Large Current Draw Shutting Down ODrive?

Setup:
I’m using two 6374 motors (from the odrive shop) to drive the wheels of a vehicle. The ODrive is powered by a 6s Lipo and both are being controlled in trajectory control mode using the CUI encoders from the odrive shop, both at 60amp current limit. I’m controlling the vehicle with a ps2 controller, which the joystick is increasing the position command for the trajectory control mode which moves the vehicle forward and backward accordingly.

Problem:
I’m noticing when trying to roll over objects, think of it as a car rolling up a curb, the wheels hit the bump, the vehicle stops, and sometimes it is able to go over the bump, and sometimes it gets halfway over and both motors lose holding torque, and I have to restart the board and calibrate in order to get the motors to work again.

Hypothesis:
Any idea on what might be going on? When it hits the bump and the vehicle stops, I’m still increasing the position command with the joystick, thus increasing the error and forcing it to try and get over the bump.

Is there a setting inside the firmware that tells the boards to shut down if it’s maybe getting too hot or pulling too much current.

Any insight would really help, thanks in advance!

1 Like

Do you know how to use Odrivetool to read the errors?

Sounds like high current draw could be causing a voltage drop that leads to undervoltage protection on the Odrive. That’s something that would be potentially solved by placing a large capacitor on the power input. Maybe 470uF with appropriate voltage rating.

Can you dump the errors and check if you get undervoltage? The procedure is shown here:

The Odrive has a temperature limiting/scaling feature, on by default, not sure where though. It will help prevent the Odrive mosfets from blowing up.

It sounds like you are hitting your current limit or stalling your motors. When the system stalls, try browsing through the (current-) controller values. They are saved to the values they had when the system errored, and are accessable from python. In conjunction with the error code it should give you an indication of what is going on.

My guess, you are hitting your current limit (which I assume you have set to 60A but could still be the default 10A if you haven’t changed it), and the system shuts down.

Ah that’s a great idea! I’m guessing those errors reset after a power cycle? I’m currently getting no errors for either axis. I’ll try and recreate the problem tomorrow and then do an error dump before power cycling.

Thanks!

Thanks for the recommendations! I’m going to recreate the problem and get an error dump. How do I get the current controller values you’re talking about? Current limits for both motors are 60A and they’re definitely being pushed to their limit. I’m wondering if changing the requested current range from the default 60A to 65A will help at all. Either way I’ll post my error dump tomorrow since I need two people to operate the robot.

Thanks!
Matt

To me it sounds like you may have encoder slippage when the vehicle bumps. That can cause the motor to stop providing torque

So I’m getting the following errors from:

In [13]: dump_errors(odrv0)
Axis0:
axis: Error(s):
ERROR_BRAKE_RESISTOR_DISARMED
ERROR_MOTOR_DISARMED
motor: Error(s):
ERROR_BRAKE_CURRENT_OUT_OF_RANGE
encoder: no error
controller: no error
Axis1:
axis: Error(s):
ERROR_BRAKE_RESISTOR_DISARMED
ERROR_MOTOR_DISARMED
motor: Error(s):
ERROR_BRAKE_CURRENT_OUT_OF_RANGE
encoder: no error
controller: no error

Could the brake resistor disarming be due to the fact I don’t have a power resistor connected? From what I understood from the documentation is that it’s only needed if you’re running ODrives off of power supply’s to prevent overvolting the power supply/ODrive.

Re-reading the power resistor section of the documentation does describe the problem:

If you don’t have a brake resistor, the ODrive will pump excess power back into the power supply during deceleration to achieve the desired deceleration torque. If your power supply doesn’t eat that power (which it won’t if it’s not a battery), the bus voltage will inevitebly rise. If you’re unlucky this will break the power supply. At some point, the ODrive’s overvoltage protection will trip, after which both motors will be allowed to spin freely. Depending on your machine, this may or may not be a problem.

I’m a little confused since I assumed this is for something like an electric skateboard where you’re absorbing tons of energy. Any ideas/insight with these errors?

That’s possible, I’ll check the encoder mounting. I think from the error dump it’s related to the brake current/ brake resistor disarming. I’m going to connect the power resistor and see if I still get this error.

Let me know if you think it might be something else, I really appreciate the help!

-Matt

The 50W power resistor doesn’t help, I still get the same error when trying to navigate over tall obstacles

What value do you have the break current resistor configured to? Default is 2 ohm I think? Try turning it off (set it to 0) and see if the error goes away. After that you can decide if the resistor is necessary to protect your battery/power supply.

The brake current resistor was configured to the default 2 ohm, I reduced it down to 0 and haven’t been able to reproduce the problem so that just might have fixed it. Do you know what that setting is doing?

I’m guessing by telling the software what power resistor value you’ve installed it will use that for some feedback calculations, so if there’s a mismatch it will give the brake current out of range error?

thanks for all your help!

You are entirely correct. Glad that fixed it for you. You can always consider installing a brake resistor if you feel your setup requires it.