0% found this document useful (0 votes)
121 views33 pages

Project Report II - Modified

This document describes a project to design an Arduino-based autonomous line-following robot for transporting loads. A group of three students from the Electronics and Communication Engineering department at Central Institute of Technology developed this robot as their final year project under the supervision of Dr. Agile Mathew. The robot has two main parts - a carrier cart to transport loads and a robotic arm to pick up and place loads onto the cart. The goal is for the robot to follow a black line on a surface to transport a small load from one point to another, where the arm will remove the load and replace it, before returning to its starting position to repeat the cycle.

Uploaded by

Rupam Medhi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
121 views33 pages

Project Report II - Modified

This document describes a project to design an Arduino-based autonomous line-following robot for transporting loads. A group of three students from the Electronics and Communication Engineering department at Central Institute of Technology developed this robot as their final year project under the supervision of Dr. Agile Mathew. The robot has two main parts - a carrier cart to transport loads and a robotic arm to pick up and place loads onto the cart. The goal is for the robot to follow a black line on a surface to transport a small load from one point to another, where the arm will remove the load and replace it, before returning to its starting position to repeat the cycle.

Uploaded by

Rupam Medhi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 33

Arduino based Autonomous robot for Load, Unload and Transportation

Application
A project work submitted in partial fulfilment

of the requirements for the degree of

BACHELOR OF TECHNOLOGY

In

ELECTRONICS AND COMMUNICATION ENGINEERING

By

Biplab Hazarika (Gau-C-14/015)

Rupam Medhi (Gau-C-14/025)

Riju Prasad Roy (Gau-C-14/L-201)

Under the supervision of

Dr. Agile Mathew

(Assistant Professor, ECE Dept.)

DEPARTMENT OF ELECTRONICS AND COMMUNICATION ENGINEERING

CENTRAL INSTITUTE OF TECHNOLOGY, KOKRAJHAR

(A centrally funded institute under Ministry of HRD, Govt. of India)

BTAD : KOKRAJHAR :: ASSAM :: 783370


2

CENTRAL INSTITUTE OF TECHNOLOGY,KOKRAJHAR


(A Centrally Funded Institute under Ministry of HRD,Govt. Of India)

DEPARTMENT OF ELECTRONICS AND COMMUNICATION ENGINEERING

Kokrajhar – 783370, BTAD, Assam, India

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

Dr. Agile Mathew

Asst. Professor

Dept. Of Electronics and Communication Engineering

CIT, Kokrajhar
3

CENTRAL INSTITUTE OF TECHNOLOGY,KOKRAJHAR


(A Centrally Funded Institute under Ministry of HRD,Govt. Of India)

DEPARTMENT OF ELECTRONICS AND COMMUNICATION ENGINEERING

Kokrajhar – 783370, BTAD, Assam, India

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.

Mr. Rajib Chetia Dr. Sunandan Bhunia

Project Coordinator, Head of the Department,

Electronics and Communication Engineering Electronics and Communication Engineering

Central Institute of Technology, Kokrajhar Central Institute of Technology, Kokrajhar


4

CENTRAL INSTITUTE OF TECHNOLOGY,KOKRAJHAR


(A Centrally Funded Institute under Ministry of HRD,Govt. Of India)

DEPARTMENT OF ELECTRONICS AND COMMUNICATION ENGINEERING

Kokrajhar – 783370, BTAD, Assam, India

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.

Date: Biplab Hazarika

Place: Kokrajhar Roll No: Gau-C-14/015

Reg. No: 134694 of 2014-15

Rupam Medhi

Roll No: Gau-C-14/025

Reg. No: 134702 of 2014-15

Riju Prasad Roy

Roll No; Gau-C-14/L-201

Reg. No: 032862 of 2015-16


6

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

Riju Prasad Roy

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.

1.3 Block diagram

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.

We have used the port 8,9,10,11,12 as INPUT to Arduino board.

And we have used the port 2,3,4,5 as OUTPUT from the Arduino board.
11

2. Hardware Description

2.1 Arduino Uno


Arduino is an open-source electronics platform based on easy-to-use hardware and software.
Arduino boards are able to read inputs - light on a sensor, a finger on a button, and turn it into an
output - activating a motor, turning on an LED etc. You can tell your board what to do by sending a set
of instructions to the microcontroller on the board. To do so you use the Arduino programming
language (based on Wiring), and the Arduino Software(IDE)(based on Processing). Arduino Uno is one
type of Arduino board which is being used for this project.

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

