• Font Size:
  • A
  • A
  • A

Motion Control Resources

How to Select the Right Encoder for Your Motion Axis

by Kristin Lewotsky, Contributing Editor
Motion Control & Motor Association

Editor’s Note: For more information on specifying encoders, register for our free webinar.

Feedback plays an essential role in motion control. Servomotors and, increasingly, stepper motors leverage encoder feedback for precise control of both speed and position. An encoder is a transducer that converts the motion of an object being tracked, such as the motor shaft or load, into analog or digital output corresponding to speed or position. Encoders are effective feedback devices, but only when properly specified for the application and conditions at hand. Here, we review the process for choosing the optimal encoder, step-by-step. For a more detailed tutorial on encoder technology, see Understanding  Encoders.

Things to Know About the Application

Specifying an encoder starts with the needs of the application. Key factors to consider include:

  • Environmental conditions, including temperatures, moisture, shock and vibration, contamination
  • Type of motion: unidirectional or bidirectional, etc.
  • Magnitude of the motion and sensitivity to re-homing
  • Mechanical design, including compliance in the system
  • Electrical requirements of drives and controllers
  • Physical configuration, including form factor, physical distance between encoder and controllers
  • Budget

Collect as much information as possible before reviewing models or calling your vendor – you want to make an informed decision.

What are the Environmental Characteristics?

The environmental conditions of the application drive the most fundamental encoder choice: type of sensor engine. The most common sensor engines are optical, magnetic, and inductive. Capacitive encoders do exist but they will not be covered in this tutorial.

Optical Encoders

How They Work: In an optical encoder, a patterned disc attached to the object being monitored (typically the motor shaft or the load) passes between a source (typically an LED) and a photodetector fixed to the body of the encoder. The patterning of the disc either chops the beam to generate a train of square wave pulses or generates a binary digital word. In either case, the control/readout uses this data to determine position, and possibly speed. In a linear optical encoder, both source and detector move with the load while the linear scale that generates the output is fixed to the frame.

Pros: Optical encoders offer the highest resolution of this class of feedback devices. As such, they can be very good for scientific and demanding industrial applications that require tracking angular position to the order of fractions of degrees.

Cons: On the downside, optical encoders are sensitive to contamination and should not be used for applications exposing them to dust, moisture, or corrosive chemicals. Optical encoders with glass code discs are vulnerable to shock and vibration. These days, mylar code discs are more commonly used and are more robust to shock and vibration.

Best Used For: Scientific applications and industrial applications with very demanding output performance.

Magnetic Encoders

How They Work: Magnetic encoders operate analogously to optical encoders. Instead of optical code discs, magnetic rotary encoders use a different structure to perturb the magnetic field, such as a toothed ferrous metal gear, or drums or discs patterned with alternating magnetic domains; linear versions use linear scales. The alternating domains create a varying magnetic field that can be detected using any of several technologies, including simple magnetic pickups, or magneto restrictive detectors that offer better high-speed performance. Alternatively, the Hall-effect sensor leverages a solid-state detector array that provides an economical, robust solution that combines high sensitivity and resolution with better tolerance of high shock loads.

Pros: Magnetic encoders can withstand extremely harsh conditions, making them a good fit for industrial applications. They can operate under water, covered with dust, and exposed to very high vibration.

Cons: Sensitive to high magnetic fields and may require shielding. Very high shock loads can demagnetize the magnetic domains, as can very high temperatures. As mentioned, Hall-effect sensors are less vulnerable to shock loads. According to traditional thinking, magnetic encoders only provide moderate resolution. Once again, Hall-effect sensors provide improved performance. For demanding applications in extremely dirty environments, a Hall-effect sensor may be the ideal choice.

Best Used For: Industrial applications with harsh environments.

Inductive Encoders

How They Work: Inductive encoders are closely related to resolvers, which are differential transformers that determine absolute angular position of a rotating load by tracking the voltages induced in a pair of “readout” coils. The primary coil is attached to the rotor and energized, while the secondary sine and secondary cosine coils are attached to the stator. Rotation of the primary coil induces current in the secondary coils. As this derivation shows, taking the arctangent of the ratio of the sine coil voltage and the cosine coil voltage yields the angle. Resolvers are extremely rugged but can be difficult to install. Inductive encoders were designed to address this drawback.

An inductive encoder is a solid-state implementation of a resolver. Instead of conventional coils, the coils are flat elements lithographically patterned onto a PCB. All three coils are on the same PCB and mounted to the stator. A conductive disk mounted to the rotor or shaft excites the coils.

Pros: Very high resolution. Robust to contamination, liquid ingress, extreme temperatures, and shock and vibration. Easier to use than resolvers and more compact, particularly eddy-current designs which use ironless thin films just 100 µm thick for the conductive disk.

Cons: Although the inductors are robust, the conductive disk can still create issues. Proper choice of the conductive disk is essential. Applications with thermal extremes should not use soft iron code discs. Ferrous or ferrite code discs may still be used in high magnetic fields but might require shielding.

Best Used For: applications with harsh conditions and high resolution/accuracy demands.

Can Your Application Handle Re-homing?

Encoders can be classed as incremental and absolute. Incremental encoders are electromechanical transducers that track incremental advances from some arbitrary home position set at start up. As a result, if they are shut down or fault out, they must be re-homed prior to operation (see figure 1). For simple applications that just need speed control on a web processing line, for example, in a package handling facility, an incremental encoder can be an economical solution.

Absolute encoders assign a unique digital word to each angular position. Because of this, the encoder can always return the angular position of the device being tracked when interrogated, even at start up. Best fits for absolute encoders include applications for which re-homing at any point in the cycle could result in damage or unsafe conditions. Examples include surgical robots, automotive robots, or interrelated mechanics or axes that could crash upon power up after a fault. In some cases, just the time spent re-homing can negatively impact productivity and justify the modest cost differential of an absolute encoder.

