Gray Code Encoder Overview
Gray code encoders, also known as reflected binary code encoders, produce only a single bit change at each step, which can reduce encoder communication errors.
Gray code encoders are an option for serial or parallel encoder communication protocols.
Gray Code Encoder Output vs Binary Output
Parallel encoder output provides a stream of bits in quick succession. When the data is in binary format, multiple bits may change per step and in some instances, all bits may change between each read. In high speed applications, this may cause errors or complicated programming. Gray code reduces the bit change to only one data bit per measuring step at a time.
Table: Example of conversion between straight binary and gray code encoder output.
Gray Code Encoder Applications
Gray code encoder output is commonly used in high speed applications or those with large amounts of signal noise resulting in missing signal data when reading binary data. Absolute encoders with gray code are available for point to point communication protocols including parallel and SSI.
Parallel Output Encoders
Parallel output makes all output bits available simultaneously. It may be provided as straight binary or transformed into gray code to reduce errors.
The advantage of parallel output is that it’s fast: all the data is available in real time, all the time. Disadvantages include bulky (and expensive) cables and limited cable length. Most encoders come with cables a meter or two long, but a parallel output using differential output (push-pull) and shielded cabling can be extended to 100 m using a thicker cable, at a reduction in speed. Open-collector (sinking or sourcing) outputs can go roughly a third that far.
Serial Output Encoders
The alternative to parallel communication is serial. SSI requires less cabling for data transfer, the same interface hardware regardless of the absolute encoder’s resolution and less electronic components.
There are several dedicated serial buses available including SSI and BiSS, as well as standard industrial buses including DeviceNet, CAN Bus, Profibus and Interbus. Tradeoffs among these include bandwidth, update rate, hardware requirements, wire count, proprietary vs. nonproprietary nature, and availability.
Popular Gray Code Encoders