You are on page 1of 70

SMART HELMET

A Project Report Submitted in the Partial Fulfillment of the


Requirements for the Award of the Degree of

BACHELOR OF TECHNOLOGY
in
ELECTRONICS & COMMUNICATION ENGINEERING

Submitted
by

N.Tejaswini
Roll No.-13K81A0442
P.Akhil
Roll No.-13K81A0444
D.Akarsh Reddy
Roll No.-13K81A0416

Under the Supervision of

Mr.K.Yadaiah
Associate Professor, ECE

Department of Electronics and Communication Engineering


St.MARTINS ENGINEERING COLLEGE
Dhulapally, Secunderabad, R.R Dist, Telangana, India-500041

April, 2017

0
St.MARTINS ENGINEERING COLLEGE
Department of Electronics and Communication Engineering

CERTIFICATE

This is to certify that the project work embodies in this dissertation entitled
Smart Helmet being submitted by N.Tejaswini-13K81A0442, P.Akhil-
13K81A0444, D.Akarsh Reddy-13K81A0416 for partial fulfillment of the
requirement for the award of Bachelor of Technology in Electronics and
Communications Engineering discipline to St. Martins Engineering College
during the academic year 2013-17 is a record of bonafide piece of work,
undertaken by her the supervision of the undersigned.

Supervised by Head of the Department

Mr.K.YADAIAH,M.Tech(Ph.D) Mr.K.YADAIAH, M.Tech(Ph.D)


Department of E.C.E ,Associate Professor Department of E.C.E.

ACKNOWLEDGEMENT

1
We are happy to express my deep sense of gratitude to the principal of the college Dr. S P VENU
MADHAVA RAO, B.E, M.Tech, Ph.D, Professor for having provided us with adequate facilities
to pursue our project.
We would like to thank Mr. K.YADAIAH, Assoc.Professor and Head of the Department
of Electronics and Communication Engineering, St. Martins Engineering College, for having
provided the freedom to use all the facilities available in the department, especially the
laboratories and the library.
We are very grateful to my guide Mr.K.YADAIAH, Associate Professor in the
Department of Electronics and Communication Engineering, St. Martins Engineering College,
for his extensive patience and guidance throughout my project work.
We sincerely thank all the teaching and non-teaching staff of the Department of
Electronics and Communication for their timely suggestions, healthy criticism and motivation
during the course of this work.
We would also like to thank my classmates for always being there whenever we needed
help or moral support. With great respect and obedience, We thank our parents who were the
backbone behind our deeds.
Finally, we express my immense gratitude with pleasure to the other individuals
who have either directly or indirectly contributed to my need at right time for the development
and success of this work.

N.Tejaswini P.Akhil D.Akarsh Reddy


13K81A0442 13K81A0444 13K81A0416

St.MARTINS ENGINEERING COLLEGE

2
Department of Electronics and Communication Engineering

DECLARATION

We N.Tejaswini, P.Akhil, D.Akarsh Reddy, are the students of Bachelor


of Technology in Department of Electronics and Communications
Engineering, session: 2013 - 17, St. Martins engineering College, hereby
declare that the work presented in this Project Work entitled Smart Helmet is the
outcome of our own bonafide work and is correct to the best of our knowledge and
this work has been undertaken taking care of Engineering Ethics. The result
embodied in this project report has not been submitted in any university for award
of any degree

N.Tejaswini P.Akhil D.Akarsh Reddy


(13K81A0442) (13K81A0444) (13K81A0416)

Date:

ABSTRACT OF PROJECT WORK

3
An accident is a specific, unexpected, unusual and unintended external action which
occurs in a particular time and place, with no apparent and deliberate cause but with marked
effects. Carelessness of the driver is the major factor of such accidents. The traffic authorities
give a lot of instructions to the vehicle operators. But many of them do not obey the rules.
Nowadays most of the countries are forcing the motor riders to wear the helmet and not to use
the vehicles when the person is in drunken condition. But still the rules are being violated by the
users. In order to overcome this we introduces an intelligent system, Smart Helmet, which
automatically checks whether the person is wearing the helmet and has non- alcoholic breath
while driving. Here we have a transmitter at the helmet and the receiver at the bike. There is a
switch used to sure the wearing of helmet on the head. The ON condition of the switch ensures
the placing of the helmet in proper manner. An alcohol sensor is placed near to the mouth of the
driver in the helmet to detect the presence of alcohol.The engine should not ON if any of the two
conditions is violated.When the rider crashes and the helmet hits the ground, the sensors sense
and gives to controller board, the controller extract GPS data using GPS module that is intefaced
to it. When the data exceeds the minimum stress limit then GSM module automatically sends
message to ambulance or family members.

LIST OF CONTENTS
Topic Name PAGE NO

4
Certificate i
Abstract ii
List of figures v
List of tables vi

CHAPTER 1: INTRODUCTION
1.1 INTRODUCTION 1
1.2 MOTIVATION 1
1.3 OBJECTIVE 1
1.4 THESIS ORAGNISATION 2
1.5 APPLICATIONS 3
1.6 CONCLUSION 3
CHAPTER 2:DESCRIPTION OF PROJECT
2.1 INTRODUCTION 13
2.2 BLOCK DIAGRAM 13
2.3 INTRODUCTION TO ARDUINO 14
2.4 ATMEGA328P 18
2.5 FEATURES 19
2.6 REGULATED POWER SUPPLY 21
2.7 LCD 23

2.8 MOTOR DRIVE AND MOTOR 24


2.9 LED 28
2.10RFID MODULE 30
2.11NODEMCU 34
2.12BUZZER 36
2.13POTENTIOMETER 37
2.14RESET BUTTON 40

5
2.15SOFTWARE REQUIREMENTS
2.15.1 ARDUINO IDE 42
2.15.2 MICRO PYTHON 43
2.15.3 THINKSPEAK 44
2.15.4 MIT APP INVENTOR 44
2.16 CONCLUSION 45

CHAPTER 3: TOOL FLOW


3.1 INTRODUCTION 46
3.2 ARDUINO SOFTWARE 46
3.3 CONCLUSION 51

CHAPTER 4: SIMULATION RESULTS


4.1 INTRODUCTION 52
4.2 SIMULATION AND TEST RESULTS 52
4.3 CONCLUSION 55

CHAPTER 5: ADVANTAGES AND LIMITATIONS


5.1 INTRODUCTION 56
5.2 ADVANTAGES 56
5.3 LIMITATIONS 56
5.4 CONCLUSION 56

CHAPTER 6: FUTURE SCOPE AND CONCLUSION


6.1 INTRODUCTION 57
6.2 FUTURE SCOPE 57
6.3 CONCLUSION 57

6
REFERENCES 58
BIBLIOGRAPHY 59
APPENDIX 59

LIST OF FIGURES
Name of figure Page no
2.1 Block diagram of Advance Courier Bot 13
2.3.1 Structure of Arduino Board 14

7
2.3.2 Arduino Board 16
2.4.1 Pin configuration of Atmega 328 16
2.6.1 Regulated Power Supply 19
2.6.2 Circuit diagram of Regulated Power Supply with Led 22
connection
2.7.1 Liquid Crystal Display 23
2.8.1 Internal structure DC motor 26
2.8.2 DC Motor 27
2.8.3 Pin diagram of L293D 27
2.9.1 Inside a LED 28
2.9.2 Parts of LED 30
2.9.3 Electrical Symbol & Polarities of LED 30
2.10.1 RFID Tag 31
2.11.1 NodeMCU 32
2.11.2 Pin diagram of NodeMCU 36
2.12.1 Buzzer 36
2.13.1 Potentiometer connected to Arduino 37
2.13.2 Potentiometer Construction 38
2.13.3 Types of Potentiometers 39
2.13.4 Potentiometer Symbol 40
2.13.5 Circuit for potentiometer 40
2.14.1 Reset Button 41
2.15.1 Arduino IDE 42
2.15.2 MIT App Inventor 43
3.2.1 Screen after opening arduino IDE 45
3.2.2 Screen after writing the program 47
3.2.3 Screen for selection of board before compiling 48

8
3.2.4 Screen while compiling sketch 48
3.2.5 Screen while uploading program to the arduino board 49
4.2.1 Initial setup when power is on 54
4.2.2 Message when reset button is pressed 54
4.2.3 Message when door has opened 55
4.2.4 Message after inserting the courier 55
4.2.5 Message if the courier is accepted 55
4.2.6 Message if the courier is rejected 56
4.2.7 Message after the courier has been accepted 56
4.2.8 Message sent to the customer's mobile 56
4.2.9 Page where we can change the order id 57

