Problem calibrating hoverboard motor

Hello Everyone,

I am trying to calibrate a hoverboard motor 24V 6.5inch motor following the steps on odrive page but the motor doesnt respond to the commands. ( Hoverboard motor and remote control setup guide | ODrive )
When I enter odrv0.axis0.requested_state = AXIS_STATE_MOTOR_CALIBRATION, the motor doesnt rotate but I still hear the beep sound after few seconds (2 or 3). Then with this command odrv0.axis0.motor, I get error = 0x0000 (int)

But according to some videos, the motor should rotate during calibration but in my case nothign happens and only a beep.

Following the rest of commands, I enter odrv0.axis0.requested_state = AXIS_STATE_ENCODER_HALL_POLARITY_CALIBRATION and the motor rotates and then
odrv0.axis0.encoder and get an error = 16 .
This is where I cannot get further. odrv0.axis0.controller.input_vel command doenst make it rotate.

It works in sensorless operation mode but I would need to use it will hall sensor mode.

If someone could help with this.


Of course not, you have an error.

What does dump_errors(odrv0) say?

The dump gives the following errors:





The motor is drawing more current that expected from the source when compared to ebike controllers . I am using a 30 V 3A adjustable power supply set at 24V for this.

I can share the screenshot next week of dump_errors if needed.

The hall sensor error can be a bit of a pain. Try setting encoder.config.hall_polarity_calibrated = True before you do the hall polarity calibration. if that doesn’t work, try encoder.config.ignore_illegal_hall_state = True. If the motor runs OK after that then you may just have wonky hall sensors or noise on the encoder pins.

Sure, will check these commands.

I had some dump results which might help.

#1 Sometimes I get this

#2 and other times this


#odrv0.axis0.requested_state = AXIS_STATE_ENCODER_OFFSET_CALIBRATION

#Phase inductance and resistance values

My motor still doesnt rotate in both directions as in ODrive two motor test - YouTube
As an observation, I tried using a escooter controller ( and the motor is working and the max current drawn from power source is 1.6 (no load) and idle is (1.46). With odrive, no load ideal is same (1.4) but when calibration is done and that beep sound come, it reaches about (2.65). My source can give max 3A.

In sensor less mode, the motor moves about 3/4th of rotation and then stops.

What would you suggest in this case?

any idea why dc current error is there?

I am having similar problem, the axis0 does not spin after polarity calibration. It usual return ILLEGAL_HALL_STATE. I used odrv0.clear_errors() command but still the motor doesn’t spin when in closed loop control. I am wondering if you have found a solution to this yet?
Any help would be appreciated!

No I haven’t found the solution yet. I tried in sensorless mode too but the motor only rotates for about 1 rotation and stops.

thanks for your reply