AutomateDirectUSAMotion LibraryIndustrial monitors & PCs

Explainer

Why encoder count trips a brushed DC servo drive following error

Servo and stepper motion Published 6 min read By AutomateDirectUSA engineering team

Short answer

A following-error trip limit written in pulses shrinks in degrees as the encoder count rises: a ±127 pulse window is ±22.9° of shaft error at 2000 quadrature counts per revolution and ±11.4° at 4000. Compute the window in degrees for the encoder you plan to fit, keep it at least twice the axis's worst transient lag, and keep this drive class at or below 2000 counts per revolution unless its window is wider or adjustable.

On this page
  1. A trip window in pulses is a window in degrees in disguise
  2. Lines, counts and the factor of four
  3. Shaft-error window at 2000 and 4000 counts per revolution with a ±127 pulse trip
  4. Same axis, higher count, new trips: what to check first
  5. Fit the count to the window, then tune
  6. Questions asked

A following-error trip limit written in pulses is a window in degrees in disguise: as the encoder count rises, the same pulse window guards a smaller and smaller mechanical error. On the brushed DC servo drives commonly fitted in CNC retrofits, field reports put that window at ±127 pulses. At 2000 quadrature counts per revolution that is ±22.9° of shaft error; at 4000 counts per revolution it is ±11.4°. Doubling the count halves the lag the drive forgives, which is why an axis can run all day on the smaller encoder and trip constantly on one of twice the counts with nothing else changed. The fix is not more gain: compute the window in degrees for the encoder you plan to fit, keep it clear of the axis's worst transient lag, and treat a higher count as a trade, not an upgrade.

A trip window in pulses is a window in degrees in disguise #

A following error is the difference between where the command says the shaft is and where the encoder counts it, held in the drive's own count units. The drive watches that difference continuously; when it grows past the trip window, the drive drops the motor bridge and faults, and it usually happens at the acceleration or deceleration peak, where the lag is worst. On the drives these retrofit reports describe, the window is a small fixed number of pulses, and that is the whole trap. A pulse is not a position unit: the mechanical error one pulse represents depends entirely on how many pulses arrive per revolution. Change only the encoder and you have silently changed the fault window in degrees without touching a parameter.

Lines, counts and the factor of four #

Encoder datasheets quote lines; drives count pulses. A line is one optical slot on the disk. A quadrature decoder counts both edges of channel A and both edges of channel B, so one line yields four counts at the counter: for example, a 360-line disk delivers 1440 counts per revolution, not 360. This is why count conventions must be reconciled before any comparison. The figures quoted in retrofit field reports for these drives do not state their convention; a number that is really disk lines quadruples when it reaches the counter, and the window in degrees shrinks by that same factor of four. Take the counts-per-revolution figure the drive's counter actually sees — from the drive's documentation, not the encoder's label — into every window calculation.

Shaft-error window at 2000 and 4000 counts per revolution with a ±127 pulse trip #

Inputs. Trip window: ±127 pulses, the following-error limit retrofit field reports give for this family of brushed DC, step-and-direction drives; take the figure that governs your drive from its own documentation. Encoder A: 2000 counts per revolution as seen by the drive's counter, which under quadrature decoding is a 500-line disk (2000 ÷ 4). Encoder B: 4000 counts per revolution at the counter, a 1000-line disk.

Rule. Mechanical window in degrees = pulse window × 360° ÷ counts per revolution — a unit conversion from pulses, through revolutions, to degrees.

Arithmetic. 127 × 360 = 45,720. Encoder A: 45,720 ÷ 2000 = 22.86, so the drive tolerates about ±22.9° of shaft error. Encoder B: 45,720 ÷ 4000 = 11.43, about ±11.4°.

Result. Doubling the encoder count halves the mechanical error that counts as a fault: ±22.9° becomes ±11.4°. Resolution is not the constraint — encoder A still resolves about 0.18° per count, and machine accuracy after any belt or gearbox reduction sits well inside that. One caveat before trusting the label: the arithmetic must use the counts the drive's counter actually sees. If a quoted 4000 figure is really disk lines, the counter sees 16,000 counts per revolution (4000 × 4) and the same window collapses to ±2.9° (45,720 ÷ 16,000) — tighter than almost any accelerating axis survives.

Decision. Fit the encoder that leaves margin, not the one with the biggest number: measure the worst shaft lag at the fastest commanded move, double it, and demand a mechanical window at least that wide. In counts, the ceiling is 45,720 ÷ (2 × worst lag in degrees). At 11° of worst lag that ceiling is 2,078 counts per revolution — the smaller encoder just fits, and nothing larger survives. On a fixed ±127 pulse drive, this arithmetic is why retrofit practice settled at or below 2000 counts per revolution: the doubled-count encoder halves the window to where a hard acceleration trips it, exactly as the field reports describe. Where a machine genuinely needs finer resolution than the window tolerates, the answer is a drive that sets its trip window in position units, not more gain; pairing one with an old brushed DC motor is its own sizing exercise, covered in replacing drives on old DC servo motors without sizing errors.

