Arduino Line
Following Robot
DSE 18.2 NATIONAL INSTITUTE OF BUSSINESS MANAGEMENT KURUNEGALA 3/1/2020 1
Our Team
Dimuth Bandara
Raween Randewa
Raweena Bandara
Kasun Somarathna
Hashani Ranawake
DSE 18.2 NATIONAL INSTITUTE OF BUSSINESS MANAGEMENT KURUNEGALA 3/1/2020 2
Information About the project
And the purpose of this project is to automate the fruit transport
system in this factory
In this industrial plant good carriers are essential to carry goods
from one place to another place. In most instances, carts or trucks
were used with human labour. This manual process is unreliable and
unefficient which causes wastage of time and money
DSE 18.2 NATIONAL INSTITUTE OF BUSSINESS MANAGEMENT KURUNEGALA 3/1/2020 3
Objectives of
the project
Main objective-Move towards automation
Others
1)To increase efficiency of the system
2)To reduce the time delay in the old system
3)Identify the movements of the robot
4)Reduce the Wastage due to damages when
transporting
DSE 18.2 NATIONAL INSTITUTE OF BUSSINESS MANAGEMENT KURUNEGALA 3/1/2020 4
Features Of
The
Application
This application can be used for
number of industries where industrial
automation is needed including motor
vehicle , hotels etc.
Arduino line follower follows a specific
path which is black in colour in white
background
In some instances there are line
followers which follow a white line in
dark background.
DSE 18.2 NATIONAL INSTITUTE OF BUSSINESS MANAGEMENT KURUNEGALA 3/1/2020 5
Here we use
 Arduino Uno Board
 Arduino l298n motor driver
 3 Arduino IR sensors
 2 Arduino gear motors
 Jumper wires
DSE 18.2 NATIONAL INSTITUTE OF BUSSINESS MANAGEMENT KURUNEGALA 3/1/2020 6
Arduino Uno
Board
 It is the most popular board
 Power using power USB and
barallel jack
 Voltage regulator control the
voltage given
 5v output gives input voltage to
the IR sensors
 GND use to ground the circuit
 Analog pins A0 to A5
 14 digital I/O pins which 6 provide
PWM
DSE 18.2 NATIONAL INSTITUTE OF BUSSINESS MANAGEMENT KURUNEGALA 3/1/2020 7
Arduino l298n
Motor Driver
 A dual H Bridge Motor driver
 The module can drive DC motors
that have voltages between 5 and
35V, with a peak current up to
2A.Voltage regulator control the
voltage given
DSE 18.2 NATIONAL INSTITUTE OF BUSSINESS MANAGEMENT KURUNEGALA 3/1/2020 8
How It Works
DSE 18.2 NATIONAL INSTITUTE OF BUSSINESS MANAGEMENT KURUNEGALA 3/1/2020 9
Arduino IR sensor
 Based on Infra red radiations
 Works in range from 3.3v to 5v
 In black or darker surfaces IR
sensor turn off
 In white background IR sensor
Turn ON
DSE 18.2 NATIONAL INSTITUTE OF BUSSINESS MANAGEMENT KURUNEGALA 3/1/2020 10
Arduino Gear
Motor
 Rotates Clockwise and
anticlockwise
 Works in range from 3.3v to 12v
 Gear motor is connected to
Arduino UNO via Arduino l298N
motor driver
DSE 18.2 NATIONAL INSTITUTE OF BUSSINESS MANAGEMENT KURUNEGALA 3/1/2020 11
How It Works
Move Forward Move Left
Move Right Stop
DSE 18.2 NATIONAL INSTITUTE OF BUSSINESS MANAGEMENT KURUNEGALA 3/1/2020 12
Move Forward
 All tracker sensors must be off
 The robot must be in line
 Two motors must rotate(ON)
DSE 18.2 NATIONAL INSTITUTE OF BUSSINESS MANAGEMENT KURUNEGALA 3/1/2020 13
Move Left
 Left Sensor And Middle sensor
Must be OFF
 Right Sensor Must Be ON
 The robot must be in line
 Right Motor Must be ON
DSE 18.2 NATIONAL INSTITUTE OF BUSSINESS MANAGEMENT KURUNEGALA 3/1/2020 14
Move Right
 Right Sensor And Middle sensor
Must be OFF
 Left Sensor Must Be ON
 The robot must be in line
 Right Motor Must be ON
