Project Report: Digital Logic Designs

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

Department of Mechatromnics Engineering

May 16

Project Report
2018
Digital logic Designs
Submitted To:

Ma’am Zareena Kousar

Submitted By:

M. Osama Javed 160493

M. Siddique Farooq 160496

Abdullah Qamar 160957


Department of Mechatromnics Engineering

Line Following Robot

Objectives:

Main objectives of the project are:

 To design a Line Following Robot using Digital Logic.


 Capable of following black line path with white arena.
 Should be fast as well as accurate.

Abstract:

Line Follower robot is a machine that follows a line, either a black line on white
surface or vise-versa. Nowadays, every robot is done with the help of the microcontroller,
and hence the circuit is too big and tough to understand and makes it costly. For these
reasons, in this project we have developed an intelligent Line follower robot with a simple
concept with simple circuitry. 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. Here we have designed the first one. Line follower actually senses the line and run
over it.

Introduction:

A line follower robot is basically a robot designed to follow a line or a path already
predetermined by the user. This line or path may be as simple as a physical black line on the
floor or as compared or as complex path marking schemes e.g. embedded lines, magnetic
makers and laser guide makers, in order to detect these specific makers or lines, various
sensing schemes can be employed.

The line following robot is an intelligent system as a kind of provisional one, which has robot
positions corrective feedbacks, toward the black or white line. In general robots incomes are
voltages of the circuits and sensors voltages variations. The robot processor is an IC L293D
Which read the incomes signal compare them to the predetermined amounts and ordering to
the motors by the driver. And the robot outcomes are to move and change the robot's position
toward the line in the best way. The traits of this robot comparing to the last ones in this field
includes: increasing man oeuvre power with sudden way point changes, excellent and
Department of Mechatromnics Engineering

accurate robot renovation and low price for production. This robot can be used for carrying
stuff of information's between two special points like to rooms in an office or in a hospital.

WORKING PRINCIPLE:

The line following robot uses sensors to sense the path and give signals to our logic
gates and then through our combinational logic its outputs are given to motor driver i.e.
L293D and then it drives the motor either in forward direction or reverse direction depending
upon signals given to it. Block diagram is shown in fig 1.

Fig 1.1: Flow diagram

STRAIGHT MOVEMENT:

When both the sensors are on (1) i.e. on white, both motors rotate in clockwise
direction, thus the wheels also rotate in clockwise direction, causing the robot to move
straight unless a black line comes in its path.

Fig 1.2: Straight movement


Department of Mechatromnics Engineering

RIGHT MOVEMENT:

When right sensor is off (0) i.e. on black and the left sensor is on (1) i.e. on white, the
right motor rotates in clockwise direction, thus causing the left wheel to rotate in clockwise
direction and the right motor rotates in anti-clockwise direction, thus causing the right wheel
to also rotate in anti-clockwise direction and the robot moves to the right.

Fig:1.3: Right Movement

LEFT MOVEMENT:

When left sensor is off (0) i.e. on black and the right sensor is on (1) i.e. on white, the
left motor rotates in clockwise direction, thus causing the left wheel to also rotate in
clockwise direction and the right motor rotates in anti-clockwise direction, thus causing the
right wheel to also rotate in anti-clockwise direction and thus the robot moves to the left.

Fig 1.4: Left movement


Department of Mechatromnics Engineering

Stoping Robot:

If both sensors comes on black line i.e. become off (0) both motors stops hence
robot stops.

Fig 1.5: Stoping Robot

Hardware Explanation:

Hardware used:

1. IR sensors (2)
2. H-bridge (1)
3. Combinational logic (1)
4. Base (1)
5. Tyres (2)
6. Motors (2)
Department of Mechatromnics Engineering

Three Wheel Base:


This robotic chassis kit contains of an acrylic base with two gear motors, two
compatible wheels, a ball caster, and other accessories.

 Package contain
 2 x Rubber wires
 2 x Deceleration motors 16
 2 x Aluminum fasteners
 1 x Nylon all-direction wheel
 1 x Chassis
 1 x Battery box (4 x AA batteries, not included)

