Pages

Friday, September 10, 2010

Easy Steps to make a Line Follower Robot

Of the different kinds of robots people take interest in making, the most basic one is an autonomous robot capable of following a line.
Even though a relatively simple task to achieve, it involves using hardware and interfacing it that is necessary for almost any robot. Hence, this particular robot is great for beginners in the field of robotics.



I am writing here a couple of simple steps that involve certain keywords. It is a good idea to learn about some of these things using google or wikipedia rather than following a guide and making a robot. Trust me, many a times the bot does not work, but the real fun is in debugging and making it run finally.
Firstly, find out all you can about a microcontroller. You are also going to need 3 sensors (even 2 can be used with a little innovation) that will help track the line. A sufficient basic knowledge of programming in C/C++ or assembly will largely contribute. Now, the algorithm to make the robot work is simple. We place the three sensors on the chassis of the robot (for those who read my last post, using a toy car will make things a lot easier) in such a manner that they are in one line, with the middle sensor on the line to be followed and the others on the white background (I am assuming a white line. Complementary colors of the line will only require a small modification of code.) Once this is done, interface (connect) the sensors to the microcontroller. (I will suggest using a 8051, though using PIC or ATMEL will be great, slight overkill, but it will work just fine.) Now, this controller is going to do the thinking. The code you write on your PC needs to be put into this chip (called burning the controller) in such a way that the code understands the architecture. By this, I mean that just as you use int or float in C, you refer to a pin by its pin number and make binary assignments to it like PIN 3 = 0;

The algorithm of the code is now simple, using if loops or switch cases, instruct the code and hence the controller to make certain pin configurations after encountering specific conditions. As an example, if the line turns right, make certain pin configuration so that when the motor is connected to these pins, it will behave so as to turn the robot to right, hence following the line ! However, just connecting the motor to the controller is not enough as the current in a controller is less. You are going to need a chip called the motor driver IC, typically L 293D for a DC motor to run. Read up on something called H Bridge to know more. Now all you need to do is put this all together and you have your own line follower robot ready to go !!!

In case you have noticed I am not giving the code here. This is because someone gave it to me and all I did was clerical work without actually learning anything. Hence I would advice use the keywords to google stuff up and then do it all by yourself :)

No comments:

Post a Comment