What is Gray Code Encoder?

A specific type of encoders used in industry is the Gray code encoder. It is a special subdivision of absolute encoders that provides maximal accuracy with the help of Gray code.

With an absolute encoder, the entire rotation circle is divided into a certain number of sectors, most often of the same size. These sectors are numbered. The encoder, during operation, gives the number of the sector in which it is currently located. That is why it is called absolute. With this type of encoder, it is always possible to determine at what angle relative to the zero sector the encoder is rotated at a particular moment, that is, when turning, it outputs the values of the sector numbers, up to the maximum value. Then it goes back to zero. If the encoder shaft is turned in the opposite direction, then it will start giving opposite values. In particular, absolute encoders have their drawbacks that are depicted in absolutely arbitrary value. Such errors are irregular and difficult to calculate.

That problem is solved by introducing the Gray code. A feature of the Gray code is that when the encoder switches to one, the value of the Gray code also changes to one. Only one species changes. As a result, an encoder does not provide errors when changing bits in a binary system that helps to get the most precise result of measurements.