Code disk for an encoder and absolute encoder

Figure 1: The code disk for an incremental encoder (left) is patterned in concentric zones of alternating opaque and transparent zones to generate a stream of square wave pulses. The disk for an absolute encoder (right) is patterned to generate a unique digital word for each angular position. Each mark or slot in an absolute encoder disc corresponds to one bit of resolution. (Courtesy of Dynapar Corp.)

What Are You Trying to Measure? Position? Speed? Direction?

For this question, we will focus on incremental optical rotary encoders. (Note, incremental linear optical encoders operate analogously, as to linear and rotary incremental magnetic encoders.) The code disc of an incremental encoder is patterned with concentric zones, or channels, of closely spaced and evenly distributed lines that chop the optical beam as the disc turns. As a result, the photo current generated by the photodetector generates an analog pulse stream that gets digitized to create a square wave output representing pulses. Onboard electronics can convert the pulse stream into counts, but the the readout or control device must perform further processing to return position and/or speed.

If the system only needs to track unidirectional rotation or monitor speed, a code disc with one channel, along with a single-pulse index channel for homing or tracking multi-turn motion, is sufficient. The problem is that the pulse stream from a single-channel encoder looks the same whether the disc is turning clockwise or counterclockwise. Applications that need to track direction require a quadrature encoder.

In a quadrature encoder, the code disc incorporates at least two channels, the A channel and the B channel. The two are patterned 90° out of phase. This returns to signals that are 90° out of phase electrically (in quadrature). As a result, channel A goes high first, enabling the system to detect direction of motion (see figure 2).

Quadrature Encoder Channel rotation

Figure 2: In a quadrature encoder, channel A leads channel B by 90°. Because channel A goes high first, the system can always determine the direction of rotation.

Incremental encoders can also include channels for motor commutation, typically designated U and V. Although these may normally be of interest only to motor manufacturers, they could be useful for OEMs working with frameless motors.

As for the question of whether to go with a quadrature or a single-channel encoder, consider maximizing functionality. “The cost to add a full blown quadrature signal with compliments and index is very little compared to just the cost of a standard, say A pulse only,” says Jay Johnson, market product manager for motion control sensors at SICK (Minneapolis, Minnesota). “I'm always going to err on the side of caution and have all of those channels available to be used and read.”

How Much Resolution Do You Need?

Choice of resolution is probably the biggest pitfall in specifying an encoder. There’s a widespread assumption that a higher resolution encoder will automatically increase positioning accuracy and repeatability. That’s not necessarily the case. Any positioning system is limited by the mechanics. Even the highest resolution encoder will be ineffective if there is so much compliance in the system that it can’t reliably position to the level required. In the best case scenario, extra money is wasted on the encoder and the system fails to meet positioning targets. In the worst-case scenario, the axis overshoots and moves back-and-forth, hunting for the commanded position but unable to reach it. This can delay operations or even cause the axis to fault out. In such a case, the money spent on the extra resolution might have been better applied to couplings with less compliance or shafts with less wind up.

To determine resolution, start by determining the smallest detection distance required by the application. Choosing a resolution that is about four times that minimum increment is a good rule of thumb. It could be boosted up to a factor of 10 for sensitive applications. Much higher than that will most likely be useful only in a handful of cases. “It seems like the default is to just go to the highest because they think it's better,” says Johnson. “Now, it might be in a really small percentage of applications, but if you don't need the higher resolution, it can do some damage. You're getting so much feedback that it just turns into noise and it could really induce problems in the system. So again, I look back for the practical. What's the smallest amount that I really need to be able to measure? As long as my resolution is four times that number, I am probably pretty good in the real world.”

Incremental encoders are specified in terms of pulses per revolution. This refers to the number of lines patterned on the code disc. Resolution is a function of both PPR and how the signal from the photodetector is read out. The latter is referred to as decoding and depends upon what parts of the signal the system uses to trigger readout.

There are three formats typically used. Triggering off of the rising edge of channel A (1X decoding) provides a resolution equal to the PPR of the code disc (see figure 3). Triggering off of the rising and falling edges of channel A (2X decoding) provides the actual resolution of twice the PPR. Triggering off the rising and falling edges of both channel A and channel B (4X decoding) gives a resolution quadruple that of the PPR. Depending on the application, it may be a good way to boost resolution with minimum additional cost. “You should consider the flexibility that you have, knowing that you can use a multiplier of 1X, 2X, or 4X to increase resolution through software implementation versus having to either buy new components or to purchase a new encoder with a higher PPR,” says Dalsen Ferbert, applications engineer at Dynapar (Gurnee, Illinois).

Channel triggering

Figure 3: triggering on the rising edge of channel alone (top) gives a resolution equal to the PPR of the disc. Triggering on the rising and falling edge of channel A (middle) doubles the resolution. Triggering on the rising and falling edges of both channels (bottom) increases resolution of the disc PPR by a factor of four.

That said, the approach involves trade-offs. For OEMs confident of the resolution they need, a higher actual resolution rather than one generated through software may be less prone to error. “Using interpolated pulse counts by counting the leading and trailing edges can work, generally. But it is important to be conscious of the quality of the square wave edges,” says Ferbert. “If you have longer cable runs, let's say 50 feet or more and you don't have the proper line driver, the signal edges are going to become less and less pronounced.” There are techniques that can be used to reduce noise over long cable runs. This involves properly specifying the output driver to screen out noise, which is a topic we will cover next.

In part two of this article, we will discuss electrical requirements, including output drivers, communications protocols, and more.

Back to Top

Browse By Products/Services Browse Companies