How an Encoder Works and the Feedback Information it Provides

Mark Switzer

How an Encoder Works and the Feedback Information it Provides

Learning Series: An Introduction to Encoders

Part 1: How an Encoder Works and the Feedback Information it Provides

3.5 Minute Read

 

If you’ve read enough about encoders online, you’ll quickly notice things go vague, and any helpful information gets blurred or unpublished. The information is often contradictory, and after reading several sources, you’re left with more questions than answers.

No more blog hopping to find the information you need. This learning series is straightforward. Leaving out the nonsense and only giving practical advice. Continue reading as we explain how an encoder works and the feedback information it provides.


What You’ll Learn

How an Encoder Calculates:

  • Distance
  • Speed
  • Direction

How Does an Encoder Work?

An encoder is a feedback device that converts a shaft’s rotary or linear motion into an analog or digital output signal. We can use the signals to identify speed, direction, and distance.

Using Encoder Resolution to Calculate Distance

Think of an encoder disc as a measuring instrument. Much like a ruler, it is marked with exact segments, known as windows. The accuracy determines the quantity of these windows and is called encoder resolution. These windows are placed in two channels: Channel A and Channel B. Both channels have an equal number of windows, each matching the resolution.

Each window will produce a voltage pulse as the encoder disc travels between two electronic components. Each pulse is an increment corresponding to the defined resolution.


Encoder Resolution Terms

Resolution can range from the very low teens to the high thousands.

  1. Pulses per Revolution (PPR)
  2. Count per Rotation (CPR)


The light-emitting diode produces light, whereas the phototransistor receives light. When the LED's light beam connects with the photoreceiver, the electrical current moves into the encoder's electronic circuitry. This connection produces a pulse of voltage.

Because the windows are placed at such precise distances from each other, the user can obtain accurate distance measurements by counting the voltage pulses generated.

How to Calculate Speed of the Encoder Disc

There are two ways to determine speed when working with an encoder. Option #1 is only available when the encoder has a Z channel. If you’re working with an encoder without a Z channel  – use Option #2.


Option #1

The Z channel has a single window, producing a single voltage pulse with each encoder revolution. The greater the number of Z pulses, the greater the speed.

The pulse can be scaled in various ways, such as revolutions per minute (RPM) or inches per second (IPS). The speed annotation depends on the encoder application's requirements and specifications.


Option #2

Since we know that a specific number of pulses are produced with every encoder revolution, we can work backward and use the pulse count to indicate speed.

If an encoder produces 100 PPR, we know that 100 pulses equal one revolution. With this information, we can determine the encoder speed. For example, an encoder that has operated for one minute has produced 100,000 pulses, which indicates that it is rotating at 1000 RPM.

Using Channel Offset to Determine Direction

Note: Method only works when working with quadrature encoders

The windows that comprise channel A are offset from those that comprise channel B. This slight offset between the two channels gives us a simple yet reliable way to determine the direction of encoder movement.

When moving the encoder disc, one channel produces a pulse before another. The terms used to describe this are leading and lagging. One channel either leads or lags the other.

If A leads B, the encoder disc rotates clockwise. If B leads A, the disk rotates counterclockwise.

Up Next...

We’ve covered how an encoder works and the feedback information it provides. Part 2 will widen your knowledge of rotary encoders. Learn the similarities and differences between incremental and absolute encoders.

"Don't be a know-it-all; be a learn-it-all."
Satya Nadella - Chief Executive Officer of Microsoft
Download the Complete Guide to Rotary Encoders
The entire learning series is packaged together into one PDF file.