# How an absolute encoder works – Binary

June 30, 2009 Leave a comment

Quantum Devices offers an 8 bit absolute encoder. Unlike incremental encoders that output a train of serial pulses, an absolute encoder provides a parallel data output as wide as the number of bits.

A QD-787 8 bit absolute encoder has eight data lines. Each data line has a different binary “weight” allowing us to define 256 unique positions in rotation.

Below is a map of the binary pulse train coming out of each data line over one full rotation on a single turn absolute encoder.

The numbers on the left hand side of the signals indicate the value or weight that particular data line carries. Off to the right we see LSB and MSB, which stand for “Least Significant Bit,” and “Most Significant Bit”. If the data line is low that bit is counted as a zero. If the data line is high the bit is counted as a one.

Electrically this means that the wire or pin that corresponds to that bit will be at zero volts when low and at five volts when high.

Lets take a look at the first three bits to see how this works:

The Blue line represents the real world position of the encoder. We will move the line to the right over the next few illustrations to represents encoder rotation.

I am starting at the zero position for ease of explanation. In reality, the position at which any encoder would “wake up” is arbitrary. This is in fact the main benefit of an absolute encoder. If encoder power is lost, position information is retained, and known instantly on power up.

At the start all of the data lines are low giving us a value of zero for each bit.

You can see by the math that we multiply the value of the data line by it’s weight, or significance.

As we rotate the first 1/256th of the way around, our encoder see’s the LSB go high giving us a “one” for the first bit.

Rotating another 1/256th of the way causes the first bit to fall low and the second bit to go high. Notice that as we progress through the significance of bits each bit carries twice the weight of the one before it.

Turning yet another 1/256th of the way around we see the first bit again goes high, but the second bit stays high as well. We add the value of the two data lines together to get a number that is meaningful to us. “3” is more universally understood than a binary “110”.

As we rotate, our encoder continues to count. This time the first two bits turn off and the third bit valued at “four” turns on.

We are a little over 7 degrees into our rotation and the encoder is at a count of five. Each count represents 1.40625 degrees (360 degrees/256 counts) .

Rotating 8.4375 degrees in is a binary 011, or a value of Six.

In the final position of our three bit example, all bits are high giving us a value of seven. In an eight bit encoder this 0 through 7 bit pattern repeats 45 times for these three bits over one rotation.

Absolute encoders are specified by the number of bits, the direction in which their count increments or decrements and the output bit pattern. Here we have covered Binary, but Absolute encoders can also output gray code.

Gray code is a binary like pattern that only allows one bit to change at a time. This makes it easier to check for errors in the count. It is a large enough topic that I will table it for discussion in a future post.