Download as pdf or txt
Download as pdf or txt
You are on page 1of 28

LINE FOLLOWER ROBOT

AS A MEDICINE SUPPLIER IN HOSPITAL


DURING COVID-19 PANDEMIC
USING MICROCONTROLLER

FINAL REPORT
OF MAJOR PROJECT

ELECTRONICS AND COMMUNICATION ENGINEERING


Submitted to Mrs. MANJU JAIN

SUBMITTED BY

MUSKAAN ANWAR 1910082002

NEHA 1910082003

VINITA KUSHWAHA 1910083004

MEERABAI INSTITUTE OF TECHNOLOGY


CERTIFICATE OF APPROVAL

This is to certify that the Vinita kushwaha-1910083004, Muskaan Anwar- 1910082002


and , Neha- 1910082003 students of MeeraBai Institute of Technology, in Electronic and
Communication Engineering has carried out work presented in the project of the Training
Entitled “LINE FOLLOWER ROBOT” under the supervision of Mrs. Manju Jain, Department
of Electronic and Communication Engineering, MeeraBai Institute of Technology.

Approved by

Mrs. Manju Jain

(vice principal of MBIT)


ACKNOWLEDGEMENT
We would like to express my special thanks of gratitude to my teacher Mrs.
Manju Jain who gave me the golden opportunity to do this wonderful project on the
topic Line Follower Robot which also helped me in doing a lot of Research and i came
to know about so many new things. We are really thankful to them.
Secondly we would also like to thank our parents and friends who helped me a lot in
finalizing this project within the limited time frame.
Abstract
Line Follower robot is a machine that follows a line, either a black line on
white surface or vise-versa. Nowadays, every robot is done with the help of
the microcontroller, and hence the circuit is too big and tough to
understand and makes it costly. For these reasons, in this project we have
developed an intelligent Line follower robot with a simple concept with
simple circuitry. Basically there are two types of line follower robots: one is
black line follower which follows black line and second is white line follower
which follows white line. Here we have designed the first one. Line follower
actually senses the line and run over it.
TABLE OFCONTENTS
Contents
S TITLE PAGE
NO. NO.
1. USE OF LINE FOLLOWER ROBOT DURING COVID TIME 1
IN HOSPITAL AS A MEDICINE SUPPLIER
2. INTRODUCTION 2
3. TECHNOLOGY AND LITERATURE SURVEY 3
4. LINE FOLLOWER ROBOT CIRCUIT PRINCIPLE 4

5. LINE FOLLOWER ROBOT CIRCUIT DIAGRAM 4

6. COMPONENTS IN THE CIRCUIT 5

7. HOW TO DESIGN A LINE FOLLOWING ROBOT 6

8. DESIGN OF IR SENSORS 6

9. LINE FOLLOWING ROBOTIC VEHICLE CIRCUIT 8


WORKING

10. CODE 11
11. PROCESS EXPLANATION 12
12. PIN DIAGRAM OF 8051 MICROCONTROLLER 15

13. L293D MOTOR MODULE 18

14. WORKING OF LINE FOLLOWER ROBOT USING 8051 19

15. PICTURE OF LINE FOLLOWING ROBOT 21


16. APPLICATIONS 22
17. ADVANTAGES 22
18. CONCLUSION 23
19. FUTURE SCOPE 23

20. REFRENCES 24

USE OF LINE FOLLOWER ROBOT DURING COVID


TIME IN HOSPITAL AS A MEDICINE SUPPLIER:

As COVID cases are increasing day by day. It's a need of the situation to avoid human
contact and maintain Social distancing Daily there are patients are getting admitted to
the hospital, because of this there to many covid positive is lot of pressure and work
load on doctors. Also because of COVID -19 the doctors cannot interact with the patient
effectively. So there is a need of something that can fulfil the requirement of the doctor.

HOW IT WORKS?

In COVID times can supply medicines directly to patient without any contact with the
help of Line Follower Robot. The principle behind Line Follower Robert is that it will follow
a black (1 inch) specified path and will deliver medicine to patient on time without the
help of doctor.