LIST OF TABLES

Table Name Page No.

9
2.8.1 Pin Function of L293D20 29

Chapter 1

INTRODUCTION
1.1 Introduction:

An accident is a specific, unexpected, unusual and unintended external action which

10
occurs in a particular time and place, with no apparent and deliberate cause but with marked
effects. Carelessness of the driver is the major factor of such accidents.The traffic authorities
give a lot of instructions to the vehicle operators. But many of them do not obey the rules.
Nowadays most of the countries are forcing the motor riders to wear the helmet and not to
use the vehicles when the person is in drunken condition. But still the rules are being
violated by the users. In order to overcome this we introduces an intelligent system, Smart
Helmet, which automatically checks whether the person is wearing the helmet and has non-
alcoholic breath while driving. Here we have a transmitter at the helmet and the receiver at
the bike. There is a switch used to sure the wearing of helmet on the head. The ON condition
of the switch ensures the placing of the helmet in proper manner. An alcohol sensor is
placed near to the mouth of the driver in the helmet to detect the presence of alcohol. The
data to be transferred is coded with RF encoder and transmitted through radio frequency
transmitter. The receiver at the bike receives the data and decodes it through RF decoder.
The engine should not ON if any of the two conditions is violated. MCU controls the
function of relay and thus the ignition, it control the engine through a relay and a relay
interfacing circuit.
1.2 Motivation of the project:

The idea of developing this project comes from social responsibility towards the society.
Bike riding is a lot of fun, but accidents happen. People choose motor bikes over car as it is
much cheaper to run, easier to repair, easier to park and flexible in traffic. In India more than 37
million people are using two wheelers. Since usage is high accident percentage of two wheelers
are also high compared to four wheelers.
Motorcycles have high rate of fatal accidents than cars or trucks and buses. This project aims
for accident avoidance, safety and security of bike rider.
The main purpose of the project is to encourage wearing helmet. The system will ensure that
the motorbike will not start unless the rider is wearing a helmet and has not consumed alcohol.
Thus alcohol detection is also an important part in this project. Alcohol detections done by MQ3
sensor and helmet detections done by IR and PIR sensors.
The system will also alert the bike rider if any obstacle comes too close while riding the
bike. This is found to be useful at night or when the riders drowsy or tired. By this accidents can
be prevented.

11
Also GSM technology is used to inform the family members in case of an accident.
Accident detection is done using accelerometer. Wireless communication through Ask module is
done between the helmet and motorbike.

1.4 Objective of the Project:

Existing System: The existing project basically has a wireless telecommunication, and is
connected to a smart phone. This prototype uses sensors to detect a crash or accidents and the
communication hardware is used to automatically dial a predefined emergency contact. Thus
helping the victim to reach doctors as early as possible. The other existing system is to control
the speed in which the biker is going in. The helmet is fixed with all the components and sensors
that read the speed of the bike and accordingly instruct the rider to reduce or increase the speed
based on the obstacles ahead the bike. Along with the speed limit sensors the helmet also checks
if the rider is drunk and driving. If the rider is drunk then the ignition of the bike is avoided and
the hence not letting the rider to ride the bike.
Proposed System: Security in travel is primary concern for every one. This Project
describes a design of effective alarm system that can monitor an automotive / vehicle / car
condition in traveling. This project is designed to inform about an accident that is occurred to a
vehicle to the family members of the traveling persons. This project uses a piezo-electric sensor
which can detect the abrupt vibration when an accident is occurred. This sends a signal to
microcontroller.
This Project presents an automatic vehicle accident detection system using GPS and GSM
modems. The system can be interconnected with the car alarm system and alert the owner on his
mobile phone. This detection and messaging system is composed of a GPS receiver,
Microcontroller and a GSM Modem. GPS Receiver gets the location information from satellites
in the form of latitude and longitude.
1.3 Thesis Organization
The thesis explains the implementation of "Advance Courier Bot" using Atmega328p
microcontroller. The organization of the thesis is explained here with:

Chapter 1 Presents introduction to the overall thesis and the overview of the project. In the
project overview, a brief introduction of Advance Courier Bot system with automatic delivery

12
notification and its applications are discussed.

Chapter 2 Presents the hardware description. It deals with the block diagram of the project and
explains the purpose of each block. In the same chapter the explanation of microcontroller, RFID
module[13][14][15], Arduino, NodeMCU, power supplies, buzzers, DC motors and LCD[16][17]
,LED[18], Potentiometer[19] are considered.

Chapter 3 Presents the software description. It explains the implementation of the project using
Arduino software.

Chapter 4 Presents the results obtained i.e significant messages on LCD are shown

Chapter 4 Presents the advantages and limitations of the project.

Chapter 5 Presents the conclusion and future scope of the project.

Chapter 6 Presents the references of the project.

Chapter 7 Presents the appendix where program code is written.

1.4 Applications

1.The system will ensure that the motorbike will not start unless the rider is wearing a helmet
and has not consumed alcohol. Hence safety of person is ensured.

2.Also GSM technology is used to inform the family members in case of an accident. This
project could be highly developed with upcoming technologies to provide further more safety
and security to the vehicle systems.

1.5 Conclusion

In this chapter we have discussed about the main aspects of the project. In the next
chapter we are going to see a brief description of the project.

13
Chapter 2

DESCRIPTION OF THE PROJECT


2.1 Introduction:

In this chapter we will see the block diagram and hardware description of the project in
brief.

2.2Block Diagram

The following figure shows the independent modules which are considered in this
project.

IR Sensor Alcohol
Sensor
Encoder

Transmitter
ON HELMET

Wired communication

ON BIKE

Receiver

Decoder

GSM Micro Controller Abort


Switch

LCD Accelromet GPS


er

Fig 2.1: Block diagram of Smart Helmet

The main blocks of the project are

14
1. Arduino UNO board

2. Alcohol Sensor

3. IR Sensor

4. GSM Module

5. LCD Display

6. Accelerometer

7.DC motor

8.GPS

9.Regulated Power Supply (RPS)

2.3 Introduction to Arduino Board

The Arduino is a family of microcontroller boards to simplify electronic design,


prototyping and experimenting for artists, hackers, hobbyists, but also many professionals.
People use it as brains for their robots, to build new digital music instruments, or to build a
system that lets your house plants tweet you when theyre dry. Arduinos (we use the standard
Arduino Uno) are built around an ATmega microcontroller essentially a complete computer
with CPU, RAM, Flash memory, and input/output pins, all on a single chip. Unlike, say, a
Raspberry Pi, its designed to attach all kinds of sensors, LEDs, small motors and speakers,
servos, etc. directly to these pins, which can read in or output digital or analog voltages between
0 and 5 volts. The Arduino connects to your computer via USB, where you program it in a
simple language (C/C++, similar to Java) from inside the free Arduino IDE by uploading your
compiled code to the board. Once programmed, the Arduino can run with the USB link back to
your computer, or stand-alone without it no keyboard or screen needed, just power.

15
Fig 2.3.1 Structure of Arduino UNO Board

Looking at the board from the top down, this is an outline of what you will see

Fig 2.3.2 Arduino UNO Board

16
Starting clockwise from the top center:
Analog Reference pin (orange)

Digital Ground (light green)


Digital Pins 2-13 (green)
Digital Pins 0-1/Serial In/Out - TX/RX (dark green) - These pins cannot be used for
digital i/o (Digital Read and Digital Write) if you are also using serial communication
(e.g. Serial.begin).
Reset Button - S1 (dark blue)
In-circuit Serial Programmer (blue-green)
Analog In Pins 0-5 (light blue)
Power and Ground Pins (power: orange, grounds: light orange)
External Power Supply In (9-12VDC) - X1 (pink)
Toggles External Power and USB Power (place jumper on two pins closest to desired
supply) - SV1 (purple)

