You are on page 1of 22

Department of Elecrical and Electronics Engineering

Line Follower Robot

LINE FOLLOWER ROBOT


A Project Report
Submitted in partial fulfillment for the award of the degree of

BACHELOR OF TECHNOLOGY
IN
ELECTRICAL AND ELECTRONICS

(IVth SEMESTER)
2013 Batch

UNIVERSITY OF CALICUT
By

ROMIN SUNNY (EKANEEE053)


KIRAN MATHEW (EKANEEE038)
SUBIN SUNILKUMAR (EKANEEE058)
PRANAV SASIKUMAR (EKANEEE048)

EDUCATION IS DEDICATION

SAHRDAYA COLLEGE OF ENGINEERING AND TECHNOLOGY


KODAKARA, THRISSUR

Department of Elecrical and Electronics Engineering

Line Follower Robot

DEPARTMENT OF ELECTRICAL AND ELECTRONICS


SAHRDAYA COLLEGE OF ENGINEERING AND TECHNOLOGY
KODAKARA, THRISSUR

EDUCATION IS DEDICATION

BONAFIDE CERTIFICATE

This is to certify that the project report titled LINE FOLLOWER ROBOT
is the bonafide work of ROMIN SUNNY (EKANEEE053), KIRAN
MATHEW (EKANEEE038), SUBIN SUNILKUMAR (EKANEEE058),
PRANAV SASIKUMAR (EKANEEE048) during their IV semester in partial
fulfillment of the requirements of the University of Calicut,

under our

supervision.

PROJECT GUIDE

COORDINATOR

Mr. Madujith

Mr. Madujith

Asst. Professor

Asst. professor

HEAD OF THE DEPARTMENT

Prof.P.Dinakaran

Professor

Kodakara
10-04-2015

Department of Elecrical and Electronics Engineering

Line Follower Robot

ACKNOWLEDGEMENT
I express my sincere thanks to God almighty who has blessed us
with a healthy constitution and has bestowed on us the required skills to persue
this high tech course.
I am deeply indebted to our beloved Executive Director Rev. Fr. Dr
Antu Alappadan, Director Prof. K.T.Joseph and Principal Dr. Sudha George
Valavi, of Sahrdaya College of Engineering and Technology.
I also convey my immense gratitude to our HOD Prof P.D
Dinakaran and our project guide, Madhujith Thelepurath, Jitha Joseph and
Merry Mathew for having given us constant inspiration and suggestions
throughout the project work.
I am also thankful to all the faculty members of Sahrdaya College of
Engineering and Technology and to my parents for their help and
encouragement that I have received from them, without their sacrificial help I
couldnt have dreamt of completing my project work successfully.
I am extremely thankful to my friends who supported me in all the
aspects of the project work.

Department of Elecrical and Electronics Engineering

Line Follower Robot

ABSTRACT

The Line follower robot is a mobile machine that can detect and follow the line
drawn on the floor. Generally, the path is predefined and can be either visible
like a white line on a surface with a high contrasted color or it can be invisible
like a magnetic field. Therefore, this kind of Robot should sense the line with its
Light Dependent Resistors that are installed under the robot. After that, the data
is transmitted to the Arduino board. Hence, the Arduino Board is going to
decide the proper commands and then it sends them to the driver and thus the
path will be followed by the line follower robot.

Department of Elecrical and Electronics Engineering

Line Follower Robot

TABLE OF CONTENTS
SL

NAME OF CONTENT

PAGE NO

LIST OF TABLES & FIGURES

LIST OF ABBREVIATIONS

INTRODUCTION

10

NO

LITERATURE REVIEW

11

WORKING

13

CIRCUIT DIAGRAM AND DESIGN

17

PROGRAM

18

HARDWARES

19

FUTURE SCOPE

20

10

CONCLUSION

21

11

SUMMARY

21

12

REFERENCE

22

Department of Elecrical and Electronics Engineering

Line Follower Robot

LIST OF TABLES & FIGURES

Department of Elecrical and Electronics Engineering

Line Follower Robot

Department of Elecrical and Electronics Engineering

Line Follower Robot

Department of Elecrical and Electronics Engineering

Line Follower Robot

LIST OF ABBREVIATIONS

LED - Light emitting diode


IC

- Integrated circuit

POT - Potentiometer
LDR Light Dependent Resistor
R1, R2, R3, R4 Resistances
D1, D2 - Diodes

Department of Elecrical and Electronics Engineering

Line Follower Robot

INTRODUCTION

This line follower robot is basically designed to follow a black line on a white
surface. Any way the same project can be used to follow the opposite configuration
with appropriate changes in the software. The entire hardware of this simple line
follower robot using Arduino can be divided into three parts. They are the sensor
part, Arduino board part and the motor driver circuit part.

