The rotary encoder is used to detect axial movement and its direction. Rotary Encoder is an incremental electro-mechanical device that converts the angular position or motion of a shaft or axle to digital code. The rotary encoder with nut has a fixed number of positions per revolution. These positions are easily felt as small “clicks” you turn the encoder. The digital output code is in form of 2-bit Gray code. Operating voltage required for the device is 5V.
There are 5 pins in this module i.e., GND, +, SW, DT and CLK. GND and + are connected to ground and positive terminal of power supply respectively. SW is an output pin and gives an output of the internal button. DT and CLK are data and clock pin as well as Contact A output and Contact B output pin respectively. Pulses per 360° rotation are 20.
This module is designed in such a way that output is low when the switches are closed and high when the switches are open. Rotary Encoder is usually used for stepper and servo motor control. It can also be used as a digital potentiometer.
(Note: Product Image are shown for illustrative purposes only and may different from the actual product)