Line Follower Robot Using Arduino

by Robotics club of CEG in Circuits > Robots

1178 Views, 2 Favorites, 0 Comments

Line Follower Robot Using Arduino

line_follower.png

Line follower robots are very easy and basic project to get started with robotics.Line follower as the name indicates, are the robots that are capable of following lines (Say a black line on a white surface). In this tutorial we will see how to build one using a open source micro controller platform arduino !!

Components Required

caster.jpg
spduino.jpg

200rpm GEARED MOTOR 2nos
CASTER WHEEL 1nos

7 cm dia WHEELS 4nos

METAL CHASSIS 1

12v 1AMP BATTERY 1nos

L293D MOTOR DRIVER board 1nos

Arduino Clone

A2B CABLE 1nos

Few connecting wires

IR PAIR(TX and Rx) 4 nos

RESISTORS(330 ohm and 10k) 3 each

IC 7805 1

DOT BOARD 1

Helping Tools :

WIRE STRIPPER
MULTIMETER

SOLDERON 1
SOLDERING LEAD 1 SOLDERING FLUX 1

Circuit Diagrams

L293D.jpg
l293d.JPG
ir.JPG

We have two basic circuits for making a line tracer robot
1. The Ir sensor circuit which would help us to find the presence or absence of line
2. The motor driver circuit which is used to drive the motors

The IR sensor circuit consists of The Tx and Rx and couple of resistors.
The circuit diagram is shown below

The other important circuit For a line tracer robot is the motor driver. Here we will be using L293D motor driver IC, it is also called as H-Bridge. It can handle upto 1Amp current and hence we restrict ourselves to 2 motors

In case of IR, do 4 such circuits. Have more than 1 sensor will help in tracing turns, curves etc.

Robot Structure

layout.JPG

Here is a basic structure of our robot. As said it will have only two motors and a caster wheel

Connections

connection.jpg

As said earlier we have two major parts. The Ir circuit and motor driver connections.
The IR circuit has two main connections Supply and output. The two terminals of 7805 (input and ground) are connected to the battery and the output to any of the analog pin of arduino (A0-A5)
Regarding motor driver, it has 4 input pins which are connected to the digital pins of arduino. Enable pins(E1 and E2) connected to the 5v power supply(output of 7805) and motors are connected to two channels CN1 and CN2 of driver board. Here the diagram shows only 1 sensor, you can connect upto 6 sensors !!

Coding

Here is a small snippet that helps you interface the IR sensor with arduino and final code ! Connections as said, provide supply to the circuit and connect output pin to A0 pin of arduino
For the final code, we used 4 sensors. Three in line and one in the front which will be the priority sensor.
The four sensor outputs are connected to pins A0, A1, A2 and A3 pins of arduino and motor driver input pins to arduino digital pins 5,6,10 and 11

Working Video

Here is a working video of our robot !! Hope, you enjoyed this tutorial !!
Feel free to post your doubts, we will help you out

Downloads