## Incremental encoder

4 posts / 0 new
Author
Message

Hi,

I'm new to the microcontroller programming, and I have to do some work for school, regulating dc motor speed.

Actually, I have a question about incremental encoder. Can someone explain me how to measure rotational speed by counting pulses from encoder.

I don't know yet what resolution will my encoder have, but can you give me a general idea how to measure speed.

* Moved to a more appropriate forum. Moderator*

Last Edited: Sat. Jan 2, 2016 - 09:30 PM

Micro94 wrote:

Hi,

I'm new to the microcontroller programming, and I have to do some work for school, regulating dc motor speed.

Actually, I have a question about incremental encoder. Can someone explain me how to measure rotational speed by counting pulses from encoder.

I don't know yet what resolution will my encoder have, but can you give me a general idea how to measure speed.

You would count how many pulses you get in a fixed, known amount of time. OR you would accurately measure the amount of time between pulses, both of which will tell you how fast the pulses are coming, from which you can calculate RPM or whatever.

SpiderKenny
@spiderelectron
www.spider-e.com

Micro94 wrote:

Can someone explain me how to measure rotational speed by counting pulses from encoder.

I don't know yet what resolution will my encoder have, but can you give me a general idea how to measure speed.

The answer is in the dimensions: Rotational Speed is revolutions/time, and encoders have some known Pulses per revolution

You will need to find that PPR number early.

Next, you need to decide how often you need this value updated and what precision you need to have on the Rotational Speed result, and what Rotational Speed range you need to cover.

Encoders can have phase-wobble within a revolution, so a general rule is to ideally measure over some whole number of revolutions.

There are natural physical limits, if you have 16ppr, and want a 100ms update rate, you cannot go below 10 revs/sec with the > 1 rev per sample rule.

You can measure the time between pulses, and use divide, and now 100ms can get to 0.625 revs/sec, but encoder quality matter more.

If you need low speeds, and good precision with rapid updates, you need many pulses/rev from a good quality encoder.