Hoverboard motors not working after release 0.5.1

I burned a day trying to get hoverboard motors and their hall sensors working with the odrive and I thought I’d share the solution here to help others having the same problem out. There are some great resources for this, so I was optimistic it would be a quick project as I’ve been using odrives for several years now :
Odrive Hoverboard motor guide
detailed video by AustinTronics

Unfortunately after setting everything up and exactly following the instructions the encoder calibration kept failing with EncoderError.ILLEGAL_HALL_STATE. I tried switching wires on the hall sensor, switching hoverboard motors and switching odrives. The current version of the Odrive Firmware is 0.5.4 so I tried rolling back to 0.5.3 and 0.5.2 all with the same result. Nothing helped until I looked at the version of the firmware that AustinTronics was using in his video (by looking at his odrivetool output on his laptop). He was using FW 0.5.1. Sure enough this worked like a charm exactly as seen in the video without any changes in my hardware setup. So something has borked the hoverboard hall sensor calibration in the new releases and needs a fix. To save you some hunting around to get version 0.5.1 on your odrive do the following :

Download the .elf file for your specific odrive HW version from the odrive github releases folder :

For example this is the full url for release 0.5.1 for my 24v OD3.5 file :
https://github.com/odriverobotics/ODrive/releases/download/fw-v0.5.1/ODriveFirmware_v3.5-24V.elf

You can download it directly using :
wget https://github.com/odriverobotics/ODrive/releases/download/fw-v0.5.1/ODriveFirmware_v3.5-24V.elf

Then pass this file as an argument to odrivetool dfu to flash your odrive firmware :
odrivetool dfu ODriveFirmware_v3.5-24V.elf

Also using AustinTronics’s python script to do the config setting and calibration is really handy.

And lastly if you need smooth low speed operation of the motor then you’ll want to run the anti-cogging calibration, just ignore his config settings (as he is using a different motor and encoder). Also the calibration only took 45 seconds with the controller gains from AustinTronics’ script so you can ignore tweaking those too.

Hope this saves people some time! And a fix would be great in a new release at some point :slight_smile:

5 Likes

Thank you very much for sharing this, I’m sure it’ll save many people some time.
Has anyone had a chance to investigate what’s causing the issues in later releases?

Thanks, that’s a very useful post. Is this for the 3.6 board? Have you tried the Pro board public-beta with hoverboard motors?

Unfortunately I don’t have a pro odrive or a v3.6 odrive to test on. I’ve observed this issue on both v3.5 24V odrives and v3.5 48V odrives. It is possible that the issue is limited to the v3.5 boards but I have no way of testing this.