Encoders, Resolvers and Feedback

Incremental and absolute encoders, quadrature, resolution and frequency, resolvers, Hall sensors, signal types, wiring and homing.

Why feedback matters

A feedback device tells the drive and controller where the motor really is and how fast it is turning. Without it the controller can only assume. With it the drive can commutate a brushless motor correctly, close the speed and position loops (Servo Systems and Tuning), detect a lost step or a stall, and report the true position to the machine. The quality of the feedback (resolution, accuracy, noise, delay) sets a hard limit on the quality of the motion, so it deserves as much attention as the motor.

The feedback devices

DeviceOutputStrengthsLimits
Incremental encoder (optical or magnetic)Pulses in quadrature (A, B), index ZCheap, simple, high resolutionPosition lost at power-off; needs homing
Absolute encoder (single-turn)Position within one revolution, serial or parallelKnows position at power-up within a turnMore costly; serial protocol to match
Absolute encoder (multi-turn)Turn count plus positionNo homing at all after a power lossBattery or gear/Wiegand-wire counting; the most costly
ResolverAnalog sine and cosine from a rotating transformerVery rugged, high temperature, vibration-proofLower resolution, needs a converter
Hall sensorsThree digital signals, six states per electrical cycleCheap commutation for BLDC motorsCoarse: not for position control
TachometerA voltage proportional to speedSimple speed feedbackLargely replaced by encoders
Linear scale (glass, magnetic)Pulses or serial, along the axisMeasures the load directly, ignoring screw errors and backlashCostly, needs protection from dirt and coolant
LVDT, potentiometer, magnetostrictiveAnalog voltage or digitalSimple absolute position over a short strokeLimited accuracy or resolution (see Sensors)

Incremental encoders and quadrature

An incremental encoder has a disc with a pattern of lines, read by two sensors placed a quarter of a line apart. As the disc turns they produce two square waves, A and B, 90° out of phase (quadrature), plus an index pulse once per revolution. The controller counts the edges: the order of A and B shows the direction, and counting all four edges per line (4× decoding) quadruples the resolution.

Quadrature signals: A, B and indexChannel AChannel BIndex (Z)one line (one period) = four counted edgesforward: A rises before B(in reverse, B leads A)A 1 000 line encoder gives 4 × 1 000 = 4 000 counts per revolution when the controller counts all edges (4× decoding).The index marks one position per turn, used for homing.
Quadrature signals: the order of the A and B edges gives the direction; the index marks one point per revolution.

Worked example: counts, frequency and linear resolution

  • Resolution: a 1 000 line encoder gives 4 × 1 000 = 4 000 counts per revolution in 4× mode (0.09° per count).
  • Frequency: at 3 000 rpm (50 rev/s) each channel runs at 50 × 1 000 = 50 kHz, and the counter must handle 200 kcounts/s. A PLC input card limited to 100 kHz would fail: check the counter’s maximum frequency (and its 4× rating).
  • On a screw: a 10 mm lead screw with this encoder moves 10 ÷ 4 000 = 0.003 mm = 2.5 µm per count. The resolution is not the accuracy: screw error, backlash and thermal growth all add to it.
  • Choosing: pick the resolution so that the smallest move you need is at least 4 to 10 counts, and so that the maximum speed does not exceed the counter’s frequency limit.

Absolute encoders and Gray code

An absolute encoder reports the position directly: every shaft angle has a unique code, so there is nothing to home. A disc with several tracks is read in parallel; the patterns are in Gray code so that only one bit changes between neighboring positions, which prevents a large error if the read head straddles two sectors. Modern encoders convert it to a serial protocol (SSI, BiSS, EnDat, Hiperface, or an industrial fieldbus such as EtherCAT or PROFINET).

Absolute encoder disc (Gray code) and why Gray code is usedshaftread head (4 sensors)16 positions per turn from 4 tracksPositionBinaryGray code000000000100010001200100011300110010401000110501010111601100101701110100Binary changes several bits at once (3 to 4: 0011 to 0100),so a misaligned read can be far wrong. Gray code changes one bit.
A four-track Gray-code disc (16 positions per revolution) and the comparison with binary code.

Worked example: resolution of absolute encoders

  • A 17-bit single-turn encoder has 217 = 131 072 positions per turn: a resolution of 360° ÷ 131 072 = 0.003° = 9.9 arc-seconds.
  • A multi-turn encoder adds a turn counter: with 12 bits of turn count it tracks 4 096 revolutions, for a total of 29 bits.
  • Sin/cos (1 V peak-to-peak) encoders give an analog sine and cosine per line that the drive interpolates: a 2 048 line sin/cos encoder interpolated ×4096 gives about 223 positions per turn. The accuracy of the optical disc and the signal quality set the true accuracy, much lower than the number of bits.

Resolution, accuracy and frequency

TermMeaningTypical figure
ResolutionThe smallest change the device can report (counts per turn or per mm)Thousands to millions of counts per turn
AccuracyHow far the reading may be from the true positionRotary: ±20 to ±120 arc-seconds; linear scale: ±1 to ±5 µm per meter
RepeatabilityHow closely the same position is reported againMuch better than the accuracy
Maximum frequency or speedThe highest signal frequency the device or interface can handle100 kHz to several MHz; check the cable length
LatencyThe delay between the shaft position and the value the drive seesMicroseconds; matters for the velocity loop bandwidth

