1. How do linear magnetic encoders work?

A linear magnetic encoder is a linear position sensor used for accurately tracking position and displacement over distances up to 100 meters. The encoder consists of a read head and a high accuracy scale. The scale is a magnetic tape etched with alternate north and south magnetic poles at intervals of about 1-2 mm (this spacing is known as the pole pitch). The read head contains a magnetic field sensor (typically a Hall effect or magnetoresistive device). As the read head progresses along the scale, the magnetic field sensor generates a sine wave output signal in response to the alternating magnetic polarity of the magnetic tape. Each peak and trough of on the sine wave coincides with an alternate magnetic pole and so position can be determined by counting the number of peaks and troughs.

Illustration of linear magnetic encoder

Direction

The encoder described thus far tracks displacement but lacks a mechanism for detecting the direction of motion (i.e. forwards or backwards). To determine direction, an additional magnetic field sensor is incorporated into the read head, positioned such that its output is 90° out of phase with the original output. The two output signals are known as channel A and channel B respectively. When the encoder moves in one direction, channel A always rises ahead of channel B. If the direction of motion is switched, channels B always rises ahead of channel A. By detecting which channel leads, the direction of motion can be determined. The addition of the second channel also doubles the spatial resolution of the encoder. The two channels, A and B, are illustrated below as square waves because it makes it easier to observe that one channel leads the other.

Incremental encoder A and B channel square wave outputs

Signal interpolation

The encoder described thus far has a very modest spatial resolution because the scale’s pole pitch is typically 1-2mm. To improve resolution, the encoder measures the instantaneous voltage at multiple locations along the sine wave. It then interpolates instantaneous position by calculating the inverse sine of the normalized voltage. The encoder interpolates position a fixed number of times per sine wave and generates a high frequency square wave output that coincides with the interpolation of the sine wave. The number of interpolation points per wavelength varies between encoders and is often programmable. Magnetic encoders typically use 4 to 100 interpolations per wavelength, though some encoders are capable of performing 1000’s per wavelength. Keep in mind that large interpolation factors significantly reduce the maximum operating velocity of the encoder.

Encoder sine wave signal interpolation

Incremental vs Absolute encoders

The encoder described thus far is known as an incremental encoder. It measures displacement as a series of high-resolution pulses, but the read head has no knowledge of its position on the scale. Absolute position must be determined by the process controller. The controller achieves this by starting at a known position and updating its stored position in response to pulses received from the encoder. Clearly, missing a pulse (e.g. because the read head is moving too fast) will lead to an error in the absolute position stored in the process controller. Furthermore, each time the system is switched off, the process controller loses its absolute position and must therefore return to a known position (e.g. a proximity switch) on start-up.

In contrast to incremental encoders, absolute encoders can track their absolute position on the scale. To achieve this, a second row of magnetic poles is incorporated into the scale and read by an additional magnetic field sensor located inside the read head. The magnetic poles are of non-uniform and unique spacing such that each section of magnetic poles represents a unique location (like a supermarket barcode). Each time the absolute position is determined, the encoder outputs its position as a digital signal via serial communication. However, the absolute encoder still provides an incremental sine or square wave output because the absolute position is determined at a lower spatial resolution, necessitating the process controller to count pulses between successive absolute position readings. On start-up, the encoder head must move a small distance to determine its absolute position.

Absolute magnetic encoder scale

2. General characteristics of linear magnetic encoders

Linear magnetic encoders are medium cost sensors capable of accurately measuring displacements over a wide range of lengths (full scale lengths of 0.1-100 m). They can achieve spatial resolution up to 0.25 µm and operating velocities up to 80 m/s. However, operating at a high resolution necessitates reducing the operating velocity and so their maximum resolution and velocity cannot be achieved concurrently. Magnetic encoders have a long lifetime and excellent Ingress protection ratings. Furthermore, they are largely immune to contamination of the read head or scale with dirt or liquid, the exception being magnetic debris. However, magnetic encoders cannot be used in environments where powerful external magnetic fields are present. Linear magnetic encoders are available with either incremental or absolute readings, though the latter are generally limited to scales of up to 15 m.

3. Input and output signals

Linear magnetic encoders operate on a 5-30 Vdc supply voltage. Incremental encoders without signal interpolation output a pair of 90° out of phase sine waves (referred to as channels A and B) with wavelengths equal to double the pole pitch. Incremental encoders with built-in signal interpolation generate a pair of 90° out of phase square waves of much higher spatial resolution, as high as 0.25 µm. Incremental encoders also include reference poles at equal increments (often 50 mm), known as the Z channel. Many incremental encoders also provide the inverse of each channel (A-, B- and Z-) for cross verification purposes. Absolute encoders output a digital signal describing the absolute position, in addition to a two channel (A and B) square or sine wave signal. The reason that absolute encoders provide both signals is that the digital signal is of lower resolution than the incremental output.

