My ODrive constantly reports SPI faults when using an AS5047 encoder. With the encoder disconnected, I measured the voltages on the bare board ODrive: MISO-to-GND is 1.74V, and MOSI-to-GND is 3.27V. Is there a hardware failure with the MISO pin on the ODrive controller? How can I troubleshoot and resolve this hardware fault? The ODrive controller is version V3.6.
I don’t think that pin is what’s causing the faults. From firmware 0.5.2 on, the ODrive holds MISO up with a weak (~40k) pull-up, so with nothing connected it should read close to 3.3V like MOSI does. 1.74V means something is leaking a few tens of µA to ground, which the encoder overpowers easily when it drives the line. The onboard gate drivers also talk to the processor over that same MISO line, so if motor calibration passes on both axes, the processor end is working.
On the v3.6, SPI faults are most likely noise from the motor phase wires getting into the encoder wiring. Keep the SPI wires short and away from the phase wires, and wrap the phase wires through a ferrite ring.
A few questions:
- Which firmware version are you on? Before 0.5.2 MISO just floats, so the 1.74V doesn’t mean anything, and I’d update to 0.5.6 regardless.
- Do the faults show up with the axis idle and the motor turned by hand, or only once it’s running?
- How long is the encoder cable, and is it shielded?