[P]i wanted to develop something creative for his entry into the Texas Instrument’s MSP430 Design Contest(2006). He came up with an MSP430 balancing a two wheeled robot. The robot’s wheel base consists of a damaged Microsizer car. Using only the rear end of the car with the drive components, some silicone to dampen the vibrations, a PCB and a carbon rod, he was able to come up with a good enough chassis to test his inverted pendulum theory.
The MSP430F1232 interfaces to an ADXRS300 yaw rate gyroscope from Analog Devices for measuring angular velocity. The MSP430 samples the gyro signal via an ADC. [P]i describes that he made use of the Two Block Data Transfer Control of the MSP. The other major part consists of a simple H-Bridge using FETs for controlling the motor. He also explains his gyroscope calculations and control algorithm. All details, code and schematics can be downloaded from his site. He used mspgcc as his compiler.