PLEASE NOTE: This project is in its infant stage. The code has little to no documentation and I have not uploaded the CAD files for the frame.
Over Winter break (2013), my friend David Ingraham and I built a balancing robot. It operates on the same principles as the popular Segway two wheeled transportation system. That is, it accelerates and decelerates the wheels in order to keep the entire system upright. We used a 3D printed frame along with some components I had lying around. The code incorporates a PID controller and a Kalman filter. The PID controller code used was from the Arduino PID Library and the Kalman filter was based off this project. The primary purpose of the project was to learn how to write and use a Kalman filter. The code is still under development, and we will be upgrading the drivetrain soon brushed DC motors and encoders). See the video at the bottom of the post for more information.
1 x Dual Use Gyro and Accelerometer Sensor Board (This consists of an ADXL345 3-axis accelerometer (get it at Sparkfun) and a ADW2207 analog gyroscope, both of which can be purchased separately. Any analog gyroscope can be substituted for the ADW2207, but new code would have to be written (or found) in order to use a different accelerometer).
1 x Bluetooth transceiver (for telemetry)
3 x Potentiometers (for tuning PID controller)
1 x Frame of your choice. Should be relatively tall.
1 x Assortment of zip-ties
1 x Assortment of wires and jumpers
1 x Wheels of your choice. Should have a diameter of approximately 7 inches.
As zip file containing the Arduino and Processing code can be found here.