Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 12

PROJECT REPORT

LINE FOLLOWING ROBOT

SUBMITTED BY:
Sohail Ahmed
16-EE-13
Shahzaib Malik
16-EE-31
Yasir Haidri
16-EE-04

DEPARTMENT OF ELECTRICAL
ENGINEERING
Table OF Contents:

1. Abstract
2. Introduction
3. Components
4. Circuit Diagram
5. Working
6. Results
Abstract:
A Line Follower Robot, as the name suggests, is an automated guided vehicle,
which follow a visual line embedded on the floor or ceiling. Usually, the visual
line is the path in which the line follower robot goes and it will be a black line on
a white surface but the other way (white line on a black surface) is also possible.
Certain advanced Line Follower Robots use invisible magnetic field as their
paths. Large line follower robots are usually used in industries for assisting the
automated production process. They are also used in military applications, human
assistance purpose, delivery services etc. Line follower Robot is one of the first
robots that beginners and students would get their first robotic experience with.
In this project, we have designed a simple Line Follower Robot.
Introduction:
It is a machine that follows a line, either a black line on white surface or vise-
versa. For Beginners it is usually their first robot to play with. In this project, we
made the line follower robot which move on the line with a type of feedback
mechanism. It’s the most basic example of adding small intelligence to a robot,
but it’s actually the designer’s intelligence. Basically there are two types of line
follower robots: one is black line follower which follows black line and second
is white line follower which follows white line. Line follower actually senses the
line and run over it.

Basically there are three main things in our Robot:

Input: Read the white/black on the floor and condition the input signal(s)
for transmission into the microcontroller in a way that questions can be
asked and decisions made.

Process: Based on the inputs received, microcontroller decide what change


(if any) needs to be made to the robots speed and direction. Convert the
results of any decisions made into something that can be sent to motor speed
control and/or steering.

Output: Send the old or the newly adjusted control signals to speed and/or
steering devices.
Components:
Following are the required components in our project:

 Three Wheel Robotics Kit


 Microcontroller
 IR Sensors
 Motor Driving Module (L298N)
 Power Supply

Now explaining components:

Microcontroller:
We are using in this project the AVR ATMEGA16 Microcontroller.
ATmega16 is an 8-bit high performance microcontroller of Atmel’s
Mega AVR family with low power consumption. Atmega16 is based on
enhanced RISC (Reduced Instruction Set Computing, Know more about RISC
and CISC Architecture) architecture with 131 powerful instructions. Most of the
instructions execute in one machine cycle. Atmega16 can work on a maximum
frequency of 16MHz.ATmega16 has 16 KB programmable flash memory, static
RAM of 1 KB and EEPROM of 512 Bytes. The endurance cycle of flash memory
and EEPROM is 10,000 and 100,000, respectively. ATmega16 is a 40 pin
microcontroller. There are 32 I/O (input/output) lines which are divided into four
8-bit ports designated as PORTA, PORTB, PORTC and PORTD.
ATmega16 has various in-built peripherals like USART, ADC, Analog
Comparator, SPI, JTAG etc. Each I/O pin has an alternative task related to in-
built peripherals. The following table shows the pin description of ATmega16.

Pin configuration of ATmega 16 is given:


Motor Driving Module:
This dual bidirectional motor driver is based on the very popular L298 Dual H-
Bridge Motor Driver IC. This module will allow you to easily and independently
control two motors of up to 2A each in both directions.
It is ideal for robotic applications and well suited for connection to a
microcontroller requiring just a couple of control lines per motor.

An H-Bridge is a circuit that can drive a current in either polarity and be


controlled by *Pulse Width Modulation (PWM).
* Pulse Width Modulation is a means in controlling the duration of an electronic
pulse. In motors try to imagine the brush as a water wheel and electrons as a the
flowing droplets of water. The voltage would be the water flowing over the wheel
at a constant rate, the more water flowing the higher the voltage. Motors are rated
at certain voltages and can be damaged if the voltage is applied to heavily or if it
is dropped quickly to slow the motor down. Thus PWM. Take the water wheel
analogy and think of the water hitting it in pulses but at a constant flow. The
longer the pulses the faster the wheel will turn, the shorter the pulses, the slower
the water wheel will turn. Motors will last much longer and be more reliable if
controlled through PWM.
Pins:

 Out 1: Motor A lead out


 Out 2: Motor A lead out
 Out 3: Motor B lead out
 Out 4: Mo (Can actually be from 5v-35v, just marked as 12v)
 GND: Ground
 5v: 5v input (unnecessary if your power source is 7v-35v, if the power
source is 7v-35v then it can act as a 5v out)
 EnA: Enables PWM signal for Motor A (Please see the "Arduino Sketch
Considerations" section)
 In1: Enable Motor A
 In2: Enable Motor A
 In3: Enable Motor B
 In4: Enable Motor B
 EnB: Enables PWM signal for Motor B (Please see the "Arduino Sketch
Considerations" section)
IR sensors:
IR Sensors work by using a specific light sensor to detect a select light
wavelength in the Infra-Red (IR) spectrum. By using an LED which produces
light at the same wavelength as what the sensor is looking for, you can look at
the intensity of the received light. When an object is close to the sensor, the
light from the LED bounces off the object and into the light sensor. This results
in a large jump in the intensity, which we already know can be detected using a
threshold.

Depiction of the operation


of an IR Sensor

Detecting Brightness
Since the sensor works by looking for reflected light, it is possible to have a
sensor that can return the value of the reflected light. This type of sensor can
then be used to measure how "bright" the object is. This is useful for tasks like
line tracking.
Depiction of the operation of an
IR Sensor to measure brightness

We made IR sensors by using following circuit:


Circuit Diagram:
The circuit diagram is as follows:

Working:

The workings of a line follower robot are pretty straight forward. These robots
have the capability to detect a black/dark line on a lighter surface depending on
the contrast. They estimate whether the line underneath them is shifting towards
their left/right as they move over them. Based on that estimation, they give
respective signals to the motors to turn left/right so as to maintain a steady center
with respect to the line.

These robots usually use an array of IR (Infrared) sensors in order to calculate the
reflectance of the surface beneath them. The basic criteria being that the black
line will have a lesser reflectance value (black absorbs light) than the lighter
surface around it. This low value of reflectance is the parameter used to detect the
position of the line by the robot. The higher value of reflectance will be the
surface around the line. So in this linear array of IR sensors, if the
leftmost/rightmost IR sensor presents the low value for reflectance, then the black
line is towards the left/right of the robot correspondingly. The controller then
compensates for this by signaling the motor to go in the opposite direction of the
line.
The IR sensor array consists of individual IR LEDs and IR photodiodes. The IR
light emitted by the LED strikes the surface and is reflected back to the IR
photodiode. The photodiode then gives an output voltage proportional to the
reflectance of the surface (high value for light surface and low for black/dark
surface).

IR Sensor Working
Results:
By doing these above steps and procedures we somehow made the line following
robot.

You might also like