nBot Balancing Robot

b08.jpg

The basic idea for a two-wheeled dynamically balancing robot is pretty simple: drive the wheels in the direction that the upper part of the robot is falling. If the wheels can be driven in such a way as to stay under the robot’s center of gravity, the robot remains balanced. In practice this requires two feedback sensors: a tilt or angle sensor to measure the tilt of the robot with respect to gravity, and wheel encoders to measure the position of the base of the robot.

http://www.geology.smu.edu/~dpa-www/robo/nbot/