Line Follower Robot

Welcome to robotic electronics. Here, we begin with a Line Follower Robot. Once, a person in England thought of making a  mobile bot as a line follower robot and prepared an Electro-Light-Sensitive-Internal-External(ELSIE) in 1953, which follows a light source using a mechanical feedback system with no intelligence. There kickoff the evolution of our Line Follower bot.
RE

DEFINITION

 A line follower bot is a mobile bot that follows a given white or black line over a white or black background by sending and receiving Infra-Red rays by using IR sensors.
These are used in the factories to carry the finished products to the whare house with no human intervention.
And now are you interested in building one!
Here we go..
One can readily build a Line Follower Robot in short LFR by using the following elements

1.Chassis:

Chassis is the body of the bot, we can use a metal chassis or a wooden board to fasten all other elements

2.Motors:

The motor is a prime mover or actuator mainly used for the motion of the bot.
We can use center shaft motor, N120 motor, or a basic operation (BO) motor.

3.Wheels:

           Wheels of different sizes are available in the market, we can use wheels of small size for easy movement of the bot, we can use a freewheel in the front

4.IR sensors:

IR sensor is the main component in the LFR. We can use an IR array of individual IR sensors for this purpose. One can make a basic LFR by 3 IR sensors.

5.MicroController:

It links the IR sensors to the actuators ie; motors. We can use an Arduino Uno or Arduino Nano for this LFR.

6.Battery:

               The battery is the power source for the MC, we can use a lithium-ion battery or a lithium-polymer battery for less weight of the bot. We can also use a lead-acid battery.

7.Motor driver:

  A Motor driver is an element that provides the required current input for the motors. Arduino output will be the Motor driver’s input. L298n is a motor driver used to control two motors, with a heat sink.

 8.Jumper wires:

A jumper wire is used for the current to flow from the battery to other elements.

9.Fasteners:

Fasteners such as double tape, motor clamps, screws, nuts, and bolts are needed.

PROCESS OF MAKING A LINE FOLLOWER ROBOT

  • First, take the chassis and attach the two motors on both sides by using clamps with screws.
  • Then attach the wheels to the motor shafts by screw.
  • Place the Micro Controller on the chassis and fasten it by screws
  • Place the IR sensors in the front by leaving 3 mm gap between the ground
  • If three IRs are used then place one in the middle and other two at sides
  • Place the Motor driver, Battery at the designed place on the chassis
  • Place the freewheel in the front bottom part seeing the body is parallel to the ground.
  • Now start connections of the IR sensors to the Arduino, Motors to the  Motor driver then to the Arduino, Battery to the Motor driver.
Now the bot is mechanically ready for functioning.
For having intelligence to follow a white or black line it needed to be coded

CODING:

The code goes in this way,
int  l1=3,l2=4,r1=5,r2=6,l=8,c=9,r=10;
void setup()
{
  pinMode(l1,OUTPUT);
     	pinMode(l2,OUTPUT);
     	pinMode(r1,OUTPUT);
     	pinMode(r2,OUTPUT);
     	pinMode(l,INPUT);
     	pinMode(c,INPUT);
     	pinMode(r,INPUT);
}
void loop()
 {
  if((digitalRead (l)==1)&&(digitalRead (c)==0)&&(digitalRead (r)==1))
     	{
     	        digitalWrite(l1,HIGH);
                 	digitalWrite(l2,LOW);
                 	digitalWrite(r1,HIGH);
                 	digitalWrite(r2,LOW);
     	}   
     	if((digitalRead (l)==0)&&(digitalRead (c)==1)&&(digitalRead (r)==1))
     	{
                 	digitalWrite(l1,HIGH);
                 	digitalWrite(l2,LOW);
                 	digitalWrite(r1,LOW);
                 	digitalWrite(r2,LOW);
     	}   
     	if((digitalRead (l)==0)&&(digitalRead (c)==0)&&(digitalRead (r)==1))
     	{
 digitalWrite(l1,HIGH);
                 	digitalWrite(l2,LOW);
                 	digitalWrite(r1,LOW);
                 	digitalWrite(r2,LOW);
     	}   
     	if((digitalRead (l)==1)&&(digitalRead (c)==1)&&(digitalRead (r)==0))
     	{
                 	digitalWrite(l1,LOW);
                 	digitalWrite(l2,LOW);
                 	digitalWrite(r1,HIGH);
                 	digitalWrite(r2,LOW);
     	}   
     	if((digitalRead (l)==1)&&(digitalRead (c)==0)&&(digitalRead (r)==0))
     	{
                 	digitalWrite(l1,LOW);
                 	digitalWrite(l2,LOW);
                 	digitalWrite(r1,HIGH);
                 	digitalWrite(r2,LOW);
     	}   
     	if((digitalRead (l)==0)&&(digitalRead (c)==0)&&(digitalRead (r)==0))
     	{
                 	digitalWrite(l1,LOW);
                 	digitalWrite(l2,LOW);
                 	digitalWrite(r1,LOW);
                 	digitalWrite(r2,LOW);
     	}  
}

After coding is done in your pc you need to dump it into the Arduino by using a connecting cable.

CONCLUSION

After checking the connections as per code you’ve made, the Line Follower Robot is ready to follow the line.
Spread knowledge

1 thought on “Line Follower Robot”

Leave a Comment

Your email address will not be published. Required fields are marked *