DSE 18.2 NATIONAL INSTITUTE OF BUSSINESS MANAGEMENT KURUNEGALA 3/1/2020 15
Stop
 All tracker sensors must be ON
 The robot must be outside line
 Two motors must be OFF
DSE 18.2 NATIONAL INSTITUTE OF BUSSINESS MANAGEMENT KURUNEGALA 3/1/2020 16
Explanation
Using
Pseudocode
Read RS,LS,MS,LM,RM
IF LS equals zero ,MS equals zero and , RS equals zero
Turn on LM
Turn off RM
End IF
If LS equals zero , MS equals zero and, RS equals one
Turn on RM
Turn off LM
End IF
If LS equals one, MS equals zero and, RS equal Zero
Turn on LM
Turn off RM
End IF
DSE 18.2 NATIONAL INSTITUTE OF BUSSINESS MANAGEMENT KURUNEGALA 3/1/2020 17
Explanation
Using
Pseudocode
contd…..
If LS equals one, MS equals zero and, RS
equal one
Turn on LM
Turn on RM
End IF
ELSE
Turn off LM
Turn off RM
END
DSE 18.2 NATIONAL INSTITUTE OF BUSSINESS MANAGEMENT KURUNEGALA 3/1/2020 18
Code
int S_A=11; // speed of motor A
int M_A1=2;// motor a=+
int M_A2=3; // motor a=-
int M_B1=4; // motor b= -
int M_B2=5; // motor b=+
int S_B=10; // Speed of motor B
int R_S=A0; // sensor r
int S_S=A1; // sensor s
int L_S=A2; // sensor L
void setup() {
pinMode(M_B1,OUTPUT);
pinMode(M_B2,OUTPUT);
pinMode(M_A1,OUTPUT);
pinMode(M_A2,OUTPUT);
pinMode(S_B,OUTPUT);
pinMode(S_A,OUTPUT);
3/1/2020DSE 18.2 NATIONAL INSTITUTE OF BUSSINESS MANAGEMENT KURUNEGALA 19
pinMode(L_S,INPUT);
pinMode(S_S,INPUT);
pinMode(R_S,INPUT);
analogWrite(S_A,75);
analogWrite(S_B,75);
delay(200);
}
void loop() {
if((digitalRead(L_S)==0)&&(digitalRead(S_S)==1)
&&(digitalRead(R_S)==0)){forword();}
if((digitalRead(L_S)==1)&&(digitalRead(S_S)==1)&&(digitalRead(R_S)==0)){turnLeft();}
if((digitalRead(L_S)==1)&&(digitalRead(S_S)==0)&&(digitalRead(R_S)==0)){turnLeft();}
if((digitalRead(L_S)==0)&&(digitalRead(S_S)==1)&&(digitalRead(R_S)==1)){turnRight();}
if((digitalRead(L_S)==0)&&(digitalRead(S_S)==0)&&(digitalRead(R_S)==1)){turnRight();}
if((digitalRead(L_S)==1)&&(digitalRead(S_S)==1)&&(digitalRead(R_S)==1)){Stop();}
if((digitalRead(L_S)==1)&&(digitalRead(S_S)==0)&&(digitalRead(R_S)==1)){Stop();}
}
3/1/2020DSE 18.2 NATIONAL INSTITUTE OF BUSSINESS MANAGEMENT KURUNEGALA 20
void forword(){
digitalWrite(M_A1,LOW);
digitalWrite(M_A2,HIGH);
digitalWrite(M_B1,HIGH);
digitalWrite(M_B2,LOW);
}
void turnRight(){
digitalWrite(M_A1,LOW);
digitalWrite(M_A2,LOW);
digitalWrite(M_B1,HIGH);
digitalWrite(M_B2,LOW);
}
void turnLeft(){
digitalWrite(M_A1,LOW);
digitalWrite(M_A2,HIGH);
digitalWrite(M_B1,LOW);
digitalWrite(M_B2,LOW);
}
3/1/2020DSE 18.2 NATIONAL INSTITUTE OF BUSSINESS MANAGEMENT KURUNEGALA 21
How To Operate
 Handle with care.
 Check whether sensors are working.
 Don’t supply higher voltages and currents.
 Check whether the motors are rotating.
DSE 18.2 NATIONAL INSTITUTE OF BUSSINESS MANAGEMENT KURUNEGALA 3/1/2020 22
A Practical Example
 Practical Example 01(Static Example)