10

Department of Elecrical and Electronics Engineering


Robot

Line Follower

LITERATURE REVIEW
In recent years a great deal of time and effort have been spent
on developing systems to enable an autonomous robot to follow a
marked path using a vision system. Not surprisingly, the majority of
this research has been towards modifying, or designing from
scratch, a full-sized road vehicle so that it can drive on ordinary
roads without human supervision. Due to the large amount of space
available in an ordinary road vehicle, high performance computers
can be used to perform complex image processing and, typically, to
maintain a mathematical model of the vehicle and the environment
[PW1993] [WSGM1999].
Research into autonomous driving using smaller robots
typically follows one of two approaches. In the first approach a
mathematical model of the vehicle and its surroundings is generated,
tested in simulation, and then applied to a robot built specifically for
the purpose [HN1997] [KMMT1996]. In the second approach a
combination of a visual servoing system and a kinematic model is
used, again the robot is typically designed around the solution
technique [MKS1999]. Due to the size of these robots, the
processing resources available are quite limited so simpler models
andtechniques, such as visual servoing, are used to reduce the
processing load. The following sections contain a brief overview of
the research done in path following, including autonomous driving,
and the research in visual servoing that can be applied to path
following for autonomous robots. 2.1 Path Following Path following
research can be separated into two main categories: research
involving road vehicles and research involving smaller robots. The
following sections give a brief overview of the research in both
categories. 2.1.1 Road Vehicles Due to the large cargo spaces
available in the vehicles considerable processing resources can be
applied to the path following problem, thus path following
techniques using real road vehicles tend to use complex processing
algorithms.

11

Department of Elecrical and Electronics Engineering


Robot

Line Follower

While most of these systems use visual data as inputs, several


other sensors, including range finders and odometers, provide
additional feedback about the vehicle and the surrounding
environment. Some systems are even capable of functioning, when
given an accurate model of the environment, using only range
finding [PW1993] or location data [WSGM1999].
The sensor data is then fed into the control system of the
vehicle where most of the processing takes place. Typically the
control systems are designed by Artificial Intelligence researchers
and are thus based on systems such as Neural Networks [Pom1992],
internal mathematical models [SN1992] or Fuzzy Logic [PW1993].
Hybrid solutions have also been trialed, combining, for example,
Neural Networks and reinforcement learning [OLC2000]. As the
control systems use established techniques, much of the research
concentrates on high-level processing, identifying stoplights and
intersections, rather than on the actual driving [SB1998]
[OLC2000]. 2.1.2 Smaller Robots As the size of these robots
prohibit the use of high performance computational equipment the
algorithms used for path following are simpler than those used in the
full sized road vehicles. However, for the most part, the same basic
approaches are used though there is a greater emphasis on
simulation [MKS1999] [RH1993]. The image-processing steps for
these robots typically use Kalman filters [MKS1999] and other
simple functions for extracting information about the curvature of
the path. The control system is typically a fuzzy logic system
[LSL1999] if one exists, see the next section, a kinematic model of
the vehicle is also used [MKS1999] [HN1997].

12

Department of Elecrical and Electronics Engineering


Robot

Line Follower

WORKING

SENSOR

ARDUINO
(ANALOG)

ARDUINO
(DIGITAL)

OUTPUT

The working of a Line Follower Robot occurs with mainly three


components, a sensor, an arduino part and a motor driver circuit.

13

Department of Electrical and Electronics Engineering

Line Follower Robot

THE SENSOR
The sensor consists of two LED/LDR pairs with appropriate current limiting resistors.
The resistance of an LDR is inversely proportional to the intensity of the light falling
on it. The circuit diagram of the sensor is shown in the figure below.

Resistors R1 and R2 limits the current through the LEDs. Resistors R6, R8, R3,and R5
forms individual voltage divider networks in conjunction with the
corresponding LDRs. When the sensor is correctly aligned, both
LED/LDR pairs will over the white surface. In this condition sufficient
amount of light gets reflected back to the LDRs and so their resistance
will be low. So the voltage dropped across the LDR will be low. When
the robot is drifted to one side , the sensor in the opposite side falls over
the black line and the intensity of light reflected back to the
corresponding LDR will be low. As a result the resistance of the LDR
shoots up and the voltage dropped across it will be high. The voltages
dropped across the right and left LDRs are given as input to the analog
input pins A4 and A3 of the Arduino board. Right and left sensor outputs
observed while testing the above circuit is shown in the table earlier.

14

Department of Electrical and Electronics Engineering

Line Follower Robot

