Skip to main content

Options Abound when Selecting a Sensor for Motor Feedback

By Bill Schweber, Mouser Electronics

In many motion-control applications, it is necessary to know the position, speed and perhaps even acceleration of a motor's rotor or its load. Depending on the application and design specifics, the motor controller may need to know these parameters precisely, approximately, or perhaps not at all. By knowing the motor situation and rotor status, the motor controller has a closed-loop scenario, Figure 1.

In many motor management and control applications, real-time details of the position and/or speed of the rotor, provided by a sensor assembly, is critical for effective closed-loop feedback and thus accurate performance on the objectives. Source: Bill Schweber

 

Figure 1: In many motor management and control applications, real-time details of the position and/or speed of the rotor, provided by a sensor assembly, is critical for effective closed-loop feedback and thus accurate performance on the objectives. Source: Bill Schweber

Of course, a motor's speed, position, and acceleration are closely linked. Because speed is the derivative (time rate of change) of position, and acceleration is the derivative of speed, it is possible to determine all three factors, even when knowing just one of them (also note the complement: speed is the integral of acceleration, and position is the integral of speed).

However, in practice, this method of determining associated parameters is often (but not always) inadequate due to resolution and noise. For example, knowing the rotor has completed another revolution tells you about all three variables but with very low and usually unacceptable resolution. Depending on the application, the resolution and accuracy needed can range from rough to moderate to precise. A CNC machine tool needs precise rotor information, an automobile power-window controller can accept approximate data, and a clothes washer or dryer will be satisfied with only coarse information.

Closing the loop

For sensing the rotor position or motion, the most common options are resolvers, optical or capacitive encoders and Hall-effect devices, in roughly descending order of precision, resolution and cost. These sensors are very different in their physical design, implementation and electrical interface, so users must understand what is needed, what the best choice is in a given application, and how they will interface the sensor to the circuitry of the controller.

Incremental encoders (used when only relative position is needed, or cost is an issue) are typically used with AC induction motors. In contrast, absolute encoders (which give a different binary output at each position, so shaft position is absolutely determined) are often paired with permanent-magnet brushless motors in servo applications. The application, of course, is the primary factor that determines if incremental or absolute information is needed.

While most motor control is now done via a digital control loop, the sensor signal itself is either all-analog and needs to be digitized, or is a digital signal but with voltages and other attributes that make it incompatible with standard digital circuitry. While some of the feedback sensors are offered with "raw" outputs that can be tailored as preferred, many also have conditioned, ready-to-interface outputs that are compatible with standard I/O ports, formats, and protocols.

Although more resolution may seem like a good idea, it may not be so in practice. Too much of an apparently good thing—resolution—can slow a system by requiring extra processing of information that is not needed or useful, so limiting resolution to the minimum needed is a good idea.

"I hereby resolve…"

Resolvers are extremely accurate, rugged, absolute transducers of position. They are based on fundamental transformer principles, with one primary winding plus two secondary windings, which are oriented in quadrature (90°) with respect to each other, Figure 2. The effective turns ratio and polarity between the primary and secondary windings varies depending on the angle of the shaft. The primary is excited with a reference AC waveform at constant frequency, which can range from 50/60 Hz to several hundred kHz, and the outputs of the secondary windings will be out of phase due to their physical placement. The peak voltages of the secondaries will vary as the shaft rotates, and will be proportional to the shaft angle. By demodulating these outputs using the primary signal as a reference, the resolver circuitry can provide a high-resolution readout of the shaft angle.

The resolver uses a primary winding and a pair of secondary windings in quadrature to assess the angle; it requires AC excitation and demodulation but is accurate, rugged and provides absolute position information on power up. (Image: Analog Devices, Inc.)

 

Figure 2: The resolver uses a primary winding and a pair of secondary windings in quadrature to assess the angle; it requires AC excitation and demodulation but is accurate, rugged and provides absolute position information on power up. (Image: Analog Devices, Inc.)

