I’m attempting to set up an ODrive with a 250W eBike motor.
I’ve tried following several examples, including the ODrive documentation for hoverboard motors:
https://docs.odriverobotics.com/v/0.5.6/hoverboard.html#calibration-and-powering-the-motor
I’ve adjusted the numbers as appropriate based on the estimated specs of my motor. I’ve had some success, the motor calibration causes a beep and returns no errors, and if I type:
odrv0.axis0.requested_state = AXIS_STATE_FULL_CALIBRATION_SEQUENCE
The motor turns slowly in both directions.
The encoder appears to be working too:
odrv0.axis0.encoder.hall_state
returns a number from 1 to 6 as I turn the motor by hand.
odrv0.axis0.encoder.shadow_count
returns an absolute position that goes up and down as expected as I rotate the motor.
So I believe the hall sensors are doing their job, and being read and counted by the ODrive.
However, when I run:
odrv0.axis0.requested_state = AXIS_STATE_ENCODER_HALL_POLARITY_CALIBRATION
I get an INVALID_STATE error. It returns immediately, with no attempt to move the motor. dump_errors(odrv0)
returns:
system: not found
axis0
axis: Error(s):
AxisError.INVALID_STATE
motor: no error
DRV fault: not found
sensorless_estimator: no error
encoder: no error
controller: no error
axis1
axis: no error
motor: no error
DRV fault: not found
sensorless_estimator: no error
encoder: no error
controller: no error
Full disclosure, I’m using a single channel ‘V4.2’ board, which I now understand to be a closed-source knockoff with who-knows-what firmware running on it. I bought it in good faith but accept this might be the reason for my troubles.
However if there’s some other cause of the above, I’d like to know. Thanks.