Calibrating ODrive PID without USB?

The issue I’m currently facing is that while I can get ODrive to run and talk to my RPI over USB – once I turn the motors on (closed loop control), I cannot maintain a USB connection. I’ve replicated this one 3 different ODrives. The first did work for a while though, but I was powering the PI from the onboard power of the ODrive to avoid a ground loop.

Now I use a USB isolator, with ferrite rings on all the motor/psu cables. Cables are routed far from USB (but PSU connection points are still next to onboard USB). I can connect to ODrive before I change state to closed loop control, and usually after an index search by replugging USB.

Replugging USB doesn’t seem to work after closed loop control though – even if motor drivers are off due to a fault (presumably overspeed or similar – not that I can check). A reboot of the ODrive fixes this issue.

How should I go about calibrating PID if I cannot talk to ODrive at all when motors are under power? Is there any reason the USB line has too much noise, even with a USB isolator?

I’m not sure if a ferrite ring should be used on the PSU cables. Maybe @madcowswe can comment here.
(my reason being: the odrive is grounded via the PSU cable, so you are putting a ferrite in the ground path - this could have an effect of amplifying the noise seen by the ODrive)

I’ve also had issues with USB isolators not being fast enough. Are you using the one from the shop?

If you still find it impossible to use USB, you could enable native protocol over UART, and use a 3.3V UART adapter e.g. FT232R with odrivetool, instead of USB.

Yeah, PSU ferrite was a recent addition, most testing was without it. I tried a $20 Amazon isolator and a $50 one, no dice. I gave up on that and made a rats nest cough neatly arranged set of octocoupler for low baud rate UART (9600 works, 115200 didn’t, didn’t try anything else since I’m not doing control over UART). Of course, odrivetool didn’t seem to play dice with different baud rate serial – so I wrote a nodejs clone of odrivetool this evening that I’ll publish later, designed to work with ASCII protocol over UART with nodejs REPL.