One of the star attractions at the recent bring-a-hack prior to our London unconference was [Dan]’s two-wheeled self-balancing robot. As the assorted masses of the Hackaday readership consumed much fine ale and oohed and ahhed over each others work, there it stood on a pub table, defying all attempts to topple it.
In a way a successful self-balancer can look surprisingly unexciting because it achieves the seemingly unimpressive task of just standing there and not doing much except trundling about, but to take such a superficial view belies the significant feat of engineering that gives the self-balancer its party trick. And it’s no mean achievement to create one from fairly basic hardware, so how has he done it?
The 3D-printed frame holds a pair of stepper motors to do the hard work, while a piece of stripboard acts as carrier for boards containing the MPU6050 accelerometer and DRV8825 stepper motor drivers. Meanwhile the brains of the whole show started as an Espruino Pico but has since been moved to an ESP32.
There is a linked GitHub repository with all the code, and if our description of seeing it in a London pub isn’t good enough for you then you can see it in action in the video below.
If you fancy a go at making your own self-balancer, you might also want to take a look at this simple design. And if you were at the London Unconference and prepared a talk, don’t be shy — write it up on Hackaday.io and add it to this list!
What would be cool would be to have it “drink”beer and as the level of beer rises in its stomach it’s stability decreases and starts to wobble about.
This would be awesome to watch…. Competitive beer drinking robots.
Could sell as a drinking buddy. Once past a certain point it keeps knocking you down in direct proportion to how close you’ve gotten to your car.
Most awesome comment all week, Thank-you!
The PID needs to be tuned :)
Very clean robot!
Great project!
I made very similar project some time ago: https://www.youtube.com/edit?o=U&video_id=vb3MHEYYsVc
http://www.mordzon.net/blog/uncategorized/self-balancing-robot/