Knowledge base

Why do I get “Collision or Motor Error” when encoders are enabled?

2026-08-28

Why do I get “Collision or Motor Error” when encoders are enabled?

That message usually means the firmware compared commanded motor steps to encoder counts during a move and they did not agree. It can be a real stall or crash. It can also be false encoder counts, electrical noise, wiring, or a voltage mismatch. If the same joint runs fine with encoders disabled (open loop) and fails as soon as encoders are enabled, start with the encoder path, not the gearbox.

Know which hardware you have

- AR3: Teensy 3.5 and external CUI encoders. That generation is a 5V-ish encoder and limit-switch world. Putting 5V encoder outputs onto a Teensy 4.1 is a common way to get flaky counts or a damaged board, the 4.1 is not 5V tolerant.

- AR4 MK1 and later: Teensy 4.1 (3.3V) with integrated motor encoders. No external CUI units on the stock motors.

Use the Teensy sketch, HMI version, and wiring diagram for your mark. Mixing AR3 CUI hardware with current AR4 files without following the upgrade docs is a frequent source of this error.

What to check first

- Run Test Encoders with the motors disabled, then again with the motors enabled. If counts look clean with motors off and wander or jump as soon as the drives enable, you are looking at noise or a ground issue, not a bad motor.

- Confirm encoder wiring and channel polarity against the schematic in your mark’s manual. A reversed channel often shows up as Collision or Motor Error as soon as the joint moves.

- Use the cable type the manual calls for. Shielded runs from the arm into the electronics help. Follow the shield/ground notes in that same manual, do not invent a grounding scheme.

- Match driver microsteps and kinematics (steps per degree, encoder CPR) to the motor list for your mark.

- If one joint is the problem: put that joint in open loop, then swap the driver with a known-good joint and see if the fault follows the driver.

Filter capacitors (community, not an official BOM item)

Encoder noise and false counts with the motors enabled is a known AR3 and early AR4 issue. In the community, builders often add small filter capacitors on the encoder lines. We are not publishing a capacitor value here. If a value is not in your Annin build manual, it is not an official spec. If you experiment, treat it as a community workaround and confirm it against Test Encoders, do not copy a random forum number into a production build.

If you are still stuck

Note the model (AR3 vs which AR4 mark), HMI and Teensy sketch versions, and whether Test Encoders is clean with motors on versus off. The matching manual and downloads (https://anninrobotics.com/downloads/) beat guessing. The community is useful for noise-related builds; official wiring is always the manual for your mark.

Related: Are the AR4 joint encoders closed-loop? (https://anninrobotics.com/docs/are-the-ar4-joint-encoders-closed-loop/) and Can I use the AR4 control software on an AR3? (https://anninrobotics.com/docs/can-i-use-ar4-software-on-an-ar3/).

This is the official answer. See what the community has said. Looking for a short answer? Try the FAQ.