Motor-wheel upgrade
Hoverboard Motor-Wheel Upgrade with Absolute Angle Sensors
Last updated
Hoverboard Motor-Wheel Upgrade with Absolute Angle Sensors
Last updated
One of the most affordable sources of components for mid-sized robots is hoverboards. Thanks to mass production, they offer a cost-effective way to acquire:
Two high-power hub motors,
A battery with balancing/protection circuitry,
A dedicated battery charger.
The fact is that by default, all inexpensive wheels use a six-step control method based on staggered Hall sensors (simple explanation: , more detailed explanation: ).
This is a good way to move fairly quickly, but its downside is that between the Hall sensor commutation points, you won’t have actual data about the wheel’s position. This prevents you from implementing all the benefits of full FOC control capabilities.
Let’s move directly to modifying the wheel. Assuming you’ve managed to disassemble the hoverboard, you’ll have two wheels left in your hands. Opening them, you’ll see something like this:
You can see how the winding wires and Hall sensor wires (connected to the green PCB) come through the shaft hole into the wheel housing. Carefully pulling out the stator, you can begin the modification:
You need to carefully desolder all phase wires and sensor wires:
Now the stator is ready for sensor installation. Let’s consider what needs to be done. Initially, the wheel is designed so that during movement, the stator remains stationary while the wheel (rotor) rotates on two bearings. In cross-section, it looks like this:
The most suitable place for sensor installation is the gap between the end of the stator shaft and the housing. The sensor is mounted on the end of the shaft, and a diametrically magnetized magnet is glued to the motor housing. However, for this, the shaft needs to be modified: a channel for the sensor wires must be made, the end of the shaft must be trimmed to fit the magnet, and the shaft must be bored to install the sensor.
It’s most convenient to modify the shaft using a lathe. Even a basic-class machine will do. DO NOT remove the stator from the shaft. It’s enough to carefully fold the winding ends so they don’t get caught during machining. You can secure them with tape. The machining sequence:
Drill through the shaft to the main channel.
Trim the shaft. Make sure that for your magnet thickness, considering the sensor recess, a gap of about 1mm remains between the magnet and the sensor. This will allow the magnet to be glued conveniently. We recommend a diametrically magnetized magnet with a diameter of 9mm and a thickness of 3mm.
Bore the shaft for the sensor according to Fig. 5. First, make a 2mm-deep recess with a diameter of 12mm, then a 7mm-deep recess with a diameter of 9mm, and finally chamfer the edges. The chamfer closest to the edge is especially important—ensure the contact pads do not touch the shaft.
In the end, the modified stator shaft will look like this:
First, solder the wires to the sensor and check its functionality. Make sure the sensor with wires easily fits into place and the contacts do not short-circuit on the shaft.
If everything is fine with the sensor, solder the winding wires and secure them with zip ties to the stator as it was originally.
After thoroughly checking the sensor and all wires, glue the sensor board into the recess.
The stator modification is complete. Now it’s necessary to install and glue the magnet onto the wheel cover. This should be done as centered as possible. For convenient magnet gluing, it’s recommended to 3D print a jig. Here’s an example of a jig for a 9mm magnet and a wheel bearing with an inner diameter of 15mm:
The jig is designed with slight shrinkage during printing in mind and is sized for a D9x3mm magnet. The hole in the center allows you to hold the magnet after gluing while lifting the jig to avoid it sticking to the wheel housing. If you have a different magnet, you’ll need to create your own jig. The key is to correctly account for the magnet dimensions when calculating shaft modifications.
To press the magnet and remove the jig, you can use, for example, a pencil.
Apply a drop of glue to the magnet, firmly press it onto the disk cover, and let the glue set. Remove the jig while holding the magnet with a pencil. This operation requires care; otherwise, there’s a high risk of gluing everything together.
When the glue has fully dried, ensure the magnet is securely attached. After that, you can assemble the wheel.
After assembly, stationary testing and adjustment are recommended. It’s convenient to use a rig made from structural profiles.
Solder wires of the required length to the sensor according to the . For the sensor, it’s better to use thin, shielded multicolored wires. Ensure that the 6 sensor wires and 3 winding wires comfortably pass through the channel. For this, it’s better to first thread all the wires and then solder them.
3D model of the motor-wheel: