Project Report II - Modified
Project Report II - Modified
Application
A project work submitted in partial fulfilment
BACHELOR OF TECHNOLOGY
In
By
CERTIFICATE
This is to certify that project work entitled “Line follower robot using Arduino for to & fro load
transport application” submitted by Biplab Hazarika(Gau-c-14/015), Rupam Medhi(Gau-c-14/025) and
Riju Prasad Roy(Gau-c-14/L-201) to the Department of Electronics and Communication Engineering of
Central institute of Technology, Kokrajhar embodies work carried out under my direct supervision and
guidance during the period August 2017 to November 2017. The project work has been prepared as per
the regulations of Central Institute of Technology and qualifies to be accepted as Major Project-II, a part
of the requirements for the eighth semester curriculum of Bachelor of Technology in Electronics and
Communication Engineering.
Supervisor
Asst. Professor
CIT, Kokrajhar
3
CERTIFICATE
This is to certify that the project work entitled “Line follower robot using Arduino for to & fro load
transport application” submitted by Biplab Hazarika(Gau-c-14/015), Rupam Medhi(Gau-c-14/025) and
Riju Prasad Roy(Gau-c-14/L-201) to the Department of Electronics and Communication Engineering of
Central institute of Technology, Kokrajhar, has been prepared as per regulations of Central Institute of
Technology and qualifies to be accepted as Major Project-II, a part of the requirements for the eighth
semester curriculum of Bachelor of Technology in Electronics and Communication Engineering.
CERTIFICATE
This is to certify that the project work entitled “Line follower robot using Arduino for to & fro load
transport application” submitted by Rupam Medhi(Gau-c-14/025), Biplab Hazarika(Gau-c-14/015) and
Riju Prasad Roy(Gau-c-14/L-201) to the Department of Electronics and Communication Engineering of
Central institute of Technology, Kokrajhar, has been prepared as per regulations of Central Institute of
Technology and qualifies to be accepted as Major Project-II, a part of the requirements for the eighth
semester curriculum of Bachelor of Technology in Electronics and Communication Engineering.
Board of Examiners
5
DECLARATION
I hereby declare that the project work entitled “Line follower robot using Arduino for to & fro load
transport application” is an authenticated work carried out by us under the guidance of Dr. Agile
Mathew for the requirements of Major Project-II, as part of the eighth semester curriculum of Bachelor
of Technology in Electronics and Communication Engineering and this work has not been submitted for
similar purpose anywhere else, except, to the Department of Electronics and Communication
Engineering, Central Institute of Technology, Kokrajhar.
Rupam Medhi
ACKNOWLEDGEMENT
The satisfaction that accompanies the successful completion of any task would be incomplete
without the mention of people whose ceaseless cooperation made it possible, whose constant guidance
and encouragement crown all efforts with success.
We bestow our hearted appreciation and gratefulness to the efforts made by our project guide: Asst.
Professor Dr. Agile Mathew, in terms of the Project Idea, instruction, suggestions and the opportunity
without which our efforts would have remained astray.
We do gratefully acknowledge and express our gratitude to all staff members of “Electronics and
Communication Engineering” and friends who supported us in preparing project.
Also this project work would have been incomplete if Robotics Club of Central Institute of Technology
was not there to help us. We are very grateful to Robotics Club for cooperating with us while making this
project work a success.
Date:
Biplab Hazarika
Roll: Gau-C-14/015
Rupam Medhi
Roll: Gau-C-14/025
Roll: Gau-C-14/L-201
7
ABSTRACT
The idea of line follower robot evolved as an alternative for the classical driver based transport
mediums. Classical transport mediums possess many limitations in terms of reliability and cost of
operation. Based on the principles of robotics, line follower robot provides some promising solutions to
various difficult problems in transport systems. These kinds of robots are expected to fulfil the future
needs of transportation to solve various difficult problems in the field of transportation. Such line
follower robots provide greater efficiency than the classical transport mediums for certain very
important applications.
In this project, line follower robot for to & fro load transport application; our aim is to design a line
follower robot which can transport a small quantity of load to destination by following black line on a
bright surface.
Basically the robot we have made has two main parts. First one is the carrier or the cart and the
second one is the robotic arm. The function of the arm is to take the load from ground and place it on
the carrier. Then the carrier will go to the other end of the line and stops. Then the robotic arm will take
the load from the cart and place it on the ground. After this the robot will go to the starting position and
then the whole process repeats again and again.
8
TABLE OF CONTENTS
1. Introduction
1.1 Motivation
1.2 Methodology
1.3 Block Diagram
2. Hardware Description
2.1 Arduino UNO
2.2 DC Motor
2.3 Motor Driver
2.4 Sensor Module
2.5 Chassis and Wheel
2.6 Servo Motor
2.7 Robotic Arm
3. Programming
3.1 Arduino IDE
3.2 Circuit Diagram
3.3 Flow Chart
3.4 Coding
4. Results & Discussion
4.1 Straight Line Path
4.2 Curved Line Path
4.3
5. Conclusion
6. References
9
1.INTRODUCTION
A line follower robot is basically a robot designed to follow a line or path already predetermined by
the user. This line or path may be as simple as a physical white line on the floor or as complex path
marking schemes e.g. embedded lines, magnetic markers and laser guide markers. In order to detect
these specific markers or lines, various sensing schemes can be employed. These schemes may vary
from simple low cost line sensing circuit to expansive vision systems. The choice of these schemes would
be dependent upon the sensing accuracy and flexibility required. From the industrial point of view, line
following robot has been implemented in semi to fully autonomous plants. In this environment, these
robots functions as materials carrier to deliver products from one manufacturing point to another where
rail, conveyor and gantry solutions are not possible. Apart from line following capabilities, these robots
should also have the capability to navigate junctions and decide on which junction to turn and which
junction ignore. This would require the robot to have 90 degree turn and also junction counting
capabilities. To add on to the complexity of the problem, sensor positioning also plays a role in
optimizing the robots performance for the tasks mentioned earlier.
Line-following robots with pick and placement capabilities are commonly used in manufacturing
plants. These move on a specified path to pick the components from specified locations and place them
on desired locations. Basically, a line-following robot is a self-operating robot that detects and follows a
line drawn on the floor. The path to be taken is indicated by either a white line on a black surface or by a
black line on a white surface. The control system used must sense the line and manoeuvre the robot to
stay on course while constantly correcting the wrong moves using feedback mechanism, thus forming a
simple yet effective closed- loop system.
1.1 Motivation
In daily life we can find that there are many such areas where we can automate the process
transportation by using various kinds of robots. We have built the line follower robot which can take
load from one place and delivers to another place in a very confined area. We have said confined area
because the robot senses a black line on bright surface, this kind of robots can be implemented outside
because of the same region.
1.2 Methodology
This line follower robot is basically based on infrared sensor technology. The robot can sense a
black line on bright surface and then makes a movement like to & fro. We have used Arduino Uno board
to control the robot. In the Arduino Uno board, there is a program which is used to control the logic of
the robot. We have taken IR sensor as input to the Arduino Uno and based on the reading we make
10
output to the wheels of the robot. Also the robotic arm is controlled by the Arduino Uno within the
same program.
Basically in this robot we have used five sensors. One sensor sense the load and the remaining four
sensors are used for the movement of the robot. Based on the sensor readings Arduino Uno operate the
motor driver to drive the motors which is used to drive the two wheels.
And we have used the port 2,3,4,5 as OUTPUT from the Arduino board.
11
2. Hardware Description
The Arduino platform has become quite popular with people just starting out with electronics, and
for good reason. Unlike most previous programmable circuit boards, the Arduino does not need a
separate piece of hardware (called a programmer) in order to load new code onto the board – we can
simply use a USB cable. Additionally, the Arduino IDE uses a simplified version of C++, making it easier
to learn to program. Finally, Arduino provides a standard form factor that breaks out the functions of
the micro-controller into a more accessible package.
12
2.2 DC Motor
A DC Motor is any of a class of rotary electrical machines that converts direct current electrical
energy into mechanical energy. The most common types rely on the forces produced by magnetic fields.
Nearly all types of DC motors have some internal mechanism, either electromechanical or electronic, to
periodically change the direction of current flow in part of the motor.
DC motors were the first type widely used, since they could be powered from existing direct-current
lighting power distribution systems. A DC motor's speed can be controlled over a wide range, using
either a variable supply voltage or by changing the strength of current in its field windings. Small DC
motors are used in tools, toys, and appliances. The universal motor can operate on direct current but is
a lightweight motor used for portable power tools and appliances. Larger DC motors are used in
propulsion of electric vehicles, elevator and hoists, or in drives for steel rolling mills.
13
DC Motor Specifications
Rated Voltage: 6V DC
No load current: ≤280mA
Operating voltage 1.5-6.5V DC
Starting Torque ≥250g.cm (Force of 250 g acting at a radius of 1 cm would produce same amount of
torque as your motor.)
starting current ≤5A
Rotation Direction CW:[+]terminal connected to the positive power supply,[-]terminal connected to
negative power, clockwise is deemed by the direction of the output shaft
shaft gap 0.05-0.35mm
14
The L293D is a quadruple half H-bridge bidirectional motor driver IC that can drive current of up to
600mA with voltage range of 4.5 to 36 volts. It is suitable to drive small DC-geared motors, bipolar
stepper motor etc.
Specifications
Supply voltage range 4.5V to 36V
600-mA Output current capability per driver
Separate Input-logic supply
It can drive small DC-geared motors, bipolar stepper motor.
Pulsed Current 1.2 A per driver
Thermal Shutdown
Internal ESD Protection
High Noise Immunity Inputs
Applications
DC and stepper motor drives
Position and velocity servomechanisms
15
In this project, the transmitter section includes an IR sensor, which transmits continuous IR rays to be
received by an IR receiver module. An IR output terminal of the receiver varies depending upon its
receiving of IR rays. Since this variation cannot be analyzed as such, therefore this output can be fed to a
comparator circuit. Here an operational amplifier (op-amp) of LM 339 is used as comparator circuit.
16
When the IR receiver does not receive a signal, the potential at the inverting input goes higher than
that non-inverting input of the comparator IC (LM339). Thus the output of the comparator goes low, but
the LED does not glow. When the IR receiver module receives signal to the potential at the inverting
input goes low. Thus the output of the comparator (LM 339) goes high and the LED starts glowing.
Resistor R1 (100 ), R2 (10k ) and R3 (330) are used to ensure that minimum 10 mA current passes
through the IR LED Devices like Photodiode and normal LEDs respectively. Resistor VR2 (preset=5k ) is
used to adjust the output terminals. Resistor VR1 (preset=10k ) is used to set the sensitivity of the circuit
Diagram. Read more about IR sensors.
17
Servomotors are not a specific class of motor although the term servomotor is often used to refer to a
motor suitable for use in a closed-loop control system.
Servomotors are used in applications such as robotics, CNC machinery or automated manufacturing.
We have used three servo motors for the robotic arm. The first motor is used for the rotating part of the
base of the arm. Second one is used for the up and down movement of the arm. The third and last servo
motor is used for the gripper part of the arm. The gripper is used to hold the load. For our robot we have
used the SG90 model of servo motor.
Rotation/Support: Bushing
2.7 Arm
The arm portion of the robot is made of plastic. Although the arm has various parts but mainly it has
three distinct parts. First one is the base which can rotate. The second part is for the up-down movement. The
third part is the gripper which has two fingers like structure. At the time of pickup and release of the load,
these two structures either approach each other or moves away from each other.
20
3. Programming
The Arduino IDE supports the languages C and C++ using special rules of code structuring.
21
Servo myservo;
Servo myservo1;
#define m12 3
#define m22 5
#define sensor1 6
#define sensor2 7
#define sensor3 8
#define sensor4 9
int a = 0;
void setup()
Serial.begin(9600);
pinMode(sensor1, INPUT);
pinMode(sensor2, INPUT);
pinMode(sensor3, INPUT);
pinMode(sensor4, INPUT);
pinMode(m11, OUTPUT);
pinMode(m12, OUTPUT);
pinMode(m21, OUTPUT);
pinMode(m22, OUTPUT);
myservo.attach(10);
24
myservo1.attach(11);
myservo2.attach(12);
void loop() {
if (a==0)
forward();
left();
right();
{a=1;
Stop();
//open
for (pos = 0; pos <= 90; pos += 1) { // pos = 0; pos <= 180; pos += 1 goes from 0 degrees to 180 degrees
//DOWN
for (pos = 180; pos >= 90; pos -= 1) { // goes from 0 degrees to 180 degrees
//close
for (pos = 90; pos >= 0; pos -= 1) { // pos = 0; pos <= 180; pos += 1 goes from 0 degrees to 180 degrees
25
// in steps of 1 degree
delay(15); }
//UP
delay(1000);
for (pos = 90; pos <= 180; pos += 1) { // pos = 0; pos <= 180; pos += 1 goes from 0 degrees to 180 degrees
// in steps of 1 degree
//ROTATE
for (pos = 80; pos >= 0; pos -= 1) { // pos = 0; pos <= 180; pos += 1 goes from 0 degrees to 180 degrees
// in steps of 1 degree
//DOWN
delay(1000);
for (pos = 180; pos >= 90; pos -= 1) { // goes from 0 degrees to 180 degrees
// in steps of 1 degree
//open
for (pos = 0; pos <= 90; pos += 1) { // pos = 0; pos <= 180; pos += 1 goes from 0 degrees to 180 degrees
// in steps of 1 degree
//UP
delay(1000);
for (pos = 90; pos <= 180; pos += 1) { // pos = 0; pos <= 180; pos += 1 goes from 0 degrees to 180 degrees
// in steps of 1 degree
for (pos = 0; pos <=80; pos += 1) { // pos = 0; pos <= 180; pos += 1 goes from 0 degrees to 180 degrees
// in steps of 1 degree
Stop();
else if (a==1)
forward1();
left1();
right1();
{Stop();
a=0;
//ROTATE
for (pos = 80; pos >= 0; pos -= 1) { // pos = 0; pos <= 180; pos += 1 goes from 0 degrees to 180 degrees
// in steps of 1 degree
//DOWN
delay(1000);
for (pos = 180; pos >= 90; pos -= 1) { // goes from 0 degrees to 180 degrees
// in steps of 1 degree
//close
for (pos = 90; pos >= 0; pos -= 1) { // pos = 0; pos <= 180; pos += 1 goes from 0 degrees to 180 degrees
// in steps of 1 degree
delay(15); }
//UP
delay(1000);
for (pos = 90; pos <= 180; pos += 1) { // pos = 0; pos <= 180; pos += 1 goes from 0 degrees to 180 degrees
// in steps of 1 degree
for (pos = 0; pos <=80; pos += 1) { // pos = 0; pos <= 180; pos += 1 goes from 0 degrees to 180 degrees
// in steps of 1 degree
//DOWN
for (pos = 180; pos >= 90; pos -= 1) { // goes from 0 degrees to 180 degrees
// in steps of 1 degree
//open
for (pos = 0; pos <= 90; pos += 1) { // pos = 0; pos <= 180; pos += 1 goes from 0 degrees to 180 degrees
// in steps of 1 degree
//UP
delay(1000);
for (pos = 90; pos <= 180; pos += 1) { // pos = 0; pos <= 180; pos += 1 goes from 0 degrees to 180 degrees
// in steps of 1 degree
Stop();
29
void right()
digitalWrite(m11, LOW);
digitalWrite(m12, HIGH);
digitalWrite(m21, LOW);
digitalWrite(m22, LOW);
delay(100);
void left()
digitalWrite(m11, LOW);
digitalWrite(m12, LOW);
digitalWrite(m21, LOW);
digitalWrite(m22, HIGH);
delay(100);
void forward1()
digitalWrite(m11, HIGH);
digitalWrite(m12, LOW);
digitalWrite(m21, HIGH);
digitalWrite(m22, LOW);
void forward()
digitalWrite(m11, LOW);
30
digitalWrite(m12, HIGH);
digitalWrite(m21, LOW);
digitalWrite(m22, HIGH);
void left1()
digitalWrite(m11, LOW);
digitalWrite(m12, LOW);
digitalWrite(m21, HIGH);
digitalWrite(m22, LOW);
delay(100);
void right1()
digitalWrite(m11, HIGH);
digitalWrite(m12, LOW);
digitalWrite(m21, LOW);
digitalWrite(m22, LOW);
delay(100);
void Stop()
digitalWrite(m11, LOW);
digitalWrite(m12, LOW);
digitalWrite(m21, LOW);
digitalWrite(m22, LOW);
}
31
5. Conclusion
When we implemented the project in real life we have found that the robot is suitable for
transferring a small quantity of load. These kinds of robot are useful for many applications, not only for
industrial use but also for domestic use too. Some advantages of these robots are- robot movement is
automatic, it is used for long distance applications, simplicity of building, fit and forget system and it can
be used in home and industrial automations too. These robots can be used as automated equipment
carriers in industries replacing traditional conveyer belts. These robots can also be used as automatic
cars on roads with embedded magnets. These can also be used at homes for domestic purposes like
floor cleaning. These can be used in public places like shopping malls, museums etc to provide path
guidance.
33
6. References
i. Arduino Line Follower Robot-Electronics Hub - www.electronicshub.org/arduino-line-follower-robot
ii. Line Follower Robot with Circuit Diagram Explanation and Applications -
https://www.elprocus.com/line-follower-robot-basics-controlling/