Personal Projects

MIP 2

Sep 15, 2022

Inverted pendulum control project. Two-wheeled balancing bot. This page documents progress as it's completed.


Goal

I made one of these for a class a long time ago but I was never really satisfied with the result.


Motors

I decided right off the bat that if this thing can't go fast, there's really no point. After quite a bit of searching, I ordered 12V, 250rpm motors from RobotShop (these) which conveninetly come with a mounting bracket and wheels. The datasheet implies the ratio is 1:34, so the 11ppr Hall effect encoder should give about +/- 1deg of resolution, which should be about +/- 0.5mm of position accuracy with their standard wheels.

Rough calculations with guesses for center of mass height, wheel diameter, and final mass show it should need 67 N*mm to right itself from 20 deg. The motor above has 75 N*mm at stall, and while that doesn't leave much margin, the device shouldn't be tipping anywhere close to 20 deg.


Microcontroller -- reviving the BeagleBone

Tempting as it was to spend/waste money and buy a new ESP32 board for this project, I decided to try my old BeagleBone Black first. My login info was long gone (I last used this board my senior year of college, 9 years ago now) so I had to reflash. This took almost a full day of testing different Angstrom and Debian releases before I found one that took.

BeagleBone Black (2014)
Image: BBB-eMMC-flasher-2013.09.04.img.xz (Angstrom)
Default IP: 192.168.7.2
Default SSH login: username root, password root

The BeagleBone mounted on the plastic chassis from "UCSD".

Writing the simple LED blink program made me realize why I let this board gather dust in the first place, but it was a good opportunity to reteach myself some basics of C++.


Sensor(s)

Need gyro/accelerometer