Encoders
Saturday, June 7th, 2008�
Â
Encoder may be implemented using variety of technologies:
- Conductive wily tracks. A series of copper pads etched
onto a PCB is used to encode the information. This form of
encoder is now rarely seen. - Optical. This uses a light shining onto a
photodiode through slits in a metal or glass disc.
Reflective versions also exist. This is one of the most
common technologies. - Magnetic. Strips of magnetized material are placed on
the rotating disc and are sensed by a
Hall-effect sensor or
magneto resistive sensor. Hall effect sensors are also
used to sense
gear teeth directly, without the need for a separate
encoder disc.
Incremental rotary encoder
An incremental rotary encoder also known as a relative rotary
encoder or a quadrate encoder, has two outputs called quadrate outputs. They can be either mechanical or optical. In
the optical type there are two gray coded tracks, while the
mechanical type has two contacts that are actuated by cams on
the rotating shaft. The mechanical types requires denouncing and
are typically used as digital potentiometers on equipment
including consumer devices. Most modern home and car stereos use
mechanical rotary encoders for volume. Due to the fact the
mechanical switches require denouncing, the mechanical type are
limited in the rotational speeds they can handle. The
incremental rotary encoder is the most widely used of all rotary
encoders due to its low cost: only two sensors are required.
The fact that incremental encoders use only two sensors does
not compromise their accuracy. One can find in the market
incremental encoders with up to 10,000 counts per revolution, or
more.
There can be an optional third output: reference, which
happens once every turn. This is used when there is the need of
an absolute reference, such as positioning systems.
The optical type is used when higher RPM’s are encountered or
a higher degree of precision is required.
Incremental encoders are used to track motion and can be used
to determine position and velocity. This can be either linear or
rotary motion. Because the direction can be determined, very
accurate measurements can be made.
They employ two outputs called A & B which are called
quadrate outputs as they are 90 degrees out of phase.
The state diagram:
| Phase | A | B |
|---|---|---|
| 1 | 1 | 0 |
| 2 | 1 | 1 |
| 3 | 0 | 1 |
| 4 | 0 | 0 |
Â
| Phase | A | B |
|---|---|---|
| 1 | 0 | 0 |
| 2 | 0 | 1 |
| 3 | 1 | 1 |
| 4 | 1 | 0 |
Â

all that the quadrate term means. These signals are decoded to
produce a count up pulse or a count down pulse. For decoding in
software, the A & B outputs are read by software, either via an
interrupt on any edge or polling, and the above table is used to
decode the direction. For example if the last value was 00 and
the current value is 01, the device has moved one half step in
the clockwise direction. The mechanical types would be denounced
first by requiring that the same (valid) value be read a certain
number of times before recognizing a state change.If the
encoder is turning too fast, an invalid transition may occur,
such as 00->11. There is no way to know which way the encoder
turned; if it was 00->01->11, or 00->10->11.
If the encoder is turning even faster, a backward count may
occur. Example: consider the 00->01->11->10 transition (3 steps
forward). If the encoder is turning too fast, the system might
read only the 00 and then the 10, which yields a 00->10
transition (1 step backward).
Rotary sensors with a single output are not encoders and
cannot sense direction, but can sense RPM. They are thus called
tachometer sensors.
This same principle is used in old ball mice to track whether
the mouse is moving to the right/left or forward/backward.
A variation on the Incremental encoder is the Sine wave
Encoder. Instead of produce two quadrate square waves, the
outputs are quadrate sine waves (a Sine and a Cosine). By
performing an Atan function, arbitrary levels of resolution can
be achieved.
Â
Â
Â
Â