HoverBot, self-balancing vehicle with hoverboard wheels

A radio controlled two-wheeled self balancing vehicle. The build is very simple. It uses two current-controlled hoverboard motors with hall sensors and the ODrive as explained here and the auxiliary capacitors as explained here.
It runs off a 6S Lipo battery with 22.2V nominally. Equipped with a BNO055 IMU and controlled at 100Hz from an Arduino that gets its commands from an RC receiver via PWM.

The plan ist to turn this into something useful eventually - any ideas are highly welcome :slight_smile:

Code: https://github.com/LuSeKa/HoverBot
[EDIT] Skatepark Video: https://www.youtube.com/watch?v=QNOgWHhilm4
Video: https://www.youtube.com/watch?v=jp_vRK7mbwY

6 Likes

I am working on a similar project !
I am using an arduino to do the low level control of the inverted pendulum.
I am planning to buy the Nvidia Jetson Nano to do the high level stuff like person following usong my intel D435

Is it possible that your share the Odrive configuration, since you don’t use speed control ( I assume by readinbg your code you are using direct current torque control) ?
Thanks ^^ !

1 Like

Hi, yes the ODrive is in current control mode and the Arduino directly issues current commands. Apart from that the ODrive config is the one described in the Hoverboard-Wheel HowTo.

The Arduino code is on Github and the readme also has some more general info (diagrams) on the controller and the connections between components. Do you want/need more specific infos?

Not sure what error you are encountering. Can you specify?
The Arduino library to communicate with the ODrive for this project ist the one found here:

Hi, there are also Python scripts to automatically configure the ODrive for this vehicle:

Thanks, this screesnhot is helpful. Your sketch is missing the pwmDecoder.ino file. It should be in the same directory as the HoverBot.ino file. In that case the IDE and compiler should find it automatically.

The compiler cannot find SetCurrent(). I am assuming you are using the odrive-library you found (the one by beak90). This is an outdated copy of the original one. If you use the original odrive lib, this problem will disappear.

Hi,
not exactly sure what’s the cause for the problem is you are describing, but it could be that the IMU is somehow mounted differently than in my setup? In that case you might get some strange behaviour if you don’t chang the code accordingly.
I suggest you double check that the IMU is mounted in the correct orientation.

HoverBot was featured in IEEE Spectrum’s Video Friday!

4 Likes

Thanks LuSeKa for sharing your project with us … :pray: :pray: :pray:

and thanks for sharing your automatic setup script ! really useful. I wish i would have had this 9 months ago

2 Likes

Hello, thank you for your great project. One question I have - why are you using current control, not speed control for balancing? Thank you

If anyone would like to make some money I could use help with a project very similar to this all I need is the device to self balance. I could use help with Arduino code.

Greetings,
I need to build normal two wheels robot + one support wheel.
So it’s more simple than this project.
Can any one help me to configure ODrive to works two hoverboard (like this project) but in Step/Dir mode ?
That I’ll replace stepper motors with hoverboard-motors
Hope, to find support .
Regards

Hello

Should be possible, follow the hoverboard wheels guide in the docs and setup step/dir, keep in mind the position accuracy of hall sensors is not very high (standard hoverboard wheels have 30 magnets, so 90 pulses/rev).

Cheers

Carelsbergh Stijn

Dear All,
Based on “HoverBot” at “GitHub - LuSeKa/HoverBot: Self-balancing robot using hoverboard hub motors”
I try to configure the ODrive with two config file ODrive_hoverboard_motor_setup_part_01.py, and ODrive_hoverboard_motor_setup_part_02.py
It accept the configuration, but I can’t do any other things, how can I test ?
I can’t find Serial configuration inside these file, so how ODrive communicate with Arduino with setting Serial inside ODrive, please clear to me
Thanks

Hi Yousef, as an aside, the GitHub repo you mentioned is somewhat outdated. However if the setup scripts still work for you, that is great! A newer version of these tools, tested with the more recent ODrive Python 0.5.4. and ODrive firmware version 0.5.4 is here: ChIMP/tools at master · CharlestonRobotics/ChIMP · GitHub
Regarding how to test, you can either use the Arduino code to send current commands via the serial interface and see if the motors spin, or you can use the interactive ODrive tool to send current commands or read the motor positions.

Dear LuSeKa
Really many thanks for your interest and reply to answer my question.
Now, and from two days ago, I have new problem,
The driver reply by this message when rebooting:

Connected to ODrive 2054377E5853 as odrv0
In [1]: odrv0.erase_configuration()
16:04:23.483890900 [LEGACY_OBJ] protocol failed with 3 - propagating error to application
Oh no odrv0 disappeared

I tried with many configuration sequence but fail to solve this problem and pass through
Really I have big problem in my work, Kindly, can you help me?
Best regards