Rotary Encoders for Robotics: Incremental, Absolute & Resolvers — The Ultimate Guide
An engineer-grade guide to rotary encoders for robotics: incremental quadrature, single/multi-turn absolute, resolvers, optical vs magnetic vs inductive sensing, BiSS-C/SSI/EnDat interfaces, accuracy vs resolution, and real-product specs.
An encoder is the sensor that tells the controller where the shaft is. That is the whole job. Everything fancy you do with a motor — torque control, smooth velocity profiles, holding a position to a few arc-seconds, commutating a brushless motor — rides on knowing the angle of the rotor and the load. Take the encoder away and a servo collapses back into an open-loop motor that guesses.
Encoders are also where a surprising amount of robot money and a surprising amount of robot misery live. They are the component most likely to be mis-specced (resolution confused with accuracy), most likely to fail in the field for boring reasons (EMI on a long cable, a cracked solder joint, condensation on an optical disc), and most likely to be the silent ceiling on your control performance. You can have the best FOC firmware in the world and still get a buzzing, limit-cycling joint because the feedback device quantizes velocity into garbage.
The take: Resolution is not accuracy, and confusing the two is the single most common encoder mistake in robotics. A 14-bit magnetic encoder advertises 16,384 counts per turn — about 79 arc-seconds per count — but its real angular accuracy might be ±0.3° to ±0.5° (1,000–1,800 arc-seconds) once you include nonlinearity and mounting eccentricity. The counts are precise; the angle is not. Spec the encoder on the number that matches your control need: resolution for smooth velocity and low quantization noise, accuracy for absolute pointing and gear-train compensation, repeatability for return-to-home. Then pick the interface (quadrature, BiSS-C, EnDat, SSI) and the sensing technology (optical, magnetic, inductive, capacitive, resolver) that survive your environment.
Companion reading: motor controllers & FOC, servo motors, brushless DC motors (BLDC), gearboxes: harmonic & cycloidal, and robot sensors.
Table of contents
- Key takeaways
- Why position feedback is the foundation of motion control
- Incremental encoders: quadrature, PPR vs CPR, and the index pulse
- Absolute encoders: single-turn, multi-turn, and no homing
- Sensing technologies: optical, magnetic, capacitive, inductive
- Resolvers: the rugged analog veteran
- The numbers that matter: resolution, accuracy, repeatability, latency
- Digital interfaces: quadrature, SSI, BiSS-C, EnDat, Tamagawa, Hall
- Encoder placement: motor-side vs load-side
- Commutation encoders for BLDC/PMSM
- Noise, EMI, shielding, and cable length
- Selecting an encoder: a resolution budget and a comparison table
- Calibration, eccentricity, and real accuracy from a magnetic encoder
- Frequently asked questions
Why position feedback is the foundation of motion control
Start from the control loop. A servo joint runs nested loops — position outside, velocity in the middle, current/torque inside — and every one of them needs to know where the shaft is or how fast it's moving. The current loop on a brushless motor needs the electrical angle to commutate correctly (see motor controllers & FOC). The velocity loop needs a clean derivative of position. The position loop needs the absolute or relative angle of the joint. No encoder, no servo — you're back to running the motor open-loop and hoping.
The dirty secret is that velocity usually comes from differentiating position, and differentiation amplifies quantization noise brutally. If your encoder gives you N counts per revolution and you sample at frequency f, the smallest non-zero velocity you can resolve in one sample period is one count:
v_min = (1 count) / (N counts/rev) × f [rev/s]
For a 1,000-CPR encoder sampled at 1 kHz, the smallest detectable speed is 1/1000 × 1000 = 1 rev/s = 60 RPM. Below that, the velocity estimate is all zeros and ones — a staircase that the velocity loop tries to chase, producing audible buzz and limit cycles at low speed. This is why direct-drive and quasi-direct-drive joints (low gear ratio, see robot actuators) demand high-resolution encoders: there's no gearbox multiplying the motor's motion into countable increments at the joint.
Rule of thumb: For smooth low-speed velocity control, you want at least 12-bit (4,096 CPR) resolution at the point you're controlling, and 17-bit+ (131,072 CPR) for direct-drive joints that must crawl smoothly. Gearing helps: a 100:1 reducer turns a 4,096-CPR motor encoder into 409,600 effective counts per output revolution — but only if the gearbox has no backlash or compliance (it does; see section 9).
The encoder also sets your commutation quality. A brushless motor commutated with a coarse or noisy angle wastes current as torque ripple and heat. The smoothness of a BLDC running FOC is directly limited by how cleanly the encoder reports the electrical angle.
Incremental encoders: quadrature, PPR vs CPR, and the index pulse
An incremental encoder produces a stream of pulses as the shaft turns. It does not know where it is at power-up — it only knows how far and which way it has moved since. That's the defining limitation and the source of the homing requirement.
Quadrature A/B and the 4× trick
The standard incremental encoder outputs two square-wave channels, A and B, 90° out of phase. That 90° phase relationship is "quadrature," and it carries two pieces of information at once:
- Direction: which channel leads tells you CW vs CCW. If A leads B, one direction; if B leads A, the other.
- Resolution multiplication: because A and B each have a rising and falling edge per cycle and they're offset, you get four distinct edges per signal period. A decoder that counts all four edges resolves 4× the line count.
This is where PPR vs CPR trips people up:
- PPR (pulses per revolution) = the number of full cycles of channel A per turn = the number of physical lines/poles on the disc. Also called the line count.
- CPR (counts per revolution) = the number of distinct decoded states per turn. With full quadrature decoding, CPR = 4 × PPR.
So a "1,024 PPR" encoder gives 4,096 CPR after 4× decoding. Datasheets and marketing love to mix these — a vendor will quote "4,096" and you have to figure out whether that's the line count (giving 16,384 CPR) or the post-decode count. Always confirm which.
The index (Z) pulse
A third channel, Z (or I, for index), fires once per revolution at a fixed mechanical reference. It's how an incremental system establishes an absolute reference: drive the axis until you see Z, latch the count, and now you have a known zero. This is the "homing" sequence every incremental-feedback machine runs at boot.
Decoding quadrature in firmware or hardware
Most modern MCUs have a hardware quadrature decoder in their timer peripherals (STM32 "encoder mode," TI C2000 eQEP). Use it — software decoding wastes cycles and risks missed edges at high speed. But understanding the state machine matters for debugging. Here's the classic 4× decode by state transition:
// Quadrature 4x decode via state transition table.
// Previous state in bits [1:0] = (A_prev<<1 | B_prev)
// New state appended -> 4-bit index into a +1/-1/0 table.
static const int8_t qdec_table[16] = {
// 00-> 01-> 10-> 11-> (new = AB)
0, -1, +1, 0, // from 00
+1, 0, 0, -1, // from 01
-1, 0, 0, +1, // from 10
0, +1, -1, 0 // from 11
};
static uint8_t prev_state = 0;
static int32_t position = 0;
void encoder_isr(void) {
uint8_t a = read_pin(ENC_A);
uint8_t b = read_pin(ENC_B);
uint8_t state = (a << 1) | b;
uint8_t idx = (prev_state << 2) | state;
int8_t step = qdec_table[idx];
if (step == 0 && prev_state != state) {
// Both bits changed in one sample -> illegal transition.
// Either a missed edge (too slow sampling) or noise.
error_count++;
}
position += step;
prev_state = state;
}
The step == 0 with a state change case is your friend: an illegal transition (both A and B appearing to change between samples) means you either undersampled a fast edge or you're picking up noise. Watching error_count climb is the fastest way to catch an EMI problem or a too-slow ISR (see section 11).
Opinion: Don't software-decode quadrature on a hot loop. If your platform lacks a hardware QEP, use a dedicated decoder IC (LS7366R SPI counter, iC-Haus iC-MD) rather than burning interrupts. A 10,000-CPR encoder at 6,000 RPM emits 1,000,000 counts/s — an ISR per edge will eat a Cortex-M alive.
The big advantages of incremental: cheap, simple, well-understood, and the quadrature/RS-422 interface is universal. The big disadvantage: it forgets everything on power loss and needs a homing move. For a BLDC you also need commutation info before the index is found — which is why pure incremental motors add Hall sensors or UVW tracks (section 10).
Absolute encoders: single-turn, multi-turn, and no homing
An absolute encoder reports its actual angular position the moment it powers on, with no movement required. The disc (or magnetic/inductive pattern) is coded so that every angular position has a unique digital word — historically a Gray code on an optical disc, today usually a serial digital word over BiSS-C/EnDat/SSI.
This single property — knowing where you are at boot — is worth a lot in robotics:
- No homing move. A robot arm with an absolute encoder on each joint knows its full pose at power-up. No slamming joints into limit switches; no dangerous "find home" dance with a loaded arm hanging in space.
- Safety. If you lose power mid-task and come back, you still know the pose. Critical for collaborative robots and anything that could fall under gravity.
- Hard limits. You can enforce joint limits immediately, before the first commanded move.
Single-turn vs multi-turn
- Single-turn absolute uniquely encodes position within one revolution (0–360°). Perfect for a direct-drive joint that never exceeds one turn, or for commutation (which only cares about angle within an electrical cycle).
- Multi-turn absolute also tracks how many full turns the shaft has made. Essential when the encoder sits before a gearbox (motor side) and the motor spins many turns per joint move, or on a leadscrew/linear axis.
There are two ways to build multi-turn, and the choice has real reliability consequences:
Battery-backed (electronic) multi-turn. A low-power counter keeps running off a backup battery or supercapacitor while main power is off, counting revolutions. Pros: unlimited turn range, compact. Cons: a battery to maintain and replace; if it dies while powered off, you lose the multi-turn count and must re-home. Most Tamagawa and many servo-motor absolute encoders are battery-backed.
Geared (mechanical/true) multi-turn. A miniature gear train drives secondary code discs (like a mechanical odometer), so the turn count is physically encoded with no power needed. Pros: no battery, retains count indefinitely, true power-down memory. Cons: bulkier, the gear train adds a small accuracy/backlash term, finite turn range (e.g., 4,096 turns). RLS/AksIM and many Heidenhain multi-turn units use this; some use a Wiegand/energy-harvesting pulse to count turns with no battery at all.
Opinion: For a battery-free system that must survive months in storage and come back knowing its pose, geared or energy-harvesting multi-turn (RLS AksIM-2, Heidenhain, or a Wiegand-wire counter) beats battery-backed every time. The battery is the thing that strands a robot in the field. If you must use battery-backed, log the battery voltage and warn early.
Output formats
Absolute encoders speak digital serial: SSI (simple, clocked), BiSS-C (open, fast, CRC-checked), EnDat 2.2 (Heidenhain), Tamagawa (servo-motor standard in Asia), or parallel Gray-code (legacy, lots of wires). We cover the protocols in detail in section 8.
Sensing technologies: optical, magnetic, capacitive, inductive
The interface (how the encoder talks) is independent of the sensing technology (how it physically measures angle). Get the technology right for your environment first — no protocol fixes an optical encoder that fogged up.
Optical
A light source (LED) shines through or reflects off a patterned disc (glass for high-end, mylar/metal for cheaper) onto a photodetector array. Fine line spacing plus interpolation gives extraordinary resolution and accuracy.
- Strengths: Highest accuracy (Heidenhain and Renishaw reach ±1 to ±5 arc-seconds on precision units), highest resolution (28–32 bits with interpolation), low noise.
- Weaknesses: Hates contamination — dust, oil, condensation, and fingerprints degrade or kill it. Sensitive to shock/vibration (glass disc). More expensive. Bulkier.
- Use when: Metrology, machine tools, precision robotics in clean environments, semiconductor handling.
Magnetic
A diametrically magnetized magnet on the shaft spins over a Hall-effect or magnetoresistive (AMR/TMR) sensor array. The IC computes angle from the field vector. The AS5047/AS5048 (ams), MA732 (Monolithic Power), and iC-Haus iC-MU/iC-PV families dominate here.
- Strengths: Cheap, tiny, robust against dust/oil/condensation, tolerant of shock and vibration, works through non-magnetic barriers. On-axis versions integrate the whole thing in one IC.
- Weaknesses: Lower accuracy (±0.1° to ±0.5° typical without calibration), sensitive to stray magnetic fields (a nearby motor or magnet), affected by air-gap and eccentricity, temperature drift.
- Use when: Cost-sensitive, dirty, or harsh-vibration environments; commutation feedback; high-volume products.
Capacitive
A patterned rotor changes capacitance over a sensing array; an ASIC reads the angle. CUI's AMT series popularized this in robotics.
- Strengths: Robust against dust and magnetic fields (immune to the stray-field problem magnetics have), low power, modular/mountable, often field-configurable resolution. Mid-range price.
- Weaknesses: Mid-range accuracy (~±0.1–0.2°), sensitive to humidity/condensation and conductive contamination, less common at very high resolution.
- Use when: You want a magnetic-free, configurable, easy-to-mount encoder near magnets — common on robot joints and benign industrial gear. The CUI AMT102/AMT212 are maker and integrator favorites.
Inductive
A PCB-based transmit coil induces eddy currents in a passive metal target (rotor); receive coils pick up the position-dependent coupling. Renishaw's encoders, CUI's AMT inductive line, and Zettlex (now Celera Motion) pioneered this.
- Strengths: Magnetic-grade robustness (handles dust, oil, vibration, shock) plus immunity to stray DC magnetic fields and better accuracy than basic magnetic (down to arc-minutes). No precision glass, no fragile parts. Works over a larger air gap. Increasingly the default for harsh robotics.
- Weaknesses: Larger PCB footprint than an on-axis magnetic IC; sensitive to nearby conductive metal and to the target's concentricity; somewhat higher cost than a bare magnetic IC.
- Use when: Harsh robotics that still needs decent accuracy and can't tolerate magnetic encoders' stray-field sensitivity. This is the category quietly winning in 2026.
Comparison table
| Technology | Typical accuracy | Max resolution | Contamination tolerance | Stray-field immunity | Relative cost | Representative parts |
|---|---|---|---|---|---|---|
| Optical | ±1 to ±20 arc-sec | 28–32 bit | Poor (sealed helps) | Excellent | High | Heidenhain ECN/RCN, Renishaw RESOLUTE, US Digital E5 |
| Magnetic (on-axis) | ±0.1° to ±0.5° | 12–17 bit | Excellent | Poor | Low | ams AS5047/AS5048, MPS MA732, iC-Haus iC-MU |
| Capacitive | ±0.1° to ±0.2° | 12–14 bit | Good (not humidity) | Excellent | Medium | CUI AMT102/AMT212/AMT232 |
| Inductive | ±arc-minutes to ±0.05° | 18–22 bit | Excellent | Excellent | Medium-High | Renishaw, CUI AMT inductive, Celera/Zettlex IncOder |
| Resolver | ±5 to ±20 arc-min | RDC-set (10–16 bit) | Excellent | Excellent | Medium | LTN, Tamagawa Smartsyn, Moog |
Opinion: If you're building a robot arm and your knee-jerk is "magnetic, it's cheap and rugged," seriously look at inductive first. You keep the ruggedness, lose the stray-field headache (your motor is a stray field), and gain a half-decimal-place of accuracy. The price gap has shrunk a lot.
Resolvers: the rugged analog veteran
A resolver is essentially a rotary transformer. A primary winding on the rotor is excited with an AC reference (typically 5–10 kHz sine), and two stator windings, mechanically 90° apart, output AC signals whose amplitudes are modulated by the rotor angle:
S1 ≈ E·sin(ωt)·sin(θ) // SIN output winding
S2 ≈ E·sin(ωt)·cos(θ) // COS output winding
Take the ratio of the two envelopes and θ = atan2(SIN, COS). The angle lives in the ratio of two signals, so it's immune to amplitude drift, supply variation, and a lot of noise — a key reason resolvers are so robust.
Why aerospace, defense, and traction love them
- No electronics in the sensor. Just copper windings and iron. That means they operate from cryogenic to 200°C+, survive radiation, shock to hundreds of g, vibration, and decades of service. Nothing to degrade.
- Brushless variants use a rotary transformer to couple excitation to the rotor — no brushes, no wear.
- Inherently absolute within one turn (or one electrical cycle for multi-speed resolvers).
This is why you find resolvers on aircraft control surfaces, missiles, military servo systems, EV/hybrid traction motors, and steel-mill drives — anywhere the environment would destroy an optical disc or a silicon angle IC.
The resolver-to-digital converter (RDC)
A resolver isn't directly digital; you need an RDC chip to generate the excitation and demodulate SIN/COS into a digital angle and velocity. The classic part is the Analog Devices AD2S1210 (10/12/14/16-bit selectable, tracking converter with velocity output). Newer integrated solutions and microcontroller-based RDC (sampling SIN/COS with ADCs and running a tracking observer in firmware) are common too.
Watch the tradeoffs: Resolvers give modest accuracy (±5 to ±20 arc-minutes for a standard single-speed unit; multi-speed resolvers do better) and the RDC resolution is selectable but usually 10–16 bit. They also cost board space, need a tuned excitation, and the cabling carries analog signals you must shield. You pick a resolver for survival, not for arc-second accuracy.
For a traction or industrial BLDC/PMSM, the resolver doubles as the commutation sensor — absolute electrical angle straight out of the RDC, no homing, in an environment that would kill an optical encoder. That combination is why they persist despite the analog overhead.
The numbers that matter: resolution, accuracy, repeatability, latency
This is the section to read twice. Most encoder mistakes are spec mistakes.
Resolution
The number of distinguishable positions per revolution. Expressed as CPR/PPR (incremental) or bits (absolute):
positions_per_rev = 2^bits
angular_step = 360° / 2^bits
= 1,296,000 arc-sec / 2^bits
| Bits | Counts/rev | Arc-sec/count | Degrees/count |
|---|---|---|---|
| 10 | 1,024 | 1,266 | 0.352° |
| 12 | 4,096 | 316 | 0.088° |
| 14 | 16,384 | 79 | 0.022° |
| 17 | 131,072 | 9.9 | 0.0027° |
| 20 | 1,048,576 | 1.24 | 0.00034° |
| 23 | 8,388,608 | 0.155 | 0.000043° |
Resolution determines velocity-estimate smoothness and the finest commanded increment. It is a quantization number, nothing more.
Accuracy
How close the reported angle is to the true angle, including disc/pattern errors, interpolation error, eccentricity, and temperature. Always worse than resolution. Often the spec that actually limits your robot's pointing or end-effector position.
The central rule, again: Resolution ≠ accuracy. A cheap magnetic IC reporting 14 bits (79 arc-sec/count) can carry ±0.3° (~1,080 arc-sec) of absolute error — meaning ~14 of its "least significant bits" are pure fiction as far as true angle goes. Use those counts for velocity and interpolation smoothness, not for absolute pointing, unless you've calibrated (section 13).
Repeatability
How consistently the encoder reports the same value for the same physical position, run to run. Often much better than accuracy — a systematic nonlinearity error repeats, so it doesn't hurt return-to-home. This is why a robot can have mediocre absolute accuracy but excellent repeatability (and why we calibrate: turn good repeatability into good accuracy via a lookup table).
Hysteresis
The difference in reported position approaching the same point from opposite directions. In magnetic/inductive systems it's an electrical/filtering artifact; in geared multi-turn it's mechanical backlash. Matters for bidirectional positioning and for velocity-loop stability near zero speed.
Maximum speed
Two limits stack up:
- Mechanical: bearing/disc RPM rating (optical glass discs and ball-bearing housings limit this).
- Electrical: the maximum count or output rate. An incremental encoder has a max output frequency; an absolute encoder has a max angular speed beyond which interpolation can't keep up and you get a tracking error or a velocity-warning flag.
f_out_max [Hz] = CPR × RPM_max / 60
A 10,000-CPR encoder at 10,000 RPM = 1.67 MHz output — well within RS-422, but check the receiver and decoder rating.
Latency
For digital absolute encoders, the time from "I asked" to "I have the angle" — propagation delay plus protocol transaction time. It directly adds phase lag to your control loop. BiSS-C and EnDat 2.2 minimize this with fast clocks and cyclic reads; a slow SSI poll over a long cable adds microseconds that hurt a fast current loop. For a 10–20 kHz FOC loop, you want the position read to complete in a small fraction of the loop period.
Rule of thumb: Budget encoder read latency under ~10% of your fastest loop period. At a 20 kHz current loop (50 µs), keep the position read under ~5 µs. BiSS-C at 10 MHz reading 26 bits + CRC fits; a 1 MHz SSI poll might not.
Digital interfaces: quadrature, SSI, BiSS-C, EnDat, Tamagawa, Hall
The interface is how the encoder hands position to your controller. Pick it to match your controller's hardware support, your latency budget, and whether you need error checking.
Incremental quadrature (A/B/Z, RS-422)
Three differential pairs (A/A̅, B/B̅, Z/Z̅) over RS-422. Universal, simple, decoded by MCU timers. No absolute info, no CRC, no diagnostics. Best for cheap incremental feedback and legacy machine retrofits.
SSI (Synchronous Serial Interface)
Clocked unidirectional serial. The controller drives a clock; the encoder shifts out its absolute position MSB-first on data. Simple, widely supported, but: no standard CRC (some add it), no register access, and the data is only valid as fast as you clock it. Common on older absolute encoders and many industrial sensors. Gray-code option avoids transition glitches.
BiSS-C
Open, license-light bidirectional serial from iC-Haus, built on the SSI physical layer but adding CRC error checking, fast clocking (to 10 MHz), and a register-access channel for configuration and diagnostics. Point-to-point, low latency, no royalties — which is exactly why it's everywhere in modern robotics and servo drives. RLS/AksIM, iC-Haus parts, and a huge swath of motor encoders speak BiSS-C.
BiSS-C single-cycle read (simplified):
Controller drives MA clock burst.
Encoder responds on SLO line:
[ Ack ][ Start=1 ][ CDS ][ position (n bits) ][ Error ][ Warn ][ CRC6 ]
- position: absolute angle, MSB first (e.g. 26 bits = 18 single-turn + 8 multi-turn... varies)
- Error/Warn: live status flags (LED degraded, speed exceeded, etc.)
- CRC6: inverted, polynomial 0x43 — verify EVERY frame; a failed CRC means drop the sample.
Opinion: For a new robotics design needing absolute feedback, BiSS-C is the default I reach for. It's open, fast, CRC-protected, and supported by RLS, iC-Haus, and most drive ICs. EnDat is excellent but ties you to the Heidenhain ecosystem and licensing; SSI is fine but you give up the CRC and diagnostics that catch field failures.
EnDat 2.2
Heidenhain's bidirectional digital protocol. Absolute position, CRC, parameter memory, error/warning flags, and the ability to read temperature and diagnostics from the encoder. Excellent, tightly integrated with Heidenhain encoders and the drives that support them. Choose it when you're buying Heidenhain glass and want the full diagnostic stack.
Tamagawa (and the servo-motor family)
Tamagawa's smart-encoder serial protocol is the de facto standard on Asian servo motors (and many global ones); related protocols include Nikon, Sankyo, and Panasonic variants. Half-duplex, absolute, with battery-backed multi-turn support. If you're integrating Asian servo motors, your drive needs to speak Tamagawa.
Hall and UVW commutation tracks
Not a position-reporting interface so much as a commutation aid. Three Hall signals give 6 states = 60° electrical resolution. UVW tracks on an encoder do the same in the encoder body. Enough to start a trapezoidal BLDC; not enough for smooth FOC, which wants the fine A/B or absolute angle (section 10, and motor controllers & FOC).
Interface comparison table
| Interface | Direction | Absolute? | Error check | Max speed/clock | Diagnostics | Best for |
|---|---|---|---|---|---|---|
| Quadrature A/B/Z | Output only | No (Z = ref) | None | RS-422, MHz edges | None | Cheap incremental, retrofits |
| SSI | Clocked read | Yes | Optional | ~1–2 MHz typical | Minimal | Legacy absolute, simple sensors |
| BiSS-C | Bidirectional | Yes | CRC | 10 MHz | Yes (register channel) | Modern robotics/servo, default |
| EnDat 2.2 | Bidirectional | Yes | CRC | Fast cyclic | Yes (temp, params) | Heidenhain ecosystem |
| Tamagawa | Half-duplex | Yes | CRC | ~2.5 Mbps | Yes | Asian/global servo motors |
| Hall/UVW | Output only | 60° elec | None | — | None | BLDC commutation start |
Encoder placement: motor-side vs load-side
Where you mount the encoder changes what it actually measures — and this is one of the most consequential and under-appreciated decisions in a precision robot.
Motor-side feedback
The encoder sits on the motor shaft, before the gearbox. This is the cheap, default, integrated-servo arrangement.
- Pro: High effective resolution at the joint (the gear ratio multiplies counts), small fast encoder, ideal for commutation (it reads the rotor directly), low cost.
- Con: It measures the motor, not the load. Everything the gearbox does between motor and output — backlash, torsional windup, lost motion, hysteresis — is invisible. The controller thinks the joint is at angle X; the output is actually somewhere in a band around X/ratio.
For a harmonic drive (see gearboxes: harmonic & cycloidal), this matters a lot: harmonic drives have near-zero backlash but real torsional compliance — under load the output deflects relative to the motor by an angle the motor encoder can't see. A cycloidal drive has its own lost-motion and ripple signature. A motor-side encoder behind either is blind to all of it.
Load-side feedback
A second (usually absolute) encoder mounts on the output — the joint itself, after the gearbox.
- Pro: Measures the thing you actually care about. Closes out backlash, compliance, and gear nonlinearity. Essential for accurate end-effector positioning and for high-stiffness force control.
- Con: More cost, more wiring, and the gearbox compliance now sits inside your position loop — which can destabilize a naive controller (you can get a resonance between motor inertia and gearbox spring with the load encoder feedback). You need dual-loop control to do it right.
Dual-encoder (the gold standard)
The best precision arms run both: motor-side for fast inner-loop velocity/commutation and load-side for the outer absolute-position loop. The motor encoder gives you a clean, high-bandwidth velocity signal (no compliance in the path), and the load encoder gives you true output position. This dual-loop architecture is how robots like high-end collaborative arms and surgical robots hit their accuracy.
Rule: If your gear train has backlash or meaningful compliance and you care about absolute output accuracy, a motor-side encoder alone will lie to you. Either go dual-encoder, or characterize and compensate the gearbox — and accept that compliance compensation is open-loop and load-dependent. There is no free lunch here.
Commutation encoders for BLDC/PMSM
A brushless motor needs to know the rotor's electrical angle to energize the right windings — that's commutation (see BLDC and motor controllers & FOC). The encoder's commutation job is different from its position-feedback job, and confusing them causes the classic "motor cogs or runs backward on first power-up" bug.
Hall sensors: enough to start
Three Hall-effect sensors spaced 120° (electrical) give 6 unique states per electrical revolution = 60° resolution. That's coarse, but it's absolute at power-up: you instantly know which 60° sector the rotor is in, enough to start six-step (trapezoidal) commutation without a homing move. Cheap, robust, the standard for low-cost BLDC and for getting moving before a finer sensor is referenced.
Why Halls aren't enough for FOC
Field-oriented control needs a continuous electrical angle to align the current vector 90° ahead of the rotor flux. 60° Hall steps produce torque ripple and inefficiency if used directly. So FOC needs either:
- a fine incremental encoder plus a commutation reference (Halls or UVW tracks, or an index-find alignment routine), or
- an absolute single-turn encoder, which hands FOC the electrical angle directly, with no alignment dance.
UVW commutation tracks
Some encoders provide three extra "UVW" outputs that mimic Hall signals, generated from the encoder's own pattern and aligned to the motor poles. They give the drive the startup sector without separate Hall sensors. You still need the fine A/B or absolute channel for smooth running.
The alignment problem
For an incremental encoder to commutate a BLDC, the controller must learn the offset between the encoder's zero and the rotor's electrical zero. Two approaches:
- Forced alignment: push current into a known phase, the rotor snaps to a known electrical angle, latch the encoder reading as the offset. Simple, but it twitches the motor (bad on a loaded joint) and is sensitive to load/friction.
- Use an absolute encoder: the angle is known at boot, so the offset is a one-time calibration constant stored in the drive. No twitch. This is why absolute single-turn encoders are the clean answer for BLDC commutation in robotics — power on, you already know the electrical angle.
Opinion: On a robot joint that holds a load against gravity, never accept a commutation scheme that requires a power-on alignment twitch. Use an absolute encoder (or a resolver) so the rotor angle is known before you energize. The twitch is harmless on a benchtop and dangerous on an arm holding a payload.
Noise, EMI, shielding, and cable length
Encoders fail in the field for unglamorous reasons, and electrical noise tops the list. The encoder sits a few centimeters from a switching inverter pushing tens of amps with nanosecond edges. That's a hostile RF environment, and the encoder cable is your antenna.
Differential signaling is non-negotiable on real machines
Single-ended quadrature (one wire per channel referenced to ground) is fine on a 20 cm desk hookup. On a machine, use differential RS-422: each channel as a complementary pair (A and A̅) over a twisted pair. The receiver looks at the difference, so common-mode noise injected equally on both wires cancels. This single change is the difference between an encoder that miscounts under load and one that doesn't.
Practical failure modes and fixes
- Long single-ended runs near motor leads → miscounts. Symptom: position drifts only when the motor is moving/loaded. Fix: differential signaling, separate the encoder cable from phase leads, add shielding.
- Unterminated or wrong-impedance lines → ringing and double-counts. Fix: terminate RS-422 pairs (typically 120 Ω) at the receiver.
- Shield grounded at both ends → ground loop. Fix: ground the cable shield at one end only (typically the controller/drive end). Ground loops inject current through the shield and couple noise.
- Routing parallel to PWM phase wires → capacitive/inductive coupling. Fix: cross motor wires at 90°, keep physical separation, use shielded conduit for the encoder run.
- Cable length exceeding driver capability → degraded edges, latency. RS-422 can run tens of meters, but rise-time degradation eats your max count frequency. For absolute serial (BiSS-C/SSI), long cables limit max clock — propagation delay forces a slower clock or BiSS-C "processing time" compensation.
- Condensation/contamination on optical discs → dropouts. Fix: sealed encoders, or switch sensing technology (magnetic/inductive) for wet/dirty environments.
Rule: Treat the encoder cable like the sensitive analog/digital line it is. Differential pairs, twisted, shielded, shield grounded one end, routed away from power, terminated correctly. Most "the encoder is flaky" tickets are really "the wiring is wrong" tickets.
For absolute serial protocols over long cable, BiSS-C and EnDat both have line-delay compensation: the controller measures or is told the round-trip propagation delay and adjusts the sampling so the data lines up. Use it on runs over a couple of meters or you'll cap your clock rate and add latency to your loop (section 6).
Selecting an encoder: a resolution budget and a comparison table
Don't start from the encoder catalog. Start from the control requirement and derive the spec.
Step 1 — Set the accuracy requirement from the application
What absolute positioning error can the end effector tolerate? Work that back through the kinematics to a per-joint angular accuracy. If the arm must hold ±0.1 mm at a 500 mm reach, that's roughly ±0.0002 rad ≈ ±41 arc-sec at the joint — before you even budget for gearbox and structural errors. That tells you whether you need optical/inductive accuracy or whether magnetic-plus-calibration suffices.
Step 2 — Set the resolution from the velocity loop
Pick the minimum smooth speed and the loop rate, and invert the velocity-quantization equation from section 2:
required_CPR ≥ f_loop / v_min_smooth [counts/rev], v in rev/s
For 1 RPM (0.0167 rev/s) smooth control at a 1 kHz loop: CPR ≥ 1000 / 0.0167 ≈ 60,000 counts/rev (~16 bit). Gearing relaxes the motor-encoder requirement by the gear ratio — but only the motor-side smoothness; load-side still needs its own resolution.
Step 3 — Pick absolute vs incremental
Need to know pose at power-up, can't tolerate a homing move, holding a gravity load? Absolute (single-turn for direct drive, multi-turn before a gearbox). Pure speed/velocity job, homing is fine, cost-critical? Incremental.
Step 4 — Pick the interface
Match your controller/drive. BiSS-C for a modern open design; EnDat if you're in the Heidenhain world; Tamagawa for Asian servo motors; quadrature for the cheapest incremental; SSI for legacy.
Step 5 — Pick sensing technology from the environment
Clean and precise → optical. Dirty/vibrating/cheap → magnetic. Dirty but needs accuracy and sits near magnets → inductive or capacitive. Extreme temp/shock/radiation → resolver.
Step 6 — Form factor and mounting
Through-bore vs shafted vs on-axis (magnet on shaft end). Through-bore is great for hollow-shaft robot joints (route cables through). Kit/modular encoders (separate read head + disc/ring) save space and weight on integrated actuators but demand careful mounting tolerance (air gap, concentricity) — which feeds straight into calibration.
Real-product comparison table
| Product | Type | Tech | Resolution | Accuracy (typ) | Interface | Notable |
|---|---|---|---|---|---|---|
| US Digital E5 | Incremental, kit | Optical | to 5,000 PPR (20,000 CPR) | — (incremental) | Quadrature A/B/Z | Cheap, maker/industrial staple |
| CUI AMT212B-V | Absolute single-turn | Capacitive | 12–14 bit, configurable | ±0.2° | RS-485 | Modular, magnetic-free, configurable |
| ams AS5047P | Absolute single-turn | Magnetic on-axis | 14 bit | ±0.8° (uncal, max) | ABI/UVW/SPI/PWM | Tiny IC, built for FOC commutation |
| iC-Haus iC-MU | Absolute, kit | Magnetic (BiSS) | up to 18 bit | ~±0.5° (cal-dependent) | BiSS-C | High-res magnetic, robotics-friendly |
| RLS AksIM-2 | Absolute, off-axis ring | Magnetic | up to 20 bit | ±0.007° (calibrated grades) | BiSS-C / SSI / SPI | Large-bore, functional-safety options |
| Renishaw RESOLUTE | Absolute, linear/rotary | Optical | to ~32 bit (1 nm linear) | sub-arc-sec | BiSS-C / others | Metrology-grade, fast |
| Heidenhain ECN1325 | Absolute single-turn | Optical | 25 bit | ±20 arc-sec | EnDat 2.2 | Servo-motor integrated, diagnostics |
| Broadcom AEAT-9000 | Absolute single-turn | Optical | 17 bit | ±0.025° | SSI | High-res optical module |
| Tamagawa TS5700N8401 | Absolute multi-turn | Optical/magnetic | 17 bit ST + 16 bit MT | — | Tamagawa serial | Battery-backed, servo standard |
| Celera/Zettlex IncOder | Absolute | Inductive | up to ~22 bit | to ±arc-sec (grade) | SSI/BiSS/SPI | Large-bore, rugged, magnetic-free |
Opinion: For a new robot joint in 2026 I'd default to an RLS AksIM-2 (or an inductive ring like the IncOder) on BiSS-C for the load side, and an integrated absolute magnetic (AS5047-class) on the motor for commutation. You get true output accuracy where it matters, robust commutation where it's cheap, CRC-checked serial throughout, and no homing move. Reach for optical (Renishaw/Heidenhain) only when you genuinely need sub-arc-second and can keep the disc clean.
Calibration, eccentricity, and real accuracy from a magnetic encoder
Here's how you turn a cheap, high-repeatability magnetic encoder into a usefully accurate one — and why it works.
The dominant error: eccentricity
In an on-axis or ring magnetic encoder, the single biggest accuracy killer is eccentricity — the sense IC (or read head) not being perfectly centered on the magnet/ring's rotation axis. A small radial offset between the magnetic center and the mechanical rotation axis produces a once-per-revolution sinusoidal error:
θ_error(θ) ≈ (e / R) · sin(θ - φ) [radians]
where e is the eccentricity offset, R is the code-track radius, and φ is the phase of the offset direction. A 50 µm eccentricity on a 10 mm-radius ring gives ~5 mrad ≈ ±0.29° peak — which is exactly the order of the "±0.3°" you see in uncalibrated magnetic specs. Mounting tolerance, not silicon, dominates the error.
Off-axis ring encoders add higher harmonics (2nd, 3rd) from ring distortion and read-head geometry, but the 1st harmonic (eccentricity) is usually the big one.
Calibration: turn repeatability into accuracy
Because these errors are systematic and repeatable, you can measure and subtract them:
- Get a reference. Compare the encoder against a known-accurate reference (a calibrated optical encoder, a rotary index table, or — clever trick — a second encoder of the same type mounted 180° opposite, which cancels the 1st harmonic and lets you self-characterize).
- Sweep a full revolution logging reported vs true angle.
- Fit the error. Either store a dense lookup table (e.g., 1,024 points) or fit the dominant harmonics (
a₁·sin(θ+φ₁) + a₂·sin(2θ+φ₂) + ...). Harmonic fitting is compact and generalizes; LUT is simplest. - Correct in firmware:
θ_corrected = θ_raw − error_estimate(θ_raw).
A good eccentricity/harmonic calibration routinely cuts magnetic-encoder error 5–10× — taking a ±0.3° raw encoder to ±0.03–0.05°, approaching inductive territory. Many modern ICs (iC-Haus iC-MU, ams, MPS) and modules (RLS AksIM "calibrated" grades) build self-calibration in; AksIM's calibrated grades hit ±0.007° precisely because they characterize each unit on the ring.
Practical mounting that saves you calibration grief
- Air gap: hold the read-head-to-target gap within the datasheet window (often 0.1–1.0 mm for magnetic, wider for inductive). Too far = weak signal/noise; too close = saturation/nonlinearity.
- Concentricity: center the magnet/ring on the rotation axis as tightly as the budget allows — it's cheaper to mount well than to calibrate.
- Stray fields: keep the motor magnets and current-carrying conductors away from a magnetic sense IC, or use inductive/capacitive to sidestep the problem entirely.
- Temperature: magnetic field strength and IC offsets drift with temperature; characterize over your operating range if you need the last bit of accuracy.
Opinion: A calibrated magnetic encoder is one of the best price/performance plays in robotics — you get inductive-class accuracy from a sub-$10 IC by spending engineering time on mounting and a calibration sweep. The catch is you must own that calibration step; if you can't run a per-unit (or at least per-design) cal in production, buy the accuracy in silicon (inductive or factory-calibrated module) instead.
Frequently asked questions
What's the practical difference between PPR and CPR? PPR (pulses per revolution) is the encoder's physical line count — one full cycle of channel A per line. CPR (counts per revolution) is what you get after quadrature decoding: CPR = 4 × PPR, because A and B each contribute a rising and falling edge offset by 90°. A 1,000-PPR encoder yields 4,000 CPR with full 4× decode. Vendors mix the terms, so always confirm which number you're being quoted.
Do I need an absolute encoder, or is incremental plus homing good enough? If you can tolerate a homing move at every power-up and there's no danger in moving the axis to find its index, incremental is cheaper and fine. If the axis holds a load against gravity, has hard limits you must respect immediately, or can't safely move to home (a loaded arm), use absolute. Most modern robot joints choose absolute for the safety and convenience of knowing pose at boot.
Why is my 16-bit encoder not giving me 16 bits of accuracy? Because resolution and accuracy are different things. Sixteen bits means 65,536 distinguishable positions (~20 arc-sec each), but the true angle may be off by far more due to disc/pattern nonlinearity, interpolation error, eccentricity, and temperature. On a magnetic encoder, mounting eccentricity alone often dominates. The low-order bits are real for relative motion and velocity, but not for absolute pointing unless you've calibrated.
Single-turn vs multi-turn — which do I need? Single-turn uniquely encodes position within one revolution; use it for direct-drive joints under one turn and for commutation. Multi-turn also counts how many full revolutions, which you need when the encoder sits before a gearbox (the motor spins many turns per joint move) or on a leadscrew. Choose battery-backed multi-turn for unlimited range with a maintenance cost, or geared/energy-harvesting multi-turn for battery-free power-down memory.
BiSS-C or EnDat — which should I pick for a new design? BiSS-C if you want an open, royalty-light, CRC-protected, fast (to 10 MHz) protocol supported across RLS, iC-Haus, and most drive ICs — it's my default for new robotics. EnDat 2.2 if you're committing to Heidenhain encoders and want their integrated diagnostics (temperature, parameters) and ecosystem. Both are excellent; the choice is mostly about which encoder vendor and drive you're standardizing on.
Can I commutate a BLDC with just Hall sensors? Yes, for six-step (trapezoidal) drive — three Halls give 60° electrical resolution, enough to start and run a BLDC, absolute at power-up. But for smooth FOC you need a continuous electrical angle, so you add a fine incremental encoder (plus a commutation reference) or use an absolute single-turn encoder. Halls alone produce torque ripple under FOC. See motor controllers & FOC.
Why do aerospace and EV traction systems still use resolvers in 2026? Survival. A resolver is just windings and iron — no semiconductors in the sensor — so it runs from cryogenic to 200°C+, shrugs off shock, vibration, and radiation, and lasts decades. The cost is modest accuracy (±5–20 arc-min) and the need for an RDC chip and tuned excitation. When the environment would destroy an optical or silicon encoder, the resolver wins.
My encoder counts fine on the bench but drifts when the motor runs hard — what's wrong? Almost always EMI on the encoder cable. The inverter's switching couples into a single-ended or poorly shielded encoder line and injects false edges. Fix: use differential RS-422 signaling, twisted shielded pairs, ground the shield at one end only, route the encoder cable away from and crossing perpendicular to the motor phase leads, and terminate the lines. Watch for illegal quadrature transitions in firmware as your early-warning flag.
Motor-side or load-side encoder for a geared joint? Motor-side gives high effective resolution and easy commutation but is blind to gearbox backlash and compliance — it measures the motor, not the output. Load-side measures the true joint angle but puts gearbox compliance inside your loop. For precision arms, run both (dual-loop): motor-side for fast velocity/commutation, load-side absolute for true position. See gearboxes: harmonic & cycloidal.
How do I get better accuracy out of a cheap magnetic encoder? Calibrate out the eccentricity. The dominant error is a once-per-turn sinusoid from the magnet not being centered on the rotation axis. Mount it concentrically and within the air-gap window, then sweep a full revolution against a reference and store a lookup table or harmonic-fit correction. This routinely cuts error 5–10×, taking ±0.3° down to ±0.03–0.05°. Many ICs and modules offer built-in self-calibration.
What sensing technology is most robust for a dirty, vibrating robot? Inductive is my top pick: it tolerates dust, oil, vibration, and shock like a magnetic encoder, but it's immune to stray DC magnetic fields (your motor) and reaches better accuracy. Magnetic is the cheapest robust option if stray fields are managed. Capacitive is a good magnetic-free middle ground but dislikes humidity. Avoid optical in contaminated environments unless it's sealed.
Does encoder latency really matter for my control loop? Yes, for fast inner loops. Position-read latency adds phase lag to the loop, which erodes phase margin and limits achievable bandwidth. Budget the read under ~10% of your fastest loop period — under ~5 µs for a 20 kHz current loop. BiSS-C at 10 MHz fits comfortably; a slow SSI poll over a long cable may not. On long cables, use the protocol's line-delay compensation.
Related guides
- Stepper Motors & Drivers: The Ultimate Guide
An engineer-grade guide to stepper motors and drivers: how steps and microsteps really work, NEMA frame sizes, the torque-speed curve, resonance and missed steps, A4988 vs Trinamic TMC drivers, closed-loop steppers, and honest sizing math.
- Servo Motors: The Ultimate Guide
A deep, engineer-grade guide to servo motors: RC vs industrial vs smart serial servos, PWM and closed-loop control, datasheet specs, cascaded PID, sizing math, failure modes, and a real-product comparison table.
- Linear Motion Systems: Rails, Ball Screws & Linear Motors — The Ultimate Guide
A working engineer's guide to linear motion: profile rails and recirculating-ball guides, ball/lead/roller screws, belt and rack drives, and linear motors — with preload classes, accuracy grades, life and critical-speed math, real parts, and a selection workflow.
- Brushless DC Motors (BLDC) for Robotics: The Ultimate Guide
A robotics engineer's deep dive into brushless DC motors: Kv vs Kt, trapezoidal vs FOC commutation, sensored vs sensorless, gimbal/QDD actuators, datasheet math, and how to size a BLDC for a robot joint or drone.
- Robot Actuators: Electric, Hydraulic & Pneumatic — The Ultimate Guide
A working engineer's guide to robot actuators — electric, hydraulic, pneumatic, series-elastic, QDD, and soft — with real power/force-density numbers, products, and a selection cheat-sheet.
- Robot Gearboxes: Harmonic & Cycloidal Drives — The Ultimate Guide
A working engineer's guide to robot gear reduction: harmonic (strain-wave), cycloidal RV, and planetary drives compared on ratio, backlash, stiffness, efficiency, shock tolerance, and where each one actually belongs in a robot.