The resolver is not only accurate, but it is also rugged. There is no physical contact between primary and secondary sides, no separate brushes or bearings in addition to those at the motor itself, no points of friction that will cause parts to wear out, and there is no opportunity for contaminants (such as oil) to interfere with operating. Resolvers are used extensively in extremely challenging situations, such as angle measurement in military guns, because of their mechanical ruggedness and performance.

However, resolvers tend to be large and relatively costly compared to alternatives, and require a relatively large amount of power, which is often unacceptable in low-power applications. They also require relatively complex circuitry for generation and demodulation of the AC waveforms, although this is much less of an impediment with modern ICs. They provide absolute position indication on "power up" and do not require any motion to index or determine the initial angle. This feature is a "must have" in some situations and a "don't care" in others, of course.

Encoding for position, not for data

An optical encoder (the term "encoder" here is unrelated to encoding of digital data) in an incremental position readout, which uses a light source (LED), two photosensors in quadrature and a glass or plastic disk between them, Figure 3. The disk has fine etched lines radiating from its center, and as it rotates the sensors see patterns of light and dark.

The number of lines on the disk and some other techniques determines the resolution, which is typically 1,024, 2,048 or even as high as 4,096 counts per revolution. Unlike the transformer-like resolver, the optical encoder was not a mass-market device until the development of long-life LEDs and efficient photosensors.

The optical encoder has a light source, quadrature light sensors and an interposed disk with lines; it is small, low power, very easy to interface to circuitry, and can provide excellent performance. (Image: National Programme on Technology Enhanced Lea Learning (NPTEL), a project funded by the Government of India)

 

Figure 3: The optical encoder has a light source, quadrature light sensors and an interposed disk with lines; it is small, low power, very easy to interface to circuitry, and can provide excellent performance. (Image: National Programme on Technology Enhanced Lea Learning (NPTEL), a project funded by the Government of India)

The physical arrangement of the sensors lets the encoder determine the direction of rotation. A basic circuit translates the pulse trains from the two sensors (called A/B outputs) into a pair of bit streams indicating both motion and direction, Figure 4.

The A/B quadrature and index outputs of the optical encoder are compatible with many interfaces and motion-control processor I/O ports. Source: Bill Schweber

 

Figure 4: The A/B quadrature and index outputs of the optical encoder are compatible with many interfaces and motion-control processor I/O ports. Source: Bill Schweber

However, the encoder is an incremental, not absolute, indicator of motion. In order to determine absolute position, most encoders add a third track and photosensor as an indicator "zero reference track"; the shaft must rotate enough to pass the zero reference position for this to signal. There are ways to add true relative position readout to an optical encoder, but these add complexity to the unit.

Optical encoders offer very good resolution, but they are not as rugged as resolvers. Dirt can interfere with the optical path and the encoder disk can get dirty. However their performance is more than adequate for many applications, and they are small, lightweight, low power, easy to interface and low cost.

Typical optical encoders for motor and rotation applications are the similar HEDS-9000 and HEDS-9100 two-channel modules from Avago Technologies (Broadcom). These high-performance, low-cost modules consist of an LED source with lens and a detector IC enclosed in a small, C-shaped plastic package, along with drive and interface electronics, Figure 5. They have a highly collimated light source and special photodetector physical arrangement, so they are very tolerant of mounting misalignment.

The Avago HEDS-9000 and HEDS-9100 two-channel modules offer small size and mounting flexibility; the interposed optical disk is ordered separately with the desired resolution of counts per revolution. (Image: Avago Technologies/Broadcom)r

 

Figure 5: The Avago HEDS-9000 and HEDS-9100 two-channel modules offer small size and mounting flexibility; the interposed optical disk is ordered separately with the desired resolution of counts per revolution. (Image: Avago Technologies/Broadcom)

Note that the disk, called the code wheel, is purchased separately, with resolution of 500 CPR and 1,000 CPR for the HEDS-9000, and between 96 CPR and 512 CPR for the HEDS-9100. The modules provide two channels of TTL-compatible A and B digital outputs and require a single 5-V supply, Figure 6.