A linear scale with a 1 µm resolution gives 1 000 counts per millimeter. Many “high-resolution” encoders are limited by the signal noise, not the number of bits: the last two or three bits are often noise.

Resolvers, Hall sensors and tachometers

  • A resolver is a rotating transformer: an excitation signal of a few kHz on the rotor winding induces sine and cosine signals in two stator windings whose amplitude depends on the shaft angle. It has no electronics or optics on the shaft, so it survives shock, heat (150 °C and more) and oil. A resolver-to-digital converter in the drive gives 12 to 16 bits. It is the choice for harsh environments.
  • Hall sensors in a brushless motor give three digital signals that change every 60° electrical, enough to commutate the motor but not to control position. Many servo motors have both Halls and an encoder.
  • A tachometer (a small DC generator) gives a voltage proportional to speed. It was the standard speed feedback; encoders now do the job and also give position.

Signal types, cables and wiring

SignalLevelsNotes
TTL (5 V, single-ended)0 to 5 VShort cables only; picks up noise
HTL (10 to 30 V)24 V push-pullIndustrial, better noise margin, still single-ended
Differential line driver (RS-422)A and /A, B and /B, Z and /ZPreferred: noise cancels, long cables (up to 100 m)
Sin/cos 1 V pk-pkAnalog differentialHigh resolution through interpolation; sensitive to noise
Serial (SSI, BiSS, EnDat)Clock and data, differentialAbsolute position by a protocol; match the protocol and clock
Open collector (NPN or PNP)Switches to 0 V or the supplyNeeds a pull-up or pull-down to the right level
  • Use twisted-pair shielded cable, with the shield bonded at the drive end (and at the encoder if specified). Route it away from motor cables, which carry the high dv/dt (see Cabling, Grounding and Noise).
  • Terminate differential signals with the right resistor at the receiver (about 120 Ω) and check that the receiver matches the line driver.
  • Keep the supply voltage right at the encoder end. The cable drop in the supply wires can bring a 5 V encoder below its minimum on a long run: use the sense wires or a higher supply voltage (the encoder accepts 5 to 30 V in many cases).
  • Check the pin-out twice: reversed A and B reverses the direction, and swapped phases in a servo give a runaway.

Homing and reference

After a power-up an incremental system does not know where it is. Homing moves the axis to a known reference and sets the position counter. Common methods: seek a home switch and then the next index pulse (the best repeatability), drive into a hard stop and detect the torque rise, or use a limit switch. An absolute (multi-turn) encoder holds its position through a power loss and needs a one-time reference only. The home switch must be a reliable sensor (see Sensors and Field Devices) with a repeatable edge, and the approach direction and speed should be fixed.

Motor feedback or load feedback

With the encoder on the motor shaft, the loop controls the motor position and the screw error, backlash and belt stretch between the motor and the load are outside it. A linear scale on the load puts them inside the loop, giving true position at a cost: the loop includes the mechanical compliance, which is harder to tune. Dual-loop control uses the motor encoder for the fast velocity loop and the load scale for the position loop, which gives the best of both.

Troubleshooting feedback problems

SymptomLikely causeCheck
Position error that grows over timeLost counts: noise, an input too slow, a slipping couplingCount rate against the counter limit, shielding, coupling set screws
Runaway or fault on enablingReversed feedback direction or wrong commutation offsetSwap A and B or invert the direction; repeat the commutation set-up
Axis position differs after each homingIndex not used, a worn or loose home switchHome on the index and fix the switch
Occasional jumps in positionNoise on the cable or a poor groundUse differential signals, bond the shield, separate from motor cables
Encoder fault or no signalSupply low, a broken wire, a failed encoderMeasure the supply at the encoder; check the signals with a scope
Whine on a servoNoisy or quantized velocity feedbackRaise the resolution, add a filter, check shielding (see Servo Systems and Tuning)
Absolute position wrong after a power lossMulti-turn battery flat or a counter faultReplace the battery and re-reference the axis

Related

FAQ

How many pulses per revolution do I need?

Divide the smallest move you need by the travel per revolution to get counts per turn, and aim for several counts per smallest move. Then check that the highest speed gives a signal frequency within the counter’s limit.

Incremental or absolute?

Incremental is cheaper and perfectly adequate if the machine can home at start-up. Choose absolute for axes that cannot easily home (a robot joint, a long travel), or when a power loss must not lose the position.

What is the difference between resolution and accuracy?

Resolution is the smallest step the device reports; accuracy is how close the reading is to the true position. A high-resolution encoder can still be inaccurate over a turn because of disc and mounting errors.

Why does my encoder count wrongly only at high speed?

Most often the counter input or the cable bandwidth cannot follow the frequency, or noise adds false edges. Check the frequency against the input rating and use differential signals.

References

  • Heidenhain, Rotary encoders and Linear encoders technical information; Renishaw and Sick encoder application guides.
  • Analog Devices, Resolver-to-digital converter AD2S1210 data sheet and application notes.
  • BiSS Interface and SSI specifications; EnDat 2.2 specification (Heidenhain).

Last reviewed: October 2026. Resolutions and accuracies are typical; use the manufacturer’s data for the exact device.