Position and rotation sensors

Encoders, Hall-effect and magnetic angle sensors, magnetometers, potentiometers and LVDTs: how each reports position, and what misleads it.

Core

How position and rotation sensors count, and what misleads them An incremental encoder's A, B and reference signals beside an absolute encoder; one maker's encoder error before and after mounting; the error sources of a magnetic angle sensor; and how hard and soft iron distort a compass's readings. Encoders A B R 90° apart reference Incremental: counts from a datum Watch for R must be crossed to set the datum, which can mean a long move of the axis Absolute position known at switch-on Resolution is not accuracy One maker's 200 mm rings, typical, arc seconds System error 1.1 Installed, one readhead 5.2 Installed, two readheads 2.1 Watch for eccentricity in mounting; interpolation adds a cyclic error Magnetic angle sensor Reads a magnet on a shaft; assembly tolerances add error Watch for magnet tilt (2°) or offset (0.1 mm), in one maker's simulations Warm magnets weaken NdFeB typically 0.12 %/°C, ferrite 0.2 %/°C Ferromagnetic parts nearby change it Magnetometer as a compass Hard iron: fixed offset from magnetised parts Soft iron: distortion from unmagnetised ferromagnetic parts on its circuit board Check fit the ellipsoid in place; no need to know where north is ideal: a sphere measured: an ellipsoid Not to scale
How an incremental encoder counts and an absolute one knows; how mounting adds encoder error; what limits a magnetic angle sensor; and how nearby iron bends a compass's readings.

Key points

  1. An incremental encoder typically outputs two signals, A and B, 90° (electrical) apart, plus a reference mark. It counts steps from a datum, so the reference mark must be crossed to set it, which can mean moving the axis a long way. An absolute encoder reads a coded scale, so its position is available at switch-on.1
  2. Fine resolution is not accuracy. Steps finer than an encoder's graduations come from interpolation, whose non-linearity adds a cyclic error. On one maker's 200 mm rings, typical system error was 1.1 arc seconds, installed 5.2 with one readhead (2.1 with two); eccentricity caused 60% or more of the installation error.2
  3. A Hall-effect switch reports whether a magnetic field passes a threshold, as in lid detection and push buttons. A latch gives speed and direction for rotary encoding, and position for motor commutation. A linear type's output follows the field, for absolute position. Switching thresholds vary with temperature.34
  4. A magnetic angle sensor reads a magnet turning with a shaft, so assembly tolerances add angle error: one maker simulates 2° of magnet tilt and a magnet 0.1 mm off-centre. Magnets weaken as they warm, typically by 0.12 %/°C (NdFeB) or 0.2 %/°C (ferrite), and nearby ferromagnetic parts change the field.56
  5. A compass magnetometer is misled by ferromagnetic parts on its own circuit board. Magnetised ones add a fixed offset (hard iron); unmagnetised ones add a field induced by the Earth's (soft iron). Readings then lie on an ellipsoid, not a sphere. One maker's note fits it in place, without knowing where magnetic north is.7
  6. A potentiometer is a contact sensor: a wiper moves over a resistive track, and its life is rated in cycles. One maker rates a 12 mm carbon part at 15 000 cycles, a precision wirewound one at 1 000 000 shaft revolutions (no load). A free-core LVDT's core does not touch its coil, but needs AC excitation and demodulation.89101112
  7. India's BIS lists IS 17123 (Part 5/Sec 3):2025 as identical (dual numbering) to IEC 61800-5-3:2021, on functional, electrical and environmental requirements for encoders in power drive systems. IEC's abstract says it applies where an encoder's functional safety is claimed. BIS committee: ETD 31 (Power Electronics).1314as of 19 November 2026

Common mistakes

  • Trusting an incremental encoder's count before its reference mark has been crossed. It counts steps from a datum; an absolute encoder has its position at switch-on.
  • Reading an encoder's resolution as its accuracy. In one maker's tests on 200 mm rings, typical system error was 1.1 arc seconds but installed error with one readhead 5.2.
  • Calibrating a compass module before it is fitted to its circuit board. Hard- and soft-iron errors come from the parts around it, so calibrate it in place.

Sources

  1. Interfaces of HEIDENHAIN Encoders (brochure ID 1078628) · DR. JOHANNES HEIDENHAIN GmbH · Reference
  2. The accuracy of rotary encoders (white paper) · Renishaw plc · Vendor page
  3. Introduction to Hall-Effect Sensors (SLYT824B, revised April 2024) · Texas Instruments · Reference
  4. Understanding and Applying Hall Effect Sensor Data Sheets (SLIA086A, revised December 2021) · Texas Instruments · Reference
  5. Achieving Highest System Angle Sensing Accuracy (SBAA539A, revised May 2023) · Texas Instruments · Reference
  6. Angle Measurement With Multi-Axis Linear Hall-Effect Sensors (SBAA463A, revised April 2023) · Texas Instruments · Reference
  7. AN4246: Calibrating an eCompass in the Presence of Hard- and Soft-Iron Interference, Rev. 4.0 (November 2015) · NXP Semiconductors (originally Freescale Semiconductor) · Reference
  8. Potentiometers and Trimmers (application note, document 51001, revision 02-Aug-13) · Vishay Sfernice · Reference
  9. PTV/PTT Series 12 mm Potentiometer datasheet (REV. 09/23) · Bourns · Datasheet
  10. 3590 Precision Potentiometer datasheet (REV. 12/20) · Bourns · Datasheet
  11. Basics of the Linear Variable Differential Transformer (LVDT) (Understanding LVDTs tutorial) · TE Connectivity · Vendor page
  12. PGA970 Use Case for LVDT Applications (SLYA028, May 2017) · Texas Instruments · Reference
  13. IS 17123 (Part 5/Sec 3):2025 / IEC 61800-5-3:2021 Adjustable speed electrical power drive systems, Part 5 Safety requirements, Section 3 Functional, electrical and environmental requirements for encoders (Know your standards record) · Bureau of Indian Standards · Standard
  14. IEC 61800-5-3:2021 Adjustable speed electrical power drive systems, Part 5-3: Safety requirements, Functional, electrical and environmental requirements for encoders · IEC · Standard