A skateboard style mode of transport which balances on two wheels in the centre
Fairly recently I discovered the Rust programming language and fell in love with it! So much so that I decided to change the hardware to an STM32 microcontroller and rewrite the entire firmware in Rust. You can take a look at the code over here: https://github.com/SamP20/SelfBalanceSkateboard/tree/master/RustFirmware. The C firmware is still there if you're interested, however it's incomplete compared to the Rust version.
The Skateboard is now fully functional at last! Unfortunately however it's a bit unstable to ride in practice. The flexibility in the threaded rod is partially to blame, however the differential steering doesn't help much either as you have to remember to lean as you move the steering joystick otherwise you'll fall off. If I ever get time to rebuild this project I may opt for a single wheel design similar to the commercial OneWheel as it looks a lot more intuitive to ride.
In case you've missed it, the firmware for the microcontroller is now on GitHub: https://github.com/samp20/SelfBalanceSkateboard
As of this post there's no support for steering yet, however I have implemented a PD loop for balancing. I can't really do much testing at the moment anyway until I have a proper enclosure for the electronics. I'm going for a steampunk-ish theme, so stay tuned.
I have finally managed to get hold of a router to mill the slots for the motors. These should allow me to tension the chain as it becomes slack. Unfortunately one of the motors isn't quite aligned laterally causing the chain to catch occasionally. I should be able to fix by widening the slots by about 0.5mm. Here's a photo of the underside:
Once that's sorted I can finally start testing the balancing code. I'll also need an enclosure to protect all the electronics and battery.
I've got all the steel box section screwed down, and couldn't resist giving it a try. To my relief it didn't break!The climbing shoes were because my feet kept slipping off the board when trying to get on (normal shoes would probably have worked too). I'll put some grip tape on the deck eventually which should sort that problem.
Steel box section has arrived, so I've been spending time cutting it to length and drilling holes. I've decided to have one length down the middle to stop the deck from bending. Either side are brackets to hold the axle. Next step is to drill and countersink holes in the board to fix everything down.
Of course when new parts arrive you have to find some way of playing with them, even when you're still waiting on something else. Anyway, here's another video of me messing around:Read more »
I decided to test out the serial interface of the Sabertooth motor controller while waiting for parts to arrive. The easiest way for me to test it was to use a USB<->serial adapter and create a quick script in python. All the script does is ramp the motors a few times, then oscillate them to a sin wave. Video below.Read more »
A little more progress has been made purchasing parts for the board. A trip to toolstation means I now have a 1m length of M12 threaded bar which will be cut to length for the axle. I've also purchased various nuts, bolts and washers to secure everything together.Read more »
A quick test of the motor controller. I had to be slow decelerating to avoid feeding too much power back into the power supply. This is an advantage when using a battery as it allows the battery to be charged during braking: