I just got my odrive and am having some trouble setting up sensorless control.
Here’s the code:
odrv0.axis0.controller.config.vel_gain = 0.01
odrv0.axis0.controller.config.vel_integrator_gain = 0.05
odrv0.axis0.controller.config.control_mode = CTRL_MODE_VELOCITY_CONTROL
odrv0.axis0.controller.vel_setpoint = 400
odrv0.axis0.motor.config.direction = 1
odrv0.axis0.sensorless_estimator.config.pm_flux_linkage = 5.51328895422 / (7 *324)
odrv0.axis0.motor.config.current_lim=1
odrv0.axis0.controller.config.vel_limit=2000
odrv0.axis0.motor.config.calibration_current=1
odrv0.axis0.requested_state = AXIS_STATE_MOTOR_CALIBRATION
odrv0.axis0.controller.vel_setpoint = 1000
odrv0.axis0.requested_state = AXIS_STATE_SENSORLESS_CONTROL
The odrive beeps after the calibration. When I change the state in the last line, the motor turns very slowly (maybe 1 revolution in 5 seconds) and pulls 10 A (odrv0.axis0.motor.current_control.Iq_measured). This ignores the 1 A current limit and starts to heat the motor.
The same happens if I set vel_setpoint=0.
This is a 3536 size brushless motor. It came packaged with a hydraulic pump with no model number, so the Kv is measured 3.455 V peak-peak at 531.4 rev/min with 7 poles.
Any ideas what I’m doing wrong?