A, B and Z channels of an incremental encoder

4. Applications of linear magnetic encoders

The compact size, high resolution and large measurement range of linear encoders makes them popular in linear motion applications such as laser cutting, CNC milling machines and coordinate measuring machines (CMM). The resolution of linear magnetic encoders is sufficient for the majority of applications outsides of the electronics and semiconductor industries. Furthermore, they are the preferred choice in many applications because of their high immunity to contamination from liquid and debris (e.g. coolant fluid and metal filings in CNC milling applications).

5. Typical specification

CostMedium to high
Measurement range0-100 meters
Resolution 0.25-250 µm
Velocity0.5-80 m/s (depending on resolution)
LifetimeVery high
Ambient temperature-20 to 80 °C (up to 120 °C available)
Supply voltage10-30 V dc
Output signalsine or square wave (incremental) / digital (absolute)
Vibration resistance30 g
Shock resistance100 g
Ingress protectionIP67
Passive / activeActive
Contact / non-contactNon-contact

6. Purchasing tips

  • Incremental vs absolute encoders: Magnetic encoders measure either relative or absolute position. Reasons for choosing an absolute encoder include mitigating the risk of skipping a pulse and determining position on start-up without the need for homing. Note that the length of absolute encoder scales is limited to about 15 m.
  • Pole pitch: Pole pitch is the distance between consecutive changes in polarity along the scale i.e. the thickness of each magnetic segment. The pole pitch, which is typically 1 or 2 mm is the true spatial resolution of the scale before interpolation is performed.
  • Cable length: Long cables limit the operating frequency of the encoder and will therefore result in a lower maximum velocity.
  • Sine vs square wave output and interpolation: Encoders output either low frequency uninterpolated sine waves or high frequency interpolated square waves. Selecting a model with a sine wave output gives the engineer more freedom in choosing how to interpolate the signal. However, it also necessitates purchasing additional electronics to perform interpolation.
  • Ride height: The ride height is the required air gap between the encoder and its scale. Most encoders require a gap of 0.1-1 mm for correct operation. However, some encoders can operate at ride heights of 2 mm.
Magnetic encoder ride height
  • ‘Shaft mounted’ encoders: It is possible to purchase encoders already mounted to a linear rail so that the control engineer need not worry about maintaining the correct ride height. The drawback of such encoders is that they are only available in lengths of up to 1 meter.
  • Resolution vs velocity: Encoder specification sheets quote a maximum velocity and spatial resolution. Many encoders offer adjustable resolutions (by using different interpolation factors). However, their maximum velocity will not be achievable at the highest resolutions.

7. Advantages of magnetic encoders

Linear magnetic encoders:

  • Have a very large measurement range, similar to that of optical encoders. Encoder scales are available in lengths of 0.1-100 m.
  • Are very robust and are immune to contamination from liquids and dirt with the exception of magnetic debris and aggressive solvents.
  • Possess spatial resolution up to 0.25 µm. Although not nearly as high as optical encoders, it is a very high resolution.
  • Have a very long lifetime, owing to the fact they are non-contact sensors and no mechanical wear takes place.
  • Are very small and therefore often a more appropriate choice than rod type position sensors, which reach lengths over twice their full scale measuring range when fully extended.

8. Disadvantages of magnetic encoders

Linear magnetic encoders:

  • Have a much lower resolution than optical encoders. However, at up to 0.25 µm, their resolution is still high in its own right!
  • Incremental encoders cannot determine absolute position. Absolute encoders are more expensive and limited to a maximum measurement range of about 15 m.
  • Are susceptible to disturbance from external magnetic fields and contamination of their scale with magnetic debris.
  • With the exception of shaft mounted encoders, magnetic encoders are usually more difficult to install than rod type position sensors.

9. Application tips

  • Temperature compensation: Magnetic encoder scales experience thermal expansion in the range of 10-18 µm/m/°C. A 10 meter long scale with a thermal expansion coefficient of 18 µm/m/°C, subject to a 20 °C temperature increase will undergo a 3.6 mm increase in length! The expansion can be compensated for by measuring the temperature increase and programming the controller to automatically adjust the programmed distance per pulse in real time.
  • Scale minimum bend radius: The encoder scale has a minimum allowable bend radius which if ignored during installation, could result in damage to the scale. Damage to the scale is likely to negatively impact accuracy, which can often cause more problems than catastrophic failure.
  • Accuracy and resolution: The resolution of high-resolution encoders is significantly higher than their accuracy because of practical limits on the accuracy with which scales can be manufactured.