Same axis, higher count, new trips: what to check first #

Symptom: following-error faults that start right after an encoder change, almost always at the acceleration or deceleration peak, while the axis holds position cleanly at rest and tracks steadily at constant speed. Work the causes from cheapest to check:

  • Reconcile the count convention. Multiply disk lines by four for counter counts and rerun the window arithmetic; a lines-versus-counts mix-up alone moves the window by a factor of four. Confirming check: commanded travel per revolution lands wrong by exactly a factor of four, or the trip threshold in degrees matches the recomputed figure rather than the label.
  • Recompute the window in degrees at the new count, and compare it with the real lag. Use the conversion from the worked example, then measure the lag at the peak of a normal move. Confirming check: reduce the acceleration rate; if the fault clears at gentler rates, the transient lag was crossing the window, and no motor swap will fix that.
  • Retune at the new count. Loop gains expressed in counts scale with the resolution, so a loop stable at one count can be sluggish or noisy at another. Confirming check: refit the previous encoder; if the trips vanish, retune deliberately at the new count instead of condemning the drive.
  • Rule out the encoder supply and wiring before blaming resolution. Check that the encoder's current draw fits the drive's encoder-supply rating and that both channels stay clean at top speed. Confirming check: an oscilloscope on channels A and B at speed shows missing or ringing edges.

For the fuller fault tree, work through troubleshooting a servo axis that faults mid move.

Fit the count to the window, then tune #

Work the choice in this order:

  1. Take the real trip window from the drive's documentation; the reported pulse figure for this drive family is not a universal constant, and other drives set wider windows or set them in position units.
  2. Bound the axis's worst transient lag, measured at the shaft during the fastest move the machine must make.
  3. Compute the counts-per-revolution ceiling and pick the lowest encoder that still meets the machine's accuracy requirement after gearing; anything above the ceiling buys trip risk, not performance.
  4. Check the encoder electrically: the drives in these retrofit reports supply the encoder's 5 V DC themselves, so a shaft kit that accepts a 5 V supply needs no separate encoder power supply — match the encoder's current draw to what the drive's manual allows before wiring.
  5. Tune last, from a known opening point for this drive class: the P200, D400, I4 first gains laid out in starting PID values for a brushed servo drive give a stable place to begin after the feedback is sized.

Size the feedback to the window, and the drive that tripped on a bigger number runs without drama.

Questions asked

Is a higher encoder count always the better choice for a servo axis?

No. Resolution pays only up to what the machine needs and what the drive can use. Past that, it shrinks a fixed-pulse following-error window and can outrun the counter input at top speed. Size the count from the machine's accuracy requirement after gearing and from the trip-window arithmetic above, not from the largest number on the shelf.

My encoder is rated in lines. What goes into the window calculation?

Multiply lines by four: a quadrature counter sees two edges on each of the two channels, so a 720-line disk presents 2880 counts per revolution. Convert the pulse window to degrees from that figure, and use the convention the drive's documentation states, because a lines-versus-counts mix-up moves the window by a factor of four.

How do I work backwards from a lag budget to a maximum encoder count?

Divide the pulse window times 360 by twice the worst shaft lag you can accept in degrees; the quotient is the largest counts-per-revolution figure that fits. With the drive window used above and a 5 degree lag budget, the ceiling is about 4,570 counts per revolution — essentially the doubled-count encoder the retrofit reports found marginal on laggy moves.

Does the same trap apply to stepper axes?

Open-loop steppers have no following-error trip at all: nothing compares command with position, so an overloaded axis stalls and loses steps silently instead of faulting. Closed-loop stepper drives do compare position, and their trip windows follow the same arithmetic, with degrees per count falling as the encoder count rises — run the same calculation before fitting a high-count feedback kit to one.

Keep reading

  • Explainer

    Servo Positioning Resolution Versus Stepper Step Angle Explained

    A 0.018° move needs 360 ÷ 0.018 = 20,000 usable feedback counts per revolution, which come from the encoder and the drive's decoding and scaling, not from the servo label. Matching 3,000 command pulses per revolution on a stepper and a servo only matches command scaling; short-time overload capacity and high-speed performance still differ.

    Servo and stepper motion

  • Explainer

    Servo drive step rate versus encoder feedback rate

    The step/direction input rating and the encoder feedback input rating are two separate numbers in the drive's manual, and both must be checked at maximum axis speed. A worked example shows where a 3,000-line encoder at 3,000 RPM lands against each limit and when a step multiplier fixes it.

    Servo and stepper motion

  • How-to

    Starting PID values for a brushed servo drive: P200, D400, I4 first

    For a brushed DC servo drive, start the position loop at P = 200, D = 400 and I = 4, sweep the loop-time parameter L from 3 to 7 for the deadest response to a hand disturbance, and only then set range, trip and feedforward. These are first-pass values for a manual tune on a step-and-direction retrofit, with the encoder trip starting near four times the line count.

    Servo and stepper motion