USB (used for uploading sketches to the board and for serial communication between the
board and the computer; can be used to power the board) (yellow)
2.3.1Digital Pins
In addition to the specific functions listed below, the digital pins on an Arduino board can
be used for general purpose input and output via the pin Mode(), Digital Read(), and Digital
Write() commands. Each pin has an internal pull-up resistor which can be turned on and off
using digital Write() (w/ a value of HIGH or LOW, respectively) when the pin is configured as
an input. The maximum current per pin is 40mA.
Serial: 0 (RX) and 1 (TX). Used to receive (RX) and transmit (TX) TTL serial data. On
the Arduino Diecimila, these pins are connected to the corresponding pins of the FTDI
USB-to-TTL Serial chip. On
the Arduino BT, they are connected to the corresponding pins of the WT11 Bluetooth
module. On the Arduino Mini and LilyPad Arduino, they are intended for use with an
external TTL serial module (e.g. the Mini-USB Adapter).
External Interrupts: 2 and 3. These pins can be configured to trigger an interrupt on a low
value, a rising or falling edge, or a change in value. See the attach Interrupt() function for

17
details.
PWM: 3, 5, 6, 9, 10, and 11 Provide 8-bit PWM output with the analog Write() function.
On boards with an ATmega8, PWM output is available only on pins 9, 10, and 11.
BT Reset: 7. (Arduino BT-only) Connected to the reset line of the bluetooth module.
SPI: 10 (SS), 11 (MOSI), 12 (MISO), 13 (SCK). These pins support SPI communication,
which, although provided by the underlying hardware, is not currently included in the
Arduino language.
LED: 13. On the Diecimila and LilyPad, there is a built-in LED connected to digital pin
13. When the pin is HIGH value, the LED is on, when the pin is LOW, it's off.
2.3.2 Analog Pins
In addition to the specific functions listed below, the analog input pins support 10-bit
analog-to-digital conversion (ADC) using the analog Read() function. Most of the analog inputs
can also be used as digital pins: analog input 0 as digital pin 14 through analog input 5 as digital
pin 19. Analog inputs 6 and 7 (present on the Mini and BT) cannot be used as digital pins.
I2C: 4 (SDA) and 5 (SCL). Support I 2C (TWI) communication using the Wire library
(documentation on the Wiring website).
2.3.3 Power Pins
VIN (sometimes labeled "9V"): The input voltage to the Arduino board when it's using an
external power source (as opposed to 5 volts from the USB connection or other regulated
power source). You can supply voltage through this pin, or, if supplying voltage via the
power jack, access it through this pin. Also note that the Lily Pad has no VIN pin and
accepts only a regulated input.
5V: The regulated power supply used to power the microcontroller and other components
on the board. This can come either from VIN via an on-board regulator, or be supplied by
USB or another regulated 5V supply.
3V3 (Diecimila-only) : A 3.3 volt supply generated by the on-board FTDI chip.
GND: Ground pins.
2.3.4 Other Pins
AREF: Reference voltage for the analog inputs. Used with analog Reference().
Reset: (Diecimila-only) Bring this line LOW to reset the microcontroller. Typically used
to add a reset button to shields which block the one on the board.

18
2.4 Atmega328
2.4.1 Pin diagram

Fig 2.4.1 Pin Configuration of Atmega328

Pin Description
VCC:
Digital supply voltage.
GND:

19
Ground.
Port A (PA7-PA0):
Port A serves as the analog inputs to the A/D Converter. Port A also serves as an 8-bit bi-
directional I/O port, if the A/D Converter is not used. Port pins can provide internal pull-up
resistors (selected for each bit). The Port A output buffers have symmetrical drive
characteristics with both high sink and source capability. When pins PA0 to PA7 are used as
inputs and are externally pulled low, they will source current if the internal pull-up resistors
are activated. The Port A pins are tri-stated when a reset condition becomes active, even if
the clock is not running.
Port B (PB7-PB0):
Port B is an 8-bit bi-directional I/O port with internal pull-up resistors (selected for each bit).
The Port B output buffers have symmetrical drive characteristics with both high sink and
source capability. As inputs, Port B pins that are externally pulled low will source current if
the pull-up resistors are activated. The Port B pins are tri-stated when a reset condition
becomes active, even if the clock is not running. Port B also serves the functions of various
special features of the ATmega32.
Port C (PC7-PC0):
Port C is an 8-bit bi-directional I/O port with internal pull-up resistors (selected for each
bit). The Port C output buffers have symmetrical drive characteristics with both high sink
and source capability. As inputs, Port C pins that are externally pulled low will source
current if the pull-up resistors are activated. The Port C pins are tri-stated when a reset
condition becomes active, even if the clock is not running. If the JTAG interface is enabled,
the pull-up resistors on pins PC5(TDI), PC3(TMS) and PC2(TCK) will be activated even if
a reset occurs. The TD0 pin is tri-stated unless TAP states that shift out data are entered. Port
C also serves the functions of the JTAG interface.
Port D (PD7-PD0):
Port D is an 8-bit bi-directional I/O port with internal pull-up resistors (selected for each
bit). The Port D output buffers have symmetrical drive characteristics with both high sink
and source capability. As inputs, Port D pins that are externally pulled low will source
current if the pull-up resistors are activated. The Port D pins are tri-stated when a reset
condition becomes active, even if the clock is not running. Port D also serves the functions

20
of various special features of the ATmega32.
Reset (Reset Input):
A low level on this pin for longer than the minimum pulse length will generate a reset, even
if the clock is not running. Shorter pulses are not guaranteed to generate a reset.
XTAL1:
Input to the inverting Oscillator amplifier and input to the internal clock operating circuit.
XTAL2:
Output from the inverting Oscillator amplifier.
AVCC:
AVCC is the supply voltage pin for Port A and the A/D Converter. It should be externally
connected to VCC, even if the ADC is not used. If the ADC is used, it should be connected
to VCC through a low-pass filter.
AREF:
AREF is the analog reference pin for the A/D Converter.
2.5 Features
1.8-5.5V operating range
Up to 20MHz
Part: ATMEGA328P-AU
32kB Flash program memory
1kB EEPROM
2kB Internal SRAM
2 8-bit Timer/Counters
16-bit Timer/Counter
RTC with separate oscillator
6 PWM Channels
8 Channel 10-bit ADC
Serial USART
Master/Slave SPI interface
2-wire (I2C) interface
Watchdog timer
Analog comparator
23 IO lines
Data retention: 20 years at 85C/ 100 years at 25C
Digital I/O Pins are 14 (out of which 6 provide PWM output)
Analog Input Pins are 6.
DC Current per I/O is 40 mA
DC Current for 3.3V Pin is 50mA

21
2.6 Regulated Power Supply

2.6.1 Introduction:
Power supply is a supply of electrical power. A device or system that supplies electrical
or other types of energy to an output load or group of loads is called a power supply
unit or PSU. The term is most commonly applied to electrical energy supplies, less often to
mechanical ones, and rarely to others. A power supply may include a power distribution system
as well as primary or secondary sources of energy such as

Conversion of one form of electrical power to another desired form and voltage, typically
involving converting AC line voltage to a well-regulated lower-voltage DC for electronic
devices.

Low voltage, low power DC power supply units are commonly integrated with the
devices they supply, such as computers and household electronics.

Batteries.

Chemical fuel cells and other forms of energy storage systems.


Solar power.
Generators or alternators.

2.6.2 Block Diagram:

Fig 2.6.1: Regulated Power Supply

The basic circuit diagram of a regulated power supply (DC O/P) with led connected as load is
shown in fig: 3.6

22
Figure 2.6.2: Circuit diagram of Regulated Power Supply with Led connection
The components mainly used in above figure are

230v AC mains

Transformer

Bridge rectifier(diodes)

Capacitor

Voltage regulator(IC 7805)

Resistor

LED(light emitting diode)

2.7 Liquid Crystal Display

LCD stands for Liquid Crystal Display. LCD is finding widespread use replacing LEDs
(seven segment LEDs or other multi segment LEDs) because of the following reasons:

1. The declining prices of LCDs.

2. The ability to display numbers, characters and graphics. This is in contrast to LEDs,
which are limited to numbers and a few characters.

3. Incorporation of a refreshing controller into the LCD, thereby relieving the CPU of the
task of refreshing the LCD. In contrast, the LED must be refreshed by the CPU to keep
displaying the data.

23
4. Ease of programming for characters and graphics.

These components are specialized for being used with the microcontrollers, which

means that they cannot be activated by standard IC circuits. They are used for writing different

messages on a miniature LCD.

A model described here is for its low price and great possibilities most frequently used in

practice. It is based on the HD44780 microcontroller (Hitachi) and can display messages in two

lines with 16 characters each . It displays all the alphabets, Greek letters, punctuation marks,

mathematical symbols etc. In addition, it is possible to display symbols that user makes up on its

