Why does my encoder signal glitch from cable noise?: causes and fixes
Electrical noise on encoder A, B and Z lines adds false counts, which show up as position errors, jitter or random alarms. How the signals work, why the motor power cable is the usual source, and how to wire and test the encoder cable.
Updated 2026-11-28
Short answer
Encoder noise usually comes from the motor power cable. Fast switching from a drive couples into nearby signal wires, and a single false edge is counted as a real move. Use twisted-pair differential signals, a shielded cable with the shield terminated the way the drive requires, and keep the encoder cable physically separate from the motor power cable. Confirm with an oscilloscope before replacing parts.
How encoder signals are carried
- A quadrature encoder gives two square waves, A and B, 90 degrees apart. The direction is set by which channel leads, and each edge is one count.
- A Z (index) pulse gives one reference per revolution.
- Line-driver (RS-422) outputs send each signal as a pair, A+ and A-. The receiver reads the difference, so noise that hits both wires equally cancels out.
- Open-collector outputs have no pair. They are far more sensitive to noise and to cable length.
Worked example: how many edges a noise spike can affect
Take a 2500-line encoder read in x4 quadrature, so it gives 10,000 counts per revolution. At 3000 rpm it makes 2500 × 3000 ÷ 60 = 125,000 pulses per second per channel, which is 500,000 edges per second. A single false edge is one count of position error that the controller never removes, so random noise accumulates as drift or as a following error alarm.
Symptoms that point to noise
- Position error or following error alarms that appear mainly when the power stage switches hard, for example during acceleration or with a long motor cable.
- Jitter at standstill, or a small random movement the controller cannot explain.
- Counts that differ between forward and reverse runs of the same move, or a Z index that drifts relative to a fixed mark.
- Faults that appear only when another machine starts nearby.
Check the cable and the wiring
- Use shielded twisted-pair encoder cable, with each pair (A+ and A-, B+ and B-, Z+ and Z-) twisted, and keep the length within the limit the encoder maker gives.
- Keep the encoder cable away from the motor power cable. A practical separation of about 100 mm is often used, or cross the two cables at right angles. Do not run them together in one conduit or tray.
- Terminate the shield as the drive manual says, usually at the drive end. A long pigtail on the shield acts as an antenna, so keep the shield connection short.
- Check the encoder connector and the 5 V supply at the encoder. Low supply voltage gives erratic output.
How to test it
- Scope A+ and A- together. The two should be mirror images. Ringing or spikes on one line only point to a wiring or termination fault.
- Turn the motor slowly by hand with the drive disabled and count the edges. Extra edges while the shaft is still show noise.
- Swap in a known good cable, then move the power cable and see whether the fault moves with it.
- If the maker supports it, fit a ferrite core on the encoder cable close to the drive.
Common mistakes
- Swapping A+ and A-, or swapping whole pairs, which gives a reversed or unreliable count.
- Using an unshielded spare cable or a generic extension cable for the encoder.
- Grounding the shield at both ends when that creates a ground loop, or leaving it ungrounded.
- Replacing the encoder when the real problem is the cable routing.
Synchronous speed, slip and VFD speed
nₛ = 120·f / p · s = (nₛ − n) / nₛ
V/f control keeps slip in rpm roughly constant at the same torque, so speed = 120·f/p − rated slip. At light load the motor runs closer to synchronous speed. Above base frequency torque falls (field weakening).
Sourcing a motor or production equipment from China? We can find and contact the right factories for you in Chinese. Ask on WhatsApp →