2.3 Motor Driver


A motor driver is a little current amplifier; the function of motor drivers is to take a low-current
control signal and then turn it into a higher-current signal that can drive a motor.

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

2.4 Sensor Module


An infrared sensor (IR sensor) is an electronic sensor that measures infrared (IR) light radiating from
objects in its field of view. An infrared sensor is an electronic device, that emits in order to sense some
aspects of the surroundings. An IR sensor can measure the heat of an object as well as detects the motion.
These types of sensors measures only infrared radiation, rather than emitting it that is called as a passive IR
sensor. Usually in the infrared spectrum, all the objects radiate some form of thermal radiations. These
types of radiations are invisible to our eyes, that can be detected by an infrared sensor. The emitter is
simply an IR LED (Light Emitting Diode) and the detector is simply an IR photodiode which is sensitive to IR
light of the same wavelength as that emitted by the IR LED. When IR light falls on the photodiode, the
resistances and these output voltages, change in proportion to the magnitude of the IR light received.

IR Sensor Circuit Diagram and Working Principle


An infrared sensor circuit is one of the basic and popular sensor module in an electronic device. This
sensor is analogous to human’s visionary senses, which can be used to detect obstacles and it is one of the
common applications in real time. This circuit comprises of the following components.

 LM358 IC 2 IR transmitter and receiver pair.


 Resistors of the range of kilo ohms.
 Variable resistors.
 LED(Light Emitting Diode)

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

2.5 Chassis and Wheels


For this project we have used a chassis of wood. The wooden chassis is rigid and durable. We have
attached the wheels on the wooden chassis by glue and nuts and bolts. The wheels are also made of
plastic, but the outer most part of the wheel is made up of soft rubber. The wheels are used to
manoeuvre the robot in every kind of place, whether it is on concrete floor or a terrain area. A sample
picture of the chassis with two wheels is given below.
18

2.6 Servo Motor


A servomotor is a rotary actuator or linear actuator that allows for precise control of angular or linear
position, velocity and acceleration. It consists of a suitable motor coupled to a sensor for position feedback.
It also requires a relatively sophisticated controller, often a dedicated module designed specifically for use
with servomotors.

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.

SG90 servo motor Specifications


Modulation: Analog

Torque: 4.8V: 25.00 oz-in (1.80 kg-cm)

Speed: 4.8V: 0.12 sec/60°

Weight: 0.32 oz (9.0 g)

Dimensions: Length:0.91 in (23.0 mm)

Width:0.48 in (12.2 mm)

Height:1.14 in (29.0 mm)

Motor Type: 3-pole

Gear Type: Plastic

Rotation/Support: Bushing

Pulse Width: 500-2400 µs


19

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

3.1 Arduino IDE


Arduino integrated development environment (IDE), which is a cross-platform application written in
the programming language Java. A program written with the IDE for Arduino is called a sketch. Sketches
are saved on the development computer as text files with the file extension .ino. Arduino Software (IDE)
pre-1.0 saved sketches with the extension .pde.

The Arduino IDE supports the languages C and C++ using special rules of code structuring.
21

3.2 Circuit Diagram


22

3.3 Flow Chart


23

3.4 Program for the project


#include <Servo.h>

Servo myservo;

Servo myservo1;

Servo myservo2;//pins for servo

#define m11 2 // rear motor

#define m12 3

#define m21 4 // front motor

#define m22 5

#define sensor1 6

#define sensor2 7

#define sensor3 8

#define sensor4 9

int a = 0;

int pos = 0; //for servo

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)

if(digitalRead(sensor1)==HIGH &&digitalRead(sensor2)== HIGH)

forward();

else if(digitalRead(sensor1)==HIGH && digitalRead(sensor2) == LOW)

left();

else if(digitalRead(sensor1)==LOW && digitalRead(sensor2) == HIGH)

right();

else if(digitalRead(sensor1)==LOW && digitalRead(sensor2) == LOW)

