I’m just having a quick question. What is the difference between the current limit and current limit margin of an axis?
We have some hoverdrive like motors installed on our ODrive and it hit the curb. The ODrive gave us an error that the current limit was exceeded, which makes sense. It was also set fairly low. Now we increased it but didn’t know what the difference the current limit and the current limit margin is. Is the margin a temporary tolerance for current spikes?
Thank you
Depending on your answer, I can also update the variable descriptions in the docs if you like.
That’s the right way to think about the current limit margin! The current limit represents the max value that the current in our motor can take on and the margin is the threshold that it can surpass the current limit before the board throws an error. You can see that logic here in the firmware. Hope that helps!
if motor says stall current is 13A does that mean current limit should be no higher than 13? and how would you decided what is ok for margin? won’t motor burn out if margin too high?
It depends on what kind of motor you have. If you look at the datasheet for your motor, does it specify anything about hold limitations or stall time limitations? If not, it should be ok to run your motor at a current limit of 13A and have a small current limit margin or lower the limit and raise the margin so long as you don’t exceed 13A.
I SINCERELY would appreciate your comment on this. I have limited knowledge. I don’t want to burn the motor or drive, but I also don’t want to needlessly limit the motor. So for this kind of setup, is 13 for limit and 13 for ‘requested range’ and 8 (default) for margin ok? or is it risky?
There is definitely someone more knowledgeable than me that can speak on this, but my interpretation of stall current is that it represents the amount of current that can safely pass through the motor while it is stalled. With that said, you can probably set the current limit to 13A and start off with a low margin, like 2A, and ramp up the limit gradually if you are encountering CURRENT_LIMIT_VIOLATION’s.
thank you. I wasn’t really sure I was even interpreting the meaning of those amp ratings correctly. ie, I had read somewhere that 60A was a good value so was going to do that, until i looked at motor sheet and got scared.
Motors are thermally limited, generally. The windings have a resistance of 1.37 Ohms, and Power = I^2 R. So at 60A, you would be putting nearly 5kW (!) into the winding. That’s a recipe for smoke / flames.
At 13A, it’s only 230W. That sounds reasonable - maybe this motor acts as enough of a heat sink to get rid of 230W of heat without getting too hot - that’s where the 13A comes from.
However, there’s nothing stopping you from using a higher power for short bursts, as long as you are aware that sustained high currents will overheat the motor. 20A (550 W) shouldn’t be a problem, you could maybe even get away with 25A (850 W) if it’s for less than a second and the motor is not already hot.
The first motor you posted has a resistance of 5 Ohms, apparently. This is not suitable for use with ODrive - the max current is too low.
@towen so, the motor wasn’t doing anything until I set odrv0.axis0.resistance_calib_max_voltage = 12.0. But I don’t understand what you mean odrive isn’t suitable. I was driving the robot around last night. what exactly is not suitable? (I have the 56V odrive with 36V battery). That was taken from product page, so if it’s different from the second link, maybe it’s the wrong data or something. Or am is it just a matter of time till i kill my nice new Odrive? maybe that page has specs that are wrong. the second image is from the manual they sent me.
Normally people struggle with high resistance motors (which work at less than 1A), because the current measurement shunt resistors of ODrive are meant for up to +/- 120A. There is a programmable gain amplifier on the ODrive, but even at the lowest range, the noise is a bit too much for these motors.
Normally I’d choose a motor that can take at least 20A, or has a winding resistance less than 1 Ohm.
The robot in the video, Is that using the motors with 1.37 Ohm resistance / 13A limit? That’s fine.
But another motor you posted had 5 Ohms, which is too high - although it may still work at high voltages, but there will be a lot of current sensor noise, so control performance might be not so good.
There’s no risk of damage to the ODrive, just the motor won’t perform so well - you’ll find that you can’t increase vel_gain very much before you get vibration, for example.
Yes, it does.
Gimbal mode doesn’t use the current sensors - but it assumes that the motor moves quite slowly i.e. voltage across the resistance dominates, and there is little back-EMF.
So it might not work for high speeds.