Salutations!
I am attempting to get a motor working with the Odrive S1 and have run into the dreaded “Illegal Hall state” error.
Plotting the hall signals in “ODrive” I get the result:
|1|0001|
|3|0011|
|2|0010|
|6|0110|
|4|0100|
|5|0101|
Which looks like a valid hall signal to me. I have also looked at the signals on a scope and they are rock solid edges and look clean during calibration.
This is the motor I am attempting to use: (Model 539480)
odrv = odrv0
odrv.config.dc_bus_overvoltage_trip_level = 30
odrv.config.dc_bus_undervoltage_trip_level = 10.5
odrv.config.dc_max_positive_current = 5
odrv.config.brake_resistor0.enable = True
odrv.config.brake_resistor0.resistance = 2
odrv.axis0.config.motor.motor_type = MotorType.GIMBAL
odrv.axis0.config.motor.phase_resistance = 0.225
odrv.axis0.config.motor.phase_resistance_valid = True
odrv.axis0.config.motor.torque_constant = 0.011882183908045976
odrv.axis0.config.motor.pole_pairs = 4
odrv.axis0.config.motor.current_soft_max = 4
odrv.axis0.config.motor.current_hard_max = 7.2
odrv.axis0.config.motor.calibration_current = 1
odrv.axis0.config.motor.resistance_calib_max_voltage = 12
odrv.axis0.config.calibration_lockin.current = 0.5
odrv.axis0.controller.config.control_mode = ControlMode.VELOCITY_CONTROL
odrv.axis0.controller.config.input_mode = InputMode.VEL_RAMP
odrv.axis0.controller.config.vel_ramp_rate = 0.1
odrv.axis0.controller.config.vel_limit = 100
odrv.axis0.controller.config.vel_limit_tolerance = 20
odrv.axis0.config.torque_soft_min = -0.7
odrv.axis0.config.torque_soft_max = 0.7
odrv.axis0.config.encoder_bandwidth = 100
odrv.hall_encoder0.config.enabled = True
odrv.axis0.config.load_encoder = EncoderId.HALL_ENCODER0
odrv.axis0.config.commutation_encoder = EncoderId.HALL_ENCODER0