Charalampos Andrianakis writes:
The idea of explaining here how a rotary encoder works began from the need to use a rotary encoder myself for adjusting a PWM which drives a DC motor. So i started looking for how a rotary works. When i understood how it works i thought that it could be a good idea to show you and explain what i learned.
Anyone who has worked on circuits before has used an analog potentiometer. If you are new in electronics here is a quick explanation of what a potentiometer is. In a few words a potentiometer is a varying resistor which value changes by turning the knob. By the Ohm Law V=I*R implies that it can be used for voltage or current adjustments. An example of potentiometers use is in front panels for varying values e.g in a work bench power supply to adjust the voltage or the current.
Well the potentiometers have some disadvantage.
- Produce noise at knob turn over the uses or if dust has passed in.
- They are not that accurate.
- To use them in a digital circuit you have to use an Analog To Digital converter.
On the other hand Rotary Encoder.
- There is no noise production (if you use the appropriate capacitors).
- They are accurate (they have steps).
- There is no need of a digital to analog converter.
3-pin Rotary Encoder How to - [Link]