The Robot be modified further as per as the requirements.

ADVATAGES:
1. It will decrease the work lood on nurses and doctors.

2. It ù cost effective.

3. Less human Contact as per as the COVID -19 situation 4. It will avoid unnecessary
delays in medicine. supply.

4.Easy to operate and flexible.


INTRODUCTION
Line follower is a machine that can follow a path. The path can be visible like a black line on a white
surface.Sensing a line and maneuvering the robot to stay on course, while constantly correcting wrong
moves using feedback from the sensor forms a simple yet effective system. It can be used in automobile,
industrial automations, guidance, etc .

Background
As technology becomes increasingly important in today's world, it is invaluable to
not only learn how to use technology, but also to understand how to create it. Since
being the engineer one should have sound knowledge of the other discipline.Most of
the projects have limted scope to only specific discipline.This would limit ones
innovation and creativity. This project inspires to make connections across several
disciplines rather than learning topics in isolation as it combines mechanical,
electronic, electrical and programming skills. It gives visual grasp of math and
science.• It builds logical thinking.

• It brings out innovation and creativity.

• It enhances problem solving skills

• The robot designed in a such way that it not only track the path and follow it but
also visualize the distance travelled through the LCD displays.

Motivation
How ants always travel in a line, following ani nvisible route in search of food, or back home. How on
roads the lanes is followed to avoid accidents and traffic jams. Ever thought about a robot which follows
line? A perfect or near perfect mimic of nature? After all the purpose of robotics is to recreate in terms of
machines what one see around to solve a problem or fulfill a requirement. The area will be benefitted
from the project Industrial automated equipment carriers

• Entertainment and small household applications.

• Tour guides in museums and other similar applications.

• Second wave reconnaissance operations.

Problem Description
In the industry carriers are required to carry products from one manufacturing plant
to another which are usually in different buildings or separate blocks. Conventionally,
carts or trucks were used with human drivers. Unreliability and inefficiency in this
part of the assembly line formed the weakest link. The project is to automate this
sector, using carts to follow a line instead of laying railway tracks which are both
costly and an inconvenience.

Objectives
The objectives of the project are: The robot must be capable of following a line.

• It should be capable of taking various degrees of turns.

• The robot must be insensitive to environmental factors such as lighting and noise.

• It must allow calibration of the line’s darkness threshold.

• Scalability must be a primary concern in the design.

• It also shows the distance travelled by it through LCD display.

Methodology
• After the detail literature survey through the books, periodical, journal, magazine,
websites. The idea of the project is well defined.
• The logic is derived for the intelligence of the robot. It is programmed and burn it
to the Arduino by using the software Arduino® 1.65.
• The accuracy and viability of the program and electronic components is tested in
the simulation software Proteus®.
• After the sucessful simulation result it is implemented in the hardware.
• After the finishing the programming, electrical and electronics part, the
stable,reliable and flexible mechanical design and fabrication is completed.
• Finally system is tested and encountered error is omitted.

Limitations
• The system has restricted to the following limitation.
• Choice of line is made in the hardware abstraction and cannot be changed by
software.
• Calibration is difficult, and it is not easy to set a perfect value.
• Few curves are not made efficiently, and must be avoided.
• The turning radius should be of minimum 100m to take smooth U-turning of robot.
• The width of the path must be of 45mm so that it can cover minimum 3 sensors.
• The path should be plane and obstacle free.
• The steering mechanism is not easily implemented in huge vehicles and impossible
for non-electric vehicle.
Summary
Line Follower is one of the most important aspects of robotics. A Line Following
Robot is an autonomous robot which is able to follow either a black or white line
that is drawn on the surface consisting of a contrasting color. It is designed to
move automatically and follow the plotted line. It enhances interdisciplinary
approach to mechanical,electronic, electrical and programming skills. The
application of the project is range from the individual domestic appliance to
automation and control aspect of large industry. Human are intelligent natural
machine but it has serious limation of efficiency and realiblity. Robots are made to
replace dependency of human force partially. The project is somehow designed to
perform the similar task.

