52
Lesson 19 Rotary Encoder
Introduction
A rotary encoder is an electro-mechanical device that converts the angular position or
motion of a shaft or axle to an analog or digital code. Rotary encoders are usually placed
at the side which is perpendicular to the shaft. Rotary encoders act as sensors for detecting
angle, speed, length, position and acceleration in automation field.
Components
- 1 * SunFounder Uno board
- 1 * USB data cable
- 1 * Rotary Encoder module
- Jumper wires
Experimental Principle
There are mainly two types of rotary encoder: absolute and incremental (relative) ones. The
output of absolute encoders indicates the current position of the shaft, making them angle
transducers. The output of incremental encoders provides information about the motion of
the shaft, which is typically further processed elsewhere into information such as speed,
distance, and position.
In this experiment, we will use the latter. An incremental encoder is a rotary sensor to turn
rotational displacement into a series of digital pulse signals which are then used to control
the angular displacement. It generates two-phase square waves whose phase difference is
90°. Usually the two-phase square waves are called channel A and channel B. See the
following figure for details.
SunFounder