Motor error 0x01000000 when testing closed loop control via velocity

Hi all,

So I’ve sucessfully calibrated both hall sensors and my hoverboard style motor without errors, however I’m getting the following error from odrive0.axis0.motor when testing closed loop control via setting velocity commands:

16777216 (uint16)
which converts to the hex code error:
0x01000000 which looks like a system error from the motor

I first enter these commands:
odrv0.axis0.requested_state = AXIS_STATE_CLOSED_LOOP_CONTROL
odrv0.axis0.controller.input_vel = 2

The motor moves for 1-2 seconds and stops.

This is the output from: odrv0.axis0.motor

DC_calib_phA: -0.4268602430820465 (float)
DC_calib_phB: 0.2320336103439331 (float)
DC_calib_phC: 0.1948387771844864 (float)
I_bus: 0.0 (float)
config:
  I_bus_hard_max: inf (float)
  I_bus_hard_min: -inf (float)
  I_leak_max: 0.10000000149011612 (float)
  R_wL_FF_enable: False (bool)
  acim_autoflux_attack_gain: 10.0 (float)
  acim_autoflux_decay_gain: 1.0 (float)
  acim_autoflux_enable: False (bool)
  acim_autoflux_min_Id: 10.0 (float)
  acim_gain_min_flux: 10.0 (float)
  bEMF_FF_enable: False (bool)
  calibration_current: 10.0 (float)
  current_control_bandwidth: 100.0 (float)
  current_lim: 10.0 (float)
  current_lim_margin: 8.0 (float)
  dc_calib_tau: 0.20000000298023224 (float)
  inverter_temp_limit_lower: 100.0 (float)
  inverter_temp_limit_upper: 120.0 (float)
  motor_type: 0 (uint8)
  phase_inductance: 0.0004522507661022246 (float)
  phase_resistance: 0.19346265494823456 (float)
  pole_pairs: 15 (int32)
  pre_calibrated: True (bool)
  requested_current_range: 25.0 (float)
  resistance_calib_max_voltage: 4.0 (float)
  torque_constant: 0.4650000035762787 (float)
  torque_lim: inf (float)
current_control:
  I_measured_report_filter_k: 1.0 (float)
  Ialpha_measured: -3.7667298316955566 (float)
  Ibeta_measured: -3.2100861072540283 (float)
  Id_measured: 4.904476642608643 (float)
  Id_setpoint: 0.0 (float)
  Iq_measured: 0.6619045734405518 (float)
  Iq_setpoint: 6.379796504974365 (float)
  Vd_setpoint: 0.0 (float)
  Vq_setpoint: 0.0 (float)
  final_v_alpha: 1.713279366493225 (float)
  final_v_beta: -1.2373284101486206 (float)
  i_gain: 19.34626579284668 (float)
  p_gain: 0.045225076377391815 (float)
  phase: -2.046341896057129 (float)
  phase_vel: 0.0 (float)
  power: -3.7148144245147705 (float)
  v_current_control_integral_d: -0.5606003999710083 (float)
  v_current_control_integral_q: 1.8080379962921143 (float)
current_meas_phA: 0.4287026822566986 (float)
current_meas_phB: -0.23318833112716675 (float)
current_meas_phC: -0.19548656046390533 (float)
effective_current_lim: 10.0 (float)
error: 16777216 (uint64)
fet_thermistor:
  config: ...
  temperature: 31.7919921875 (float)
is_armed: False (bool)
is_calibrated: True (bool)
last_error_time: 171.6840057373047 (float)
max_allowed_current: 30.375 (float)
max_dc_calib: 3.0375001430511475 (float)
motor_thermistor:
  config: ...
  temperature: 0.0 (float)
n_evt_current_measurement: 6251047 (uint32)
n_evt_pwm_update: 6251061 (uint32)
phase_current_rev_gain: 0.012500000186264515 (float)

I should also add, if I change axis state to idle, and back to closed loop, I am able to once again enter a velocity which causes the motor to once again move for a second before stopping.

EDIT: I just ran dump_errors(odrv0) and got the following:

ODRIVE_ERROR_DC_BUS_OVER_REGEN_CURRENT

A quick search doesnt quite show any direct solutions for solving this.

I am running off of a 56v battery that was used on a segway.

Ahah! Ok I solved this but wanted to leave this up incase anyone else has this problem.

After digging deeper into the error:
ODRIVE_ERROR_DC_BUS_OVER_REGEN_CURRENT

It looks like my brake resistor had not been enabled.

By running the following commands the closed loop system worked properly:

odrv0.config.enable_brake_resistor = True
odrv0.save_configuration()

If anyone else has this problem try it, and hopefully itll solve your issue.

2 Likes