Rotary Encoder Pinout is an electro-mechanical instrument that converts rotational motion into analog or digital information. Apparently, it seems like a potentiometer however it has turning capability in both clockwise as well as counter-clockwise directions up to an infinite extent. In this article, we will see Arduino rotary encoder wiring.
Rotary encoder Pinout is of several types. Two main types include relative (incremental) and absolute encoders. The output of the absolute encoder is a value proportional to the current shaft angle while the incremental encoder’s output is a step of the shaft and its direction.
The rotary encoder has 5 pins; three of them are on the encoder side while two are on the click button side.
The two (1 & 2) pins are actually pushed buttons where 1 is grounded and 2 acts as a switch while on the encoder side the corner pins (3 & 5) are connected to the Arduino board whereas the middle pin of the encoder is grounded.
However, when the rotary encoder is mounted on the breakout board, all five pins are available on the same side. The pictorial comparison is given below.
Arduino rotary encoder wiring is the most important of this, therefore we have shown below rotary encoder pinout wiring clearly to easily understand wiring: