50 Bucks Direct Drive Wheel Base From a Hoverboard
by joegaffey in Circuits > Reuse
752 Views, 4 Favorites, 0 Comments
50 Bucks Direct Drive Wheel Base From a Hoverboard
WARNING: This is a potentially dangerous device to build and operate.
It is NOT recommended to recreate this build unless you have sufficient knowledge of and experience working with power tools, high powered motors and large lithium batteries.
Don't allow children or adults inexperienced with high powered direct drive wheel bases to use the wheel base unsupervised or without adjusting the force strength to a suitable level for the individual.
Why did I make this?
Some people like to drive fast cars and some people like to pretend to drive fast cars. Often these are the same people.
For such people like myself, the world of sim racing has many wonderful gadgets among which the Direct Drive wheel base holds a special place at the highest echelon of racing gear, allowing virtual drivers to experience simulated driving forces on the steering wheel with unmatched fidelity.
While Direct Drive wheel bases have dropped hugely in price in the last few years they can still be prohibitively expensive in different parts of the world due to availability, taxes, exchange rates etc.
I wanted to see how inexpensively I could build one myself with my trusty Cammus C5 wheel as a reference and target to surpass. I also wanted something that I can attach different wheels to, which is one of the limitations of the C5 as it combines the wheel and motor into a single assembly.
It's also just a great fun project, combining elements of industrial design, mechanical and electronic engineering as well as some Microcontroller shenanigans.
The project is made possible by the excellent FFBeast firmware that runs on ODrive compatible controller boards. The build largely follows the guide in the FFBeast website with support from the fantastic community on the FFBeast Discord.
Supplies
Some project costing ground rules to start with before anyone complains about cheating:
- This is what the build cost me in my situation using my tools and available scraps. There is no guarantee that it will cost you the same amount.
- Only parts specifically purchased for and used in the final build are included in the costs.
- This build requires some mechanical and electronic tinkering experience so it is expected that some basic stuff like wires and solder etc can be considered something you likely already have on hand - at least I did.
- The project costs cover the wheel base only - not the steering wheel or the power supply (though I will discuss what I used later) or any attachment mechanism such as a clamp to hold the base onto a rig or table. A basic wheel attachment mechanism is included.
- My costs are in Eurobucks - your bucks may vary :)
Check out the cost table for the full parts list for the reference build from the FFBeast docs and note the parts that I skipped in my build.
The two major components of the build are:
- The broken hoverboard that I picked up at a local secondhand market from which I harvested the motors, chassis and some connectors and screws.
- The MKS Xdrive Mini motor controller which was the least expensive ODrive compatible board I could find.
The junk hoverboard only cost me €5 and I hope to use the other motor in another project (stay tuned folks).
The motor controller board makes up the bulk of the cost at €35. The remainder is the inexpensive MT6701 based magnetic encoder module and some additional screws and fixings that I needed to purchase.
Hoverboard Teardown
I forgot to keep a pic of the donor hoverboard but I guess many people would have seen these around. The one I found was quite damaged and dirty.
Breaking it down involved carefully disassembling the case, removing the battery for recycling (that's another project) and then ripping out the remaining electronics and wiring.
I weighed the motor to determine what torque I could expect following the guide on the FFbeast docs. This one seems like a 12.7nm job with 25mm magnets.
Remove the Tyre
To remove the tyre you should disassemble the motor by first removing the screws at the back and then pulling out the rotor by the centre axle.
Be careful to use the correct screwdriver type and ensure that the blade is seated firmly in the screw head as the screws will likely be very well tightened and may have loctite on them as mine did.
The rotor will offer some resistance due to the magnets. Mine was ok but if you have trouble doing this by hand you might want to clamp the case down somehow and grab the axle with a large pair of pliers or a vice grips for extra leverage.
Once the rotor has been successfully extracted, try to pry off the tyre with a flat head screwdriver, chisel or other such prying tool. Mine came off pretty easily but you may not be so lucky.
Once the tyre is off you may reassemble the motor for now.
Prepare the Chassis
The hoverboard chassis must be split in two so you can use one side as the chassis for the wheel base. In my case at least this involved prying open a circlip and removing the centre pipe connecting the two halves.
Once that was complete I used an angle grinder to cut off the shaft that housed the centre pipe so as to reduce the footprint of the chassis and somewhat improve its aesthetics.
I could then reattach the motor using the original clamping plate to get an idea of the final overall shape and size of the wheel base.
Preparing the Rotor
The rotary encoder used is magnetic with a chip that detects the orientation of a magnetic field nearby. In order for the rotary encoder to work either it or the needs to be fixed somehow to the rotor with the other part fixed to the motor housing. In this build I will attach the encoder to the rotor and the magnet to the front of the case behind the steering wheel.
There are other options including using a rod through the axel to the carry magnet and affixing the encoder to the chassis but this option seems the cleanest to me. In either case the axel must be drilled to pass either the wires from the encoder or the rod through to the chassis so the axle must be drilled.
The first thing I needed to do was remove the wires from the already drilled half of the axle. This involved removing some glue that was holding the wires in place and then removing the lighter hall sensor wires with a wire cutter.
I could then pull pit the hall sensor wires which gave a bit more room to pull out the motor power wires which I managed to do without having to cut them. If you have to cut the wires at this point make sure to cut as close as possible to the axel to leave plenty of wire for resoldering later.
Once the wires have been removed it is safe to drill the axle. A bench vice is highly recommended here to hold the rotor steady for drilling and a drill press is also highly recommended if you have one (I don't).
Usual drilling rules apply, use the right metal cutting bits with the right drill speed and a bit of oil for lubrication. Start with smaller bits and work your way up to 8mm - at least for my encoder mounting - perhaps a bit less would be ok for the rod approach.
The metal in the axle is quite tough and I managed to break a couple of drill bits in the process but thankfully they didn't get stuck in the axle. Even with the centre dimple in the axle I still managed to drill mine a little off centre so I will try to compensate for that in the encoder mount.
When the drilling is complete there should be a hole all the way through the axle. Check that is it clear and clean before moving on.
Finally you can reinsert the power wires through the hole in the side of the axle carefully guiding them in one-by-one. The last one was a bit tricky but should be manageable with a little perseverance.
If you cut the wires to get them out make sure to add some heatshrink tubing when soldering them back together before inserting them into the axle.
Preparing the Motor Housing
I now had to drill some holes to mount the wheel and the encoder magnet to the motor housing. I started by centre punching for the encoder hole at the center of the housing. I used this punch mark to draw a 70mm circle with a scribe.
I then lined up my steering wheel with the scribed circle, marked out the hole positions and centre punched them. Next I drilled out the wheel hole pattern starting with a small pilot hole (2mm perhaps) and then 5mm. The bits were inclined to wander along the material even with the center punch so take some care here by making small incremental cuts at first.
I messed up the centre hole cut initially but managed to pull it back into line by angling the drill. I somehow managed to get a clean and centered cut for the final 10mm hole. Again a drill press would be very useful here if you have access to one.
With the holes drilled I was able to add the threaded hex joiners I use to attach the wheel. These are screwed in from the inside of the motor housing and will be inaccessible after final assembly so make sure they are well tightened.
Note: This is a potential weak point of the design as there is a risk that internal screws may come loose in time. For a better solution I recommend purchasing an automotive wheel hub spacer that may be secured with lock nuts on the outside of the housing but that is outside of the scope and budget of this build.
With the spacers attached I was able to attach a steering wheel to check the hole alignment. These were not perfect but close enough to get all the screws in with some persistence.
Mounting the Wheel Base
I test mounted the wheel base to my rig in order to do any necessary modifications to the chassis before mounting the electronic components.
I didn't need to buy anything for this as I had all the scraps I needed. Also, this is just an example of the many ways you could bolt or clamp your own wheel base to a rig, bench or table. Do what ever works for your driving situation.
In my case I screwed a couple of scrap iron brackets to the underside of the chassis and then screwed them to two aluminium profile cut offs I had left over from building my rig. The profile is completely optional here and just made it easier to attach to the rig with extra adjustability.
I had to shave the brackets and underside of the chassis a little with an angle grinder to get them to fit together nicely.
Next I attached some more heavy brackets to the rig. I also modified these with the grinder and drill to allow me to adust the wheel angle.
In the end I had a solution that allows adjustment of the wheel position in three axes with tilt.
Assembly and Wiring
I originally intended to design and 3D print a mount for the magnetic encoder but I impatiently decided to have a rummage around the shed to see if I could find anything suitable instead.
I soon found a couple of pieces of plastic including a rigid tube that fit tightly into the motor axle and another piece to which I could attach the magnetic encoder module.
To secure these two piece together I wrapped the plastic tube with tape so that it fit snugly into the encoder holder piece which I just shoved down onto the tube.
Due to the slight offset in the motor axle hole the mount ended up a little off-level. This was corrected later when mounting the encoder.
The next step was to feed the encoder wires through the motor axle from the chassis side. This was a little tricky due to the offset hole and the smaller diameter of the plastic tube so I pushed through a fishing wire from the front and used it to pull the encoder wires back through.
Next I soldered the encoder module to the wires and mounted it on the protruding plastic piece using BluTack - yes really! #BluHack
BluTack actually turned out to be a great option here as it later allowed me to easily adjust the position of the encoder to ensure a proper read of the magnetic field of the magnet.
I also needed a magnet holder. Searching around for some useful material I came across a rusty metal plate off an old kitchen appliance. After cleaning it up with the angle grinder I drilled some 5mm holes in the 70mm bolt pattern. I marked the center and just placed the magnet there.
The magnet holder disc was then mounted on the brass steering supports behind the wheel with the magnet facing the encoder. The magnet needs to be well centered on the encoder chip within a couple of millieters from the chip. Again the BluTack was esential here to adjust the encoder position.
Note that the magnet is attached to the steering wheel, it is the moving part and therefore must be centered on the axis of rotation of the motor. The encoder board doesn't move in operation so its position can be finely adjusted relative to the centered magnet to ensure it also is centered even if the axle hole or encoder mount is off center and slanted as mine is. I adjusted the encoder board position simply by applying gentle pressure to the appropriate side of the board and allowing the BluTack to hold the module in the new position. This can be fine-tuned later using the calibration software as a guide if necessary.
With all the pieces ready I followed the wiring instructions from the FFBeast website.
Note: This step was done quite hastily due my eagerness to get the project finished and used what I could find to hand. If you want a long lasting and 100% reliable wheel I would take more time on this step than I did and consider using more rugged materials including perhaps a 3D printed encoder mount. Many such examples may be seen on the FFBeast discord.
I do think my experiment with a protruding encoder is generally a good idea but likely needs further refinement in execution.
The Power Supply
In order to boot up the controller board for programming I needed a suitable power supply as the board doesn't take any power from USB.
Looking through my box of old PSUs (which is a perfectly normal thing for a person to have that their partner should be totally cool with) I came across this 19.5V, 11.8A (230W) HP job.
This is a big step up from the 19.5V 6.7A (140W) supply for the C5 so we should have the headroom to beat that on available power at least even if a little bit under the 24V 20A typically recommended on the FFBeast Discord.
I figured this would be a good enough fit for my motor being a 25mm magnet version and I could dial it down a bit for a little extra headroom. Likely if I get even 8-10nm at the wheel it would be a boost over the C5 which is already quite strong.
I didn't have a compatible connector so the quickest solution was to cut off the barrel jack plug and stick on the XT60 plug salvaged from the junker hoverboard's battery pack.
After that I checked the voltage with a multimeter to make sure I got the polarity right and there was actually power.
Flashing the Controller
This step turned out to be the trickiest part up to this point. I will summarise briefly some of the grief I encountered with this as a cathartic exercise but feel free to skip over the next few paragraphs and proceed on a happier path by following the instructions on the FFBeast docs instead and maybe check back here if you hit a snag.
I wanted to test the electronics using the ODrive tools before flashing the controller board.
At first I tried to avoid installing the ODrive toolchain on my dedicated but elderly gaming PC which is the only Windows machine I own. I tried Debian Linux via Crouton on a Chromebook which had USB driver issues and Arch Linux on my Steam Deck which has a read only system partition that I needed write access to.
I even tried Window Subsystem for Linux (WSL) on Windows so as to at least avoid tampering with the host OS but had similar USB driver issues there. Likely these issues could individually be resolved but they all involved either making environment modifications that I was not entirely happy with or going down into some rabbit shaped holes. I expect that a vanilla Linux install would have fared better and briefly considered a Linux USB boot stick.
At this point I was running out of patience though so I threw caution to the wind and went straight to flashing the controller with the FFBeast firmware using STM32CubeProgrammer directly installed on my Windows gaming PC as per the FFBeast instructions.
This also turned out to be problematic as the programmer could not see the board initially.
At first I thought it wasn't going into DFU (Device Firmware Upgrade) mode but after reading through the FFBeast Discord and retrying many (many) times as suggested I tried using Zadig as also recommended to check the installed drivers.
As it turns out, a previous driver (from the C5 or perhaps a previous Thrustmaster wheel) was associated with the "STM Bootloader" device that the controller reports as in Windows Device Manager when in DFU mode.
I then tried using Zadig to swap the driver to something that the board programmer could work with. Luckily the first driver option that Zadig offered did the trick and the programmer software was finally able to see the controller board and flash it with the FFBeast firmware following the instructions in the FFBeast docs. Phew!
After flashing the controller I found I was no longer able to flash my C5 wheel firmware using the Cammus desktop software but I managed to fix that by changing the STM Bootloader device driver back to the one provided by Cammus using Zadig.
Calibration and Testing
Once the firmware was loaded I could successfully run the FFbeast setup application from the website and begin testing using the FFBeast recommended test apps.
This involved setting the configuration of the motor (15 poles) and the encoder (4096 cpr) as per FFBeast guidelines as well as activating the firmware license and setting the FFB parameters - strength, rotation (540) and damping (10%).
I also set the brake resistor relatively high initially (50%) to protect the PSU.
When these settings were applied and saved to the controller board on the wheel base it was then rebooted to the latest settings.
I did the initial testing with low strength and no wheel attached. On the first run the wheel apparently calibrated ok but when I turned it by hand it started rotating to the right continuously.
I suspected either motor wiring or encoder issues. Turns out I was right on both counts.
I had followed the example from the document supplied with the controller board which had the motor power wires in the order - yellow, green, blue. After going through some examples on the FFBeast discord I found that some had a different order - green, yellow, blue which I tried. This seemed to address the runaway motor issue.
Note: As stated in the FFBdocs - don't follow wire colour coding. Always check the component schematics for the correct routing. In the case of the motor power wires, some experimentation may be required.
After getting the motor power wire order sorted and solving the runaway motor issue I was still having problems so I checked the VKB joytester program recommended in the FBeast docs and found that my encoder signal was periodically resetting to zero as I turned the wheel. Back to FFBeast discord for more research.
As it tuns out the Z wire in the magnetic ABZ encoder is being used by the firmware as a reset so I simply cut that wire and the problem was solved.
In hindsight, I should have set the motor strength to zero for the initial testing to get the encoder set up properly first. When this is working correctly the Joystick tester program shows the axis slider moving smoothly between both extents as you turn the wheel through its full range of motion.
At this point I attached my lightest steering wheel to the wheel base and started testing in Assetto Corsa while keeping a close eye on the electronics temperatures in case something was overloading.
From here I gradually increased power and reduced the percentage of brake resistor which I noticed was heating up at the higher values.
I initially settled at 80% power and 10% brake resistor which seems to give a great response on the wheel with crisp and strong feedback comparable but notably stronger than my already quite powerful Cammus C5 wheel.
However after further testing with a heavier steering rack car I found my power supply shut down due to overload protection so I backed this off to 70% with 15% brake.
Likely I need a beefier power supply to get the most out of the wheel base.
Wrap Up
The wheel base turned out great, matching and in some ways exceeding my existing wheel base by offering not only an excellent force feedback response but also a flexible platform to build future modifications and additions on top of.
This was the most fun project I've completed in a while, giving me a chance to flex some long dormant skill muscles including metalworking, electronics and even a bit of industrial design.
The project is complete only in so much as it is now a fully functional and very enjoyable device. However as you may have noted there were quite a few shortcuts taken for a quick build and to keep the costs on budget. These are in line with the experimental nature of the build but may cause reliability issues in the long term.
I intend to keep improving the wheel in a few areas including bolting down the electronics and tidying up the wiring, adding an emergency kill switch, improving the encoder mount, adding a case or shield to cover the electronics and adding a quick release so that I can easily swap different wheels on and off.
This base also opens the door to further projects including wired or wireless button boxes for the various steering wheels I want to use. I'm also considering a handlebar attachment for my latest sim racing obsession - motorbikes!
If you've made it this far - thanks for reading. I hope you found it a useful or even enjoyable read. Happy building!!!