ARDUINO BOARD
The arduino board has to be programmed to keep the robot in correct path. This is
done by reading the left and right sensor outputs and switching the left
and right motors appropriately. Output of the right sensor is connected to
the analog input A4 of the arduino and output of the left sensor is
connected to the analog input A3 of the arduino. The voltage range that
can be applied to a particular analog input of the arduino is 0 to 5V. This
range can be converted into a digital value between 0 and 1023 using
analogRead () command. For example if 3V is applied to A3, the
following code will return 3/(5/1023) which is equal to 613 in the
variable leftValue.
int leftInput = A3;
int leftValue=0;
void loop ()
{
leftValue = analogRead (leftInput);
{
From the above table you can see that the voltage across a particular LDR will be 4.4V
when it on white and 4.84V when it is on black. The digital equivalent of
4.4V will be 900 and that of 5.00V will be 1020 as per the above scheme.
The median of these two values is 960 and it is set as the reference point
for the program to check the orientation of the sensor module.
The program identifies the position of the sensor module by comparing the sensor
readings with the reference point that is 960. If the reading of a particular sensor is
greater than 960 the program can assume that the particular sensor is above black. If
the reading of a particular sensor is less than 960 then it is assumed that the particular
sensor is above white. If both sensor readings are less than 945 then it means both
sensors are on white. If both sensor readings are above 945 it is assumed that both
sensors are above black (the same thing happens if we lift the robot off the track).
Based on the above four conditions, the program appropriately switches the left and
right motors to keep the robot following the black line.

15

Department of Electrical and Electronics Engineering

Line Follower Robot

MOTOR DRIVER
The motor driver circuit is based on two NPN transistors Q1 and Q2. Each transistors
are wired as a switch with a resistor at its base for limiting the base current. The
motors are connected to the emitter terminal of the corresponding transistors. A 0.1uF
capacitor is connected across each motor for by-passing the voltage spikes. Back emf
and arcing of brushes are the main reason behind the voltage spikes. If these voltage
spikes are not by-passed it may affect the Arduino side. Circuit diagram of the motor
driver is shown in the figure below.

16

Department of Electrical and Electronics Engineering

Line Follower Robot

CIRCUIT DIAGRAM

17

Department of Electrical and Electronics Engineering

Line Follower Robot

PROGRAM
int leftInput=A3;
int rightInput=A4;
int leftMotor=13;
int rightMotor=12;
int leftValue = 0;
int rightValue = 0;
void setup()
{
pinMode (leftMotor, OUTPUT);
pinMode (rightMotor, OUTPUT);
}
void loop()
{ leftValue = analogRead (leftInput);
rightValue= analogRead (rightInput);
if ( leftValue < 960 && rightValue < 960)
{
digitalWrite (leftMotor, HIGH);
digitalWrite (rightMotor, HIGH);
}
else
{
if ( leftValue > 960 && rightValue < 960)
{
digitalWrite (leftMotor, LOW);
digitalWrite (rightMotor, HIGH);
}
else
{
if (leftValue < 960 && rightValue > 960)
{
digitalWrite (rightMotor, LOW);
digitalWrite (leftMotor, HIGH);
}
else
{
if (leftValue > 960 && rightValue > 960)
{
18

Department of Electrical and Electronics Engineering

Line Follower Robot

digitalWrite (rightMotor, LOW); digitalWrite (leftMotor, LOW); }} } }}

HARDWARES
ARDUINO BOARD
LED (2 nos GREEN)
LDR (2)
RESISTORS (100 (2), 220(2), 2.2K(4))
TRANSISTOR (2N2222) (2)
CAPACITORS (0.1 uF) - (2)
MOTORS (300rpm) - (2)

19

Department of Electrical and Electronics Engineering

Line Follower Robot

FUTURE SCOPE

Industrial Applications: These robots can be used as automated equipment


carriers in industries replacing traditional conveyer belts.
Automobile applications: These robots can also be used as automatic cars
running on roads with embedded magnets.
Domestic applications: These can also be used at homes for domestic purposes
like floor cleaning etc.
Guidance applications: These can be used in public places like shopping mallS
Defense application
For long distance applications

20

Department of Electrical and Electronics Engineering

Line Follower Robot

CONCLUSION
There are many advantages of using a Line Follower Robot. They include:

Robot movement is automatic


It is used for long distance applications
Simplicity of building
Fit and forget system
Used in home, industrial automations etc.

SUMMARY
The line follower robot is made using an arduino board. It has various applications like
industrial, domestic, automobile etc.

21

Department of Electrical and Electronics Engineering

Line Follower Robot

REFERENCE

www.google.com
www.electronicshub.com
www.wikipedia.org
www.electronics4u.com

22

You might also like