Troubleshooting Your Rotary Encoder

  • 2-4 hours
  • Advanced

A rotary encoder is a device that has a shaft and an end that rotates in different axis. It can show you the shaft's absolute position or its relative positioning. The most common type of rotary encoder is that within a computer mouse. The small ball on the bottom of the mouse is a rotary encoder that works through the use of binary codes to show the placement of the cursor on the screen. When the rotary encoder is not working properly there are some troubleshooting tips you can follow to fix the problem yourself.

Check Binary Codes

An absolute position rotary encoder will have a binary code that consists of four different outputs. This type of output is very symmetrical and orderly. The relative position rotary encoder sends its output through a square sine wave through both of the wires. Check these codes to make sure that they are operating to the specifications.

Is Positioning Crossed?

In the binary code of the relative positioning rotary encoder the OUT 1 code will have a distinct configuration in order for a higher resolution, and responsive position. Check to make sure that the pulse in the OUT 2 starts when the OUT 1 is high for a clockwise direction. The OUT 1 will be in the low position for a counter clockwise direction. If you do not see these things happening during the binary code check, the positioning is crossed.

Timing of Encoder is Off

Another problem that is common to rotary encoders is that the timing will be off. We have all used a mouse and the cursor does not match up with the movement of the mouse. When this happens you must determine whether or not there are enough pulses coming through the encoder to move the cursor. This might need to be changed, or cleaned.

Encoder is Stuck

When the rotary encoder is in an open environment there is the tendency for some dirt and dust to accumulate around the actual physical shaft. When this happens it should be cleaned out. If you can take apart the piece, use a small shop vac to suck up the particles. If not, then a small pointed object, with a cloth on the end, will work to free the encoder.

The Position is Not Calibrated Correctly

There is going to be either a square wave or a sine wave that the rotary encoder uses to send the pulses back for an output. These waves may be on different pulse sequences. For example, if the output of the A=0 and B=1, then the encoder is moving in a clockwise position. If the numbers are larger, or fluctuate wildly, the encoder needs to be recalibrated.

Noise Interference

Another problem with a rotary encoder is that of noise interference. To improve the noise immunity make sure that there are no other electrical motors nearby. Each of the encoder wires should also be shielded and grounded with the right terminals. Check the attachment of the wires to make sure that there can be no noise interference. Also, the channels for each of the pulses should be separated.