Fig 1.7: Base package

DC motor specification:

 Rated Voltage: 3-6V DC.


 Unloaded speed: 120 RPM.
 Load current: 190 mA (250 mA MAX).
 Maximum torque: 800 g. cm min.
 Chassis Specification:
 Dimensions: 7.72 in x 4.13 in x 0.12 in (19.6 cm x 10.5 cm x 0.3 cm)
 Weight: 14.29 Oz (405 g)

Wheel specification:

 Width:30mm
 Diameter:65mm

IR Sensor:
Two sensors are used in our line follower one is placed left side and one is placed at
left side such that the black line of one inch is exactly between them.
Department of Mechatromnics Engineering

Working principle:

 Working

In this present Line follower we use IR sensor to sense the line, Sensor array consist
of two IR sensor pairs. IR sensor pair consist of two diodes that one of them sends IR ray and
another one must receive it. IR LED emits infrared radiation. This radiation illuminates the
surface in front of receiver LED. Surface reflects the infrared light, Depending on reflectivity
of the surface, amount of light reflected varies. This reflected light is made incident on
reverse biased IR sensor. When photons are incident on reverse biased junction of this diode,
electron-hole pairs are generated, which results in reverse leakage current. Amount of
electron-hole pairs generated depends on intensity of incident IR radiation. More intense
radiation results in more reverse leakage current. This current can be passed through a
resistor so as to get proportional voltage. Thus as intensity of incident rays varies, voltage
across resistor will vary accordingly. If the receiver receives the reflection ray, it means that
the robot is on white and if it cannot receive it, so the robot is on black.

F 1.8: Behavior of Sensor at white surface

F 1.9: Behavior of Sensor at Black surface


Department of Mechatromnics Engineering

Components Required:

 IR transmitter
 IR receiver
 Resistor 10k, 100, 330
 Variable Resistor 10k
 LM358 IC
 LED

LM 358 IC or Comparator:

Comparator is devices which compares two output voltages and give output high or
low. In circuit Diagram, it is normally represented by a triangle having inverting input,
None inverting input, Vcc, Ground, Output.

Properties of the comparator:

1. If V+>V-, Then Vo=Vcc.

2. If V+<V-. Then Vo=0.

Symbolic representation

Fig 1.10: Symbolic representation of LM 358

Use of comparator in IR sensor:

As above we see that two inputs are required for comparator. One input is from photo-
receiver (like photo-diode), other is generated by us using potentiometer. The second voltage
is also called as reference voltage for that sensor.

Setting of reference voltage (Vref):


Department of Mechatromnics Engineering

We can vary reference voltage by using potentiometer, such that it can vary from 0V
to Vcc. We set reference voltage as mean value of the sensor inputs measured with and
without light. Let’s connect Inverting Input of Comparator to photo- receiver, Non-Inverting
Input to potentiometer and output goes to micro controller.

LEDs:

A light-emitting diode (LED) is a two-lead semiconductor light source. It is a p–n


junction diode, which emits light when activated. When a suitable voltage is applied to the
leads, electrons are able to recombine with electron holes within the device, releasing energy
in the form of photons. This effect is called electroluminescence, and the color of the light
(corresponding to the energy of the photon) is determined by the energy band gap of the
semiconductor.

Fig 1.11: LED

Features:

 High luminous intensity output.


 Low power consumption.
 High efficiency.
 Versatile mounting on PCB or panel.
 I.C. Compatible/low current requirement.
 Reliable and rugged.

Applications:

 Status indicator.
 Backlighting front panels.
 Light pipe sources.
 Lighted switches.

Specification:
Department of Mechatromnics Engineering

 Diameter:5mm
 Forward Voltage :2.0V
 Forward Current:20mA
Department of Mechatromnics Engineering

Schematic diagram:

Fig 1.12: Schematic diagram of IR sensors