own. Automatic shifting message on display (shift left and right), appearance of the pointer,

backlight etc. are considered as useful characteristics.

PINS FUNCTIONS :

There are pins along one side of the small printed board used for connection to the

microcontroller. There are total of 14 pins marked with numbers (16 in case the background light

is built in). Their function is described in the table below:

Description Logic State Name Pin Number Function


0V - Vss 1 Ground
5V+ - Vdd 2 Power supply
Vdd - 0 - Vee 3 Contrast

24
D0 D7 are interpreted as
0
commands RS 4
1
D0 D7 are interpreted as data
Write data (from controller to LCD) 0
R/W 5 Control of
Read data (from LCD to controller) 1
operating
Access to LCD disabled
0
Normal operating
1 E 6
Data/commands are transferred to
From 1 to 0
LCD
Bit 0 LSB 0/1 D0 7
Bit 1 0/1 D1 8
Bit 2 0/1 D2 9
Bit 3 0/1 D3 10
Data / commands
Bit 4 0/1 D4 11
Bit 5 0/1 D5 12
Bit 6 0/1 D6 13
Bit 7 MSB 0/1 D7 14

LCD SCREEN:
LCD screen consists of two lines with 16 characters each. Each character consists of 5x7
dot matrix. Contrast on display depends on the power supply voltage and whether messages are
displayed in one or two lines. For that reason, variable voltage 0-Vdd is applied on pin marked as
Vee. Trimmer potentiometer is usually used for that purpose. Some versions of displays have
built in backlight (blue or green diodes). When used during operating, a resistor for current
limitation should be used (like with any LE diode).

25
Fig:2.7.1 Liquid Crystal Display

2.8 MOTOR DRIVE & MOTOR:

Here DC Motor is used to rotate the panel in the required direction. Let us study in detail
about the DC Motor.

2.8.1 Principles of Operation


In any electric motor, operation is based on simple electromagnetism. A current-carrying
conductor generates a magnetic field; when this is then placed in an external magnetic field, it

26
will experience a force proportional to the current in the conductor, and to the strength of the
external magnetic field. The internal configuration of a DC motor is designed to harness the
magnetic interaction between a current-carrying conductor and an external magnetic field to
generate rotational motion. Let's start by looking at a simple 2-pole DC electric motor (here red
represents a magnet or winding with a "North" polarization, while green represents a magnet or
winding with a "South" polarization).

Fig 2.8.1 Internal structure DC motor


Every DC motor has six basic parts. They are axle, rotor (a.k.a., armature), stator,
commutator, field magnet(s), and brushes. In most common DC motors (and all that BEAMERS
will see), the external magnetic field is produced by high-strength permanent magnets. The stator
is the stationary part of the motor -- this includes the motor casing, as well as two or more
permanent magnet pole pieces. The rotor (together with the axle and attached commutator)
rotates with respect to the stator.
The rotor consists of windings (generally on a core), the windings being electrically
connected to the commutator. The above diagram shows a common motor layout with the rotor
inside the stator (field) magnets.
The geometry of the brushes, commutator contacts, and rotor windings are such that
when power is applied, the polarities of the energized winding and the stator magnet(s) are
misaligned, and the rotor will rotate until it is almost aligned with the stator's field magnets. As
the rotor reaches alignment, the brushes move to the next commutator contacts, and energize the
next winding. Given our example two-pole motor, the rotation reverses the direction of current
through the rotor winding, leading to a "flip" of the rotor's magnetic field, driving it to continue
rotating.

27
Figure 2.8.2 DC Motor
Consider a DC motor. A DC motor will have two terminals. Let the terminals are D1 and D2. If
we give positive voltage to D1 and negative voltage to D2 (simply voltage at D1 should be more
positive than the voltage at D2) the rotor will rotate in forward direction. Alternatively if the
voltage at D1 is negative and D2 is positive (or in other words voltage at D1 is more negative
than D2) then the motor will rotate in reverse direction.
2.8.2MOTOR DRIVER L293D

Figure 2.8.3 Pin diagram of L293D

Table 2.8.1 Pin Function of L293D


Name Function Pin
No
Enable 1,2 Enable pin for Motor 1;active high 1
Input 1 Input 1 for Motor 1 2
Output 1 Output 1 for Motor 1 3
Ground Ground(0V) 4
Ground Ground(0V) 5

28
Output 2 Output 2 for Motor 1 6
Input 2 Input 2 for Motor 1 7
Vcc2 Supply voltage for Motors;9-12V(upto 36V) 8
Enable 3,4 Enable pin for Motor 2; active high 9
Input 3 Input 1 for Motor 1 10
Otput 3 Output 1 for Motor 1 11
Ground Ground (0V) 12
Ground Ground(0V) 13
Output 4 Output 2 for Motor 1 14
Input 4 Input 2 for Motor 1 15
Vcc1 Supply voltage; 5V(upto 36V) 16

2.8.3 Working of L293D


The 4 input pins for this L293d, pin 2,7 on the left and pin 15 ,10 on the right as shown
on the pin diagram. Left input pins will regulate the rotation of motor connected across left side
and right input for motor on the right hand side. The motors are rotated on the basis of the inputs
provided across the input pins as LOGIC 0 or LOGIC 1. In simple you need to provide Logic 0
or 1 across the input pins for rotating the motor.

2.9 LED:

A light-emitting diode (LED) is a semiconductor light source. LEDs are used as


indicator lamps in many devices, and are increasingly used for lighting. Introduced as a
practical electronic component in 1962, early LEDs emitted low-intensity red light, but
modern versions are available across the visible, ultraviolet and infrared wavelengths,
with very high brightness. The internal structure and parts of a led are shown in figures
2.9.1 and 2.9.2 respectively.

29
Fig 2.9.1: Inside a LED Fig
2.9.2:Parts of LED

Working:

The structure of the LED light is completely different than that of the light bulb.
Amazingly, the LED has a simple and strong structure. The light-emitting
semiconductor material is what determines the LED's color. The LED is based on the
semiconductor diode.

When a diode is forward biased (switched on), electrons are able to recombine with
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 gap of the semiconductor. An LED is usually
small in area (less than 1 mm2), and integrated optical components are used to shape its
radiation pattern and assist in reflection. LEDs present many advantages over
incandescent light sources including lower energy consumption, longer lifetime,
improved robustness, smaller size, faster switching, and greater durability and
reliability. However, they are relatively expensive and require more precise current and
heat management than traditional light sources. Current LED products for general
lighting are more expensive to buy than fluorescent lamp sources of comparable

30
output. They also enjoy use in applications as diverse as replacements for traditional
light sources in automotive lighting (particularly indicators) and in traffic signals. The
compact size of LEDs has allowed new text and video displays and sensors to be
developed, while their high switching rates are useful in advanced communications
technology. The electrical symbol and polarities of led are shown in fig: 2.10.3.

Fig 2.9.3: Electrical Symbol & Polarities of LED

2.10 MQ3 Sensor:

This is an alcohol sensor from futurlec, named MQ-3, which detects ethanol in the air. It is one
of the straightforward gas sensors so it works almost the same way with other gas sensors. It
costs $6.90.Typically, it is used as part of the breathalyzers or breath testers for the detection of
ethanol in the human breath.

Fig 2.10.1: MQ3 Sensor

2.10.1 Data Sheet:

31
Here is a datasheet*, only 2 pages. It shows features, applications, specifications and
configurations etc. It is a pretty simple datasheet. Since this datasheet was not prepared in
English, the translation is not very accurate.
2.10.2 How does it look like:

Basically, it has 6pins, the cover and the body. Even though it has 6 pins, you can use only 4 of
them. Two of them are for the heating system, which I call H and the other 2 are for connecting
power and ground, which I called A and B.
If you look at the inside of the sensor, you will find the little tube. Basically, this tube is a heating
system that is made of aluminum oxide and tin dioxide and inside of it there are heater coils,
which practically produce the heat. And you can also find 6 pins. 2 pins that I called Pin H are
connected to the heater coils and the other ones are connected to the tube.

Fig 2.10.2: MQ3 Sensor internal

2.10.3 Working Process:

How does it work? The core system is the cube. As you can see in this cross-sectional view,
basically, it is an Alumina tube cover by SnO2, which is tin dioxide. And between them there is
an Aurum electrode, the black one. And also you can see how the wires are connected. So, why

32
do we need them? Basically, the alumina tube and the coils are the heating system, the yellow,
brown parts and the coils in the picture.