{a=1;

Stop();

//open

for (pos = 0; pos <= 90; pos += 1) { // pos = 0; pos <= 180; pos += 1 goes from 0 degrees to 180 degrees

myservo2.write(pos); // tell servo to go to position in variable 'pos'

delay(100); // waits 15ms for the servo to reach the position

//DOWN

for (pos = 180; pos >= 90; pos -= 1) { // goes from 0 degrees to 180 degrees

myservo1.write(pos); // tell servo to go to position in variable 'pos'

delay(50); // waits 15ms for the servo to reach the position

//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

myservo2.write(pos); // tell servo to go to position in variable 'pos'

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

myservo1.write(pos); // tell servo to go to position in variable 'pos'

delay(50); // waits 15ms for the servo to reach the position

//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

myservo.write(pos); // tell servo to go to position in variable 'pos'

delay(100); // waits 15ms for the servo to reach the position

//DOWN

delay(1000);

for (pos = 180; pos >= 90; pos -= 1) { // goes from 0 degrees to 180 degrees

// in steps of 1 degree

myservo1.write(pos); // tell servo to go to position in variable 'pos'

delay(50); // waits 15ms for the servo to reach the position

//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

myservo2.write(pos); // tell servo to go to position in variable 'pos'

delay(100); // waits 15ms for the servo to reach the position


26

//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

myservo1.write(pos); // tell servo to go to position in variable 'pos'

delay(50); // waits 15ms for the servo to reach the position

//lower most servo go to the above cart position ROTATE

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

myservo.write(pos); // tell servo to go to position in variable 'pos'

delay(100); // waits 15ms for the servo to reach the position

else if(digitalRead(sensor1)==LOW && digitalRead(sensor2) == LOW && digitalRead(sensor3)==HIGH &&


digitalRead(sensor4) == HIGH)

Stop();

else if (a==1)

if(digitalRead(sensor3)==LOW &&digitalRead(sensor4) == LOW)

forward1();

else if(digitalRead(sensor3)==LOW && digitalRead(sensor4) == HIGH)

left1();

else if(digitalRead(sensor3)==HIGH && digitalRead(sensor4) == LOW)

right1();

else if(digitalRead(sensor3)==HIGH && digitalRead(sensor4) == HIGH)


27

{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

myservo.write(pos); // tell servo to go to position in variable 'pos'

delay(100); // waits 15ms for the servo to reach the position

//DOWN

delay(1000);

for (pos = 180; pos >= 90; pos -= 1) { // goes from 0 degrees to 180 degrees

// in steps of 1 degree

myservo1.write(pos); // tell servo to go to position in variable 'pos'

delay(50); // waits 15ms for the servo to reach the position

//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

myservo2.write(pos); // tell servo to go to position in variable 'pos'

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

myservo1.write(pos); // tell servo to go to position in variable 'pos'

delay(50); // waits 15ms for the servo to reach the position

} // waits 15ms for the servo to reach the position

//lower most servo go to the above cart position ROTATE


28

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

myservo.write(pos); // tell servo to go to position in variable 'pos'

delay(100); // waits 15ms for the servo to reach the position

//DOWN

for (pos = 180; pos >= 90; pos -= 1) { // goes from 0 degrees to 180 degrees

// in steps of 1 degree

myservo1.write(pos); // tell servo to go to position in variable 'pos'

delay(50); // waits 15ms for the servo to reach the position

//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

myservo2.write(pos); // tell servo to go to position in variable 'pos'

delay(100); // waits 15ms for the servo to reach the position

//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

myservo1.write(pos); // tell servo to go to position in variable 'pos'

delay(50); // waits 15ms for the servo to reach the position

else if(digitalRead(sensor1)==LOW && digitalRead(sensor2) == LOW && digitalRead(sensor3)==HIGH &&


digitalRead(sensor4) == HIGH)

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

4. Results and Discussion

4.1 Straight Line path


We have implemented the project on a wooden board containing black lines made up by tape and
found that the robot can move in a straight line in about 40 revolutions per minute(RPM).

4.2 Curved line path


When we implemented the project we have found that it can follow a curve path when the radius
of the path is not more than 20 cm. If a curved path is more than this limit of radius it cannot follow the
path.
32

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/

iii. Arduino – Home - https://arduino.cc/

iv. Arduino – Wikipedia – https://en.wikipedia.org/wiki/Arduino

You might also like