Hoverboard motors not calibrating


So I got the current devel firmware and tools loaded, and have connected a hoverboard motor, its hall effect encoder, and a 36v battery. standard 6.5 hoverboard wheels

Followed the commands on the hoverboard howto, and all looks fine until the motor calibration command. no other commands used other than an erase after the firmware flash.

Sometimes i when running it i get a beep and the motor ‘twitches’, then either a dc bus under or over voltage error, other times nothing seems to happen at all, no motor error or beep or response on the console

Where to start troubleshooting?


What power supply are you using?


3x 12v sealed lead acid batteries in series, multimeter measures just over 36V


Can you attach an oscilloscope to the power input during operation and see how stable the voltage is?


I’ve been looking for an excuse to pull the trigger on an oscilliscope, have now got one on order. Will report back once it arrives.


the voltage was crap - I replaced one of the batteries and now the power is solid.

The motors still wouldn’t calibrate, i was getting phase inductance out of range error on the motor calibration. As I see in the code the values were commented as arbitrary, I commented that test out in the firmware and now axis0 calibrates fine, the encoder calibrates, and the motor runs fine. Axis1 however, I’m getting this with encoder calibration:

In [52]: odrv0.axis1.encoder
error = 0x0010 (int)
is_ready = False (bool)
index_found = False (bool)
shadow_count = 86 (int)
count_in_cpr = 86 (int)
offset = 0 (int)
interpolation = 0.5 (float)
phase = 2.6179871559143066 (float)
pos_estimate = 86.02304077148438 (float)
pos_cpr = 86.02426147460938 (float)
hall_state = 1 (int)
pll_vel = 0.0 (float)
  mode = 1 (int)
  use_index = False (bool)
  pre_calibrated = False (bool)
  idx_search_speed = 10.0 (float)
  cpr = 90 (int)
  offset = 0 (int)
  offset_float = 0.0 (float)
  bandwidth = 100.0 (float)
  calib_range = 0.019999999552965164 (float)

if i plug the motor and encoder into axis0 it calibrates and runs fine…


You have encoder error ERROR_ILLEGAL_HALL_STATE = 0x10. This means that all hall signals are 0 or all are 1: this is not allowed and means something is wrong with the hall feedback. Please check your wiring and if it looks good, please double check behaviour with an oscilloscope or logic analyzer.


OK I connected my new fancypants oscilloscope probes inline with the signal wires from the hall effect sensor and the board, this is what i see when rotating the wheel

looks ok :\

am I right that there is a direct trace on the board from the hall effect sensor sockets to the chip? Is there somewhere else i can probe to troubleshoot?

Probing R32, R33, and R34 shows the same result. The same wheel (and different wheels i can replicate with) calibrate and work on M0 so i think they are fine


Nice scope!

I agree, those signals look fine. Yeah it’s a direct signal, so probing at the wires should be fine.
I don’t have any clue why it should work on M0 and not M1. Maybe a loose wire right when you were testing on M1?

To be completely sure, you can set up your oscilloscope to trigger mode “pattern” and look for “LLLX”, set the trigger level to 1.6V. Then power cycle the ODrive, then activate single trigger mode, and then run the calibration.


OK, brand new board, brand new set of hoverboard wheels.

exact same thing, encoder error 0x0010 - both wheels work fine on axis0 but not on axis1, with the exact same commands and wiring



Were you able to use the oscilloscope in pattern mode to check?