TECHNOLOGY AND LITERATURE SURVEY


The line follower is a self-operating robot that detects and follows a line that is drawn on
the floor .The line follower robot using Arduino is a self-operating system that detects and
follows track drawn on the floor. The track consists of a black path drawn on white surface.
Basic Operation
• The basic operations of line follower are as follows:
• Capture line position with optical sensors mounted at front end of the robot. For this
a combination of IR-LED and Photodiode called an optical sensor has been used. This
make sensing process of high resolution and high robustness.
• Steer robot requires steering mechanism for tracking. Two motors governing wheel
motion are used for achieving this task.
• This system has LCD display panel to show the distance that it covers.
• On the detecting no black surface robot move in a circular motion until line is found.

Line Follower Robot Circuit Principle


• This circuit mainly consists of 8051 microcontroller, two IR sensors, motors
and motor driver IC (embedded in a module). The line follower robot needs
mechanical arrangement of the chassis. I have used a 4WD Acrylic chassis.
The two IR sensors are mounted on the fron of the robot facing with the diodes
facing towards Earth.
• When robot is placed on the fixed path, it follows the path by detecting the
line. The robot direction of motion depends on the two sensors outputs. When
the two sensors are on the line of path, robot moves forward. If the left sensor
moves away from the line, robot moves towards right. Similarly, if right sensor
moves away from the path, robot moves towards its left. Whenever robot
moves away from its path it is detected by the IR sensor.
BLOCK DIAGRAM OF LINE FOLLOWER ROBOT

Line Follower Robot Circuit Diagram


Components in the circuit
• 8051 Microcontroller
• Development Board for 8051 Microcontroller (preferred)
• 10KΩ Resistors X 2
• 10µF Capacitor
• 11.0592MHz Crystal
• 33pF Capacitors X 2
• Push Button
• Motor driver Module (L298N)
• Robot Chassis with Motors
• IR Sensors x 2

PCB LAYOUT
How to Design a Line Following Robot?
The circuit consists of 8051 microcontroller, IR Sensors (with IR transmitter
and IR Receiver), L298N Motor Driver Module, Robot Chassis with 4 wheels and
4 motors, battery holder.

8051 microcontroller is the main component of the project. It is an 8 bit


microcontroller with 32 programmable I/O pins. This has many peripheral
features like programmable UART, two 8-bit timer/counter, two interrupts,
external memory access etc.

The DC motors of the robot are connected to the controller using a motor driver
IC. As the output of the controller is maximum 5V with very small current, it
cannot drive the motors. So, to amplify this voltage motor driver IC is used.
L298N can drive motors up to 36v and can provide a drive current of 3A.
The driver IC has 15 pins and is usually available in multiwatt15 Package. These
ICs are easily available in the market as Modules. The inputs to the Motor Driver
Module are connected to PORT2 pins P2.0, P2.1, P2.2 and P2.3.

The two IR sensors are connected to P2.6 and P2.7 pins of the
microcontroller. Arrange the chassis and connect the four wheels of the robotic
vehicle to the motors which are in turn connected to the microcontroller.

Design of IR Sensors

IR sensor circuit consists of mainly IR transmitter and IR receiver. IR transmitter


is similar to an LED. Its operating voltage is around 1.4V. So to protect it, a
150Ω resistor is placed in series with it and is connected in forward biased. IR
receiver is connected in reverse bias and a 10KΩ resistor is placed between VCC
and the receiver. Output is taken between resistor and IR receiver.

Since this is an analog output, we can convert it to a digital HIGH and LOW
with the help of a simple comparator IC like LM358, for example. The IR
Sensor Module used in this project uses the same configuration and the circuit
diagram is shown below.

Working of IR Sensors
The IR transmitter continuously transmits the IR rays. When IR transmitter is on the black
surface these rays were absorbed by the surface and when it is on white surface these
rays were reflected. The IR receiver has maximum resistance when no IR rays are received
and voltage from VCC flows through the resistor. At the output pin, voltage is
approximately 5V.

