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

instructables

Line Following Robot V.1

by Zuhayerpro

I am making a three proximity sensor line following robot. It is a robot which runs following a black line which
proceeds the bot to the speci c destination. Normally people makes a two proximity sensor robot. But that
robot has normal functions but this one has a little bit advanced function. It can detect the 90 degree lines and
40 degree line that makes it advanced. I am mainly making this project to help the people who wanted to make
a easy line following robot but a little bit advanced that is why three proximity sensors which will help to detect
the 90 degree line and also 40 degree lines. Making with three proximity sensors is not so easy but coding is a
little bit confusing if you are a beginner. I am also a beginner. This is V.1 Line Following Robot. I will also make
other versions of it so stay tune. So that is all below is all the steps and requirements you will need for making
this project.
Supplies:

To make this three proximity sensors line following robot we need some components. They are listed below:

1)Three IR Sensors
2)Two Gear Motor
3)Arduino Uno/Nano
4)L298N Motor Driver
5)Two Wheel
6)12/9 Volt Battery
7)Jumper Wires
8)Caster Wheel
9)Chassis
All the above components are available in the Starter Kit. As there are number of projects listed on Instructables which
can be made using Starter Kit.

Line Following Robot V.1: Page 1


Line Following Robot V.1: Page 2
Line Following Robot V.1: Page 3
Step 1: Preparing the Chassis

First attach the motors to the Chassis.


Then attach the wheels with the motors. After doing attach the caster wheel to the front of chassis. Now your chassis
is ready.
But if you don't have any chassis then you can use any type of cardboard or plywood or PVC pipe sheet and then you
can attach the motors and caster wheel to it.

Line Following Robot V.1: Page 4


Line Following Robot V.1: Page 5
Line Following Robot V.1: Page 6
Step 2: The Upper Part of the Chassis

First attach the proximity sensors to the front of the chassis facing downwards
Left sensor to the Left Corner of the Chassis.
center sensor to the Center of the Chassis.
Right sensor to the Right Corner of the Chassis.

If you are having problem look at the picture.

Line Following Robot V.1: Page 7


Attach the Arduino Uno to the Middle of the Chassis.
Attach the Motor Driver to a little back of the Arduino Uno.

Line Following Robot V.1: Page 8


Line Following Robot V.1: Page 9
Step 3: Connections

This is a important part of the project. Now I will describe the connections to you
Left sensor >> Arduino Uno
VCC >> 5V
GND >> GND
OUT >> A0

Center sensor >> Arduino Uno


VCC >> 5V
GND >> GND
OUT >> A1

Right sensor >> Arduino Uno


VCC >> 5V
GND >> GND
OUT >> A2

L298N >> Arduino Uno

EA >> 10
IN 1 >> 2
IN 2 >> 3
IN 3 >> 4
IN 4 >> 5
EB >> 11
5Volt >> 5Volt
GND >> GND

Give 12Volt to L298N's 12Volt.


Here is the link to the circuit diagram - Circuit diagram

Line Following Robot V.1: Page 10


Line Following Robot V.1: Page 11
Step 4: How It Works

Now I will show you how my Line Following Robot works. (//I am using Proximity sensors with Active High Output//)
To Go Straight:
When the Centersensor will detect black line.
The two other sensors will detect white surface.
The two Motors will go clockwise/right.

To Go Left:
When the Leftsensor will detect black line.
The other two sensors will detect white surface.
The Left Motor will stop.
The Right Motor will go clockwise/right.

Line Following Robot V.1: Page 12


To Go right:
When the Rightsensor will detect black line.
The other two sensors will detect white surface.
The Right Motor will stop.
The Left Motor will go clockwise/right.

To Go 90 Degree Left:
When the Center andLeftsensors will detect black line.
The Right sensor will detect white surface.
The Right Motor will goclockwise/right.
TheLeft Motorwill go counter clockwise/left.

To Go 90 Degree Right:
When the Center andRight sensors will detect black line.
The Left sensor will detect white surface.
The Left Motor will goclockwise/right.
TheRight Motor will go counter clockwise/left.

To Go 40 Degree Left:
When the Center andLeftsensors will detect black line.
The Right sensor will detect white surface.
The Right Motor will goclockwise/right.
TheLeft Motorwill go counter clockwise/left.

To Go 40 Degree Right:
When the Center andRight sensors will detect black line.
The Left sensor will detect white surface.
The Left Motor will goclockwise/right.
TheRight Motor will go counter clockwise/left.

To stop:
When all thesensor will detect black line.
The two Motors will go stop.

In this way this Line Following Robot will work. It has 90 Degree and 40 Degree turns and it can also detect 90 Degree
and 40 Degree lines. This is full description of how this robot will work.
You will also have to tune the potentiometer of the sensors so that when they black line the output light in the
sensor will turn o and when detect white surface it will turn on.

Line Following Robot V.1: Page 13


Line Following Robot V.1: Page 14
Line Following Robot V.1: Page 15
Step 5: CODE

Now I am giving you the Github link of the code below:


LFR V.1
Now you can paste this code in your Arduino IDE and upload it to the Arduino Uno of you robot. Or you can
make your own code and make this Line Follower.

Line Following Robot V.1: Page 16


Thanks for sharing :)

Line Following Robot V.1: Page 17

You might also like