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 might 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).

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).

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, are critical for effective closed-loop feedback and thus accurate performance on the objectives. (Source: Bill Schweber)

However, in practice, this method of determining associated parameters is often (but not always) inadequate because of 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 whether incremental or absolute information is needed.

Although 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. Although 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 might seem like a good idea, it might 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.


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.)

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 Hz/60 Hz to several hundred kHz, and the outputs of the secondary windings will be out of phase because of 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 is not only accurate but is also rugged. Resolvers have 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 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.

Encoding for Position, Not Data

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)

An optical encoder (the term encoder here is unrelated to encoding of digital data) in an incremental position readout 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 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).

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)

The encoder is an incremental, not absolute, indicator of motion. 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. True relative position readout can be added 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 integrated circuit 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 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 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)

CUI AMT10 Series is an alternative to the optical encoder, based on capacitive principles instead of optical ones ( Figure 6). 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, dual in-line package (DIP) switch. The complementary metal oxide semiconductor (CMOS)-compatible A/B quadrature outputs of these units are reported via a standard serial peripheral interface (SPI).

Figure 6. The CUI AMT10 capacitive encoder might 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, so the same basic encoder can be used across a wide range of shaft diameters and installations.

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, error sources occur because of 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

Another class of encoding or sensor device is also based on a time-worn principle that requires modern semiconductor electronics and packaging to become widely affordable, available, and effective. Further, the critical interface circuitry, which can make use of the miniscule 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.

Figure 7. 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)

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 7).

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°).

Figure 8. 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)

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

Figure 9. 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.


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 can 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, many viable vendors and parts from each are available, so the decision on a specific device might take some research to better understand the tradeoffs.

This article was written by Bill Schweber for Mouser Electronics, Mansfield, TX. For more information, visit here .