First of all I want to apologize for my English, if you don’t understand something, please, ask. I know that a self-balancing robot is not new, but when i started this project i found a lot of information, but never in the same self balancing robot using arduino pdf, i had to search a lot to join all information in a single project. Becouse of that i’m making this instrucctable, to show you all the information i get, with all detail, to make that robot. This project is for all of you that like’s to make robots but don’t have many things, and by things i mean time, money and robotics knowledge.
In this project i’m gonna show you the easiest way to do a simple, cheap and useless two wheels self-balancing robot. I explain the materials and electronics used in the project, how and where to buy or create it and i’m gonna tell you my experience and tips along the way to create this project. The materials i used for this projects were the cheapest i could get, but there are even cheaper. Robot-Italy, an Italian store specialized in kits for robotics.
I used materials as cheap if i could but you can use whatever you have, i saw people using servo motors and stepper motors with a good result. This motor driver maybe is much bigger than the needed one, with an L293 it can work, you can make your own chassis and use other type of sensors. The physics for this robot are simple, the robot stand in two points lined, the wheel, and i tends to fall and lose his verticality, the movement of the wheel in the direction of the falling rises the robot for recover the vertical position. A Segway-type vehicle is a classic inverted pendulum control problem that is solvable in two degrees of freedom for the simplest models. The vehicle attempts to correct for an induced lean angle by moving forward or backwards, and the goal is to return itself to vertical.
Or at least not fall over. For measure the angle we have two sensors, accelerometer and gyroscope, both have his advantages and disadvantages. The accelerometer can measure the force of the gravity, and with that information we can obtain the angle of the robot, the problem of the accelerometer is that it can also measure the rest of the forces the vehicle is someted, so it has lot of error and noise. Those problems can be resolved be the combination of both sensors, that’s called sensor fusion, and there are a lot of methods to combine it. In this project i try two of them: Kalman Filter, and complementary filter.
The Kalman filter is an algorithm very extended in robotics, and offers a good result with low computational cost. The Complementary filter is a combination of two or more filters that combines the information from different sources and gets the best value you want. It can be implement in only one line of code . For more information visit this page.