81
Lesson 12 Rotary Encoder
Introduction
A rotary encoder is an electro-mechanical device that converts the angular position or
motion of a shaft or axle to analog or digital code. Rotary encoders are usually placed at
the side which is perpendicular to the shaft. They act as sensors for detecting angle, speed,
length, position, and acceleration in automation field.
Components
- 1 * Raspberry Pi
- 1 * Breadboard
- 4 * Jumper wires (Male to Male, 2 red and 2 black)
- 1 * Network cable (or USB wireless network adapter)
- 1 * Rotary Encoder module
- 1 * 5-Pin anti-reverse cable
- 1 * T-Extension Board
- 1 * 40-Pin GPIO Cable
Experimental Principle
A rotary encoder is an electronic switch with a set of regular pulses with strictly timing
sequence. When used with IC, it can achieve increment, decrement, page turning
,
and
other operations such as mouse scrolling, menu selection, and so on.
There are mainly two types of rotary encoders: absolute and incremental (relative) encoders.
Here we use an incremental (relative) encoders.
Most rotary encoders have 5 pins with three functions of turning left & right and pressing down.
Pin 1 and pin 2 are switch wiring terminals used to press. Pin 4 is generally connected to
ground. Pin 3 and pin 5 are first connected to pull-up resistor and connect to VCC. Pin 3 and
Содержание Super Kit 3.0
Страница 7: ...4 22 RGB LED 1 23 LED red 8 24 LED white 4 25 LED green 4 26 LED yellow 4 27 NPN Transistor S8050 2 ...
Страница 30: ...27 Also we have drawn a table of the corresponding BCM wiringPi and Name of each pins ...
Страница 78: ...75 Now pull the slide and you can see the two LEDs light up alternately ...