Fig 2.10.3: MQ3 Sensor working

If the coil is heated up,SnO2 ceramics will become the semi - conductor, so there are more
movable electrons, which means that it is ready to make more current flow.Then, when the
alcohol molecules in the air meet the electrode that is between alumina and tin dioxide, ethanol
burns into acetic acid then more current is produced. So the more alcohol molecules there are,
the more current we will get. Because of this current change, we get the different values from the
sensor.

Fig 2.10.4: MQ3 Sensor behaviour

2.10.4 Connecting MQ3 with Arduino:

When attaching your MQ-3 to the Arduino, it should be noted that it doesnt matter which way
the MQ-3 alcohol sensor is pressed in. Both the A pins are electronically the same as well as the
B pins. The center pins on both sides are the heater element pins. Since the circuit will be

33
running on +5V DC it doesnt matter which way the sensor is soldered to the board.

Fig 2.10.5: MQ3 Sensor to Arduino

2.11 IR Sensor:

An infrared sensor is an electronic device, that emits in order to sense some aspects of the
surroundings. An IR sensor can measure the heat of an object as well as detects the motion.These
types of sensors measures only infrared radiation, rather than emitting it that is called as
a Passive IR Sensor. Usually in the infrared spectrum, all the objects radiate some form of
thermal radiations. These types of radiations are invisible to our eyes, that can be detected by an
infrared sensor.The emitter is simply an IR LED (Light Emitting Diode)and the detector is
simply an IR photodiode which is sensitive to IR light of the same wavelength as that emitted by
the IR LED. When IR light falls on the photodiode, The resistances and these output voltages,
change in proportion to the magnitude of the IR light received.

Fig 2.11.1: IR Sensor

2.11.1 Circuit Diagram and Explanation:

34
An infrared sensor circuit is one of the basic and popular sensor module in an electronic device.
This sensor is analogous to humans visionary senses, which can be used to detect obstacles and
it is one of the common applications in real time.This circuit comprises of the following
components
LM358 IC 2 IR transmitter and receiver pair
Resistors of the range of kilo ohms.
Variable resistors.
LED (Light Emitting Diode).

Fig 2.11.2: Circuit Diagram of IR sensor

In this project, the transmitter section includes an IR sensor, which transmits continuous IR rays
to be received by an IR receiver module. An IR output terminal of the receiver varies depending
upon its receiving of IR rays. Since this variation cannot be analyzed as such, therefore this
output can be fed to a comparator circuit. Here an operational amplifier (op-amp) of LM 339 is
used as comparator circuit.
When the IR receiver does not receive a signal, the potential at the inverting input goes higher
than that non-inverting input of the comparator IC (LM339). Thus the output of the comparator
goes low, but the LED does not glow. When the IR receiver module receives signal to the
potential at the inverting input goes low. Thus the output of the comparator (LM 339) goes high
and the LED starts glowing. Resistor R1 (100 ), R2 (10k ) and R3 (330) are used to ensure that

35
minimum 10 mA current passes through the IR LED Devices like Photodiode and normal LEDs
respectively. Resistor VR2 (preset=5k ) is used to adjust the output terminals. Resistor VR1
(preset=10k ) is used to set the sensitivity of the circuit Diagram.

Schematic diagram

Fig:2.11.1 NodeMCU

Pin Diagram

36
Fig:2.11.2 Pin diagram of NodeMCU

GPIO(General Purpose Input/output) Pin I/O Index Number:


GPIO0 - 3
GPIO1 - 10
GPIO2 - 4
GPIO3 - 9
GPIO4 - 2
GPIO5 - 1
GPIO6 - N/A
GPIO7 - N/A
GPIO8 - N/A
GPIO9 - 11
GPIO10 - 12
GPIO11 - N/A
GPIO12 - 6
GPIO13 - 7
GPIO14 - 5
GPIO15 - 8
GPIO16 - 0

2.12 Buzzer:

37
A buzzer or beeper is an audio signaling device, which may be mechanical,
electromechanical, or piezoelectric. Typical uses of buzzers and beepers include alarm devices,
timers, and confirmation of user input such as a mouse click or keystroke.

Fig:2.12.1 Buzzer

2.13 Potentiometer:

A potentiometer, informally a pot, is a three-terminal resistor with a sliding or rotating contact


that forms an adjustable voltage divider. If only two terminals are used, one end and the wiper, it
acts as a variable resistor or rheostat.

The measuring instrument called a potentiometer is essentially a voltage divider used for
measuring electric potential (voltage); the component is an implementation of the same principle,
hence its name.

Potentiometers are commonly used to control electrical devices such as volume controls on audio
equipment. Potentiometers operated by a mechanism can be used as position transducers, for
example, in a joystick. Potentiometers are rarely used to directly control significant power (more
than a watt), since the power dissipated in the potentiometer would be comparable to the power
in the controlled load.

38
Fig:2.13.1 Potentiometer connected to arduino

Potentiometer construction

Potentiometers consist of a resistive element, a sliding contact (wiper) that moves along the
element, making good electrical contact with one part of it, electrical terminals at each end of the
element, a mechanism that moves the wiper from one end to the other, and a housing containing
the element and wiper.

Fig:2.13.2 Potentiometer construction

See drawing. Many inexpensive potentiometers are constructed with a resistive element (B)
formed into an arc of a circle usually a little less than a full turn and a wiper (C) sliding on this
element when rotated, making electrical contact. The resistive element can be flat or angled.
Each end of the resistive element is connected to a terminal (E, G) on the case. The wiper is
connected to a third terminal (F), usually between the other two. On panel potentiometers, the
wiper is usually the center terminal of three. For single-turn potentiometers, this wiper typically

39
travels just under one revolution around the contact. The only point of ingress for contamination
is the narrow space between the shaft and the housing it rotates in.

Another type is the linear slider potentiometer, which has a wiper which slides along a linear
element instead of rotating. Contamination can potentially enter anywhere along the slot the
slider moves in, making effective sealing more difficult and compromising long-term reliability.
An advantage of the slider potentiometer is that the slider position gives a visual indication of its
setting. While the setting of a rotary potentiometer can be seen by the position of a marking on
the knob, an array of sliders can give a visual impression of, for example, the effect of a multi-
band equalizer (hence the term "graphic equalizer").

The resistive element of inexpensive potentiometers is often made of graphite. Other materials
used include resistance wire, carbon particles in plastic, and a ceramic/metal mixture called
cermet. Conductive track potentiometers use conductive polymer resistor pastes that contain
hard-wearing resins and polymers, solvents, and lubricant, in addition to the carbon that provides
the conductive properties.

Fig:2.13.3 Types of potentiometer

Fig:2.13.4 Electronic symbol for potentiometer

Others are enclosed within the equipment and are intended to be adjusted to calibrate equipment
during manufacture or repair, and not otherwise touched. They are usually physically much
smaller than user-accessible potentiometers, and may need to be operated by a screwdriver rather

40
than having a knob. They are usually called "preset potentiometers" or "trim[ming] pots". Some
presets are accessible by a small screwdriver poked through a hole in the case to allow servicing
without dismantling.

Multiturn potentiometers are also operated by rotating a shaft, but by several turns rather than
less than a full turn. Some multiturn potentiometers have a linear resistive element with a sliding
contact moved by a lead screw; others have a helical resistive element and a wiper that turns
through 10, 20, or more complete revolutions, moving along the helix as it rotates. Multiturn
potentiometers, both user-accessible and preset, allow finer adjustments; rotation through the
same angle changes the setting by typically a tenth as much as for a simple rotary potentiometer.

A string potentiometer is a multi-turn potentiometer operated by an attached reel of wire turning


against a spring, enabling it to convert linear position to a variable resistance.

User-accessible rotary potentiometers can be fitted with a switch which operates usually at the
anti-clockwise extreme of rotation. Before digital electronics became the norm such a component
was used to allow radio and television receivers and other equipment to be switched on at
minimum volume with an audible click, then the volume increased, by turning a knob. Multiple
resistance elements can be ganged together with their sliding contacts on the same shaft, for
example, in stereo audio amplifiers for volume control. In other applications, such as domestic
light dimmers, the normal usage pattern is best satisfied if the potentiometer remains set at its
current position, so the switch is operated by a push action, alternately on and off, by axial
presses of the knob.

Fig:2.13.5 Circuit for potentiometer

2.14 Reset Button:

