Tuesday, December 28, 2010

How to Build a LINE FOLLOWER/LINE TRACER ROBOT






The basic connection diagram

LINE FOLLOWER/Line tracer ROBOT

The line follower robot is an autonomous robot i.e. it works automatically!!! . As all ilt for some robots are built for some specific task the purpose of the line follower is to follow a path given to it. The robot can follow a black line drawn in a white background or vice versa. It is also called a line tracer etc… Well that’s all about the basic background of a line follower

Construction

The construction of a line tracer isn’t rocket science… all we require is a basic knowledge of electronic circuitry and its components. If we have interest in it well we can finish the project within a week for newbie’s and if you really know what you are doing well a day or 2 would be more than sufficient. Now lest get started.

Basic Requirements

1> Electronic components (Electronic circuit)

2> Mechanical parts (For the body of robot)

Some of the most common components you will be requiring for building this robot would be

Resistors (1k,2.2k…), Capacitors (5mF..),LED’s , LDR’s or Photodiodes ,Pots (Potentiometers-Variable resistors) connection wires, IC Base, Soldering iron, solder, Copper board (Etching board if you know to design) etc…. Most importantly you will require a motor controller IC (LM342), A microcontroller (ATmeg-8, PIC …) and 2 Geared motors.

For the body of the robot you will have to have some (2-3) L shaped clamps depending upon how you plan to design, a small thick board (wooden, cardboard…)

The total cost would not be more than 1000/- as the only the costliest component is the geared motor which would cost between 200-300 each. Make sure that both the motors RPM (Rotations per minute) are same. Do check this for sure. A small difference of 2 or 3 RPM is all right as it can be adjusted. But a large variation would be unacceptable. Also a smaller RPM would be sufficient. We usually get motors with RPM ranging from 10RPM to 750RPM. Choose a range b/w 50-150 as it below it would be too slow and above it might be hard to control (Not that it cannot be done). Rest of the components can be got easily. Get dozens of LED’s (Min of 2 Required), Resistors of different rating, pots (1k,5k..), connection wires . if required you can build your robot using a bread board also. A list of components to buy is given in a list below. Always keep IC’s, components a little extra in hand as we cannot tell when something might turn faulty or burn out. Extra set of it would be always be helpful .

Theory of the Robot (HOW IT WORKS)

Well before we start actually building the robot lets know what is actually happening on the inside of it. Well we can divide the whole circuit into three parts

1> The sensing part (The sensors sense the line i.e. the path)

2> The controller part (The Microcontroller decides the course of action to be taken )

3> The Navigation part (The motors act accordingly to move through the path)

The sensing part consists of a set of LED’s and LDR/Photodiodes/Phototransistors. Let’s go back to our basics. We all know that the refection and absorption properties of light differ between colours to colour. Black absorbs all the light and doesn’t reflect much while the colour white absorbs maximum amount of light while reflecting back almost none. This principle is used for the sensing of the path. Here a track is painted in black with a white background or a white track is drawn in a black background. When the light from the LED’s hit the Black part of the track reflection of light will be minimum the sensor which is the LDR will be receiving minimum light while if the light from the white part then almost full light of the LED reaches the sensor. Now as the name suggests LDR-Light Dependant Resistor, the resistance of the LDR depends on the amount light reaching it. It ranges from 0 ohm in full light to 15Kohm in dark resistance. With this we can find the variations in the track i.e. where the black line is and where the white background is. Now we can convert this data into digital signals as HIGH or LOW. We can set it as required which becomes our base logic for writing the program for the control of the robot.

Now the data we get from the sensors are gathered and connected to the processing unit i.e. the microcontroller. we can also use Gates to program the same but the disadvantage is that once it is connected we cannot change its logic at any cost and also that it would be hard to troubleshoot it as the size and complexity increases. Now in here we will have to write a program to make the robot work. We can call this unit as the brain centre as this is where the all the control commands are sent and according to the logic written in here the robot works.

The commands/signals sent from the Microcontroller are received in the navigation unit. Here it consists of an IC L293D. It is a motor controller. We can control 2 motors with the same IC. It is basically similar to a H-Bridge. The IC’s inputs are from the Microcontroller and the outputs are connected to the geared motors. This IC helps in changing the direction of rotation of the motor. It is simple logic for the reversal. Usually in a DC motor if we reverse the poles of the battery connected, the direction of rotation would reverse automatically. Here it is done electronically.

To better understand the working a small track through which the robot would navigate is shown. Now we can see that as there are 2 wheels only for this robot and the only 3 actions that can be done are

1> Rotate forward

2> Rotate backward

3> Stop

Now by controlling these actions simultaneously on the motors the following would be the result

1> Both wheel Stop : Robot doesn’t move

2> Both wheel forward : Robot moves forward

3> Both Wheel Reverse : Robot moves Backward

4> Left wheel forward, Right wheel Stop : Robot turns Towards Right

5> Left wheel stop, Right wheel forward : Robot turns Towards left

6> Left wheel forward, Right wheel reverse : Robot turns 90deg towards right (Sharp right)

7> Left wheel reverse, Right wheel forward : Robot turns 90deg towards left (Sharp left)

The other combinations wouldn’t be required much. The above given are some of the most used basic controls that can be done.

THE circuit diagram and connection diagram is as given

Circuit Diagram :

here a s/w is kept for changing the mode

1> Follow a white line in a Black Background

2> Follow a Black line in a White Background

a 7-Segment display is connected. We can also use an LED (2 No's) for indicating in which mode is the Robot working i.e. In white mode or the black mode. There will be couple of more pins left out in the PIC which can be used for additional sensors or some other functions as required.

No comments:

Post a Comment