IMG_2693_Medium.JPG (116699Bytes)
IMG_2694_Medium.JPG (109863Bytes)
I want to build a two wheel self balancing robot using Arduino and the IMU6050. After a few weeks looking around robot and arduino forums, without much luck, I thought perhaps users might share their experiences, ideas and code on this forum.
For starters, I built the platform out of 5mm plywood, using the following componnents
2x Tamiya 70168 Double Gearbox Kits
2x Pololu Wheel 90x10mm
1x L298N Dual H Bridge motor driver
1x Arduino Uno
1x IMU6050 board
1x bluetooth module
I also built a 'cube' testing device so I can accurately measure the IMU6050 outputs for every 90 degrees of rotation.
So far the best results for accurate and driftless angle measurements have been using the Lauszus Kalman 6050 sketch below.
References:
Kalman filter for the IMU6050 by Lauszus
http://blog.tkjelectronics.dk/2012/09/a-practical-approach-to-kalman-filter-and-how-to-implement-it
2 and 4 wheel robot using an IMU6050 by Arkadi
http://forum.arduino.cc/index.php/topic,143261.msg1075848.html
Dorweiler 2 wheel robot
http://www.transistor.io/balancing-robot.html
Kerry Wong self balancing robot
http://www.kerrywong.com/2012/03/08/a-self-balancing-robot-i
Balancing robot for dummies by KAS
http://www.x-firm.com/?page_id=145
http://forum.arduino.cc/index.php/topic,60170.0.html