41
In electronics and technology, a reset button is a button that can reset a device. On video game
consoles, the reset button restarts the game, losing the player's unsaved progress. On personal
computers ,the reset button clears the memory and reboots the machine forcibly. Reset buttons
are found on circuit breakers to reset the circuit. This button can cause data corruption so this
button often doesn't exist on many machines. Usually, in computers and other electronic devices,
it is present as a small button, possibly recessed into the case or only accessible by a pin or
similar thin object, to prevent it being pressed accidentally .

Fig:2.14.1 Reset Button

2.15 Software Requirements:

2.15.1 Arduino IDE

The open-source Arduino Software (IDE) makes it easy to write code and upload it to the
board. It runs on Windows, Mac OS X, and Linux. This software can be used with any Arduino
board. The Arduino Integrated Development Environment - or Arduino Software (IDE) -
contains a text editor for writing code, a message area, a text console, a toolbar with buttons for
common functions and a series of menus. It connects to the Arduino and Genuino hardware to
upload programs and communicate with them. Programs written using Arduino Software (IDE)
are called sketches. These sketches are written in the text editor and are saved with the file
extension .ino. The editor has features for cutting/pasting and for searching/replacing text. The
message area gives feedback while saving and exporting and also displays errors. The console
displays text output by the Arduino Software (IDE), including complete error messages and other

42
information. The bottom righthand corner of the window displays the configured board and serial
port. The toolbar buttons allow you to verify and upload programs, create, open, and save
sketches, and open the serial monitor.

Fig:2.15.1 Arduino IDE

2.15.2 Micro Python:

MicroPython[20][21][22] is a software implementation of the Python 3 programming


language, written in C, that is optimized to run on a microcontroller. It was originally
created by the Australian programmer and physicist Damien George, after a successful
Kickstarter backed campaign in 2013.While the original Kickstart campaign released
MicroPython with a pyboard microcontroller, MicroPython supports a number of ARM
based architectures. MicroPython has since been run on Arduino, ESP8266,ESP32, and
Internet of things hardware. In 2016 a version of MicroPython for the BBC Micro Bit
was created as part of the Python Software Foundation's contribution to the Micro Bit
partnership with the BBC.

MicroPython is a lean and efficient implementation of the Python 3 programming language that

43
includes a small subset of the Python standard library and is optimised to run on microcontrollers
and in constrained environments.

The MicroPython pyboard is a compact electronic circuit board that runs MicroPython on the
bare metal, giving you a low-level Python operating system that can be used to control all kinds
of electronic projects.

MicroPython is packed full of advanced features such as an interactive prompt, arbitrary


precision integers, closures, list comprehension, generators, exception handling and more. Yet it
is compact enough to fit and run within just 256k of code space and 16k of RAM.

MicroPython aims to be as compatible with normal Python as possible to allow you to transfer
code with ease from the desktop to a microcontroller or embedded system.

2.15.3 Thinkspeak:

According to its developers, "ThingSpeak [23] is an open source Internet of Things (IoT)
application and API to store and retrieve data from things using the HTTP protocol over the
Internet or via a Local Area Network. ThingSpeak enables the creation of sensor logging
applications, location tracking applications, and a social network of things with status updates".

ThingSpeak was originally launched by ioBridge in 2010 as a service in support of IoT


applications

ThingSpeak has integrated support from the numerical computing software MATLAB from
MathWorks. Allowing ThingSpeak users to analyze and visualize uploaded data using Matlab
without requiring the purchase of a Matlab license from Mathworks.

ThingSpeak has a close relationship with Mathworks, Inc. In fact, all of the ThingSpeak
documentation is incorporated into the Mathworks' Matlab documentation site and even enabling
registered Mathworks user accounts as valid login credentials on the ThingSpeak website.The
terms of service and privacy policy of ThingSpeak.com are between the agreeing user and
Mathworks, Inc.

2.15.4 MIT App Inventor:

Apps development is emerging as a lucrative career option and if you always wanted to develop

44
an app, the MIT App Inventor [24] may help you get started. Formerly the Google App Inventor,
this online tool is now maintained by Massachusetts Institute of Technologys Center for Mobile
Learning.

The best part is that you need not know programming languages, as it makes use of blocks that
have to be placed to perform the action that you want the app to do. This makes it perfect for
enthusiasts who want to create an app without worrying about coding, as it uses a very visual
approach. It also has an innovative approach: you can learn by building the games mentioned and
the level of difficulty increases gradually. Each game addresses a function that you can add to the
app. For instance, if you want to build an app that will have multiple screens, you can use the
Colored Dots tutorial, which is a painting program that uses multiple screens. Before starting, its
advisable to familiarise yourself with the tools various components. Some of these components
can be modified, while others remain static and cannot be changed. This information can be
accessed from the Reference section under the Learn tab. Additionally, you can also access a
PDF of the book App Inventor: Create Your Own Android Apps by David Wolber, Hal Abelson,
Ellen Spertus and Liz Looney. Most of the chapters in the book are accompanied by video
screencasts.

Fig:2.15.2 MIT App Inventor

2.15 Conclusion:

The description of the project is explained through this chapter and the various

45
blocks which are implemented in the project were explained.

Chapter 3

TOOL FLOW OF THE PROJECT

46
3.1 Introduction
In this chapter we will see how to operate the arduino software. This chapter will give the
step-by-step instruction with related screenshots for ease of understanding.

3.2 Arduino Software


The open-source Arduino Software (IDE) makes it easy to write code and upload it to the
board. It runs on Windows, Mac OS X, and Linux. This software can be used with any Arduino
board. The Arduino Integrated Development Environment - or Arduino Software (IDE) -
contains a text editor for writing code, a message area, a text console, a toolbar with buttons for
common functions and a series of menus. It connects to the Arduino and Genuino hardware to
upload programs and communicate with them. Programs written using Arduino Software (IDE)
are called sketches. These sketches are written in the text editor and are saved with the file
extension .ino. The editor has features for cutting/pasting and for searching/replacing text. The
message area gives feedback while saving and exporting and also displays errors. The console
displays text output by the Arduino Software (IDE), including complete error messages and other
information. The bottom righthand corner of the window displays the configured board and serial
port. The toolbar buttons allow you to verify and upload programs, create, open, and save
sketches, and open the serial monitor.

3.2.1 Steps to operate Arduino Software:


1. Open Arduino IDE

2. Write the program in the editor space.

47
Fig:3.2.1. Screen after opening arduino IDE

48
Fig.3.2.2: Screen after writing the program

3. Before compiling the program go to tools board select arduino/genuine uno.

Fig.3.2.3: Screen for selection of board before compiling

4. Compile the program to know whether there are any errors in the program.

49
Fig:3.2.4: Screen while compiling sketch

5. Upload the program on to the arduino board to run the application.

Fig:3.2.5: Screen while uploading program to the arduino board

50
3.2.2 Tool Bar Buttons
1. VERIFY: Checks your code for errors compiling it.

SYMBOL:
2. UPLOAD: Compiles your code and uploads it to the configured board.

SYMBOL:
3. NEW: Creates a new sketch.

SYMBOL:
4. OPEN: Presents a menu of all the sketches in your sketchbook. Clicking one will open it
within the current window overwriting its content.

SYMBOL:
5. SAVE: Saves the sketch.

SYMBOL:
6. SERIAL MONITOR: Displays serial data being sent from the Arduino or Genuino board
(USB or serial board).

SYMBOL:

3.2.2 Menu Bar


Additional commands are found within the five menus: File, Edit, Sketch, Tools, Help. The
menus are context sensitive, which means only those items relevant to the work currently being
carried out are available.

3.3 Conclusion: In this chapter we have discussed about how to operate the arduino software
in detail.

51
Chapter 4
SIMULATION RESULTS
4.1 INTRODUCTION

snapshots of the test results are shown to get a better idea of the desired output. This
chapter deals with the design testing and simulation results. The

4.2SIMULATION AND TEST RESULTS

The below figure shows the initial setup when power is switched on

Fig:4.2.1 Initial setup when power is ON

When reset button is pressed it displays message initially as shown in the below figure:

Fig:4.2.2 Message displayed when reset button is pressed

Below will be setup after the courier bot door has opened

52
.

Fig:4.2.3 Message when door has opened

After inserting the courier the Arduino communicates with NodeMCU through Thinkspeak and
then compares the RFID tag with the loaded open.It the RFID number matches then the message
will be as Accepted and if does not match ,the message will be as Rejected remove courier..

