4 Bit Gray Code Encoder


This encoder is a bit different in that you need four sensors to read it. Each "ring" (spaced .25" center to center on the 2" version) represents one of four bits and there are 16 unique combinations of light and dark in those rings every 22.5. There is also a small dot at the center line so you can read the position at that point. The 4 bit codes go (counter clockwise assuming the outer ring as the MSB):

Position Code
0 0000
1 0001
2 0011
3 0010
4 0110
5 0111
6 0101
7 0100
8 1100
9 1101
10 1111
11 1110
12 1010
13 1011
14 1001
15 1000

 The cool property of Gray codes are that they only change one bit between positions so you can always know exactly where you are and when you are between two spots you can know that as well.

This encoder is useful for absolute positioning requirements like you might do on an arm or a robot joint.

The image above is being shrunk by your browser to be 100 pixels across, its native resolution is 600 pixels so if you print it on a 600 DPI laser printer it will be a 1" encoder and at 300 DPI a 2" encoder.

Return to Encoders