Mini Project : Self Balancing Robot

Hey! Fellow nerds!  Hope you are having a great weekend. Just a quick reminder the Chinese new year is starting from February 8th so Happy New Year to all my Chinese readers and for all other folks it just mean a Chinese electronics market shutdown for a month, hopefully you have stocked the parts you need.  I didn’t, was really in need for some motors and yeah shipping time 15 – 38 days, so going to try my luck in local market tomorrow.

Its my Sixth semester this time and that means I have to make a mini project and after a ton of pleading to my project guide, he accepted my project topic which I really wanted to do for a long time “The self balancing robot”.
This post will be about just some basic explanation and ideas I have for the project and info on upcoming in-depth posts on same.

Here is a hand drawn model I made to give a general idea about the project.

bot diagram

I meant Motor with encoders in the diagram.

So what is does? A. Its a two wheeler robot which stands and balances itself, it also does all the basic stuff that other robots do like running around, turning and also balances any load kept on it.

What can be its possible application other than control engineer flexing his/her muscles? A. Segway, Hoverboard, Uni-wheeler which are all the new rage. Not only those but similar setup can be used to make camera stabilizers, maintaining canon position in tank, etc.

For those who may not know, what is self balancing robot is. This is just a basic rundown of the same – Its a classic Control System problem which is an idea of stabilizing an inverted pendulum (wiki link), In which you try and balance an inverted pendulum that has its center of mass above its pivot point using a control system. In simpler terms its like the process of balancing a stick on your finger (or palm).

How does it work? A. Lets us again consider the simpler example balancing a stick on your hand. Now imagine the stick is starting to lean towards right and is going to fall what you do? You move your hand towards right and balance it again. This moment of your hand bringing the bottom part of the stick under the top is your way to keep its center of gravity stable, thus keeping the stick from falling.

This is precisely what the robot does! In the case of the stick the point of the contact to your hand was just at a single point so you have to balance the stick in all four direction (forward, backwards and to the both sides) but in robot due to two wheels arrangement the robot doesn’t have to worry about falling on the sides it just have to balance forward and backwards motion.

There are two important sensor used for measurement the robots falling, they are an Accelerometer and Gyroscope which gives us proper acceleration and orientation of robot respectively. This data is then processed buy the micro-controller and it send the motor instruction to move forward or backward.

This instruction in this case is given through a PID controller than to the motor driver. (why use a PID controller? coming soon.. ) For now its just good to know that due to this PID program the robot remains stable and does not oscillates.

Besides the feedback from the Accelerometer and Gyroscope there is one other feedback form the motor’s encoder with gives the RPM of the motors. Why? A. Used in PID program for stabilization (more on that in later posts).

And this is how the robot is able to stabilize itself on two wheels. This is also the working principle behind the Segway.

That’s all for today! Soon we will be getting in to details with each aspect of the robot, its mechanical structure, PID code, primary code, Bluetooth control and much more. This is a live project which I am writing about as I go, so you will get an idea of all the problem I face and how to deal with it if they present to you. Before all of that there will be a post filled with images of the industrial event going on in Pune called MAHA Tech which I visited (still happening till 7th), there where some serious gear in there all coming up soon, so stay subscribed.

To get notified via email subscribe to blog link is at the bottom.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s