Building a robot using Hoverboard — Part1

RoboFoundry
17 min readJul 14, 2022

A few weeks ago I came across some ideas from a fellow robot builder Serdar Abali in the community where I saw a video that showed how you could take a hoverboard and get cheap parts that gives you a jump start on building a robot. I loved the idea and took a leap of faith and placed an order for one of the hoverboards on eBay. This is documentation of some of the trials and errors in building this robot I’ll call hoverbot for keeping it short. It will be a two part series with mechanical/hardware build in part 1 and software configuration in part 2. If you follow my other articles you know I love ROS2 and hoverbot will be based on ROS2 foxy and Raspberry Pi 4 [4GB] version. I know an RPi is a bit hard to get one these days :(

The hoverboard I purchased is this one. It was approx. $65 with free shipping.

Mine looked like this when it arrived:

This gets you following things for your robot:

  1. Hoverboard frame — this is pretty robust frame that can carry a person ~150–170lb
  2. Battery — it comes with a pretty powerful 36V battery that can power the two hoverboard motors for hours.
  3. Motors — two hoverboard motors that are very quiet and have a lot of torque. I don’t know the exact amount of torque but I’ll reference a few videos for more detail if you are interested in more.

If you try to purchase these alone separately it will cost more than 200 bucks. In addition, it also comes with a split board hoverboard motor controllers, these are a bit harder to work with and I chose not to go down that path. Again, there are some cool projects out there where you can even use those motor controllers if you are willing to spend some more time hacking and tinkering. However, I was told that the split board controller are harder to hack into than the single board controller.

Here is how mine looked after I removed the split controller boards.

At first I was a bit disappointed when I received the hoverboard, opened it and I found that the hoverboard motor controller it had was the split controller. However, it didn’t matter for the big picture as I went with ODrive motor controller for my project instead of hacking into the motor controller that came with hoverboard as others have done.

Here is the list of parts that I ended up using for the mechanical build of the robot. None of these require 3D-printing and these are off the shelf parts you can buy from anywhere online, I got most of mine from Amazon. I don’t get any kickback from these reference links and these are purely for reference.

  1. 2020 Aluminum profile —4 pcs 400 mm [for the four sides of the base frame]
  2. 2020 Aluminum profile — 2 pcs 300 mm [for holding the component box on top]
  3. 2020 Aluminium profile — 1 pc 300 mm [for holding the Lidar and Oak-d camera]
  4. A plastic box 11.8x9.8x4.7 inch that is wide enough and deep enough to hold all electronics and second battery for RPi. I spent a lot of time looking for the right size and may be even spent little more money than I should have but the one I got has lot of flexibility and comes with top plate and 12 pop out rubber inserts [3 on each side of the box] which makes working on the components inside and routing wires and cables very easy and accessible.
  5. Plexiglass 8x10 inch mounting plate inside the box to hold the parts [this is not really necessary but I did not want to damage/drill into the box as much as possible, in case I want to salvage the parts for future project]. My way of mounting this to the box was not the best and I will probably redo the way I attached this plate to the box. My original goal was to be able to separate and remove this plate easily with all electronics on it so its easy to work but the way I mounted the plate to box has not been the easiest to separate it even though its pretty solid in terms of assembly. I will think about a better way to either just be able to unscrew using some big wing nuts or with some sort of quick release lever sort of like the clamps used for holding the wooden projects together.
  6. Nylon spacers to raise the base plate slightly above the floor of the plastic box so there is clearance below to make sure we can have some space below the plate to tighten the screws or stand offs. These are just amazing quality and they come in many sizes and increments so you can do any combination of heights to suite your need.
  7. Mounting hardware for Aluminum profiles — you will need to get a bunch of M4 screws in various lengths, T-nuts, connectors/corner brackets and L-brackets to mount the aluminum profile bars at right angle to each other.
  8. Two Caster wheels for two rear wheels on two back corners, you get pack of four or six and mine came with big washers that were very handy.
  9. Some additional flat metal plates and L-Brackets as needed but these are optional and you may not need it depending on how you adapt your design and assembly
  10. Bunch of brass stand offs [you can also get nylon ones if you like]
  11. Bunch of 12–14 AWG wires with all kinds of connectors. Hope you have tools to crimp various kinds of connectors — I mainly ended up using some bullet connectors and a bunch of custom made DuPont connectors. The 3-phase wires going from hoverboard motors have bullet connectors on one end and I put ferrule connectors on other end to make the connection more reliable with ODrive
  12. Custom DuPont connectors — I am not very skilled at making Dupont connectors but I learned as I went along by trial and error. Believe me, making the custom Dupont connectors took the most amount of time out of all the stuff I had to put together, if I compare the time spent on any single task. These had to be custom made because on one end it needed a locking 5-pin Dupont connector to attach with hoverboard motor encoder socket and on other end it needed to have individual 1-pin Dupont connectors to plug into ODrive headers. I guess I could have taken an easier route to cut all the connectors on ends and soldered them together directly.
  13. Buy some wiring sleeves either split or expandable to cover the loose wires, you will thank yourself on how good it looks later and it will prevent making any mistakes of pulling out any wires accidentally
  14. Whole bunch of velcro strips and zip ties — I love these as they solve all sorts of mounting issues for the hardware without drilling holes.
  15. I also added some Ferrite rings around the 3 phase power lines going into ODrive as that is a recommended way to keep noise out from ODrive.

For the electronic build I used following parts:

  1. Raspberry Pi 4 [4GB] with Ubuntu 20.04 and ROS2 foxy installed
  2. ODrive v3.6 56V version - $219 for original Or $85 for clone from AliExpress. I got one from Makerbase and it worked great out of box with no firmware updates needed.
  3. RPLidar — approx $99
  4. Oak-d Lite camera [optional] — $150
  5. BMI160 6DOF IMU sensor — 3 pcs for $10 un-soldered from Amazon or 1 pc $10 from DFRobot with gravity connector
  6. Power bank battery for RPi — $15–20
  7. Some power on/off switches — one for main battery and one for Raspberry Pi
  8. Extra XT60 wires with male/female connectors to extend power from battery to ODrive
  9. Fuse rated 40A on main battery between battery and ODrive
  10. Bunch of micro USB cables to connect Lidar, camera, ODrive to RPi. My recommendation is to buy short ones — 0.5ft to 1 ft in length, it will save you lot of clutter
  11. Optional Battery Current/Voltage monitor — for a high current and voltage motors like hoverboard motors, it would be good to have something like this to monitor the usage. I got the idea for this from Dominator robot.
  12. Optional — OLED screen to display basic information like ip address and any errors.

Building the base frame

Main steps are following after you have gathered all the parts.

1.Open the hoverboard bottom cover and disconnect all the connectors for encoder, power cables from the motor controller board(s) and any other boards you have. Before you do anything else make sure you disconnect the power from main battery to both sides of the hoverboard. Leave only battery and hoverboard motors in. Most of the wires are attached to the controller cards using sockets which you can press and pull to remove. You will have to remove encoder cables, battery charging cables and power lines for battery before you can detach the cards. Be careful while disconnecting the power cables to hoverboard motor as we will want to use those connectors again when we build our own extension wires.

2. Remove the spring loaded base that holds the paddle by removing the screws around the spring loaded base, from both sides top/bottom and for each side wheel.

3. Mount the Aluminum profile rails for four sides of the base frame as close to hoverboard as possible. I used the existing holes to mount M4 screws with T-slot nuts. You can simply slide these T-slot nuts in aluminum profile slots and put additional mounting hardware on top before screwing in the M4 screws. Cool thing about the aluminum rails is, due to the slots you have infinite adjustment possible [its not the discrete number of holes you have to align with, you can pretty much slide the T-slot nut anywhere in the slot]. I did not drill any additional holes for mounting the base frame rails. The trick to get this to work just right is to choose the M4 screw length that is not too long. If your screw length is too long, it will stop against the rail after going through the T-Nut and then there will be a portion of screw that will not be completely in. Sometimes you can solve this issue by adding a few extra washers. Mount two side rails first, then the rear rail and then the front rail as close to hoverboard as you can get to keep the rigidity of the frame and making sure the two side rails stay braced and parallel. You can use the L-brackets that came with the 400 mm aluminum profile kit to mount the rear rail, those L-brackets they just insert into the two right angle rails and then just tighten the screw on each side, its fairly simple to build the square or a rectangle using these aluminum profiles.

4. Next step is to mount two Caster wheels on two rear corners. This one is slightly tricky but you can mount the caster wheels fairly well by using T-Slot nut, M4 screws and few washers. The Caster wheels have fairly big oblong holes for mounting so you may have to use some washer with good amount of radial thickness so that the M4 screw doesn’t fall through. Two screws for each caster wheels should be sufficient to brace the caster wheel properly to the rear end of the frame. I got 2 inch diameter caster wheels which aligned perfectly with my hoverboard but you may need to put some additional washers or a thin plate between the caster wheel and the rail if you are too short in height and the caster wheel is not quite reaching the ground when you hold it level. If the problem is opposite you may want to get different diameter caster wheels so it works for your hoverboard. It’s pretty much a basic exercise in leveling the front wheels with rear wheels, however you want to achieve it is up to you.

5. Mount the plastic component box using two cross rails using choice of your mounting hardware. I used two L-brackets from my existing Servocity kit and four T-Slot nuts + M4 screws to hold the box against cross rails. I only had to drill four holes at bottom of the plastic box and it came with the placeholders of where to drill the holes. I used M4 drill size to drill the holes. Use lots of washers whenever you are using metal against plastic to protect the plastic from cracking or chipping.

Mounting the Electronics

If you are using the plexiglass sheet like me to mount the electronics, you’ll need a sheet that is at least 0.5 inch or 20–25mm less than the size of box on each side.

First step is to mark the hole pattern for specs for Raspberry Pi and specs for ODrive, both of these are well published and if not, a simple ruler or inexpensive caliper should allow you to measure the distances between mounting holes and mark the drill points on the plate. You will need to mark 4 holes each for ODrive and RPi. Use M3 or equivalent imperial size drill for the holes so it will be able to receive M2.5 brass standoffs. Use 1–1.5 inch length brass/nylon standoffs to mount the RPi and ODrive on the plate. See the layout in picture below.

The trick is to keep lots of space around RPi to accommodate the USB cables to plug in Lidar/ODrive/Camera/USB stick for joystick controller so you need lots of space on the side where you have USB sockets. Also, you need some extra room where you have the RPi USB-C power cable coming in.

For ODrive, you also need to plan for two mounting holes to mount the power resistor for break energy dissipation. I used M3 screws/nuts with washer to brace it to the plate in front of ODrive board.

Next you need to find a suitable place for BMI160 imu sensor. These are very small [2x2 inch] and typically have just two mounting holes so make sure you align the X-Axis pointing to the front of your robot, in my case, pointing towards the hoverboard. Just mark the two holes and drill M3 holes and then install the IMU using two stand offs. The BMI160 will have 4 connection wires coming out which need to be connected to RPi, see this article that goes into details of how to get BMI160 up and running with ROS2.

Last item to mount is the RPi power bank battery. I simply used a series of velcro strips wrapped around the battery and longer velcro strips [you stick two of them to make longer one]wrapping around through the holes on side of the box to hold the battery against the wall of the box. Key is to make sure you have access to plug in the USB cable to power RPi and also when battery runs low, you can plugin the charging cable. If you feel comfortable with those velcro pieces that have glue side you can do that too. I personally hate to glue anything so I don’t use those. But it could be an easier way to just stick the one part of velcro to the base plate and one on back of battery and then just peel the battery off when it needs to be recharged.

At this point your basic layout is fairly settled inside the box. Next is the wiring of all the components together.

Wiring

The main wiring steps are as follows:

  1. Hoverboard motor power lines to ODrive [for left and right motors]
  2. Hoverboard encoder signal lines to ODrive [for left and right motors]
  3. Main power lines from main 36V battery to ODrive, battery fuse and on/off switch on +ve side of battery
  4. Connecting power resistor to ODrive
  5. Connecting RPi to ODrive
  6. Connecting BMI160 IMU to RPi
  7. Battery power for RPi
  8. Optional — connecting power meter follow supplier’s instructions

While you are working on the wiring DO NOT connect your battery to the rest of the circuit, that should be left at the end as a last step, after we have checked and double checked all the wires are connected from source to target place correctly. You can use a multi-meter to make sure connections are good as well.

Hoverboard motor power lines to ODrive [for left/M0 and right/M1 motors]

This one is fairly easy, you can plugin the 3 wires from hoverboard motor in any order[typically Green, Blue & Yellow], these will be thicker wires with bullet connectors at the end.

One thing you will have to prepare upfront is the extension wires for each of the 3 wires on both motors. You’ll need to crimp a male bullet connector on one end that connects to wire coming out of hoverboard motor and a ferrule connector on the other end that goes into ODrive. Once you have 2 sets of 3 wires like this, its just plugging those in.

Before you connect the hoverboard motor power lines into 3-terminal screw connectors on ODrive, insert one Ferrite ring on set of power lines for each motor. One big ring around 3 wires is sufficient.

Wiring Hoverboard encoder signal lines to ODrive

This one is the most painful custom wire extension to make. You need two of 5 wire extensions. The mapping of the pins is described below. For making the custom wire extension you’ll need to get 5-pin locking Dupont connectors. Crimp single wires and insert them into the 5-pin locking socket. On the other end of extension wires, crimp single pin male Dupont connectors. I made the extension wires that were 14 inch long so they can reach from existing hoverboard socket to the ODrive board. Wrap those five wires for each motor in wiring sleeves either expanding or sliced to keep those nicely organized. You can brace them to the aluminum rails using zip ties or velcro strips.

Once the extension wires are ready, its just a matter of following the pin mapping with color coded wires below and plug them in on both ends.

Wiring power lines from main 36V battery to ODrive

Most hoverboards come with an XT60 connector from 36V battery. You will need to buy some more XT60 connectors [male/female] to extend the wires from hoverboard to reach all the way inside the box connecting to ODrive battery input terminal connectors.

On the positive wire you may want to mount an on/off switch as well as a 40A inline fuse to protect your devices from getting damaged in case something goes wrong and very high current flows through the system. These only need to be installed on the positive wire, the negative wire can go straight to the negative terminal on the ODrive.

Wiring power resistor to ODrive

Again very simple step, just connect the two wires from power resistor that came with the ODrive kit to the two point terminal connectors in the middle as shown in the diagram above. One wire from the resistor goes to one terminal and the other one goes to the second adjacent to it.

Connecting RPi to ODrive

Connect a micro USB cable between any one of the RPi USB ports to the ODrive micro USB port.

Connecting BMI160 IMU to RPi

You can either use just four single wire DuPont wires [one end male and the other female] to connect the sensor pins to RPi pins with following configuration. Or if you got the DFRobot one, it comes with their own gravity connector so you don’t need anything else. Just make sure you read the specs of your sensor and use the correct voltage pin on both RPi and sensor. You can use either 3.3V or 5V depending on which one it supports.

Connect Battery power for RPi

Simply plug the USB-C power cable from power bank to RPi. The RPi uses its own battery so do not use the 36V battery with RPi unless you know what you are doing otherwise you’ll fry your RPi.

Some additional things:

If you have a joystick, you can plugin the USB plugin for it in the RPi USB port as well so we can use the joystick to drive around the hoverbot once we complete the software installation and building the code for hoverbot.

ODrive ground loop — ODrive docs recommend that you implement a ground loop. I purchased the USB Isolator but realized that if I plugged it into RPi, it will not allow the USB cable to be connected as it sticks out too much and I would have to drill another set of holes and move the RPi. I have not seen any issues operating the ODrive with RPi so far without the ground loop so I’ll keep it for later.

Two things I hated most during the project due to my own experience level and work area that I have:

1. Making wires with custom Dupont connectors — As I said, I don’t have a lot of experience with this, I try to buy my way out of it if I can purchase but these are very custom so I had no choice and I ended up hurting myself with small nick knacks while working on them. All together there were 10 individual wires for two motors on ODrive side and two 5-pin sockets with 5 wires in each of them on the hoverboard motor side with total of 20 connection points, it was painful.

2. Drilling holes into plexiglass- I don’t mind drilling holes but the plexiglass makes a lot of chips and small plastic particles in the air [please wear some mask to protect yourself ] and I hate the cleanup afterwards. I wish I had a good workshop area with drill press & vacuum attachment to get these out from the drilling area. I just have portable hand tools and no drill press, don’t have the space for it. Don’t want to offend any hardcore tools fans out there but I love my Makita drill/driver.

At this point we are good to go into the software installation and build part of the hoverbot configuration.

Hope this project is as much fun and a great learning experience for you as it was for me. Enjoy!!

Coming soon — Software part is still work-in-progress and I’m still testing out different parts of the system so please be patient while I get things working. At the end of it I’m planning to publish the hoverbot code as public github repo.

Thanks to ideas from the entire community of robot builders out there!! Special mention for being a great sounding board and inspiration for —Serdar Abali [@Serdar_Abali], Aditya Kamath [@kamathsblog], @joemeno @RosmoRobot, @tactiZity, @RoverTenacity, @Mufasa_sleek and so many more…

References

--

--