Hello, I’m making some tests with odrive. My BLDC motor runs without any problem when there is no load at high current mode. But when there is some heavy load that locked the motor, the motor begins to smoke and the motor become very hot immediately. Then I have to cut off power as soon as possible.
ODrive should not be exceeding 30A phase current. Please log the motor.current_control.Iq_setpoint and motor.current_control.Iq_measured when this happens. You can use the liveplotter to generate a graph, if you’d like.
I googled your motor and it says not to exceed 25A continuous current. And I wouldn’t trust the datasheet, these hobby motors are always way over-rated. IMO it’s probably just sitting at 30A and burning, as designed.
Having used 8308 motors I can tell you that 30A is way too high for a continuous current limit on this motor. I use 20A and they get hot. Use an 8318 instead if the load is too big for the motor.
BLDC motors can take huge overcurrents for short bursts - they are only really limited by heat - but remember that power and heat goes with the square of current. By increasing 20A to 30A you are more than doubling the heating power going into the coils.
However, ODrive only has a continuous rating. You cannot set different continuous & peak ratings. I think it would be a good feature for the firmware to include a peak value and “I^2 t” value in the config.
(this wouldn’t help you hold any heavier load, it would just improve dynamic performance a bit / a lot)
Thanks towen, I’m thinking is it possible to add a current safe guard to the firmware that if the current is bigger than a threshold and holds for sometime the current will cut off automatically.
Yes, that’s what I meant by having a ‘peak current’ in the config. Industrial drives do this, so it would be a good feature to have. Most don’t use a fixed time but instead compute I^2t (I squared t) or rather I^2 dt, which is the time integral of the square of the current as it exceeds the continuous rating. Once this value is exceeded it will drop back to the continuous current rating or cut out with an error, whichever the user prefers.
Ah no, I meant that you would have two current limits. So you might set your continuous current to 20A and the peak to 30A, and an I^2t value of say 10A^2 s. So you could drive the motor at 21A for 10s or 30A for 0.1s, but never more than 30A.
I’m interesting to this work. Have a quick go through the main logic.
We need to maintain a window of historical current^2 to do the integration of current^2 over time. Have some questions:
1, Is it enought to use the ictrl.Iq_measured as a measure of current in this window?
2, Are the intervals between every interupt / timer control in run_control_loop are homogeneous ? How long is it?
3, What size of this window should be good enough?
No, I would use the sum of Id_measured and Iq_measured, or ideally the raw current which should be available inside the firmware.
Yes. This is controlled by the scheduler, FreeRTOS. The control loop runs at 8kHz IIRC.
Short enough that a sudden spike doesn’t fry your motor before you get a chance to back off. Running at the mainloop rate would be plenty, but perhaps excessive. 1kHz might be a reasonable minimum rate (because that’s the default current control bandwidth), but then if it’s easy to compute as part of the 8KHz loop (which it should be), then I’d do it.
If running below 8kHz, you could use an EMA (Exponential Moving Average) which is an extremely memory-efficient and CPU-efficient moving average filter. It has an infinite impulse response, but provides a good enough approximation of the average over the last N cycles without needing an array.
I’d try to compute the integral of current^2 since the (EMA filtered) continuous current limit was exceeded, up to the point where it fell below 90% of the continuous current.
You could approximate that very simply with EMA(current^2) * (time since continuous limit exceeded)