As the intensity IR rays received by the receiver increases, resistance value decreases and
reverse break down occurs. Thus voltage through the resistor is grounded. So, at the
output pin, it will produce 0V.

Line Following Robotic Vehicle Circuit Working


1. Initially draw the path on a light colored surface with black color tape.
2. Place the robot on the floor.
3. Now power on the circuit.
4. Robot moves in the specified path.
5. When it moves out of path, sensors check it and automatically adjust the robot.

CODE
#include<reg51.h>

sbit mot1=P2^0;

sbit mot2=P2^1;

sbit mot3=P2^2;

sbit mot4=P2^3;

sbit s_left=P2^6;

sbit s_right=P2^7;

void forward (void);

void backward (void);

void left (void);


void right (void);

void forward (void)

mot1=0;

mot2=1;

mot3=1;

mot4=0;

void backward (void)

mot1=0;

mot2=1;

mot3=0;

mot4=1;

void left (void)

mot1=0;

mot2=1;

mot3=0;

mot4=0;

void right (void)

mot1=0;

mot2=0;

mot3=1;
mot4=0;

void stop (void)

mot1=0;

mot2=0;

mot3=0;

mot4=0;

void main()

s_left=1;

s_right=1;

while(1)

if(s_left==0 && s_right==0)

forward();

else if(s_left==1 && s_right==1)

stop();

else if(s_left==0 && s_right==1)

left();

}
else if(s_left==1 && s_right==0)

right();

Hardware Required
The hardware required is divided in the following category:

Optical Sensors
The robot uses photodiode sensors to sense the line; an array of four IR- LEDs (TX) and
Photodiode sensors (Rx), facing the ground used in this setup. An analog signal is obtained in
output, depends on the amount of light reflected back, which is provided to the comparator to
produce 0s and 1s which are then fed to the Arduino.
The sensors on the left named as L1, L2 and R1, R2 on the right side. Assumption should be
considered that when a sensor is on the line it reads 0 and when it is off the line it reads 1. The
Arduino correspondence to the algorithm given below decides the next movement, trying to
position the robot such that all sensors read 0. With sensors, robots can react and respond to
changes in their environment in ways that appear intelligent or life-like

Arrangement of Sensor
An array of sensors arranged in a straight row pattern is bolted under the front of the
robot. It locates the position of line below the robot. Distance between two adjacent
sensors is about 1.5 cm. We can use any number of sensors. If we have low number, then
our robot movement is not smooth and it may face problems during sharp turns. If higher
number of sensors were, used robot movement will become smooth and reliable for sharp
turns; it requires complex programming for micro-controller and requires more hardware,
which is its disadvantage. Thus, optimum number of sensors required.

Comparator
Comparator is a device, which compares two input voltages and gives output high or low.
In circuit diagram it is normally represented by a triangle having-Inverting (negative)
Input, Non-Inverting (positive) Input (+), Vcc, Ground, Output. Properties of comparator:
If V+ > V- then Vo=Vcc (Digital High Output is 1) If V+ < V- then Vo=0 (Digital Low
Output is 0)

Process Explanation
As shown in the data below, is a typical situation involved. At every sampled time the
commands executed by the microcontroller is also shown. From the below figure, it
should be
clear about the software requirements.
DC Motor

Motor is a device that converts any form of energy into mechanical energy or imparts
motion. In constructing a robot, motor usually plays an important role by giving movement
to the robot. In general, motor operating with the effect of conductor with current and the
permanent magnetic field. The conductor with current usually producing magnetic field
that will react with the magnetic field produces by the permanent magnet to make the
motor rotate.There are generally three basic types of motor, DC motor, even servomotor
and stepper motor, which are always being used in building a robot. DC motors are most
easy for controlling. One DC motor has two signals for its operation. Reversing the polarity
of the power supply across it can change the direction required. Speed can be varied by
varying the voltage across motor.

