Part 1 of this FAQ looked at the optical rotary encoder, a low-cost, high-resolution, easy-to-use sensor for indicating incremental shaft position (although it can be “upgraded” to indicate absolute position as well).
Q: What is the basic principle of the magnetic encoder?
A: The magnetic encoder uses a rotating gear made of ferrous metal and a magnetic pick-up with has a permanent magnet and a sensing element, Figure 1 and Figure 2. As the gear (or ring) rotates, the teeth “disturb” the magnetic flux of the permanent magnet, which causes the flux field to grow and shrink. The changes in that field are sensed, and the sensing element generates a corresponding digital-pulse signal output. The sensor is arranged to produce a quadrature signal pair as with optical encoders, to determine direction.
Q: What is the construction and material of the sensing element?
A: The two primary types used in encoders are Hall effect and magnetoresistive. Hall-effect sensors detect a change in voltage by magnetic deflection of electrons. Magnetoresistive sensors detect a change in resistance caused by a magnetic field. Hall-effect sensors generally have lower cost and are less precise than magnetic resistive sensors. This means that Hall-effect sensors, when used in an encoder, produce more output “jitter” or error in the signal caused by sensor variations. Also, the gear can be replaced by rugged, rubberized ring with alternating ferrous and non-ferrous zones, Figure 3.
Q: What are the attributes of the magnetic approach compared to the optical approach?
A: Magnetic encoders are less susceptible to errors or malfunction due to contamination because their sensors detect variations in magnetic fields embedded in the rotor; oil, dirt, and water do not affect these magnetic fields. They are also rugged as there is no glass disk (if that is what is used) to shatter. Finally, the magnetic approach uses a simpler bearing and so is less likely to have bearing issues or failures. Magnetic sensors can operate at higher temperatures than optical encoders. Using magnetism as the element to produce a signal yields an assembly unaffected by dust, moisture, extreme temperatures, and shock.
Q: What are the resolution and cost of the magnetic approach compared to the optical approach?
A: Resolution of the magnetic approach using gear teeth is generally lower, but using special rings with alternating sections results in comparable resolution. As with any sensor-pickup system, resolution is a function of the ability of the sensor to unambiguously detect the desired target, while not getting confused or misled by adjacent targets due to crosstalk, field overlap, or noise.
Cost of the magnetic approach is higher, so there is a relationship between cost and ruggedness. Many vendors offer both optical and magnetic encoders, so they can provide unbiased applications support as to which would be a better solution in a given application.
Q: Are there alternatives to optical and magnetic encoders?
A: Yes, there are encoders which use capacitive track-sensing principles similar to those used in digital calipers (this may seem strange, but it is true). These measure rotational movement by using a custom ASIC to detect changes in the frequency of a signal modulated by capacitive reactance. Compared to the technology most commonly used in rotary encoders today, capacitive encoding holds some potential advantages over optical encoding, Reference 2.
There are also transducers which measure rotation while providing an all-analog, non-pulsed output. A resolver (and the somewhat similar synchro) uses a set of coils, with a primary one on the rotor and two secondary ones at right angles to each other on the stator. The rotor coil is then energized with a low-voltage (around 10 V) AC waveform (60 Hz or 400 Hz are common, frequencies of several kHz are also used). The relative phases of the induced signals on the secondary coils with respect to each other can be used to derive the absolute rotor angle. The resultant all-analog signal has very high resolution and accuracy.
The resolver is a very rugged transducer, as it consists solely of non-contact coils, and is used in harsh applications or when extreme long life is need. However, it is relatively heavy and costly, and the excitation and decoding (demodulation) circuitry is more complicated. In many cases, the decoded analog output is digitized for further use.
- PC/104 and Small Form Factors, “Choosing a code wheel: A detailed look at how encoders work”
- CUI Inc., “The Advantages of Capacitive vs Optical Encoders”
- Craig, NYU Engineering, “Optical Encoders”