You are on page 1of 21

LINE FOLLOWER ROBOT

What is a line follower robot?

• Line follower is an autonomous robot which


follows either black line on white surface or
white line on black surface. Robot must be
able to detect particular line and keep
following it.
Components used….
• 1.AVR Development
board

• 2.AtMega 16 IC
• 3.L293d IC

• 4.Chassis

• 5.Wheels
• 6.DC Motor

• 7.IR Sensor

• 8.Connecting wires
• 9.AVR Programmer

• 10.A to B cable

• 11. 12 V Adaptor
Block Diagram of the Project

• The line follower robot built in this project is


divided into 4 blocks. The following image shows
the block diagram for line follower robot.
Block Diagram Description

• Sensors (IR Sensor): We have used IR Sensor Module


as the line detecting sensor for the project. It
consists of an IR LED and a Photo diode and some
other components like comparator, LED etc.

• Controller (AVR): AVR is the main controller in the


project. The data from the sensors (IR Sensors) will
be given to AVR and it gives corresponding signals to
the Motor Driver IC.
• Motor Driver (L293D): L293D Motor Driver IC
is used in this project to drive the motors of
the robot. It receives signals from AVR based
on the information from the IR Sensors.

• Motors : Motors are the devices which make


the robot movable. Motors convert electrical
energy into physical motion.
Working of IR Sensor
• IR reflective sensors have one emitter (IR LED) and one
receiver (Phototransistor or photo diode. If we have white
surface it reflects the light and it will sensed by the receiver,
similarly if we have black surface it absorbs the light and
receiver can not sense light.
L293d IC
• L293D is a dual H-bridge motor driver integrated
circuit (IC). Motor drivers act as current amplifiers
since they take a low-current control signal and
provide a higher-current signal. This higher current
signal is used to drive the motors. L293D contains
two inbuilt H-bridge driver circuits. In its common
mode of operation, two DC motors can be driven
simultaneously, both in forward and reverse
direction.
Dual H Bridge
An H bridge is an electronic circuit that enables a
voltage to be applied across a load in opposite
direction. These circuits are often used
in robotics and other applications to allow DC
motors to run forwards or backwards.[1]
Most DC-to-AC converters (power inverters),
most AC/AC converters, the DC-to-DC push–pull
converter, most motor controllers, and many other
kinds of power electronics use H bridges. In
particular, a bipolar stepper motor is almost
invariably driven by a motor controller containing
two H bridges.
• H bridges are available as integrated circuits, or can be built
from discrete components.[1]
• The term H bridge is derived from the typical graphical
representation of such a circuit. An H bridge is built with four
switches (solid-state or mechanical). When the switches S1
and S4 (according to the first figure) are closed (and S2 and S3
are open) a positive voltage will be applied across the motor.
By opening S1 and S4 switches and closing S2 and S3 switches,
this voltage is reversed, allowing reverse operation of the
motor.
• Using the nomenclature above, the switches S1 and S2 should
never be closed at the same time, as this would cause a short
circuit on the input voltage source. The same applies to the
switches S3 and S4. This condition is known as shoot-through.
Working of LFR

• Line follower robot senses black line by using sensor and then
sends the signal to AVR. Then microcontroller drives the
motor according to sensors' output.

• 1. When both left and right sensor senses white then robot
move forward.
2.If left sensor comes on black line then robot
turn left side.
3. If right sensor sense black line then robot turn right side until
both sensor comes at white surface. When white surface comes
robot starts moving on forward again.
4. If both sensors comes on black line, robot stops.
Program Explanation
If a sensor comes on black surface then it gives
output 0 and if it comes on white surface then it
gives output 1.There are 4 cases:
Input Output Movem
ent
Left Right Left Motor Right Motor
Of
Sensor Sensor
Robot

LS RS LM1 LM2 RM1 RM2

0 0 0 0 0 0 Stop
0 1 1 0 0 0 Turn
Right
1 0 0 0 1 0 Turn
Left
1 1 1 0 1 0 Forwar
d
CODE
#include<avr/io.h>
#define F_CPU 16000000UL
#include<util/delay.h>
void main()
{ DDRB=0xFF;
DDRA=0x00;
while(1)
{ if(PINA=0x02)
{ PORTB=0x01;
_delay_ms(1000);
}
else if(PINA=0x04)
{ PORTB=0x04;
}
else if(PINA=0x06)
{ PORTB=0x05;
}
else
{ PORTB=0x00;
_delay_ms(1000);
}
}
}
Applications of line follower robot
• Industrial Applications: These robots can be used as
automated equipment carriers in industries replacing
traditional conveyer belts.
• Automobile applications: These robots can also be
used as automatic cars running on roads with
embedded magnets.
• Domestic applications: These can also be used at
homes for domestic purposes like floor cleaning etc.
• Guidance applications: These can be used in public
places like shopping malls, museums etc. to provide
path guidance.

You might also like