This is testing video of the Self Balancing Robot that was developed by the Robotics Interest Group. The robot is using PID algorithm and complimentary filter algorithm to stabilize itself.
Accelerometer used is a MEMS (Microelectromechanical systems) based sensor which can measure acceleration in three different axes. The IC has a fine structure of many parallel plates. The distance between them changes on experiencing acceleration which in turn changes its capacitance proportional to the acceleration.
Gyroscope is also a MEMS based sensor used to determine the angular velocity with respect to the axis specified.
Estimating tilt :
A more reliable and accurate reading can be achieved by fusing both a gyroscope and accelerometer together using a technique known as kalman filter. This uses the accelerometer to detect the angle and correct the output signal from the gyroscope. Kalman filters are described as a recursive filter and provide output estimation for the state of the system based on past and present sensor measurements whilst also overcoming sensor noise and other system disturbances
PID control loop :
The angle given by sensors is passed through a PID loop which makes the robot come to its stable vertical position based on current error, sum of previous errors and rate of change of errors. It provides the most optimum control for the system.
Microcontroller : Atmega 328p based Arduino UNO R3
A microcontroller to process the signal and give output accordingly was used. It has an operational voltage of 5 volts .It uses RISC architecture and processes one instruction per clock cycle. It runs at 16 Mhz. It also has 10 – bit ADC which is used for getting raw values from sensors. It also has 8 – bit PWM that runs the motor through a motor driver.
Motor drivers: RIG MOSFET motor drivers