HW-040 rotary encoder is a device that generates an electrical signal based on how much the
rotary input device (knob) is rotated and the direction it is rotating in. It is a position sensor with a knob and can be used to control stepper or servo motors with precision.
Working voltage: 5V
Material: PCB + Brass
Mechanical angle: 360 Degrees
Output: 2-bit gray code
Positions per revolution: 30
Size: 32 x 19 x 30mm
Pin Configuration of KY-040 Rotary Encoder
The KY-040 module has 5 output pins. Two of which are for the power of the module whereas, 3 are for the output data of the turns and direction of the knob. The table below describes the pin type and the function of each pin in the Rotary module.
|CLK||Encoder Pin A|
|DT||Encoder Pin B|
|SW||No push-button switch|
|GND||Ground(Encoder Pin C)|
1 x HW-040 rotary decoder module