The Avago optical encoders include an aligned arrangement of physical elements and also internal electronics. (Image: Avago Technologies/Broadcom)

 

Figure 6: The Avago HEDS-9000 and HEDS-9100 two-channel modules offer small size and mounting flexibility; the interposed optical disk is ordered separately with the desired resolution of counts per revolution. (Image: Avago Technologies/Broadcom)

There is an alternative to the optical encoder, based on capacitive principles instead of optical ones, as illustrated by the CUI AMT10 Series, Figure 7. These encoders offer a range of rugged, high-accuracy, modular units available in incremental and absolute versions, with up to 12-bit (4,096 count) resolution selectable by the user from among 16 values via a four-position DIP switch. The CMOS-compatible A/B quadrature outputs of these units are reported via a standard SPI interface.

The CUI AMT10 capacitive encoder may look like an optical encoder from the outside, but the underlying operating principle is very different. (Image: CUI, Inc.)

 

Figure 7: The CUI AMT10 capacitive encoder may look like an optical encoder from the outside, but the underlying operating principle is very different. (Image: CUI, Inc.)

Unlike optical encoders, the CUI AMT devices use a repeating, etched pattern of conductors on the moving and non-moving parts of the encoder. As the encoder rotates, the relative capacitance between the two parts increases and decreases, and this change in capacitance is sensed, somewhat analogous to the outputs of the phototransistors in an optical encoder. Dirt and other contaminants have little detrimental effect here.

Keep in mind that a resolver or encoder is also a mechanical device with mounting considerations as well as electrical compatibility requirements. To minimize stocking and inventory issues, CUI offers the AMT10 series with a broad range of sleeves, covers and mounting bases, Figure 8, so the same basic encoder can be used across a wide range of shaft diameters and installations.

In practice, a wide range of shaft and mounting situations must be addressed by the encoder; CUI offers a full set of color-coded sleeves and other accessories so that a single encoder can serve many applications. (Image: CUI, Inc.)

 

Figure 8: In practice, a wide range of shaft and mounting situations must be addressed by the encoder; CUI offers a full set of color-coded sleeves and other accessories so that a single encoder can serve many applications. (Image: CUI, Inc.)

Resolvers and encoders can produce basic readouts with resolution as high as 1/100 of a degree (0.6 arc minutes) or better, but accuracy is not the same as the resolution (again, some applications are more concerned with one of these than the other). Regardless of whether the design uses a resolver or encoder, there are error sources due to temperature, speed of tracking of changes, undesired phase shifts, and other factors. However, vendors of these units have devised ways to eliminate, cancel, or compensate for many of these shortcomings, often by using IC-based circuitry between the raw sensor output and the conditioned output that goes to the system controller.

Hall-effect devices come on strong

There is another class of encoding or sensor device also based on a timeworn principle, but which requires modern semiconductor electronics and packaging to become widely affordable, available and effective. Further, the critical interface circuitry, which can make use of the minuscule voltage and easily interface it to a system, is now available on-chip, further simplifying the use of this technology. Hall-effect devices can be used to sense current flow through a conductor that is part of the sensor, or the presence or absence of a nearby magnetic field.

What we know as the Hall effect was discovered by Edwin Hall in 1879: a potential difference—the Hall voltage—is produced across an electrical conductor, at right angles to an electric current in the conductor and a magnetic field perpendicular to the current, Figure 9.

The principle of the Hall-effect device involves current, voltage and magnetic fields orthogonal to each other. (Image: National Programme on Technology Enhanced Learning (NPTEL), a project funded by the Government of India)

 

Figure 9: The principle of the Hall-effect device involves current, voltage and magnetic fields orthogonal to each other. (Image: National Programme on Technology Enhanced Learning (NPTEL), a project funded by the Government of India)

