ODrive not fully booting when the bus voltage rises too slowly

Hi all,

I’ve noticed that when the bus voltage rises slowly from 0 to 5V at a rate of less than ~1 volt per second, the ODrive does not boot correctly. Communication protocol does not even work in this state so I am unable to properly debug the error. Even if the voltage continues to rise (quickly) afterwards, the ODrive stays in this limp state until it is powered off and powered back on properly. I assume this happens due to any of the peripherals not being powered up yet when the main CPU is trying to initialise them (e.g. the DRV chip). A solution would be to detect this failure, and reboot the ODrive. However I have no clue where the ODrive fails. I noticed the _Error_Handler function under Firmware/Board/v3/Src/main.c can be called quite a lot if something goes wrong during initialization. In that function is just a while(1){} loop, so I replaced that with NVIC_SystemReset(); But no success. Any other ideas? Thanks in advance!

If you’re wondering why I need this: I’m using the ODrive in an electric bicycle, and if you were to go downhill when the battery voltage is cut (main switch is off or the BMS has cut power), the generated energy has nowhere to go, thus charging up the caps and increasing the voltage, until the MOSFET’s or the caps blow. Not good. I adjusted the update_brake_current() function so the brake resistor is always fully applied when the over-voltage trip level is exceeded. This works perfectly if the ODrive is properly booted. But if it is powered very slowly - which is realistic if the power is being generated by the wheel - this does not work.

Hmm. Maybe you could hold the reset pin with a schmitt trigger opamp circuit until the supply voltage is sufficient?

But I wouldn’t necessarily worry about blowing up the drive on overvoltage. The drive will not generate a higher voltage than it can cope with unless either:
a) it is actively applying torque in the opposite direction of motion (ie braking) - which is something it will stop doing anyway if it trips on an overvoltage error, or
b) the motor is spinning extremely fast, more than 20% faster than the odrive could move it with zero load, max setpoint, and max supply voltage

2 Likes

Hi Tom,

Thank you for your reply. I was starting to think of a hardware fix, and that schmitt trigger circuit would indeed work! Although I think it should be possible to fix this with software which would be cleaner.

I am worried about (b), because my motor is a high torque hub motor. Using a 48V battery, the max speed attainable due to back EMF is just 25kph. So going downhill I think it is definitely possible to overvolt the ODrive.