KY-040 Rotary Encoder Sensor Module Brick Sensor is a rotary input device (as in knob) that provides an indication of how much the knob has been rotated AND what direction it is rotating in. It’s a great device for stepper and servo motor control. You could also use it to control devices like digital potentiometers.
M274 360 rotary Degree encoder, is an incremental electro-mechanical device that converts the angular position or motion of a shaft or axle to digital code. The output of incremental encoders provides information about the motion of the shaft, which is typically further processed in processor / controllers into information such as speed, distance, and position.
Specifications and Features :
- Model : KY-040.
- Type : Incremental Encoder.
- Cycles per revolution (CPR) : 20.
- Working voltage : 0 – 5V.
- Material : PCB + Brass.
- Weight : 10 gm.
- Size : 32 x 19 x 30 mm.
How to use?
Using this rotary encoder is straight forward, we have to monitor both CLK and DT pins simultaneously. Whenever the CLK signal changes state to RISING edge or FALLING edge, DT signal’s logical state determines the direction of rotation. Each full 360 degree revolution gives 20 pulses on Clock pin.
From the image above we can deduce that,
At Falling edge of CLOCK if DT is HIGH – it indicates CW rotation, else CCW.
Package Includes :
1 x KY-040 Rotary Encoder Sensor Module