Encoder Interface Signal Integrity Design

An encoder reports position by counting pulses, so a single corrupted edge becomes a permanent position error in a motion system. The signals travel down a cable that runs beside motor phases and switching supplies, and they arrive at a receiver that has to distinguish a real edge from the noise that the cable has picked up. Everything between the encoder and the counter matters.

Types of Encoder and Their Outputs

An incremental encoder produces two pulse trains in quadrature plus, often, an index pulse once per revolution. The two channels allow the direction to be determined from the phase relationship, and the index provides a reference for homing. The frequency of the pulses is proportional to speed, so the interface has to work over a wide range from a few hertz to several hundred kilohertz.

An absolute encoder reports a position value over a serial interface rather than a pulse train. The physical layer is often the same differential standard, but the protocol is different, and the receiver has to be able to handle the data rate and the framing. Mixing the two types on one input circuit is possible but requires care with the receiver thresholds and the termination.

The electrical output of an incremental encoder is commonly a differential line driver, an open collector output or a push pull output. The differential version is the only one that should be used on a cable longer than a metre in an industrial environment, and the other two are found mainly on short bench setups where the noise environment is benign.

Single Ended versus Differential Signals

A single ended incremental signal refers to the local ground, so any difference in ground potential between the encoder and the controller appears directly in the signal. On a machine where the encoder is bonded to a frame and the controller sits in a cabinet, that difference can be several volts, which is enough to corrupt the logic level.

A differential signal carries the information as the difference between two conductors. A ground shift appears on both conductors and cancels, and noise coupled from a nearby conductor appears on both as well, so the receiver can extract the wanted signal. This is why differential signalling is specified for encoder interfaces and why a single ended encoder is a compromise on anything but the shortest cable.

The receiver has a defined threshold window that lies around zero volts, and it ignores any common mode voltage inside its specified range. That range is typically several volts either side of the local ground, which covers the ground differences found in most installations. Where the difference can be larger, an isolated receiver removes the problem entirely.

Encoder interface circuit on a motion control board

Cable Termination and Reflections

cable termination matters when the round trip time of the cable is comparable to the rise time of the edges. At a few hundred kilohertz with a fifty metre cable, a fast driver produces edges that reach the far end before the source has finished changing, and without termination the reflection returns and can cross the receiver threshold a second time, producing an extra count.

The termination is placed at the receiver end of the cable for a unidirectional link, and its value should match the characteristic impedance of the cable, typically 120 ohms for a twisted pair. A termination at the encoder end as well is used where the link is bidirectional or where the driver requires it, but it doubles the load on the driver and should be checked against its specification.

Some receivers include a switchable termination, which allows the same board to work with different cable types. Where the termination is fixed, its value should be documented so that a replacement cable with a different impedance does not silently degrade the margin. A poorly matched termination does not usually stop the system working; it reduces the noise margin and produces occasional count errors under load.

Noise, Shielding and Common Mode

Encoder cables run beside motor cables, and the capacitive coupling between them is proportional to the length they share. Keeping the encoder cable separated from the motor cable, and where possible in a separate conduit or tray, is more effective than any amount of filtering at the board end.

Where a shield is used, it should be connected to the enclosure ground at the controller end and, in most installations, left open at the encoder. Connecting both ends forms a loop that carries the ground difference current through the shield, and the magnetic field of that current couples into the signal conductors inside. A shield connected at one end still screens against electric fields, which is the dominant coupling mechanism for a cable pair.

Any remaining common mode voltage at the receiver is handled by the receiver itself, provided it stays inside the input range. Measuring that voltage with the motor running is worthwhile, because a value close to the limit is an indication that the installation rather than the board needs attention.

<img src="https://www.gopcba.com/wp-content/uploads/2026/06/工业控制AI-PCBA.jpg" alt="Encoder input signals routed to a differential receiver” />

Receiver Selection and Filtering

The receiver should be a differential comparator or a dedicated line receiver with a wide common mode range, hysteresis and a short propagation delay that is well matched between channels. Matched delays matter in quadrature systems, because a difference between the two channels shifts the apparent phase and introduces a position error that varies with direction.

Hysteresis is the feature that prevents the receiver from producing multiple edges when the signal is slow and noisy. A receiver without hysteresis will produce a burst of counts when a slow edge passes through the threshold region with noise superimposed. Most dedicated line receivers include a suitable hysteresis, while a general purpose comparator needs it to be added deliberately.

An input filter limits the bandwidth that reaches the receiver and removes high frequency noise, at the cost of adding delay. The filter corner should be well above the maximum pulse frequency of the encoder but low enough to attenuate the interference. Differential filtering with matched components is important, because an unmatched pair converts common mode noise into a differential signal that the receiver will happily count.

Layout of the Encoder Input

Place the receiver close to the connector that brings the encoder cable in, so that the differential pair is short and the noisy cable terminates at a defined point. Any length of trace between the connector and the receiver is an unterminated stub that can reflect, and it is also the part of the board most exposed to coupling.

Route the pair as a tight differential pair over a continuous plane, with the termination resistor as close to the receiver inputs as possible. The rules for a controlled impedance pair, described in our guide to microstrip and stripline routing, apply here as much as they do to a high speed data bus, and the pair should be kept away from switching nodes and clock lines.

Provide a small filter capacitor across the pair at the receiver, matched with a second capacitor to the local ground if the receiver has a reference pin. The reference should be the local analogue or quiet ground rather than a digital return, and the receiver output should be routed to the counter input with a return path that does not pass under the encoder input area. The partition between the noisy and quiet areas of the board is described in mixed signal board design.

Counting Errors and Diagnostics

A count error that occurs occasionally usually has an electrical cause rather than a mechanical one. Compare the count from the encoder with an independent measurement, such as a marker on the shaft, and record the conditions when the error appears. Errors that occur at a particular speed indicate a bandwidth or termination problem, while errors that occur when a motor starts indicate a coupling problem.

A count error that appears as a constant offset is more likely to be an index or phase problem. Check the phase relationship between the two channels with a scope, and confirm that the counter is configured for the same edge convention as the encoder. This is a firmware and wiring issue rather than a signal integrity issue, and it is worth ruling out before changing components.

An error that always occurs in the same direction suggests that one channel is being delayed relative to the other. Measuring the skew at the receiver inputs, rather than at the counter, shows whether the board is responsible. The method for tracing the coupling paths that cause intermittent errors is set out in our article on EMI suppression design.

FAQ

Can I use a single ended encoder on a long cable? Not reliably. The ground difference along a long cable appears directly in the signal. An encoder with a differential line driver, or a converter that produces one, is the practical answer.

Where should the termination resistor be fitted? At the receiver end for a unidirectional link. Fitting one at each end is correct for some interfaces but doubles the load on the driver, so check the specification.

Why do I lose counts only at high speed? Usually bandwidth or termination. A long unterminated cable with a slow receiver will pass the threshold twice on each edge as the speed rises, and the counter sees an extra pulse.

Leave A Comment