Diagnosis puzzle: Odrive dead due to regen current

I was turning my motor to generate regen current and the Odrive abruptly died. Now the power LED lights up, but no one’s home.

I thought (from reading posts on this forum) that the Odrive was able to defend itself against this kind of thing. In fact someone explicitly said that killing an Odrive this way shouldn’t be possible.

The Odrive is powered from a 48V power supply and dumping the power into a 2 Ohm braking resistor. There were no ground loops that I could see. The power supply is set to trip out on overvoltage, and the Odrive never complained about voltage errors in any case.

I have four confounding factors/theories as to what went wrong:

Sharp accelerations:

What I was testing was sudden, sharp accelerations of the motor (needed for my application.) So the motor was going from stationary to high speed, very suddenly. Is that by itself something that the ODrive just isn’t able to handle? (It’s a 14 pole motor and has never been anywhere near the Odrive’s speed limit.)

Firmware mods:

I’ve modified the firmware running on the ODrive.

Now I’m positive that I wasn’t doing anything to interfere with the workings of the actual control loop. All my edits do is alter the value of the torque setpoint in Controller::update, and in fact when the Odrive died the torque was being set to 0. Everything is done in it’s own low priority thread and only touches variables that I’ve created myself.

But is it possible that I could have, for eg, somehow slowed down the Odrive’s mainloop enough that something went catastrophically wrong? (I have done things that slowed it down too much before, and all I got was DEADLINE_MISSED errors. The code I was running when it died had no such errors.)

Encoder slip:

It’s possible, though I’m not at all sure that this actually happened, that the diametric magnet used by the encoder could have been slipping on the motor shaft when the acceleration was sudden enough. Could that have caused the Odrive to phase the windings at the wrong time, and dump too much power into vbus that way?

Unreliable brake resistor FETs:

It’s also possible that the FETs driving the braking resistor were damaged. Previously I’d been using a far too low value resistor, and was getting CURRENT_LIMIT_VIOLATION errors.

On replacing the resistor with a 2 Ohm one, the CURRENT_LIMIT_VIOLATION errors “retreated”. I could still get them, but I had to accelerate the motor more sharply in order to do so. It was in testing this (with the torque set conscientiously to 0) that I killed the board.

I don’t know enough about FET failure modes, but is it possible that one of them became intermittent or “sticky”, so that it stayed closed when it should have been open, and the regen power went into vbus?

Opinions needed!

I am probably going to buy another Odrive, but it would be nice to know what went wrong so I don’t immediately fry the new one as well.

Need advice from the pros. Which of these do you think was most likely? Or are they all wrong and it was something else?

Did you turn the motor faster than the ODrive would have been able to spin it, given 48V and 100% demand, no load?
If so, it may not have been able to defend itself adequately. If the back-EMF is dangerously high and the ODrive goes to error state and turns off switching, it may not be able to drive the brake resistor, and the EMF could still overcharge the DC bus capacitance via the body diodes of the FETs.
I have killed one ODrive in the past this way. Oskar was kind enough to replace it for me in my case, but it’s not technically covered by their warranty.

If that’s true, then yes, it should have protected itself. :confused:

How did you accelerate the motor sharply with the torque set to 0? I’m confused. :stuck_out_tongue:
And no, the FETs will not “stick” On or Off - they have a dedicated driver which forces them to either be in ON or OFF state at all times. If the driver failed, the FETs would go into a linear region (i.e. have a resistance not near 0 or infinity) and get very hot.

How did you accelerate the motor sharply with the torque set to 0? I’m confused.

I’ve attached a crank to the motor shaft and am turning it by hand. When the torque goes on it’s acting in the other direction, ie trying to slow me down.

Did you turn the motor faster than the ODrive would have been able to spin it, given 48V and 100% demand, no load?

I suppose it’s possible but it really didn’t feel that fast to me. I’m sure I’ve spun it faster before without issue.

The FETs were my leading theory, given the previous screw up with the resistor. Sounds like it wasn’t that though.

It’s also worth noting that I got no voltage errors at any point, and the overvoltage cutout on the power supply never tripped. The only error I saw was CURRENT_LIMIT_VIOLATION.

Yeah, it seems like you probably had a combination of factors that led to insufficient current being sent to the brake resistor.

The best way to prevent this in the future is to enable the dc_bus_overvoltage_ramp.
ODrive.Config | ODrive

Is that a geared crank or direct-drive? What is the Kv of the motor, i.e. how fast would you have to turn the crank to produce 60 volts? If that’s faster than a human can turn a crank then we can rule out excessive back-EMF.

And if the torque was set to 0, then it shouldn’t have been producing any regen current.

Motor Kv was 70, and the gearing was 16:1, meaning I would need to turn at 262rpm to get 60V. I can’t have been doing more than 150rpm by hand - and that’s if I have time to get up to speed. From a standing start (which was how the Odrive blew) I’m not sure I could get more than 50rpm.

However, torque was definitely set to 0.

Edit @Wetmelon the overvoltage ramp was already enabled, starting at 49V and ending at 52V. Could the value of the setting dc_max_positive_current have any effect on things?

If the acceleration is high enough, the current controller can simply go unstable. We try to detect it and fault out, but maybe it just fried before it had time?