MicroJPM
KY-040 Keyes Rotary Encoder - (AD835)
KY-040 Keyes Rotary Encoder - (AD835)
Couldn't load pickup availability
Description:
The Keyes KY-040 rotary encoder is a rotary input device (as in a knob) that provides an indication of how far the knob has been turned and in which direction it is turning.
It's a great device for controlling stepper motors and servos. It could also be used to control devices like digital potentiometers.
How does it work?
A rotary encoder has a fixed number of positions per revolution. These positions are easily measured by small "clicks" as the encoder rotates. This Keyes module has 30 of these positions.
On one side of the switch are three pins. These are usually labeled A, B, and C. In the case of the KY-040, they are oriented as shown.
Inside the encoder are two switches. One switch connects pin A to pin C, and the other connects pin B to pin C. In each encoder position, both switches are either open or closed. Each click causes these switches to change states as follows:
If both switches are closed, turning the encoder right or left one position will cause both switches to open.
If both switches are open, turning the encoder right or left one position will cause both switches to close.
The following illustration is representative of how the switch is constructed:
As you can see, the angular position of terminal A and terminal B is such that:
Turning the knob to the right will cause the A and C connection switches to change state first.
Turning the knob to the left will cause the connection switches B and C to change state first.
If we were to represent the opening and closing of the switches as waveforms, it would look something like this:
Share
