Making of a Self Balancing Robot

Self Balancing Robot

Robotics connects all the branches together. It needs the knowledge of mechanical , electronics and computer engineering . Mechanical engineers for making the mechanical parts of the robot. Electronics for dealing with various sensors modules . Computer engineers for coding these modules. Most importantly , the robotics is emerging branch and the world is moving towards automation through robots . Technology addicted people predict that factories will shift to robots for better efficiency. Some company have already started it.Students in the robotics field have always come across the self balancing robot . The self balancing robot finds it’s application in surveillance and transportation . Have you ever wonder how it works ? Well , this article would suffice it all.

Self balancing robot is tricky bot to make . The confusion starts right from the motors ,  center of gravity , batteries etc. Here , I will list down the components which are best suits to make it.

  1. Controller : – Any microcontroller can be put to use . However , Arduino UNO board is best to select since it is easy to use . Most importantly, the board is cheap and easily available. Similarly , Arduino mini and Arduino Nano is also available but stick to UNO.
  2. Motors :-  The stepper motors are the best to use to make the robot but the use dc gear motor . The motors makes coding simpler , hence it would be the best choice to use .
  3. Motor Driver :-  Without any doubt , the motor driver L293D is the best . However , the motor driver L298N works just fine.
  4. Wheels : – First of all , I would mention we do not put much attention to this  but the wheels are the tricky part . Therefore , make sure that the wheels have good grip . Most importantly , check that the grip should not allow wheels to skit on the floor.
  5. Accelerometer and Gyroscope :- The best choice here would be MPU6050 .  The module is the combination of both accelerometer and gyroscope . Do not use two different sensor for this purpose  because it will be difficult to work with it . Moreover, the chasis would become heavy.
  6. Battery :-  It should be as lights as possible and more than 5 volts to charge up Arduino . Hence , the best choice would be the Lithium polymer battery but the Lithium ion is 7.4 V is easily available. Both of them are good . Hence use any one of them .
  7. Chasis : – This is another plave where there should be no compromise . The chasis should be strong to hold the bot . Note that the chasis is sturdy it should not wiggle when the bot is trying to balance itself.

After selecting the components the rest all is interfacing . Interface the  MPU6050 , motors , motor driver with arduino . The battery powers up the arduino. The circuit diagram is here as shown

Self Balancing Robot

 

Next step is programming , this is where the magic happens . The MPU 6050 , checks if the bot is leaning forward or backwards .The data from there is intercepted and the wheels work accordingly . If it is leaning towards the front the wheels should rotate forwards. If it is leaning towards the back the wheel rotate backwards .While moving wheels , the speed should also be checked because the bot should not be disoriented . For this purpose we use PID algorithm . The logic behind is that if there is slight disorientation the wheels move slowly and vice versa. The current position is read from MPU6050 , it is a six axis gyroscope. In order to get the exact value , we use both the accelerometer and gyroscope . If we use them individually , the noise prevents to get exact value . Therefore try to get this sensor so you can get the exact the value .

This looks little but difficult , but not to worry . The Arduino community has created the libraries for PID control and get the value from the MPU6050. Therefore , download these libraries before proceeding . The links are https://github.com/br3ttb/Arduino-PID-Library/blob/master/PID_v1.h  and https://github.com/jrowberg/i2cdevlib/tree/master/Arduino/MPU6050 .

The best part about this bot is that you learn control system. The concepts are so basic that you can use it again in different projects.I hope you get the exact idea how to do this . If you have any problems with the coding there are many websites on the internet that gives you more idea how to code. Though I hope you guys do not copy the code. Try to do the coding by yourself . Since it will really help you to understand the concepts thoroughly. Furthermore If you want to learn more about robotics, Eckovation is a great platform to learn new technologies. There are various courses on the emerging technologies of the world! Eckovation has numerous project based courses to take your skills to a new level!

If you want to make your own Robot do check our basic and advanced course on Robotics, which come bundled with a Kit sent to your address after the enrolment.

 

Please leave you comments about how you feel about the article in the comment section. We at Eckovation value your feedback!

Don't miss out!
Subscribe To Our Newsletter

Learn new things. Get an article everyday.

Invalid email address
Give it a try. You can unsubscribe at any time.

Comments

comments