Rotary encoder can be used for several application such as digital volume control, DC motor position sensor, etc. Rotary encoder is an electro-mechanical device that converts the angular position to an analog or digital code.
There are two type of rotary encoder: absolute and incremental. Absolute rotary encoder produce unique digital code for each distinct angle of the shaft. Incremental rotary encoder produce two square waves usually in quadrature output (channel A and B). The quadrature means that the output pulses of channel A and B are 90 degree out of phase.