You are on page 1of 4


What is a line follower?

Line follower is a machine that can follow a path. The path can be visible like a
black line on a white surface (or vice-versa) or it can be invisible like a magnetic
Why build a line follower?
Sensing a line and maneuvering the robot to stay on course, while constantly
correcting wrong moves using feedback mechanism forms a simple yet effective
closed loop system.
As a programmer you get an opportunity to teach the robot how to follow the
line thus giving it a human-like property of responding to stimuli.
I designed my Robot, which use two motors control rear wheels and the single
front wheel is free. It has 4-infrared sensors on the bottom for detect black
tracking tape, when the sensors detected black color, output of comparator,
LM324 is low logic and the other the output is high.
Microcontroller AT89C2051 and H-Bridge driver L293D were used to control
direction and speed of motor.
A simple DC powered Dual power supply (5v and 10V) usually uses two battery
i.e. 6v -4.5A which is serially connected to get the output of 12v DC.
The given 12v output is decreased to 10v by connecting three 4A Diodes in
series method. The drop across one diode is 0.7v because it is a silicon (Si)
diode. So, the drop across the three diode is 2.1v. According to this, we get the
required the voltage of approx. 10v. This voltage is given to the 8th pin of the
comparator through the small capacitance of 330pf to grounded the unwanted
Next, this voltage is again decreased and regulated by the regulator IC L7805.
The input of 10v is given to the 1st pin of the 7805 and 2nd pin is grounded and
the 3rd pin is used to get the output of the regulated 5v (approx.) the unwanted
signals are grounded by the small capacitance value.
Finally, the required voltage is given to all sections by the regulated power

It consists of the four pairs of the sensors which sense the black path. The
sensors are arranged by the several distances. The distance between the
Transmitter and receiver is 2.5mm. The distance between the sensor sets and
center point is 2cm. And the distance between the sensor array and black path is
It is employed by the quad comparator LM324. The comparator compares the
sensor output with the reference voltage which is varied by the manually through
the 20K potential resistor controller. According to the output of the sensor
section, It gives the output to the controller.
Compatible with MCS-51Products
2K Bytes of Reprogrammable Flash Memory
Endurance: 10,000 Write/Erase Cycles
2.7V to 6V Operating Range
Fully Static Operation: 0 Hz to 24 MHz
Two-level Program Memory Lock
128 x 8-bit Internal RAM
15 Programmable I/O Lines
Two 16-bit Timer/Counters
Six Interrupt Sources
Programmable Serial UART Channel
Direct LED Drive Outputs
On-chip Analog Comparator
Low-power Idle and Power-down Modes
Green (Pb/Halide-free) Packaging Option
The AT89C2051 is a low-voltage, high-performance CMOS 8-bit microcomputer
with 2K bytes of Flash programmable and erasable read-only memory (PEROM).
The device is manufactured using Atmels high-density nonvolatile memory
technology and is compatible with the industry-standard MCS-51 instruction set.
By combining a versatile 8-bit CPU with Flash on a monolithic chip, the Atmel

AT89C2051 is a power-full microcomputer which provides a highly-flexible and

cost-effective solution to many embedded control applications.
The AT89C2051 provides the following standard features: 2K bytes of Flash, 128
bytes of RAM, 15 I/O lines, two 16-bit timer/counters, a five vector two-level
interrupt architecture, a full duplex serial port, a precision analog comparator,
on-chip oscillator and clock circuitry. In addition, the AT89C2051 is designed with
static logic for opera-tion down to zero frequency and supports two software
selectable power saving modes. The Idle Mode stops the CPU while allowing the
RAM, timer/counters, serial port and interrupt system to continue functioning.
The power-down mode saves the RAM contents but freezes the oscillator
disabling all other chip functions until the next hardware reset.


Let us see how the line follower robot works. First see the block diagrams.

Line Follower Robot


An array of sensor is used to detect the line. Based on the status of sensors,
special circuit or controller decides the position of line and also the required
direction of motion required to follow the line. Motor driver circuit is used to
ON/OFF the LEFT/RIGHT motors of the robot to provide desired motion.


Sensors are required to detect position of the line to be followed with respect to
the robots position. Most widely used sensors for the line follower robot are
PHOTOSENSERS. They are based on the basic observation that the white
surface reflects the light and the black surface absorbs it.

Sensor circuit contains emitter, detector and comparator assembly.


IR or VISIBLE light is emitted from the emitter (IR light is mostly preferred to
avoid interference from the visible light which is generally around the robot.
However IR light is also present in atmosphere but its intensity is much less than
that of visible light, so IR light can give much reliable output. For better accuracy
of the sensors, they must be covered properly for the isolation from the

This emitted light strikes the surface and gets reflected back. If the surface is
white, more intensity of light gets reflected and for black surface very less
intensity of light is reflected.

Photo detector is used to detect the intensity of light reflected. The

corresponding analog voltage is induced based on the intensity of reflected light.
This voltage is compared with the fixed reference voltage in comparator circuit
and hence it is converted into logic 0 or logic 1 which can be used by the
The comparator circuit may be designed in two ways.

Black area=1
White area=0

Black area=0
White area=1