Pin Diagram of 8051 Microcontroller


• Pins 1 to 8 − These pins are known as Port 1. This port doesn’t serve any other
functions. It is internally pulled up, bi-directional I/O port.
• Pin 9 − It is a RESET pin, which is used to reset the microcontroller to its initial
values.
• Pins 10 to 17 − These pins are known as Port 3. This port serves some functions
like interrupts, timer input, control signals, serial communication signals RxD and
TxD, etc.
• Pins 18 & 19 − These pins are used for interfacing an external crystal to get the
system clock.
• Pin 20 − This pin provides the power supply to the circuit.
• Pins 21 to 28 − These pins are known as Port 2. It serves as I/O port. Higher order
address bus signals are also multiplexed using this port.
• Pin 29 − This is PSEN pin which stands for Program Store Enable. It is used to read
a signal from the external program memory.
• Pin 30 − This is EA pin which stands for External Access input. It is used to
enable/disable the external memory interfacing.
• Pin 31 − This is ALE pin which stands for Address Latch Enable. It is used to
demultiplex the address-data signal of port.
• Pins 32 to 39 − These pins are known as Port 0. It serves as I/O port. Lower order
address and data bus signals are multiplexed using this port.
• Pin 40 − This pin is used to provide power supply to the circuit.

L293D Motor Driver Module

Pin Name Description


1 GND Pin Ground (It grounds the Input and completes the circuit path)
2 +5V Pin It is the Recommended Voltage
3 +9/12V Pin It is Recommended Power Supply(36V is Maximum)
(VSS)
4 Power LED Illuminates when power is Applied
5 IN1 Pin Input Pin1 (To rotate the motor in Clock-wise direction.
It is for Motor1 Inputs)
6 MTR1 Pin It is for the Input of Motor 1
7 IN2 Pin Input Pin2 (To rotate the motor in Anti-clockwise direction.
It is for Motor1 Inputs)
8 MTR2 Pin It is for the Input of Motor 2
9 Motor Driving It consists of two H-Bridge circuit inside the IC which can rotate
IC two dc motor independently.
As mentioned in the block diagram, we need sensors to detect the line. For line detection
logic, we used two IR Sensors, which consists of IR LED and Photodiode. They are
placed in a reflective way i.e. side – by – side so that whenever they come in to proximity
of a reflective surface, the light emitted by IR LED will be detected by Photo diode.

The following image shows the working of a typical IR Sensor (IR LED – Photodiode pair)
in front of a light coloured surface and a black surface. As the reflectance of the light
coloured surface is high, the infrared light emitted by IR LED will be maximum reflected
and will be detected by the Photodiode.

In case of black surface, which has a low reflectance, the light gets completely absorbed
by the black surface and doesn’t reach the photodiode.

Using the same principle, we will setup the IR Sensors on the Line Follower Robot such
that the two IR Sensors are on the either side of the black line on the floor. The setup is
shown below.
When the robot moves forward, both the sensors wait for the line to be detected. For
example, if the IR Sensor 1 in the above image detects the black line, it means that there
is a right curve (or turn) ahead.

UNO detects this change and sends signal to motor driver accordingly. In order to turn
right, the motor on the right side of the robot is slowed down using PWM, while the motor
on the left side is run at normal speed.

Similarly, when the IR Sensor 2 detects the black line first, it means that there is a left
curve ahead and the robot has to turn left. For the robot to turn left, the motor on the left
side of the robot is slowed down (or can be stopped completely or can be rotated in
opposite direction) and the motor on the right side is run at normal speed.
Working of Line Follower Robot using 8051
Line follower robot senses white line by using sensor and then sends signals to
microcontroller. Then microcontroller drives the motor according to sensors' output.

Here in this project we are using two IR sensors pair. Suppose we are calling left sensor
and right sensor of IR sensor Pair, then both left and right sensors sense nothing or black
line then robot move forward.

Picture of Line Following Robot

The picture of the line following robot is captured by the still camera at some angle and