PCB Layout:

Fig 1.13: PCB layout of IR sensors

H-bridge:

H-bridge is by using L293d IC. This generates desired output for corresponding
inputs for that we use logic circuit. We cannot connect a motor directly because
microcontroller cannot give sufficient current to drive the DC motors. Motor driver is a
current enhancing device; it can also be act as Switching Device. Thus we insert motor driver
in between motor and microcontroller. Motor driver take the input signals from
microcontroller and generate corresponding output for motor.
Department of Mechatromnics Engineering

Pin configuration of L293d:

Fig 1.14: Pin configuration of L293d

Schematic Diagram:

Fig 1.15: Schematic Diagram of H-bridge


Department of Mechatromnics Engineering

PCB Layout:

Fig 1.16: PCB layout of H-bridge

Combinational Logic:

Two sensors are used in our logic and they are on at white i.e. they give 1 at white and
off at black i.e. they give 0 at black. Truth table for logic is as under

Left Right Left Motor Right Motor


sensors sensors D1 D2 D3 D4
0 0 0 0 0 0
0 1 0 1 1 0
1 0 1 0 0 1
1 1 1 0 1 0

Table 1.1: Truth table of combinational circuit


Department of Mechatromnics Engineering

Equations:
D1 = LR’+LR

= L(R’+R)

=L

D2 = L’R

D3 = L’R+LR

= R(L’+L)

=R

D4 = LR’

Schematic Diagram:

Fig1.17: Schematic diagram of logic and H-bridge


Department of Mechatromnics Engineering

PCB layout:

Fig 1.18:PCB layout of Combinational circuit and H-bridge

Application:

1. Line followers can be used to deliver mail within an office building


2. It can be used to deliver medications in a hospital.
3. The technology has been suggested for running buses and other mass transit systems
,and may end up as part of autonomous cars navigating the freeway.
4. The line follower can be used in guidance system for industrial robots moving on
shop floor. An example might be in a warehouse where the robots follow 'tracks' to
and from the shelves they stock and retrieve from.
A line follower robot can be used in military as spy kids or in many other
applications.

Further Improvement:

The line follower robot is made by op-amps and transistors, where the motor is
directly on or off using the signal of the comparator. Now the techniques can be replaced by
PWM using more sensor, microcontroller and H-Bridge motor controller IC i.e. L293D. Also
instead of LDR it can be used phototransistor whose response is much better than LDR.
There are 2 line sensors used here so the fluctuation of line is a fact. Using more than 2
Department of Mechatromnics Engineering

sensor likely 5 sensor array may be used to detect the black line quickly. Also using
microcontroller it can draw the reverse direction as well as obstacle avoiding turning the
motor 180º. The block diagram may be represented as follows. Also using color sensors the
robot can sense different colors. It can be used in the robotic game competition and other
fields. So the development features in brief:

 Use of Microcontroller
 Use of color sensor.
Project budget

Component Price Quantity Total


(Rs.)
Base including Rs. 750 1 Rs.750
motors and tyres

Resistors Rs.5 10 Rs.50

AND Gate/NOT Rs.30 2 Rs.60


Gate IC
Motor Driver IC Rs.200 1 Rs.200

T-blocks and IC Rs.10 7+3=10 Rs.100


holders
IR LED, Rs. 10 6 Rs.60
PHOTODIODE,
LED
PCB board Rs.300 1 Rs.300

LM358 IC Rs.50 2 Rs.100

Battery Rs.60 1 Rs.60

Total 1680
Department of Mechatromnics Engineering

Conclusion:

In this project, we have designed a line following robot. This robot does not need any
remote controller or any controller like Bluetooth, Wi-Fi, GSM, driver etc., it will run
automatically with following a line. We have not used any microcontroller. This robot is very
low cost but very effective for various purposes. Our project can be used in various sectors
like in medicine delivering in hospitals, delivering products in any places, spying, and
surveillance and so on. In future we can add several sensors, cameras etc to get more.

You might also like