Specification:
Type: KY-040 Rotary Decoder Encoder
Operating Voltage: 5V
One round number of pulse: 20
Width: 19mm
Length: 30mm
Height: 28mm
Material of Knob Cap: Aluminium Alloy
Diameter of Knob Cap: 14mm
Height of Knob Cap: 17mm
Package includes: 2 x KY-040 Rotary Decoder Encoder
Pin description:
CLK - equivalent to output A in regular encoder.
DT - equivalent to output B in regular encoder.
GND - equivalent to output C in regular encoder.
SW - reset switch.
+ (VCC) - positive supply to the unit.
The KY-040 rotary encoder is a 360 degree rotary input device (i.e. a control knob) that provides an indication of how much the knob has been rotated AND which direction it is rotating in.
It is a great device for stepper and servo motor control. You can also use it to control devices like digital potentiometers. It is ideal for navigating menus on a display or taking inputs such as numbers or text characters. The range of input can be easily defined and mapped in software. A push button switch is built into this encoder.
If you push on the shaft, the normally open switch "SW" will close. This can be used as an On/Off switch, to change control functions, ranges, selecting a menu item or entering a number. The "D" shaft of the encoder can be fitted with a knob for using it in a product.