DSE 18.2 NATIONAL INSTITUTE OF BUSSINESS MANAGEMENT KURUNEGALA 3/1/2020 23
 Practical Example 02(Dynamic Example)
DSE 18.2 NATIONAL INSTITUTE OF BUSSINESS MANAGEMENT KURUNEGALA 3/1/2020 24
Little More Than A Line Follower
 Identify Movement Using C# Serial Communication
DSE 18.2 NATIONAL INSTITUTE OF BUSSINESS MANAGEMENT KURUNEGALA 3/1/2020 25
Connect Through Wifi
 Using esp 8266-1 or esp 8266 we can connect it to wifi and can observe using
php or c#
DSE 18.2 NATIONAL INSTITUTE OF BUSSINESS MANAGEMENT KURUNEGALA 3/1/2020 26
Benefits of
the project
Reduce time delay in instances where we use human labor
More efficient
Reliable
Reduce wastage due to damages when transporting
Only small space is needed for storing items
DSE 18.2 NATIONAL INSTITUTE OF BUSSINESS MANAGEMENT KURUNEGALA 3/1/2020 27
Disadvantages Of The Project
High Cost to Build. High Cost to Maintain. Operators with proper
knowledge is essential.
Reduce job opportunity
for labors.
As this is a new concept
traditional farmers will
not accept this method.
DSE 18.2 NATIONAL INSTITUTE OF BUSSINESS MANAGEMENT KURUNEGALA 3/1/2020 28
Hardships We
Faced
The line following robot project challenged the group to cooperate,
communicate, and expand understanding of electronics, mechanical
systems, and their integration with programming.
Lack of proper Knowledge.
Lack of reliable resources.
Most of applications are highly costable
Difficult to connect Arduino with C#
DSE 18.2 NATIONAL INSTITUTE OF BUSSINESS MANAGEMENT KURUNEGALA 3/1/2020 29
Conclusions
This is a new
concept in sri
Lankan minor
industrial plants.
But in other
countries this
concept is well
used.
This method can
be introduced to
sri Lankan minor
industrial plants.
We can move
towards
automation….
This will increase
job opportunity
in IT field
DSE 18.2 NATIONAL INSTITUTE OF BUSSINESS MANAGEMENT KURUNEGALA 3/1/2020 30
Future Scope
 To implement automated systems in
Sri Lanka. Expected automated system
may contain automatically updating
applications and automatically
updating online databases (mostly in
clouds)
DSE 18.2 NATIONAL INSTITUTE OF BUSSINESS MANAGEMENT KURUNEGALA 3/1/2020 31
THE END
DSE 18.2 NATIONAL INSTITUTE OF BUSSINESS MANAGEMENT KURUNEGALA 3/1/2020 32

