Hi. I am trying to set up ODrive v3.6 with the ODrive D6374-150KV motor in sensorless mode. I followed the online guide but the motors were not moving at all. Every time that I ran
odrv0.axis0.requested_state = AXIS_STATE_SENSORLESS_CONTROL I would only get ERROR_INVALID_STATE as the result (after using
I then ran
odrv0.axis0.requested_state = AXIS_STATE_FULL_CALIBRATION_SEQUENCE and the motor spun one way but not the other. This sequence was getting stuck on the encoder calibration and gave out ERROR_ENCODER_FAILED (which is completely understandable as the encoder isn’t even attached).
Eventually, I found an old thread that seemed to be about the same issue here: “ERROR_INVALID_STATE in sensorless mode”. Now, it says that
odrv0.axis0.motor.is_calibrated is True and no errors came up when I used
odrv0.axis0.requested_state = AXIS_STATE_MOTOR_CALIBRATION so I am assuming I implemented the fix correctly. But nothing has changed.
I have tried seemingly every combination of wirings and code and nothing seems to help the issue. I always, without fail, get ERROR_INVALID_STATE instead of a motor that moves.
This is functionally what I have run so far:
odrv0.axis0.controller.config.vel_gain = 0.01 odrv0.axis0.controller.config.vel_integrator_gain = 0.05 odrv0.axis0.controller.config.control_mode = 2 odrv0.axis0.sensorless_estimator.config.pm_flux_linkage = 5.51328895422 / (7 * 150) odrv0.axis0.requested_state = AXIS_STATE_MOTOR_CALIBRATION odrv0.save_configuration() odrv0.reboot() odrv0.axis0.controller.vel_setpoint = 400 odrv0.axis0.requested_state = AXIS_STATE_SENSORLESS_CONTROL
Is there something that I’m missing in setting up sensorless mode?