Balancing Robot
Below you can see some videos of a Segway-style balancing robot I made back in 2008/9 before beginning my engineering degree. Angle estimation is achieved via an accelerometer and gyroscope in conjunction with a Kalman filter. PID loops provide wheel speed control, angle control, and robot position control. A command line interface via serial communication with a host PC allows dynamic modification of PID loop parameters to tune the loops, and a hacked Playstation controller coupled to a low baud-rate wireless transmitter allows the robot to be driven around. The robot also has an optional control loop which attempts to keep net wheel revolutions to zero by changing the balancing angle of the robot. The upshot of this is that the robot can cope with small changes to its centre of mass (as illustrated by the pliers in the second video).
The slight oscillation you can see when the robot is at rest is cause by drift in the angle estimate. I'm not quite sure why this is occurring, although it may be due issues with the C compiler's floating point implementation (it's a known issue with the version of the C compiler I used). |