Calibration procedure not completing

Hello,

I am using an Odrive V3.6 56V to control a W9235 motor in combination with an AS5048A encoder, but for some reason the drive is unable to complete a calibration sequence. When I enter the calibration command, AXIS_STATE_FULL_CALIBRATION_SEQUENCE, the motor moves just slightly and I see the power supply current jump for a moment, but then the motor stops moving and nothing else happens (no beep or back and forth movement). I thought that perhaps I needed to increase the current limit, but so far no luck. I have removed all mechanical loads from the motor so it is just free-spinning, and also have a brake resistor installed.

I have successfully been able to run in sensorless mode without the encoder, and I am able to see encoder counts by looking at the shadow_count variable. I have a feeling that the error is most likely in my config as I have gotten the motor to move and the encoder appears to work properly. My motor config and axis config are below.

Any help or advice is greatly appreciated!

Motor 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: 1000.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: 2 (uint8)
phase_inductance: 2.0779292754014023e-05 (float)
phase_resistance: 0.0001250000059371814 (float)
pole_pairs: 36 (int32)
pre_calibrated: False (bool)
requested_current_range: 60.0 (float)
resistance_calib_max_voltage: 2.0 (float)
torque_constant: 0.08269999921321869 (float)
torque_lim: inf (float)

Axis Config:
calibration_lockin:
accel: 20.0 (float)
current: 10.0 (float)
ramp_distance: 3.1415927410125732 (float)
ramp_time: 0.4000000059604645 (float)
vel: 40.0 (float)
can:
encoder_rate_ms: 10 (uint32)
heartbeat_rate_ms: 100 (uint32)
is_extended: False (bool)
node_id: 0 (uint32)
dir_gpio_pin: 2 (uint16)
enable_sensorless_mode: False (bool)
enable_step_dir: False (bool)
enable_watchdog: False (bool)
general_lockin:
accel: 20.0 (float)
current: 10.0 (float)
finish_distance: 100.0 (float)
finish_on_distance: False (bool)
finish_on_enc_idx: False (bool)
finish_on_vel: False (bool)
ramp_distance: 3.1415927410125732 (float)
ramp_time: 0.4000000059604645 (float)
vel: 40.0 (float)
sensorless_ramp:
accel: 200.0 (float)
current: 10.0 (float)
finish_distance: 100.0 (float)
finish_on_distance: False (bool)
finish_on_enc_idx: False (bool)
finish_on_vel: True (bool)
ramp_distance: 3.1415927410125732 (float)
ramp_time: 0.4000000059604645 (float)
vel: 400.0 (float)
startup_closed_loop_control: False (bool)
startup_encoder_index_search: False (bool)
startup_encoder_offset_calibration: False (bool)
startup_homing: False (bool)
startup_motor_calibration: True (bool)
step_dir_always_on: False (bool)
step_gpio_pin: 1 (uint16)
watchdog_timeout: 0.0 (float)

Still digging on this, the output of dump_errors(odrv0) reveals the error to be a MOTOR_CURRENT_LIMIT_VIOLATION.

I have tried increasing the current limit and the current margin, but that hasn’t resulted in any success for getting the calibration to complete. I tried increasing the odrv0.axis0.motor.config.resistance_calib_max_voltage from 2 to 4, per this thread, but still no luck. I have also tried increasing the current limit up as well as the current_limit_margin, but still no luck. Kind of fumbling in the dark though, if anyone sees this and has any suggestions, I’m all ears.

The behavior you’re describing means it’s failing the resistance check with an Over Current error. That means there’s probably a short circuit, or at least you need to reduce resistance_calib_max_voltage, to prevent it from pushing out too much current.

You might want to try an odrv0.erase_configuration() first to make sure you don’t have anything weird set up.

Thanks for the response! Sorry for being so late in getting back to you. I tried erasing the configuration and decreasing resistance_calib_max_voltage in the odrv0.axis0.config.resistance_calib_max_voltage setting from 2.0 down to 0.5, but so far no luck. I don’t think there is a short, as I was able to move the motor in sensorless mode, although I will try running that again to see if I get the same result.

I was wondering if it is perhaps my power supply being unable to source that much power, it is a cheap switching power supply you can see here. That seems really unlikely as it is a 300W power supply and I expect it to be sufficient for one motor of this size.

Otherwise I am scratching my head on this one…

Well, I may have made things worse. While trying to run in sensorless mode, I saw MOTOR_ERROR_DRV_FAULT errors on both axes. This is weird as I only have a motor connected to a single axis, but the faults persist even with the motor unhooked and after power cycling.

Pretty frustrating overall, not sure why this happened as I had not moved the motor since I got it to turn successfully in sensorless mode last week.

Oops that’s not good. You might have fried something. Are you using the brake resistor?

Yeah that is what I am worried about. I am using the brake resistor that came with the odrive, and I didn’t see any magic smoke. I also didn’t change any of the settings beyond what was recommended in the sensorless instructions, other than changing the number of pole pairs from 36 to 40 (I mis-counted initially). I wouldn’t think that would cause the error but perhaps it did? I emailed Odrive’s support, perhaps they will have mercy. I don’t have a way to easily desolder anything that might be fried, so I might just be out of luck.

Do you know if anyone else has set up this type 9235 motor with the Odrive that may be a good resource? I am trying to do a build involving some opentorque-style actuators, and unfortunately the documentation on the opentorque GitHub isn’t detailed when it comes to the Odrive configuration/wiring.