You are on page 1of 27

A minor project on LINE

FOLLOWING ROBOT

OVER VIEW
Introduction
Basic principle
Components used
1. Chassis
2. DC motors
3. Microcontroller(ATmega16-pin diagram, associated registers
etc.)
4.
I.R Sensors
5. Motor driver IC
. Working
. Algorithm
. Application
. Limitations
. References

INTRODUCTION
Line follower is a robot which follows
either black line in white area or white
line in black area.
Robot must be able to detect a line and keep
following it.

BASIC PRINCIPLE
SENSOR ARRAY
FOR LINE
DETECTION

DECISION MAKING
CIRCUIT TO DECIDE
DIRECTION OF
MOTION

MOTORS TO
PROVIDE
CONTROLLED
MOTION

MOTOR DRIVER
CIRCUIT

COMPONENTS USED IN
CIRCUIT
Chassis
Motors
ATmega16 microcontroller
Motor driver IC (L293D)
Resistors-R1 to R4.
IR transmitters IR TX1,IR TX2
IR Receivers -IR RX1,IR RX2

CHASSIS
PROVIDES

A BASE
TO THE ROBOT

WHEELS

,SENSORS AND
CONTROLLER
BOARD ARE
ATTACHED TO IT

DC MOTOR
A DC Motor is an electric motor that runs on
direct current and gives rotating motion as
an output.
In robotic application DC motors
are preferred over AC motors
as the motor and circuit
require same kind of supply
i.e. DC supply
DC motor is a non polar device i.e. polarity
of
DC motor is not fixed.

DC MOTOR
When you apply a DC supply it will rotate in
one direction and its direction can be changed
by changing the polarity of DC supply.
We do not connect DC motor with
microcontroller directly because the amount of
current output from microcontroller pin is not
sufficient enough to generate a magnetic field
which can rotate the shaft
Thus, we need to amplify the current coming
out of the microcontroller pin. Here we use
Motor driver IC L293D

MICROCONTROLLER

A microcontroller is a small computer on a single


integrated circuit containing a processor core,
memory, and programmable input/output peripherals.

Microcontrollers are used in automatically controlled


products
and devices, such as
remote controls,
office machines,
power tool, toys and
other embedded
systems.

DIFFERENCE BETWEEN
MICROCONTROLLER &
MICROPROCESSOR
MICROCONTROLLER
It has I/O ports,
memory timers etc all
integrated on chip.

It is a full fledged pc

ROM ,RAM,FLASH
CPU,ALU ON chip
peripheral

MICROPROCESSOR
I/O ports, memory
timers etc are to be
connected externally.

Separated units

ATMEGA16
MICROCONTROLLER

ATmega16 is an 8-bit high performance


microcontroller of Atmel's Mega AVR family
with low power consumption.

ATmega16 has 16 KB programmable


flash memory, static RAM of 1 KB
and EEPROM of 512 Bytes.

It has 4 8bit ports which they label as


PORTA,PORTB,PORTC,PORTD

PIN DIAGRAM
ATMEGA16 MICROCONTROLLER

ASSOCIATED I/O REGISTERS

Each of the AVR Digital I/O ports is associated with


three I/O register- A Data Direction Register(DDRx),
A Pin Register(PINx) and a Port Register(PORTx).

DDRx- Port X Data Direction Register


DDRX0 DDRX1 DDRX2 DDRX3 DDRX4 DDRX5 DDRX6 DDRX7

DDRx is an 8bit register which stores the configuration


information of the pinot Portx.
Writing 1 in the pin location in the DDRx makes the
physical pin of that port port of an output pin and
writing 0 makes the pin an input pin

PINx- Port X Input Pin Register


PINx0

PORTx
0

PINx1

PINx2

PINx3

PINx4

PINx5

PINx6

PINx7

Pinx is an 8bit register that stores the logic value, the current state
of the physical pins on PortX.
So to read the value of the pins of the Portx, you read the values
that are in its PIN register.

PORTx
1

PORTx- Port X Data Register


PORTx
2

PORTx
3

PORTx
4

PORTx
5

PORTx
6

PORTx
7

Portx is an 8 bit register which stores the logic values that currently
being outputted on the physical pins of Portx if the pins are
configured as output pins.
So to write the values to a port you write the values to the Port
register of that port.

IR SENSORS
An infrared sensor is an electronic instrument
which is used to sense certain characteristics of its
surroundings by either emitting and/or detecting
infrared radiation

It has an invisible wavelength from 700nm to


1nm.
It consist of two diodes in which one is IR
It works onand
the other
principle
transmitter
one is receiver.
of reflection.
It means if any obstacle
comes across the sensor
then IR rays will get
reflected back and will be
received by the receiver
The amount of IR
received by the receiver
will generate
corresponding current.

IR SENSORS IN L.F.R
IR sensor circuit consists of mainly IR
transmitter and IR receiver
IR receiver is connected in reverse bias
and a 15K resistor is placed between VCC
and the receiver.
IR transmitter is similar to an LED. Its
operating voltage is around 1.4V. So to
protect it, a 10k resistor is placed before IR
and is connected in forward biased
Output is taken between resistor and IR
receiver.

MOTOR DRIVER IC (L293D)

MOTOR DRIVER IC (L293D)

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.

In its common mode of operation, two DC


motors can be driven simultaneously, both
in forward and reverse direction

The DC motors of the robot are connected to the


controller using a motor driver IC. As the output
of the controller is maximum 5v, it cannot drive
the motors. So, to amplify this voltage motor
driver, IC is used. L293D can amplify up to 36v

CIRCIT DIAGRAM FOR LINE


FOLLOWING ROBOT

WORKING

The line follower robot needs mechanical


arrangement of the chassis.
The two IR sensors are mounted on the
robot facing towards Earth.
When robot is placed on the fixed path, it
follows the path by detecting the line.
The robot direction of motion depends on
the two sensors outputs. When the two
sensors are on the line of path, robot
moves forward.
If the left sensor moves away from the
line, robot moves towards right.
Similarly, if right sensor moves away from

ALGORITHM

STEP1: start
STEP2: configure sensor port as input port
STEP3: configure motor ports as output ports
STEP4: check while(1) is true or false, if false move
to11
STEP5:make condition if both motors are on white motors
go forward
STEP6:make condition if left sensor is on black motor take
left turn
STEP7:make condition if right sensor is on black motors
take right turn
STEP8: else motor should be stop
STEP9: give a sufficient delay
STEP10: go to step4
STEP11: end

Line Following Robotic


Vehicle Circuit Working
Initially draw the path on the chart with
black color.
Place the robot on the chart.
Now power the circuit.
Robot moves in the specified path.
When it moves out of path, sensors check it
and automatically adjust the robot.

APPLICATIONS OF LINE
FOLLOWING ROBOT

This can be used in driver less car system with


some added features like obstacle detection.

This can also be used in industrial and defense


applications.
These robots can be used as automated
equipment carriers in industries replacing
traditional conveyer belts.
These can be used in public places like shopping
malls, museums etc to provide path guidance.

Limitations of Line Follower


Robot

Line follower robot requires 2-3 inches broad line.

It may not move properly if the black line drawn is of


low intensity.

The IR sensors may sometimes absorb IR rays from


surroundings also. As a result, robots may move in
improper way.

THANK YOU

You might also like