Some Hall-effect sensors go far beyond incorporating only the sensor element itself. The Melexis MLX90367 Triaxis position sensor is a monolithic absolute sensor IC sensitive to the flux density applied orthogonally and parallel to the IC surface. It is sensitive to the three components of the flux density, which allows the MLX90367 (with the correct magnetic circuit) to decode the absolute position of any moving magnet (such as a rotary position from 0 to 360°).

Internally this 12-bit resolution device includes on-chip signal processing, with a microcontroller and DSP, Figure 10, so it can perform needed calculations plus corrections for inherent nonlinearities and more, Figure 11. It also supports a wide range of user-selectable functions and features, and a variety of output formats, including an advanced format with built-in error correction called SENT (SAE J2716-2010), which is widely used in automotive applications.

The Melexis MLX90367 is much more than just a Hall-effect sensor; it includes an amplifier, digitizer, processor, firmware and I/O. (Image: Melexis N.V)

 

Figure 10: The Melexis MLX90367 is much more than just a Hall-effect sensor; it includes an amplifier, digitizer, processor, firmware and I/O. (Image: Melexis N.V)

The processing capabilities in the MLX90367 allow it to significantly improve performance by correcting some avoidable errors in the linearity of the basic Hall-effect transducer. (Image: Melexis N.V)

 

Figure 11: The processing capabilities in the MLX90367 allow it to significantly improve performance by correcting some avoidable errors in the linearity of the basic Hall-effect transducer. (Image: Melexis N.V)

Most Hall-effect magnetic encoders use a wheel attached to the motor shaft, and the wheel has a set of magnetized north and south poles around its perimeter; it is the magnetic analogy to the optical encoder slotted wheel. The wheel is usually made from an injection-molded ferrite embedded with the pole array. A typical wheel is magnetized with 32 poles (16 north and 16 south), so the resolution is far less than for an optical encoder or resolver, but is often enough for many situations. A typical installation has three Hall-effect sensors, spaced 120° apart electrically, to sense commutation of the wheel.

Summary

Designers who must sense motor position, speed, or acceleration have a wide variety of options covering the many key parameters and performance attributes. Resolvers, optical and capacitive encoders, and Hall-effect devices all have long and proven track records, plus extensive support via applications know-how.

The choice may be driven by one overriding factor—such as ruggedness or low power—or by traditional and customary use in a given situation. Once the basic technology to be used is decided, there are still many viable vendors and parts from each, so the decision on a specific device may take some research to better understand the tradeoffs.


References

  1. http://www.mouser.com/applications/robots-go-all-electric/
  2. http://www.mouser.com/applications/stepper-motors-smart-drivers/
  3. http://www.mouser.com/applications/resolver-encoder-motor-control/
  4. http://www.mouser.com/applications/considerations-choosing-advance-robotics/
  5. http://www.mouser.com/applications/industrial_vector_drive/
  6. http://www.mouser.com/applications/industrial_motor_control_overview/

 

Empowering Innovation Together - Project First Responders
 

About the Author

Bill Schweber is a contributing writer for Mouser Electronics and an electronics engineer who has written three textbooks on electronic communications systems, as well as hundreds of technical articles, opinion columns, and product features. In past roles, he worked as a technical web-site manager for multiple topic-specific sites for EE Times, as well as both the Executive Editor and Analog Editor at EDN. At Analog Devices, Inc. (a leading vendor of analog and mixed-signal ICs), Bill was in marketing communications (public relations); as a result, he has been on both sides of the technical PR function, presenting company products, stories, and messages to the media and also as the recipient of these. Prior to the MarCom role at Analog, Bill was associate editor of their respected technical journal, and also worked in their product marketing and applications engineering groups. Before those roles, Bill was at Instron Corp., doing hands-on analog- and power-circuit design and systems integration for materials-testing machine controls. He has an MSEE (Univ. of Mass) and BSEE (Columbia Univ.), is a Registered Professional Engineer, and holds an Advanced Class amateur radio license. Bill has also planned, written, and presented on-line courses on a variety of engineering topics, including MOSFET basics, ADC selection, and driving LEDs.