Fig:4.2.4 Message after inserting the courier

Fig:4.2.5 Message if the courier is accepted

53
Fig:4.2.6 Message if the courier is rejected

If the courier is accepted the COD(Cash On Delivery) box will open.

Fig:4.2.7 Message after the courier has been accepted

Message sent to the customers mobile in MIT app through Thinkspeak.

Fig:4.2.8 Message sent to the customers mobile

54
Fig:4.2.9 Page where we can change the order id

4.3 CONCLUSION:

In this chapter we have seen the simulation results .In the next chapter we will see the
advantages and limitations.

55
Chapter 5
ADVANTAGES AND LIMITATIONS
5.1 Introduction:
The main advantages and limitations of the GSM and RFID based intelligent courier
mailbox system are discussed below.

5.2 Advantages:
1. Highly efficient and user friendly design.
2. Easy to operate.
3. Low power consumption and high performance.
4. Efficient design.
5. Works anywhere in the world (GSM availability).
6. Incase of emergency intimation can be sent to predefined numbers.

5.3 Limitations:
1. Modem should be properly installed for proper working of the system.
2. Poor network signal can decrease the performance of system.

5.4 Conclusion:
In this chapter we have discussed the advantages and limitations of the GSM and RFID
based intelligent courier mailbox system.

56
Chapter 6
CONCLUSION AND FUTURE SCOPE
6.1 Introduction:

The project Advance Courier Bot with automatic delivery notification


was designed such that an automatic sending information about courier to user and
courier officials would be easy.

6.2 Conclusion:

The Advance Courier Bot will serve many problems. This will be capable of
accepting the courier without the personal presence of the individual and also send a
message to the person.

Presence of every module has been reasoned out and placed carefully ,thus
contributing to the best working of the unit. Secondly, using highly advanced ICs
with the help of growing technology, the project has been successfully implemented.
Thus the project has been successfully designed and tested.

6.3 Future Scope:

This system can be practically implemented in houses where all the


members of the family are working . It is used to avoid physical presence of
receiver to collect any mail. This system can also be implemented where
security is a major concern like in banks, schools, hospitals etc. This system can
be used at places where there are multiple mails to be received. As the RFID
system is not too high it can be adopted by everyone.

57
REFERENCES

[1].https://www.google.co.in/url?
sa=t&rct=j&q=&esrc=s&source=web&cd=2&cad=rja&uact=8&ved=0ahUKEwjviMq
c6YrTAhUKOY8KHa2IDvkQFggiMAE&url=http%3A%2F%2Fieeexplore.ieee.org
%2Fdocument%2F4603963%2F&usg=AFQjCNG-
a6YOsK2nw1OS5tuWFWIAZxwEIg&sig2=QO6t9AY0t2klhr8JiWVKKw

[2].https://www.google.co.in/url?
sa=t&rct=j&q=&esrc=s&source=web&cd=4&cad=rja&uact=8&ved=0ahUKEwjviMq
c6YrTAhUKOY8KHa2IDvkQFggrMAM&url=http%3A%2F%2Fieeexplore.ieee.org
%2Fdocument
%2F7515910%2F&usg=AFQjCNF0zDBLPrs0VP6mSBXKsMTInKj5dg&sig2=pwUd
NKZgdBCmN6PaNmDrOA

[3].https://www.google.co.in/url?
sa=t&rct=j&q=&esrc=s&source=web&cd=6&cad=rja&uact=8&ved=0ahUKEwjviMq
c6YrTAhUKOY8KHa2IDvkQFgg0MAU&url=http%3A%2F%2Fwww.ijetae.com
%2Ffiles
%2FVolume5Issue12%2FIJETAE_1215_51.pdf&usg=AFQjCNFtQ4C7y403YJDUL3J
vI8yszq6xIw&sig2=HzGR9bgAe8aLJealNor98g

[4].https://www.google.co.in/url?
sa=t&rct=j&q=&esrc=s&source=web&cd=5&cad=rja&uact=8&ved=0ahUKEwjviMq
c6YrTAhUKOY8KHa2IDvkQFggvMAQ&url=http%3A%2F%2Fgetreport.in%2Fidea
%2Fieee-paper-for-rfid-and-gsm-based-intelligent-mailbox-
system&usg=AFQjCNFCh827hLMPCXqKKVX97FhGZ_MsLA&sig2=e9SFlHZBOd
ZMYabe7i-zHg

[5].Steven Barett,Arduino Microcontroller:Processing for everyone!Second edition

[6].Yusuf Abdullahi Badamasi,The working principle of Arduino,Published in-


Electronics,Computer and Computing (ICECCO) 2014,11th International Conference.

[7].https://www.google.co.in/url?

58
sa=t&rct=j&q=&esrc=s&source=web&cd=4&cad=rja&uact=8&ved=0ahUKEwinr6O
P7YrTAhUJNbwKHS1NBE4QFggwMAM&url=http%3A%2F
%2Fwww.engpaper.com%2Farduino-
2016.htm&usg=AFQjCNHTEXq4JHVScRV0voBSRsMQkMbcgg&sig2=vSBr8tW2V
5nxWop2WXeGyw

[8].https://www.google.co.in/url?
sa=t&rct=j&q=&esrc=s&source=web&cd=4&cad=rja&uact=8&ved=0ahUKEwjLqv7
Y7YrTAhWJRo8KHeP9DUwQFggwMAM&url=http%3A%2F%2Fijesc.org
%2Fupload%2F535bcaf87f0ed450b1b6a2f72228211f.Review%2520on
%2520Programming%2520ESP8266%2520with%2520Over%2520the%2520Air
%2520Programming
%2520Capability.pdf&usg=AFQjCNHOF2MUSmLhGE1lIqf96LtiU0VGRQ&sig2=W
ERFR8D_Q6_JcVnO_6u1oA

[9].https://www.google.co.in/url?
sa=t&rct=j&q=&esrc=s&source=web&cd=2&cad=rja&uact=8&ved=0ahUKEwjLqv7Y7YrTAh
WJRo8KHeP9DUwQFggjMAE&url=https%3A%2F%2Fen.wikipedia.org%2Fwiki
%2FNodeMCU&usg=AFQjCNG_Y8HHqbZIUYEmCxrwVlemlS9S2w&sig2=mlJu5LUH7Sa_
DoM01g3a8g

[10].https://www.google.co.in/url?
sa=t&rct=j&q=&esrc=s&source=web&cd=9&cad=rja&uact=8&ved=0ahUKEwjLqv7Y7YrTAh
WJRo8KHeP9DUwQFghIMAg&url=https%3A%2F%2Fwww.researchgate.net%2Ftopic
%2FInternet-of-
Things&usg=AFQjCNFZ93i_0GDTJPUK3hwI9dco0bNKbw&sig2=2V60lUHAytpAPYIVnco8
5g

[11].https://www.google.co.in/url?
sa=t&rct=j&q=&esrc=s&source=web&cd=1&cad=rja&uact=8&ved=0ahUKEwjckur57orTAhU
KOY8KHa2IDvkQFggeMAA&url=http%3A%2F%2Fieeexplore.ieee.org%2Fxpl
%2FmostRecentIssue.jsp%3Fpunumber
%3D6488907&usg=AFQjCNHJqGOYEzh2zmypoj51Dul5Wp20fQ&sig2=tOwh0CcSXPlYNkn

59
OnFUPww

[12].https://www.google.co.in/url?
sa=t&rct=j&q=&esrc=s&source=web&cd=4&cad=rja&uact=8&ved=0ahUKEwjckur57orTAhU
KOY8KHa2IDvkQFgguMAM&url=http%3A%2F%2Fwww.engpaper.com%2Fiot-
2016.htm&usg=AFQjCNFjB8rZk08rfDmFlRLmOHTi7e1YoQ&sig2=PcXHLK7DmuxlYzwiikv
x9A

[13].R.Want,An Introduction to RFID Technology,Published in-IEEE Pervasive Computing.

[14].https://www.google.co.in/url?
sa=t&rct=j&q=&esrc=s&source=web&cd=3&cad=rja&uact=8&ved=0ahUKEwjVrPS074rTAh
WBM48KHcdgCWYQFggoMAI&url=https%3A%2F%2Fwww.ieee.org%2Fabout
%2Ftechnologies%2Femerging%2Frfid.pdf&usg=AFQjCNGR_qz-p6AZUVH0WQ0-
LvRdnFJv-Q&sig2=8TizgfZs2E8EHuqr6cBwTQ

