Professional Documents
Culture Documents
Rotary encoder
Article Talk
A rotary encoder, also called a shaft encoder, is an electro-mechanical device that converts the angular
position or motion of a shaft or axle to analog or digital output signals.[1]
Contents
Technologies
Basic types
Absolute
Incremental
Absolute encoder
Absolute rotary encoder
A Gray code absolute rotary encoder
Construction with 13 tracks. At the top, the housing,
interrupter disk, and light source can be
Mechanical absolute encoders
seen; at the bottom the sensing element
and support components.
Optical absolute encoders
Gray encoding
Incremental encoder
Rotary (Angle) Pulse Encoder
See also
References
Further reading
External links
Technologies
Off-Axis Magnetic: This technology typically employs the use of rubber bonded ferrite magnets
attached to a metal hub. This offers flexibility in design and low cost for custom applications. Due to the
flexibility in many off axis encoder chips they can be programmed to accept any number of pole widths so
the chip can be placed in any position required for the application. Magnetic encoders operate in harsh
environments where optical encoders would fail to work.
Basic types
Absolute
An absolute encoder maintains position information when power is removed from the encoder.[5] The
position of the encoder is available immediately on applying power. The relationship between the encoder
value and the physical position of the controlled machinery is set at assembly; the system does not need to
return to a calibration point to maintain position accuracy.
An absolute encoder has multiple code rings with various binary weightings which provide a data word
representing the absolute position of the encoder within one revolution. This type of encoder is often
referred to as a parallel absolute encoder.[6]
A multi-turn absolute rotary encoder includes additional code wheels and toothed wheels. A high-resolution
wheel measures the fractional rotation, and lower-resolution geared code wheels record the number of
whole revolutions of the shaft.[7]
Incremental
Absolute encoder
Incremental encoder
Construction
Digital absolute encoders produce a unique digital code for each distinct angle of the shaft. They come in
two basic types: optical and mechanical.
A metal disc containing a set of concentric rings of openings is fixed to an insulating disc, which is rigidly
fixed to the shaft. A row of sliding contacts is fixed to a stationary object so that each contact wipes against
the metal disc at a different distance from the shaft. As the disc rotates with the shaft, some of the contacts
touch metal, while others fall in the gaps where the metal has been cut out. The metal sheet is connected to
a source of electric current, and each contact is connected to a separate electrical sensor. The metal
pattern is designed so that each possible position of the axle creates a unique binary code in which some of
the contacts are connected to the current source (i.e. switched on) and others are not (i.e. switched off).
Brush-type contacts are susceptible to wear, and consequently mechanical encoders are typically found in
low-speed applications such as manual volume or tuning controls in a radio receiver.
The optical encoder's disc is made of glass or plastic with transparent and opaque areas. A light source and
photo detector array reads the optical pattern that results from the disc's position at any one time.[8] The
Gray code is often used. This code can be read by a controlling device, such as a microprocessor or
microcontroller to determine the angle of the shaft.
The absolute analog type produces a unique dual analog code that can be translated into an absolute angle
of the shaft.
The magnetic encoder uses a series of magnetic poles (2 or more) to represent the encoder position to a
magnetic sensor (typically magneto-resistive or Hall Effect). The magnetic sensor reads the magnetic pole
positions.
This code can be read by a controlling device, such as a microprocessor or microcontroller to determine the
angle of the shaft, similar to an optical encoder.
The absolute analog type produces a unique dual analog code that can be translated into an absolute angle
of the shaft (by using a special algorithm[citation needed]).
Due to the nature of recording magnetic effects, these encoders may be optimal to use in conditions where
other types of encoders may fail due to dust or debris accumulation. Magnetic encoders are also relatively
insensitive to vibrations, minor misalignment, or shocks.
Built-in rotary encoders are used to indicate the angle of the motor shaft in permanent magnet brushless
motors, which are commonly used on CNC machines, robots, and other industrial equipment. In such cases,
the encoder serves as a feedback device that plays a vital role in proper equipment operation. Brushless
motors require electronic commutation, which often is implemented in part by using rotor magnets as a low-
resolution absolute encoder (typically six or twelve pulses per revolution). The resulting shaft angle
information is conveyed to the servo drive to enable it to energize the proper stator winding at any moment
in time.
An asymmetrical shaped disc is rotated within the encoder. This disc will change the capacitance between
two electrodes which can be measured and calculated back to an angular value.[9]
A multi-turn encoder can detect and store more than one revolution. The term absolute multi-turn encoder
is generally used if the encoder will detect movements of its shaft even if the encoder is not provided with
external power.
This type of encoder uses a battery for retaining the counts across power cycles. It uses energy conserving
electrical design to detect the movements.
These encoders use a train of gears to mechanically store the number of revolutions. The position of the
single gears is detected with one of the above-mentioned technologies.[10]
These encoders use the principle of energy harvesting to generate energy from the moving shaft. This
principle, introduced in 2007,[11] uses a Wiegand sensor to produce electricity sufficient to power the
encoder and write the turns count to non-volatile memory.[12]
In general, where there are n contacts, the number of distinct positions of the shaft is 2n. In this example, n
is 3, so there are 2³ or 8 positions.
In the above example, the contacts produce a standard binary count as the disc rotates. However, this has
the drawback that if the disc stops between two adjacent sectors, or the contacts are not perfectly aligned,
it can be impossible to determine the angle of the shaft. To illustrate this problem, consider what happens
when the shaft angle changes from 179.9° to 180.1° (from sector 3 to sector 4). At some instant, according
to the above table, the contact pattern changes from off-on-on to on-off-off. However, this is not what
happens in reality. In a practical device, the contacts are never perfectly aligned, so each switches at a
different moment. If contact 1 switches first, followed by contact 3 and then contact 2, for example, the
actual sequence of codes is:
Now look at the sectors corresponding to these codes in the table. In order, they are 3, 7, 6 and then 4. So,
from the sequence of codes produced, the shaft appears to have jumped from sector 3 to sector 7, then
gone backwards to sector 6, then backwards again to sector 4, which is where we expected to find it. In
many situations, this behaviour is undesirable and could cause the system to fail. For example, if the
encoder were used in a robot arm, the controller would think that the arm was in the wrong position, and try
to correct the error by turning it through 180°, perhaps causing damage to the arm.
Gray encoding
Gray Coding
Sector Contact 1 Contact 2 Contact 3 Angle
In this example, the transition from sector 3 to sector 4, like all other transitions, involves only one of the
contacts changing its state from on to off or vice versa. This means that the sequence of incorrect codes
shown in the previous illustration cannot happen.
If the designer moves a contact to a different angular position (but at the same distance from the center
shaft), then the corresponding "ring pattern" needs to be rotated the same angle to give the same output. If
the most significant bit (the inner ring in Figure 1) is rotated enough, it exactly matches the next ring out.
Since both rings are then identical, the inner ring can be omitted, and the sensor for that ring moved to the
remaining, identical ring (but offset at that angle from the other sensor on that ring). Those two sensors on
a single ring make a quadrature encoder with a single ring.
It is possible to arrange several sensors around a single track (ring) so that consecutive positions differ at
only a single sensor; the result is the single-track Gray code encoder.
Depending on the device and manufacturer, an absolute encoder may use any of several signal types and
communication protocols to transmit data, including parallel binary, analog signals (current or voltage), and
serial bus systems such as SSI, BiSS, Heidenhain EnDat, Sick-Stegmann Hiperface, DeviceNet, Modbus,
Profibus, CANopen and EtherCAT, which typically employ Ethernet or RS-422/RS-485 physical layers.
Incremental encoder
The rotary incremental encoder is the most widely used of all rotary
encoders due to its ability to provide real-time position information.
The measurement resolution of an incremental encoder is not limited
in any way by its two internal, incremental movement sensors; one
can find in the market incremental encoders with up to 10,000
counts per revolution, or more.
Unlike absolute encoders, an incremental encoder does not keep track of, nor do its outputs indicate the
absolute position of the mechanical system to which it is attached. Consequently, to determine the absolute
position at any particular moment, it is necessary to "track" the absolute position with an incremental
encoder interface which typically includes a bidirectional electronic counter.
Inexpensive incremental encoders are used in mechanical computer mice. Typically, two encoders are used:
one to sense left-right motion and another to sense forward-backward motion.
See also
A linear encoder is similar to a rotary encoder, but measures position or motion in a straight line, rather
than rotation. Linear encoders often use incremental encoding and are used in many machine tools.
Rotary switch
References
1. ^ Murray, Mike (15 December 2019). "How Rotary 7. ^ G. K. McMillan, D.M. Considine (ed.) Process
Encoders Work" . The Geek Pub. Retrieved 3 Instruments and Controls Handbook Fifth Edition,
September 2019. McGraw Hill 1999, ISBN 978-0-07-012582-7, page
5.26
2. ^ "New - Rotary Encoder" . Archived from the
original on 2013-10-05. Canon video camera 8. ^ "encoders" (PDF). p. 12. Retrieved 20 February
lens, used for zoom and aperture control 2013.
3. ^ "A Designer's Guide to Encoders" . digikey.com. 9. ^ "Capacitive Absolute Encoder" (PDF). Camille
19 April 2012. Retrieved 23 November 2019. Bauer. Retrieved 20 February 2013.
4. ^ "MassMind Magnetic High Speed Non-Contact 10. ^ Robert, Repas. "Multi-turn absolute encoders" .
Quadrature Encoder V2" . MassMind.org. 10 machinedesign.com. Retrieved 20 February
January 2018. Retrieved 12 July 2019. 2013.[permanent dead link]
5. ^ Eitel, Elisabeth. Basics of rotary encoders: 11. ^ "New technology yields encoder that never
Overview and new technologies | Machine Design forgets" . journal. www.motioncontrol.co.za. 2007.
Magazine, 7 May 2014. Accessed: 30 June 2014 Retrieved 20 February 2013.
6. ^ TI-5000EX Serial/Incremental Encoder Test 12. ^ "White Paper Magnetic Encoder" (PDF). FRABA
[permanent dead link]
System User Manual , Mitchell Inc. p. 3. Retrieved 13 February 2013.
Electronics, Inc.
13. ^ Collins, Danielle. "What is a sine encoder (aka
sine-cosine encoder)?" . Design World. Retrieved
19 August 2020.
Further reading
Winder, C. Farrell (October 1959). "Shaft Angle Encoders Afford High Accuracy" (PDF). Electronic
Industries. Chilton Company. 18 (10): 76–80. Retrieved 2018-01-14.
Military Handbook: Encoders - Shaft Angle To Digital (PDF). United States Department of Defense.
1991-09-30. MIL-HDBK-231A. Archived (PDF) from the original on 2020-07-25. Retrieved 2020-07-25.
(NB. Supersedes MIL-HDBK-231(AS) (1970-07-01).)
External links
"Choosing a code wheel: A detailed look at how encoders Wikimedia Commons has
work" article by Steve Trahey 2008-03-25 describes "rotary media related to Rotary
encoders.
encoders".
"Encoders provide a sense of place" article by Jack Ganssle 2005-07-19 describes "nonlinear
encoders".
"Robot Encoders" .
Revotics - Understanding Quadrature Encoding - Covers details of rotary and quadrature encoding with
a focus on robotic applications.
How Rotary Encoder Works - Video explanation how rotary encoder works, plus how to use it with an
Arduino microcontroller.