Hoverboard Guide missing 'enable_brake_resistor' instructions?

Is it possible someone who knows something, could update the hoverboard guide if needed?

From what I can tell, there were recent changes to odrive firmware, making the presence of the brake resistor a required configuration parameter.

Are enable_brake_resistor or dc_max_negative_current needed to set up the odrive for hoverboard motors?

Is some mention of enable_brake_resistor or dc_max_negative_current in the current version of the hoverboard guide needed?

Everything in the guide works until you try to spin the wheel with:

odrv0.axis0.controller.input_vel = 2

The wheel just moves a tiny bit, stops, and becomes unresponsive.

A year ago I had a working wii nunchuk / arduino controlled hoverboard wheeled cart. Recently, I made the mistake of updating Anaconda Python, Odrivetool, and the firmware on my 56 v Odrive. I cleared the old configurations and walked through the hoverboard guide several times while trying to figure this out. The fun is long gone.

Thanks in advance for any relevant information on brake resistor related config, and/or update to the hoverboard guide.

We can update the guide, or if you know where it should go you can actually update it! And then it will generate a pull request for us.

Were you able to get it working with the enable_brake_resistor = True and / or setting dc_max_negative_current?

To be honest, I am not knowledgeable enough to tell what is missing or wrong. I am just guessing.

Following the guide, it looks like this…

In [2]: odrv0.axis0.requested_state = AXIS_STATE_CLOSED_LOOP_CONTROL

In [3]: odrv0.axis0.controller.input_vel = 2

In [4]: dump_errors(odrv0)
system: Error(s):
  ODRIVE_ERROR_DC_BUS_OVER_REGEN_CURRENT
axis0
  axis: no error
  motor: Error(s):
    MOTOR_ERROR_SYSTEM_LEVEL
  sensorless_estimator: no error
  encoder: no error
  controller: no error
axis1
  axis: no error
  motor: Error(s):
    MOTOR_ERROR_SYSTEM_LEVEL
  sensorless_estimator: no error
  encoder: no error
  controller: no error

After adjusting the brake resistor and max negative current, i get an error as soon as I put it in Closed Loop Control.

In [2]: odrv0.config.enable_brake_resistor = True

In [3]: odrv0.config.dc_max_negative_current = -10

In [4]: odrv0.axis0.requested_state = AXIS_STATE_CLOSED_LOOP_CONTROL

In [5]: dump_errors(odrv0)
system: no error
axis0
  axis: no error
  motor: Error(s):
    MOTOR_ERROR_BRAKE_RESISTOR_DISARMED
  sensorless_estimator: no error
  encoder: no error
  controller: no error
axis1
  axis: no error
  motor: no error
  sensorless_estimator: no error
  encoder: no error
  controller: no error

Obviously something is still not right.

The “BRAKE_RESISTOR_DISARMED” error (which is very confusingly named and poorly documented I agree) is a latching fault. It can’t be cleared with the reset errors command, you have to reboot the ODrive.

Thanks towen
I figured out that rebooting clears the error.

I just don’t know why the error is being thrown in the first place.

Is it still being thrown? If so, is it thrown on its own, or with another error? Are you still getting the ‘over regen current’ error?

If so, are you running on a battery or a power supply?
If you’re on a battery, then you could reduce the dc_max_negatige_current even further e.g. to -20A.
If you’re on a power supply, you could enable the brake resistor’s voltage clamping mode (with overvoltage_ramp_start and overvoltage_ramp_end).

1 Like

The ODRIVE_ERROR_DC_BUS_OVER_REGEN_CURRENT error went away when I added odrv0.config.enable_brake_resistor = True.

Currently,

I set odrv0.config.enable_brake_resistor = True.
then set odrv0.axis0.requested_state = AXIS_STATE_CLOSED_LOOP_CONTROL.
I immediately get the MOTOR_ERROR_BRAKE_RESISTOR_DISARMED error regardless of whether dc_max_negative_current is set to default (-0.009999999776482582) or -50.

As far as I know, that is the only error.

I am using a hoverboard battery pack, currently at around 34 volts.

1 Like

:thinking: make sure you save & reboot after enabling the brake resistor odrv0.save_configuration()

Thanks Wetmelon

odrv0.config.enable_brake_resistor = True

then

odrv0.save_configuration()

got me past the MOTOR_ERROR_BRAKE_RESISTOR_DISARMED error and allowed me to enter Closed Loop Control and spin my wheel.

I did not make any adjustments to my dc_max_negative_current

A little bit of the fun is back. Thank you very much for your assistance. I am not comfortable updating the Hoverboard Guide myself with the needed changes since I can’t explain the rational or considerations for the settings. It was blind dumb luck that I stumbled on the brake resistor change as the source of my problems in the first place.

Here is proof my error is gone. My wheel was spinning. Let me know if anything else is neded.

Connected to ODrive 205332714D4B as odrv0
In [1]: odrv0.config.enable_brake_resistor = True

In [2]: odrv0.save_configuration()
Oh no odrv0 disappeared

Reconnected to ODrive 205332714D4B as odrv0
In [3]: odrv0.axis0.requested_state = AXIS_STATE_CLOSED_LOOP_CONTROL

In [4]: odrv0.axis0.controller.input_vel = 2

In [5]: dump_errors(odrv0)
system: no error
axis0
  axis: no error
  motor: no error
  sensorless_estimator: no error
  encoder: no error
  controller: no error
axis1
  axis: no error
  motor: no error
  sensorless_estimator: no error
  encoder: no error
  controller: no error

In [6]: odrv0.axis0.requested_state = AXIS_STATE_IDLE
3 Likes

Thank you! you’re a life saver! i was pulling my hair out over this! These 2 statements saved the day. I was having the exact same issue as you.