Why use an Optical Quadrature Encoder for a Motor Encoder ?

What is the purpose of an Optical Quadrature Encoder on the back of a motor?  Incremental Optical Encoders will often provide commutation “Hall signals” for timing of the BLDC windings, but I am going to forgo that discussion and turn instead to the Incremental Encoder channels, specifically A and B encoder signals.

When using encoder incremental channels, their signals are in “quadrature”, where one channel is shifted by 90 electrical degrees from the other.   Most people are familiar with mechanical degrees, and the idea that there are 360 of these in a circle.   Electrical degrees are much along those lines in that there are 360 electrical degrees in each pulse encoder cycle. For an incremental quadrature encoder a cycle is the duration of one high and one low pulse as can be seen in the encoder pic below:

One of an encoder pulse (either High or low) is nominally 180 electrical degrees in duration, as seen below:

The edge separation for an Optical Quadrature Encoder  (Motor Encoder) between any two adjacent edges is ideally 90 electrical degrees   Since there are four 90 degree periods in a standard 360 electrical degree cycle, this amount of separation is referred to as being in quadrature.

Why set up the Incremental optical encoder signals into quadrature?  The reason is to give us rotational directional information.  If we take either channel A or  channel B and count how many of the pulses have occurred, it tells us how far we have gone in distance.   If we were to compare that against a certain amount of time we can tell us how fast we are going (RPM for example), but it takes BOTH signals to tell us the direction in which the encoder shaft is rotating.

We are able to tell direction by finding which optical encoder channel transitions from low to high first.  We do this by finding the point at which both signals are low, then look for the next rising edge.

If the shaft on the rotary encoder is spinning in the opposite direction the relationship between these two optical encoder channels is reversed.

I have purposely ignored the third encoder channel which is the index pulse (also called Marker, I, or Z)  I have a previous post on that topic here.