shown below.
APPLICATIONS

• 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,
museums etc to provide path guidance.

ADVANTAGES
▪ The robot can do all the tasks it is set to do.
▪ The factories can make a robot and get most of the work done by it. There is no
need for a human operator, the robot can perform the repetitive tasks that follow
the same path on its own.

Cost Estimation
The details of price of components used in project is given below.

Table 4: Details of Particulars Quantity Rate per item(NRs.) Total(NRs.)


Price of
components S.N.
1 microcontroller 1 2000 2000
2 Chassis 1 150 150
3 Motor 2 500 1000
4 Rear Wheel 2 100 200
5 Front Wheel 1 150 150
6 LCD 1 450 450
7 Motor Driver 1 350 350
8 Jumper Wire 20 10 200
9 Photodiode 5 30 150
10 IR LED 5 15 75
11 LM 358 1 80 80
12 LM 7805 1 45 45
13 AAA Battery 4 15 60
14 9V Battery 1 80 80
15 Battery Holder 1 50 50
16 Switches 1 5 5
17 Miscellaneous 1000
Total 6045

CONCLUSION
The line following robot is automobile system that has ability to recognize it’s path , move
and change the robot's position toward the line in the best way to remain in track.
This project report presents a photodiode sensor based line follower robot design of 200gm
weigh which always directs along the black line on white surface.The electromechenical
robot dimension is 192×100×70 mm3 with max rpm 180 at no load and frictionless
condition. The minimum turning radius for the system is 100mm at velocity of 24.2 cm/s.
The robot is able to detect it’s path in case it is out of path.
The line following robot project challenged the group to cooperate, communicate, and
expand understanding of electronics, mechanical systems, and their integration with
programming. The successful completion of every task demonstrated the potential of
mechatronic systems and a positive group dynamic.

FUTURE WORK
In the process of development of the line follower, most of the useful feature is
identified and many of them was implemented . But due to the time limitations and
other factor some of these cannot be added.
So the development features in brief:
• Use of color sensor.
• Use of ccd camera for better reconigsation and precise tracking the path..

REFRENCES
[1] B. Klaus and P. Horn, Robot Vision. Cambridge, MA: MIT Press, 1986.
[2] J. Warren, J. Adams and H. Molle, "Arduino for Robotics," in Arduino Robotics,
New York, Apress publiction, 2014, pp. 51-83.

[3] Jim, "PWM/PID/Servo Motor Control," 2005. [Online]. Available: http://www.uoxray


uoregon.edu. [Accessed 15 December 2015].

[4] Komonya, S. Tachi, K. Tanie, "A Method for Autonomous Locomotion of .Mobile
Robots,''in Journal of Robotics Society of Japan, vol. 2, pp.222-231, 1984.

[5] S. Monk, Programming Arduino Getting Started with Sketches, New Delhi, India: Tata
Macgrawhill, 2012.

[6] Open Source community, " Open Source Sketch," January 2015. [Online]. Available:
https://www.arduino.cc/en/Guide/Introduction. [Accessed 25 November 2015].

[7] A. Parsad, "Line Following Robot,"Dept. Elex. & Comm. Eng., Visvesvaraya
TecTechnological University, Banglore, India, 2005

[8] S. Bhatia, "Engineering garage," 23 May 2011. [Online]. Available:


http://www.engineersgarage.com//tachometer-microcontroller-circuit-project.
[Accessed 03 March 2016].

[9] S. Debopath and Md. Jinnah, "Digital RPM meter using Arduino,"Dept. Elect.Eng., Ah
AhAhsanullah Univ. of Sci. & Tech., Dhaka, Bangladesh, 2012.

[10] Zin, "Alldatasheet," March 2003. [Online]. Available: http://www.alldatasheet.com


[Accessed 06 December 2015].

[11] Wordpress"Turning radius of the Car," July 2013 [Online]. Available:


https:https://goodmaths.wordpress.com/2013/07/19/turning-radius-of-a-car/.
[Accessed 28 June, 2016]

You might also like