Need to build Robot with hoverboard-motors

I spent very long time with different drivers/settings/configurations with not good results.
I hope to find good results with SimpleFOC to run Hoverboard motors in smooth and good performance.
So, can any one help me to make that, please.
Regarding these two video :

I need the final code if can.
I’ll build the drivers by MOSFET, but it good if find same code run direct with Hoverboard main board (i.e. reprogram it by SimpleFOC, that I think SimpleFOC give very good performance),
I hope to find this code by Arduino.
I need to build Robot some how like this:
GitHub - LuSeKa/HoverBot: Self-balancing robot using hoverboard hub motors
by SimpleFOC.

Thanks on advance for any support.
Best regards

The video is a tuning guide, it uses the simplefoc library which is open source and tunes it for a specific motor and driver combination. These tuning parameters are useless if you use different hardware, you’ll need to follow the process described in the video to discover the best parameters for your specific setup.

I don’t quite understand what you mean to say here but I think you want to reprogram the microcontroller in your hoverboard to run simplefoc? Whether or not that is possible depends on the hardware in the hoverboard, your reverse engineering skills and the hardware you have access to for programming/debugging/snooping. Unless someone else has already done this for the hardware you have you won’t be able to just copy code from somewhere and have it work without doing anything. Simplefoc can do a lot for you but you still need to configure and tune it and this is highly hardware and drivetrain dependent.

We might be able to tell you if it’s at all possible to reprogram the hoverboard if we have a good overview of the hardware and how it’s structured. Some photos of the hoverboard internals, the serial or part numbers of the microcontroller etc and as good of an idea of how it’s all connected would give us the best chance to help you out.

That is a self balancing hoverboard, simplefoc can be used in controlling the motor driver but it’s not the only code/component you’ll need to build something like that.

Dear Eng. Bartios.
Really many thanks for your support.
Yes I need to change firmware of main board of Hoverboard by SimpleFOC ,
Like what in this link : GitHub - EFeru/hoverboard-firmware-hack-FOC: With Field Oriented Control (FOC)
even if making one board for one motor, that your code SimpleFOC seem more efficient and simple to understandable. While in the link you will find all of all about the board (pinout, connections,…)

I hope to make like this robot "HoverBot : at this link GitHub - LuSeKa/HoverBot: Self-balancing robot using hoverboard hub motors : but using your favorite code by SimpleFOC.

Thanks again your your support,
I hope to find answer and solution with your supports
Thanks in advance for any support

If your hoverboard hardware is supported by this project I would just use it instead of trying to get simplefoc to run on it. They have already done the reverse engineering etc on those boards so you won’t have to do it yourself. Trying to run simplefoc on one of those boards would just be extra work while they already have a FOC implementation running. They have made their reverse engineering work available in the github repo though so if you are using the same hardware you can make use of that if you still decide to try making simplefoc work. As I said however, this will be extra work and how much time it will take will be highly dependent on the skills and tools you have available.

(PS; I’m just a student and not an engineer yet ;p)

Dear sir,


First many thanks for sharing your code, really many thanks,
Can you kindly help me to optimal use your code, please.

I need to build round robot with hoverboard motors/drivers by hacking main board of hoverboard.

I need to configure code to control by:

  • PWM and direction for each wheel separately,
  • Control by UART

The main requirement make the robot run these sequences (by Arduino):

  • Forward (in straight-line). (i.e. two wheel synchronized)
  • Backward (in straight-line). (i.e. two wheel synchronized)
  • Rotate around itself ( i.e. two motors with same speed but with different direction).
  • Robot take angle in movement (say 30, or 45, … ) (i.e. one motor high speed than other with certain ratio)
  • Break.

My application is indoor, so, I need robot work in very very low-speed.

Any help please to make that by using online compiler (at: hoverboard online compiler:-) )
so I need to make configuration of the driver
and need to know the pseudo code to control driver by Arduino.

By the way, I have gyro to find and save direction of movement specially in Forward and Backward to synchronize the two motors.

Thanks in advance for your help.

Best regards