[15].https://www.google.co.in/url?
sa=t&rct=j&q=&esrc=s&source=web&cd=4&cad=rja&uact=8&ved=0ahUKEwjVrPS074rTAh
WBM48KHcdgCWYQFggtMAM&url=http%3A%2F%2Fwww.engpaper.com%2Frfid-
system.htm&usg=AFQjCNG2htSATb-
OydIO7TkcwD46e8ADzA&sig2=VSclIkym2pgVYsr9GNjGYQ

[16].https://www.google.co.in/url?
sa=t&rct=j&q=&esrc=s&source=web&cd=2&cad=rja&uact=8&ved=0ahUKEwjD2IHp74rTAh
VFvo8KHZoZCL8QFggeMAE&url=http%3A%2F%2Fieeexplore.ieee.org%2Fxpl
%2FmostRecentIssue.jsp%3Fpunumber%3D9425&usg=AFQjCNFVh9-
g6yHQSZqR9fjU5Ghyqp9tnQ&sig2=3bG3YFUaKmgomDlygpZTIA

[17].Inseam Choi, HOjun shim ,Naehyuck Chang,low Power Color TFT LCD display for hand
held embedded systems,Published in-Low power Electronics and Design,2002

[18].https://www.google.co.in/url?
sa=t&rct=j&q=&esrc=s&source=web&cd=1&cad=rja&uact=8&sqi=2&ved=0ahUKEwjx-
cyc9I_TAhVHOY8KHaRGCcQQFggeMAA&url=http%3A%2F%2Ftechnav.ieee.org%2Ftag
%2F1028%2Fled-lighting&usg=AFQjCNGpxXZ-

60
ojSW5Iz6A7ZMdszZ2SFCkg&sig2=Gju298V9gNX9U7ia2McvAw&bvm=bv.152174688,d.c2I

[19].Melville Stein,Design of Potentiometers,Published in-Transactions of the American


Institute of Electrical Engineers(Volume:50 Issue:4, Dec 1931)

[20].Damein P.George, Paul Sokolovsky, The Micro Python Language.

[21].https://www.google.co.in/url?
sa=t&rct=j&q=&esrc=s&source=web&cd=7&cad=rja&uact=8&ved=0ahUKEwiqpa7X-
o_TAhXJuI8KHRxdDLgQFgg2MAY&url=https%3A%2F%2Fstore.micropython.org
%2F&usg=AFQjCNH54k7rRUojPbD-dA-5g4jUvx2MrA&sig2=5hNSkI-k1dipOG42TzxioQ

[22].https://www.google.co.in/url?
sa=t&rct=j&q=&esrc=s&source=web&cd=5&cad=rja&uact=8&ved=0ahUKEwiqpa7X-
o_TAhXJuI8KHRxdDLgQFgguMAQ&url=http%3A%2F%2Fdocs.micropython.org%2Fen
%2Flatest%2Fmicropython-
pyboard.pdf&usg=AFQjCNFKdZDzeEgmNIpRyKtGQYyQrqjPPQ&sig2=jw1TbTDmoRMww
WduNaJNxQ

[23].https://www.google.co.in/url?
sa=t&rct=j&q=&esrc=s&source=web&cd=8&cad=rja&uact=8&ved=0ahUKEwj1xdSE-
4_TAhVEPI8KHRDhDCYQFghAMAc&url=https%3A%2F%2Fieee-r1-
studentconference.fluidreview.com
%2F&usg=AFQjCNG3Ml_tTheS0ZOf7XkrIwHrH0mmrg&sig2=r5ZbUlZ_sQnDqrw6e9x5rg&b
vm=bv.152174688,d.c2I

61
BIBLIOGRAPHY
1. RFID Technology and Applications 1st Edition
by Stephen B. Miles , Sanjay E. Sarma, John R. Williams
2. Beginning Arduino by Michael Mcroberts
3. Getting Started with Arduino Massimo Banzi

62
APPENDIX
8.1 Program code:
//first button read
#include <LiquidCrystal.h>
#include <SoftwareSerial.h>

#define button 6
# define courier_door_motor_1 7
# define courier_door_motor_2 8
#define courier_motor_delay 2000 // the time it takes to open or close the door
# define cash_door_1 9
# define cash_door_2 11
#define cash_door_delay 3000 // the time it takes to open or close the cash door
LiquidCrystal lcd(12, 13, 5, 4, 3, 2);

SoftwareSerial rfid (10,11);

63
char rec[12],read[12];

int confidence=0;
void setup()
{
pinMode(button,0); // setting the button pin to input
pinMode(courier_door_motor_1,1); // setting the courier motor pin to output
pinMode(courier_door_motor_2,1); // setting the courier motor pin to output
pinMode(cash_door_1,1); // setting the cash door pin to output
pinMode(cash_door_2,1);// setting the cash door pin to output
digitalWrite(cash_door_2,0);
Serial.begin(115200); // serial is connected to node mcu
rfid.begin(9600); // software is connected to rfid
lcd.begin(16,2);
}

void loop()
{
// here we are reading the state of the button
if(digitalRead(button)==1)// if the button is pressed
{
lcd.print("opening");
open_courier_door(); //open the
courier input door
lcd.clear();
lcd.print("door open");
lcd.setCursor(0,1);
lcd.print("insert courier");
while (rfid.available()==0) // wait until the data is received
{

64
}

for(int i=0;i<12;i++) // store it in an array


{
read[i]=(char)rfid.read();
delay(50);
}
rfid.flush();

/*for(int i=0;i<12;i++) // store it in an array


{
Serial.print(read[i]);

}
*/
lcd.clear();
lcd.print("closing door");
close_courier_door(); //close the
courier door
lcd.clear();
lcd.print("door closed");
lcd.setCursor(0,1);
lcd.clear();
lcd.print("checking no");

// Serial.println("requesting_data");//request the data from node


mcu via serial
//analogWrite(0,660); // request data from mcu
while (Serial.available()==0) // wait until the data is received
{

65
}

for (int i=0;i<12;i++) // store the data in a char array called as rec
{
rec[i]=(char)Serial.read();
delay(50);

}
Serial.flush();

//analogWrite(0, 0);

for(int i=0;i<12;i++)// compare both the arrays


{
if(rec[i]==read[i])
{
confidence++;
}

if(confidence>=10) // match
{
lcd.clear();
lcd.print("Accepted");
delay(1000);
open_cash_door();//open the cash door with servo
lcd.clear();
lcd.print("collect cash");

66
delay(5000);
close_cash_door();//close the servo
lcd.clear();
}

else
{
lcd.clear();
lcd.print("rejected");
lcd.setCursor(0,1);
lcd.print("remove courier");
open_courier_door();
delay(5000);
close_courier_door();
lcd.clear();
}
}

void close_courier_door() // this function is to open the courier input box door or to rotate the
motor in one direction
{
digitalWrite(courier_door_motor_1,1); // setting the pin to high
digitalWrite(courier_door_motor_2,0); // setting the pin to low

67
delay(courier_motor_delay);// wait for the door to open
// after opening we stop
stop_courier_door();
}

void open_courier_door() // this function is to open the courier input box door or to rotate the
motor in one direction
{
digitalWrite(courier_door_motor_1,0); // setting the pin to low
digitalWrite(courier_door_motor_2,1); // setting the pin to high
delay(courier_motor_delay);// wait for the door to open
// after opening we stop
stop_courier_door();
}
void stop_courier_door()
{
digitalWrite(courier_door_motor_1,0); // setting the pin to low
digitalWrite(courier_door_motor_2,0); // setting the pin to low
}

void close_cash_door() // this function is to open the courier input box door or to rotate the
motor in one direction
{
digitalWrite(cash_door_1,1); // setting the pin to high
digitalWrite(cash_door_2,0); // setting the pin to low
delay(cash_door_delay);// wait for the door to open
// after opening we stop
stop_cash_door();

68
}

void open_cash_door() // this function is to open the courier input box door or to rotate the motor
in one direction
{
digitalWrite(cash_door_1,0); // setting the pin to low
digitalWrite(cash_door_2,1); // setting the pin to high
delay(cash_door_delay);// wait for the door to open
// after opening we stop
stop_cash_door();
}
void stop_cash_door()
{
digitalWrite(cash_door_1,0); // setting the pin to low
digitalWrite(cash_door_2,0); // setting the pin to low
}

69

You might also like