MIT student Stephan Boyer has created a self-balancing electric unicycle to get around campus.
(Self-Balancing Electric Unicycle video)
To estimate its orientation, Bullet integrates readings from the gyro and accelerometer using a complementary filter. To balance, the angle estimate is fed through a PID loop (with no integral term). The loop runs at 625 Hz. The output from this stage determines the duty cycle of a 1.22 kHz PWM signal, which is connected to the H-bridge. The code was written in C, and is in the public domain...
I expect that most undergraduates in electrical engineering could probably reconstruct the circuit given this description, burn the code onto the microcontroller, and have a working electric unicycle controller. A trip to the machine shop to construct the chassis and voilà, you've made your very own self-balancing unicycle!
He calls it the Bullet, but sf fans already have a name for this kind of device; the tumblebug, from Robert Heinlein's 1940 novella The Roads Must Roll:
Gaines and Harvey mounted tumblebugs, and kept abreast of the Cadet Captain, some twenty-five yards behind the leading wave. It had been a long time since the Chief Engineer had ridden one of these silly-looking little vehicles, and he felt awkward. A tumblebug does not give a man dignity, since it is about the size and shape of a kitchen stool, gyro-stabilized on a single wheel...
Technovelgy (that's tech-novel-gee!)
is devoted to the creative science inventions and ideas of sf authors. Look for
the Invention Category that interests
you, the Glossary, the Invention
Timeline, or see what's New.
Humanoid Robots Building Humanoid Robots
''Pardon me, Struthers,' he broke in suddenly... 'haven't you a section of the factory where only robot labor is employed?''
Stratospheric Solar Geoengineering From Harvard
'Pina2bo would have to operate full blast for many years to put as much SO2 into the stratosphere as its namesake had done in a few minutes.'