Arduino line follower robot

  • 1.
    Arduino Line Following Robot DSE18.2 NATIONAL INSTITUTE OF BUSSINESS MANAGEMENT KURUNEGALA 3/1/2020 1
  • 2.
    Our Team Dimuth Bandara RaweenRandewa Raweena Bandara Kasun Somarathna Hashani Ranawake DSE 18.2 NATIONAL INSTITUTE OF BUSSINESS MANAGEMENT KURUNEGALA 3/1/2020 2
  • 3.
    Information About theproject And the purpose of this project is to automate the fruit transport system in this factory In this industrial plant good carriers are essential to carry goods from one place to another place. In most instances, carts or trucks were used with human labour. This manual process is unreliable and unefficient which causes wastage of time and money DSE 18.2 NATIONAL INSTITUTE OF BUSSINESS MANAGEMENT KURUNEGALA 3/1/2020 3
  • 4.
    Objectives of the project Mainobjective-Move towards automation Others 1)To increase efficiency of the system 2)To reduce the time delay in the old system 3)Identify the movements of the robot 4)Reduce the Wastage due to damages when transporting DSE 18.2 NATIONAL INSTITUTE OF BUSSINESS MANAGEMENT KURUNEGALA 3/1/2020 4
  • 5.
    Features Of The Application This applicationcan be used for number of industries where industrial automation is needed including motor vehicle , hotels etc. Arduino line follower follows a specific path which is black in colour in white background In some instances there are line followers which follow a white line in dark background. DSE 18.2 NATIONAL INSTITUTE OF BUSSINESS MANAGEMENT KURUNEGALA 3/1/2020 5
  • 6.
    Here we use Arduino Uno Board  Arduino l298n motor driver  3 Arduino IR sensors  2 Arduino gear motors  Jumper wires DSE 18.2 NATIONAL INSTITUTE OF BUSSINESS MANAGEMENT KURUNEGALA 3/1/2020 6
  • 7.
    Arduino Uno Board  Itis the most popular board  Power using power USB and barallel jack  Voltage regulator control the voltage given  5v output gives input voltage to the IR sensors  GND use to ground the circuit  Analog pins A0 to A5  14 digital I/O pins which 6 provide PWM DSE 18.2 NATIONAL INSTITUTE OF BUSSINESS MANAGEMENT KURUNEGALA 3/1/2020 7
  • 8.
    Arduino l298n Motor Driver A dual H Bridge Motor driver  The module can drive DC motors that have voltages between 5 and 35V, with a peak current up to 2A.Voltage regulator control the voltage given DSE 18.2 NATIONAL INSTITUTE OF BUSSINESS MANAGEMENT KURUNEGALA 3/1/2020 8
  • 9.
    How It Works DSE18.2 NATIONAL INSTITUTE OF BUSSINESS MANAGEMENT KURUNEGALA 3/1/2020 9
  • 10.
    Arduino IR sensor Based on Infra red radiations  Works in range from 3.3v to 5v  In black or darker surfaces IR sensor turn off  In white background IR sensor Turn ON DSE 18.2 NATIONAL INSTITUTE OF BUSSINESS MANAGEMENT KURUNEGALA 3/1/2020 10
  • 11.
    Arduino Gear Motor  RotatesClockwise and anticlockwise  Works in range from 3.3v to 12v  Gear motor is connected to Arduino UNO via Arduino l298N motor driver DSE 18.2 NATIONAL INSTITUTE OF BUSSINESS MANAGEMENT KURUNEGALA 3/1/2020 11
  • 12.
    How It Works MoveForward Move Left Move Right Stop DSE 18.2 NATIONAL INSTITUTE OF BUSSINESS MANAGEMENT KURUNEGALA 3/1/2020 12
  • 13.
    Move Forward  Alltracker sensors must be off  The robot must be in line  Two motors must rotate(ON) DSE 18.2 NATIONAL INSTITUTE OF BUSSINESS MANAGEMENT KURUNEGALA 3/1/2020 13
  • 14.
    Move Left  LeftSensor And Middle sensor Must be OFF  Right Sensor Must Be ON  The robot must be in line  Right Motor Must be ON DSE 18.2 NATIONAL INSTITUTE OF BUSSINESS MANAGEMENT KURUNEGALA 3/1/2020 14
  • 15.
    Move Right  RightSensor And Middle sensor Must be OFF  Left Sensor Must Be ON  The robot must be in line  Right Motor Must be ON DSE 18.2 NATIONAL INSTITUTE OF BUSSINESS MANAGEMENT KURUNEGALA 3/1/2020 15
  • 16.
    Stop  All trackersensors must be ON  The robot must be outside line  Two motors must be OFF DSE 18.2 NATIONAL INSTITUTE OF BUSSINESS MANAGEMENT KURUNEGALA 3/1/2020 16
  • 17.
    Explanation Using Pseudocode Read RS,LS,MS,LM,RM IF LSequals zero ,MS equals zero and , RS equals zero Turn on LM Turn off RM End IF If LS equals zero , MS equals zero and, RS equals one Turn on RM Turn off LM End IF If LS equals one, MS equals zero and, RS equal Zero Turn on LM Turn off RM End IF DSE 18.2 NATIONAL INSTITUTE OF BUSSINESS MANAGEMENT KURUNEGALA 3/1/2020 17
  • 18.
    Explanation Using Pseudocode contd….. If LS equalsone, MS equals zero and, RS equal one Turn on LM Turn on RM End IF ELSE Turn off LM Turn off RM END DSE 18.2 NATIONAL INSTITUTE OF BUSSINESS MANAGEMENT KURUNEGALA 3/1/2020 18
  • 19.
    Code int S_A=11; //speed of motor A int M_A1=2;// motor a=+ int M_A2=3; // motor a=- int M_B1=4; // motor b= - int M_B2=5; // motor b=+ int S_B=10; // Speed of motor B int R_S=A0; // sensor r int S_S=A1; // sensor s int L_S=A2; // sensor L void setup() { pinMode(M_B1,OUTPUT); pinMode(M_B2,OUTPUT); pinMode(M_A1,OUTPUT); pinMode(M_A2,OUTPUT); pinMode(S_B,OUTPUT); pinMode(S_A,OUTPUT); 3/1/2020DSE 18.2 NATIONAL INSTITUTE OF BUSSINESS MANAGEMENT KURUNEGALA 19
  • 20.
  • 21.
    void forword(){ digitalWrite(M_A1,LOW); digitalWrite(M_A2,HIGH); digitalWrite(M_B1,HIGH); digitalWrite(M_B2,LOW); } void turnRight(){ digitalWrite(M_A1,LOW); digitalWrite(M_A2,LOW); digitalWrite(M_B1,HIGH); digitalWrite(M_B2,LOW); } voidturnLeft(){ digitalWrite(M_A1,LOW); digitalWrite(M_A2,HIGH); digitalWrite(M_B1,LOW); digitalWrite(M_B2,LOW); } 3/1/2020DSE 18.2 NATIONAL INSTITUTE OF BUSSINESS MANAGEMENT KURUNEGALA 21
  • 22.
    How To Operate Handle with care.  Check whether sensors are working.  Don’t supply higher voltages and currents.  Check whether the motors are rotating. DSE 18.2 NATIONAL INSTITUTE OF BUSSINESS MANAGEMENT KURUNEGALA 3/1/2020 22
  • 23.
    A Practical Example Practical Example 01(Static Example) DSE 18.2 NATIONAL INSTITUTE OF BUSSINESS MANAGEMENT KURUNEGALA 3/1/2020 23
  • 24.
     Practical Example02(Dynamic Example) DSE 18.2 NATIONAL INSTITUTE OF BUSSINESS MANAGEMENT KURUNEGALA 3/1/2020 24
  • 25.
    Little More ThanA Line Follower  Identify Movement Using C# Serial Communication DSE 18.2 NATIONAL INSTITUTE OF BUSSINESS MANAGEMENT KURUNEGALA 3/1/2020 25
  • 26.
    Connect Through Wifi Using esp 8266-1 or esp 8266 we can connect it to wifi and can observe using php or c# DSE 18.2 NATIONAL INSTITUTE OF BUSSINESS MANAGEMENT KURUNEGALA 3/1/2020 26
  • 27.
    Benefits of the project Reducetime delay in instances where we use human labor More efficient Reliable Reduce wastage due to damages when transporting Only small space is needed for storing items DSE 18.2 NATIONAL INSTITUTE OF BUSSINESS MANAGEMENT KURUNEGALA 3/1/2020 27
  • 28.
    Disadvantages Of TheProject High Cost to Build. High Cost to Maintain. Operators with proper knowledge is essential. Reduce job opportunity for labors. As this is a new concept traditional farmers will not accept this method. DSE 18.2 NATIONAL INSTITUTE OF BUSSINESS MANAGEMENT KURUNEGALA 3/1/2020 28
  • 29.
    Hardships We Faced The linefollowing robot project challenged the group to cooperate, communicate, and expand understanding of electronics, mechanical systems, and their integration with programming. Lack of proper Knowledge. Lack of reliable resources. Most of applications are highly costable Difficult to connect Arduino with C# DSE 18.2 NATIONAL INSTITUTE OF BUSSINESS MANAGEMENT KURUNEGALA 3/1/2020 29
  • 30.
    Conclusions This is anew concept in sri Lankan minor industrial plants. But in other countries this concept is well used. This method can be introduced to sri Lankan minor industrial plants. We can move towards automation…. This will increase job opportunity in IT field DSE 18.2 NATIONAL INSTITUTE OF BUSSINESS MANAGEMENT KURUNEGALA 3/1/2020 30
  • 31.
    Future Scope  Toimplement automated systems in Sri Lanka. Expected automated system may contain automatically updating applications and automatically updating online databases (mostly in clouds) DSE 18.2 NATIONAL INSTITUTE OF BUSSINESS MANAGEMENT KURUNEGALA 3/1/2020 31
  • 32.
    THE END DSE 18.2NATIONAL INSTITUTE OF BUSSINESS MANAGEMENT KURUNEGALA 3/1/2020 32