Beruflich Dokumente
Kultur Dokumente
Submitted by:
Raiha-tul-Zahra 2013-EE-304
Sumeyya Javaid 2013-EE-305
Khansa Tariq 2013-EE-349
Fatima Hameed Khan 2013-EE-352
Bachelor of Science
In
Electrical Engineering.
____________________ ____________________
Internal Examiner External Examiner
____________________
Director
Undergraduate Studies
ii
Declaration
I declare that the work contained in this thesis is my own, except where explicitly
stated otherwise. In addition this work has not been submitted to obtain another
degree or professional.
iii
Acknowledgements
First and foremost, all praises and thanks to Allah (SWT), the Almighty, for His uncountable
blessings and the strength to complete this project. All best prayers and peace be unto His best
messenger, Muhammad, His pure descendant, and His sacred family, and His noble companion.
Then, we would like to thank our families. Without their love and support over the years none of
this would have been possible. They have always been there for us and we are thankful for
We offer our sincere gratitude to our supervisor, Dr. Umar Rashid, for his patience, motivation
and immense knowledge. First, being his students and then working under his supervision in Final
Year was a great privilege for us. We would also like to extend our thanks to all faculty members
of our department and to all those who offer collegial guidance and assistance over the years.
Special thanks to Dr. Muhammad Kamran, Campus Coordinator of UET (Narowal Campus), who
put his faith on us and initiates this project with great enthusiasm. Unfortunately, he could not
continue with us due to some official reasons but his support and prayers are essential to our
success here.
In the last, cheers for all our project discussions, for the sleepless nights we were working together
before deadlines and for all the fun we had in last four years. Also we are grateful to all our friends
and class fellows for their cooperation and help in completing this project work.
iv
Dedicated to
our Parents
for their unconditional love, endless support
and all time encouragement.
v
Table of Contents
Declaration.................................................................................................................................... iii
Acknowledgements ...................................................................................................................... iv
Dedication ...................................................................................................................................... v
Abstract ......................................................................................................................................... xi
Chapter 1 Introduction................................................................................................................. 1
vi
Chapter 4 RFID Reader and Finger Print Scanner ................................................................ 11
vii
List of Figures
Figure 2.1 Arduino UNO
Figure 2.2 Arduino mega
Figure 2.2 Arduino mega
Figure3-1 SIM900a Module
Figure 4-1 RFID Reader
Figure 4-2 Interfacing of RFID with Arduino
Figure 4-3 Biometric Finger Scanner
Figure 4-4 Biometric Interfacing with Arduino
Figure 4-5 Enrollment Process of RFID/Finger print scanner
Figure 4-6 Verification Process of RFID/Finger print scanner
Figure 5-1 Automation system
Figure 5-2 VR3 voice module
Figure 5-3 Automation through voice
Figure 5-4 Ethernet Shield with LAN connection
Figure 5-5 5V relay board
Figure 5-6 NC and NO contacts
Figure 5-7 Interfacing of Arduino with Relay board
Figure 6.1 Wireless Sensor Network
Figure 6-2 LM35 Temperature sensor
Figure 6-3 PIR Motion sensor
Figure 6-4 Flame sensor
Figure 6-5 MQ-2 Smoke sensor
Figure 6-6 XBee series-1 module
Figure 6-7 Configuration of XBee using XCTU
Figure 6-8 XBee Star Topology
Figure 6-9 Gateway position in WSN
viii
Figure 7-1 Window App: User Login
Figure 7-2 Window App: Enrollment form
Figure 7-3 Window App: Admin control
Figure 7-4 Window App: User display
Figure 7-5 Window App: Automation control
Figure 7-6 Window App: Sensor data display
ix
List of Tables
Table 3-1 GSM AT commands
Table 4-1 Comparison of RFID and Barcode
Table 4-2 Comparison of different biometric techniques
x
Abstract
The issue of security is very paramount in any organization like schools banks etc. Therefore we
intend to aid in the security of any organization by bringing in a web-based security system that
involves an individual to be verified by biometric or RFID card before getting an access to some
place. To concentrate more on security, the system also includes Wireless Sensor Network (WSN)
in which each sensor node is equipped with sensors to detect fire, smoke and motion. Wireless
Sensor Nodes communicate with data collecting nodes through Xbees and display data to admin
on designed Website and application. It is also featured to provide a control of Electrical
Appliances on a single tap of your screens or through voice commands. It has an administrative
password and enables multiple users wireless access. Lastly, this system is programmed to alert
admin on a cell phone in case of the fire break out, some mysterious motion or any threatening
event.
xi
Chapter 1
Introduction
It’s on us how we use the latest technology to ease us. Just monitoring people and ignoring other
factors is not enough to avoid all risks. There is a great deal of other risks to be monitored around
us like fire, smoke or some motion detected on boundaries. In APS attack, intruders used the
boundaries to enter in and did all massacre. Fortunately today, advancement in wireless technology
made it possible to design a Wireless Sensor Network which includes sensor nodes installed at
different place to monitor data and send it to central or data collecting node. All sensor nodes are
attached with different sensors and cameras to collect specific information. In WSN, central node
processed the coming data and send it to the server through IOT gateway. We have used XAMPP
server for this purpose but one can buy his domain to have his own server. There are different
application designed to access sensor data remotely through smartphones or desktops. Moreover,
this projects is featured to inform admin and alarm immediately in case of any event of threat.
Nowadays, mostly people cannot get separated from their smartphones. Providing control of
electronic devices along with access of all monitored data on their smartphones will add so much
comfort in life. Automation using Internet of Things is getting very popular as it has tons of
To acquire such system cost too much along complexities of installing and configuring it. That’s
why despite of immense demand, this has not caught much attention in market. Thus, it is essential
to make it a cost effective and simple to handle. So, maximum percentage of population can get
this for their school, home or any building they own. In other words, system modification is
required in order to lower the price to install it.
1.3 Objectives
To develop a security concept considering different aspects on any organization
To install sensor nodes and camera to collect data from different places of interest
To remotely monitor all data through phones, internet or application and alert admin on
emergency conditions.
To construct a wireless and efficient control of appliances through very common way of
commands
To implement a low cost, reliable and scalable web-based controlling and monitoring
system
Establish a server on localhost using XAMPP and design a webpage connected with this
server.
Programming of application on android and windows and, their interaction with online
MySQL database
Interfacing of biometric scanner and RFID with Arduino UNO and their connection to
windows application through serial port.
Making a simple server on Arduino Mega using Ethernet shield for wireless control of
devices through smartphone, internet and voice command
To make a wireless sensor network communication through XBees
Arduino is an open source platforms used to develop applications working in a real time. Arduino
boards are designed to take various inputs from sensors, buttons and different modules then process
that information to generate an output including lighting a bulb, turning on or off a motor,
displaying a value on LCD and the list goes on. Arduino programs are uploaded in the form of
sketches using Arduino IDE software.
We have implemented security through RFID card readers and fingerprint scanner. The RFID card
reader and finger print scanner both are interfaced with Arduino UNO on a separate board. GSM
is also attached with these boards for generating a message. Wireless sensor nodes are made on
Arduino UNO board. These nodes are equipped with flame, smoke and motion sensor. The data
of these nodes is transmitted wirelessly to the node which is collecting this data through XBee.
XBee is also interfaced on Arduino. That node which is receiving data has a receiving XBee on
Arduino board. This Arduino board also has the GSM module and Ethernet shield for sending the
data on cell phones and internet respectively. Automation is carried on Arduino mega board. It has
relay which is operating load. Ethernet shield is also used on this for sending a data on the internet.
Moreover a voice module VR3 is also connected on this board.
3.2 GSM
GSM stands for Global System for Mobile Communication. It is an international standard for
mobile networks and most commonly used in the world. Important features of GSM are
international roaming, call encryption, SMS, call forwarding and swappable SIM cards.
<MESSAGE {CTRL+Z}
Whenever a user is enrolled in in our system he will be sent a confirmation text message
through GSM.
When the admin blocks or blocks the individual he is informed by a text message
If someone tries to enter the building when the work hours are finished admin will be
notified with the text message.
SMS is sent as soon as there is fire alert or motion sensed warning to the admin.
GSM is interfaced with microcontroller using serial communication. As soon as there is serial data
available for Arduino for GSM it will serially send it to GSM module which will to send to it to
mobile user.
Controller
We have used the following component for implementing security through RFID reader and finger
print scanner
Arduino
RFID Reader
Finger Print Scanner
GSM
Enrollment
Verification
Enrollment
During the enrollment phase card is read by the RFID reader and the attached microcontroller is
communicating with RFID reader through SPI bus. Our controller is functioned to assign each card
a unique ID which is sent serially to windows application made on vb.net where it is stored in
In verification mode, the system validates a person identity by comparing captured biometric
image with already stored templates in the database. If the template is present in the pre-stored
database, then its ID is sent to our designed windows application where this particular ID is
searched in MySQL database. In such a system, recognized person’s data is displayed on the screen
but he is only granted permission if he is not present in the block list. Similarly, for RFID, an
individual has to swipe his RFID card in front of RFID scanner. The unique card ID is sent to the
application. In the application, several MySQL queries are executed to search ID in the database.
If this ID is found then the status of the user is checked whether he is blocked or not. The user is
only allowed to enter if his status is unblocked. In the case of no record of the user or blocked user
the buzzer will alert others that some unauthorized person is trying to enter. If someone attempts
to enter other than working hours the admin will be informed by a text message
No
Exist in
database?
Yes
No
Block?
Yes
Grant Access
There is another technology known as barcode scanners. They used to scan a barcode. The
following table shows the comparison of RFID and barcode techniques. By comparing these two
techniques, we concluded that RFID is better than scanning a barcode so we prefer to use RFID in
our project.
Position of reader and tag Visual contact with line of No line of sight and no visual
contact contact in effective distance
Access distance of reader and Several meters based on laser From cm to meters based on
tag reader sensitivity(line of sight) frequency of tags
Collision of Data
It is possible that multiple cards and tags may come in front of the RFID reader simultaneously.
RFID readers made by some vendors cannot handle this situation. So this will result in collision
and data loss may take place. Complex algorithms are needed to overcome this problem.
Advantages of Using fingerprint scanner
There are different types of methods for biometric verification each having its own pros and cons.
Following table is comparing different biometric techniques:
Hand
Medium Medium Medium High Medium Medium
geometry
Retinal
High High Medium Low High Low
scan
From comparison it can be concluded that biometric verification using fingerprint is more reliable.
Android/Windows Webpage
Application
Voice Command
Web-
Server
This project will consider a cost effective and easy to create method for automation. It will
beneficial for manufacture by making it easy to install and also for customer as it will make your
5.3 Webpage
In contrast from devices controlled from voice commands, there are simple techniques to control
of appliances through internet. Above everything, IOT base automation can reduce cost and
conserve energy and provides you comfortable and cool environment. Customer in not bound to
place to control appliances at his home or office. In case, user forget to turn off any device while
leaving then IOT base automation gives him the opportunity to turn it off through connecting to
any Wi-Fi network. Wireless automation through Internet of Things is very useful application to
control electronic devices over the cloud. The essential components and material for automation
using IOT are listed bellow
Arduino Mega
Ethernet Shield
Relay Board
Wired LAN connection
Ethernet to make Web-Server
You can turn you simple Arduino into a web-server by connecting it to an Ethernet Shield. You
can access this server through any browser connected with same network. Using Ethernet library
for Arduino, you may programmed your controller to answer a HTTP request with Ethernet shield.
From your browser, you navigate to your Ethernet shield IP’s address then it will respond with
HTML to display the required result on your browser. This shield connects a Wiznet Ethernet
controller with Arduino via SPI bus. It is also possible to access server through any other network
but for this purpose, your personal computer should be configured for port forwarding. This allows
you to control your hardware device from a webpage using HTML buttons.
2. Windows application
This project is also intended to make an application for user to automate their devices through
windows.it is always necessary to approach your phones all the time as it may ran out of battery
or some other technical issues. There is an option to control appliances through windows
application. We have used vb.net to design an application for this purpose. Layout of windows app
is shown in software chapter.
Results
We managed to an automation system for automated project in a user friendly and cost effective
manner. User friendly in a way that any common person can use it to control electronic devices
through smartphones, webpage or a speech command. There is no need for special training or
particular skill to operate this system. All components use in this project for automation do not
cost very high and they easily available in market.
Wireless networking is defined as the connection of different devices to each other using radio
signals. Devices are connected and allowed to communicate. It plays a vital role when you want
to place a device or a sensor where no cable can be installed. Wireless sensor Network is a large
set of small electronic devices which are programmed to sense, compute and transmit data of
physical environment to data collecting node. Wireless Sensor Networks (WSNs) have given a
new level to military, industrial, scientific and commercial applications in a cost effective manner.
WSNs are very efficient alternate when human observation or traditional sensors would be
undesirable, inaccurate, expensive or dangerous. Today, WSNs are widely used at different
commercial and industrial level to monitor any activity. If an event is triggered, sensor nodes sense
it and send the information to the main node where it is processed and stored.
Sensor Node 1
Wireless Transmission
Sensor Node 2
Arduino UNO
LM 35
PIR Motion Sensor
Flame Sensor
MQ-2 Gas Sensor
Xbee S1
LM35
LM 35 is very low cost and easily associable sensor. It is a linear device i.e. 10mV/C which means
LM35’s output will rise by 10mV for an increase in every degree. So if the output of LM35 is
220mv/0.22V then the temperature of the environment is 22°C.
They have a sensitivity range up to 20 feet. PIR motion sensor works great at input voltage 5-
12V and it has digital output pin which gives one when motion is detected. These easy to use
specifications made us to use it in our sensor node.
Flame Sensor
We have used most popular XBee module series 1 802.15.4 in our project. It needs a bit
configuration to set PAN ID and destination address for communication. There are different
softwares available for its configuration but we have chosen XCTU as it has very simple user
interface. Figure below shows its configuration software settings.
Arduino UNO
Ethernet Shield
Xbee Series 2
GSM
Here XBee is acting as a coordinator. It receives the data from both sensor nodes and gets them
separated according to the node it belongs. Ethernet shield mounted on Arduino is to save the
sensor node’s data in the online database in a useful manner for future use. An application is also
programmed to have remote access to the sensor’s data on your personal computers and
smartphones. GSM (explained in another chapter) is also connected to alert admin in any
emergency activity at node’s installation place.
Energy Awareness: All devices and sensors in WSN use energy to perform activities like sensing,
transmitting, and storage. Any node in the network should know the estimated amount of energy
to perform any specific task as value can be vary depending on the functionality.
Synchronization: Synchronization between two nodes is when they ensure that flow of data and
its receiving are done at the same rate. Receiving end of WSN should be able to recognize the data
that is transmitted on the sending side is in the same order, it sent.
MySQL
SQL in MySQL stands for Structured Query Language. We can access the database directly
through MySQL or by embedding MySQL queries into the code written in other languages like
vb.net, PHP, C# etc.
Here is a brief description of our designed application.
Automation
Toggling buttons are made on automation form for toggling bulbs. When the button is clicked
request is sent to the server and after getting response from it bulb is turned on or off.
Sensors
Sensor form shows the current status of different sensor nodes installed. In the case of fire, smoke
or any mysterious motion user will be notified through this application. By using load button user
can view the data logs of wireless nodes.
The software is easy to use even for the user who possesses less technical skills. It has buttons,
icons and search boxes for performing various actions which make it user-friendly. This software
shows message box for indicating warnings, errors or success status.
7.2 Website
Web-server based Security and Data Monitoring System can be accessed from anywhere around
the world through the laptop, desktop, tablet or by a smartphone by connecting to the internet,
typing the URL in the browser and login details into the login form. We have made a web server
Web-Server
Web server stores, processes and delivers files that form web pages to clients. For accessing a
particular web page, the client sends the request to the server. The web server then searches that
web page. If the requested page is found it will send that page to the client with HTTP response
otherwise it will send HTTP response: Error Not found.
Request
Web-Server Client
Response
Xampp
XAMPP (Cross-Platform (X), Apache (A), MariaDB (M), PHP (P) and Perl (P) consisting of
Apache HTTP Server, MariaDB database, and interpreters for scripts written in the PHP and Perl
programming languages. Developers use Xampp to create a local web server for testing and
deployment purposes. Xampp is free, simple and open source cross-platform web server solution
stack package containing everything needed to set up a web server.
Port Forwarding
Port forwarding makes a specific computer accessible to other computers on the internet. A port
number is set on the gateway for communicating with the particular service in the private network
for a particular computer. Remote computers can communicate with this specific computer by
providing the port number and the IP address of the gateway.
Router
LAN: 192.168.10.1
10.0.0.2 WAN: 39.55.108.66 192.168.10.3
Sending request to 39.55.108.66:81 Port: 81
CSS
Cascading Style Sheets (CSS) add style to the document written in HTML by setting the back
ground colors, text colors, font size, font style, text alignment, paragraph spacing, table layout,
border styles, margin layout, height and width, positions etc.
PHP
Hypertext Processor (PHP) is server side scripting language used for managing dynamic content
while designing web pages. PHP interacts with databases which include Oracle, Informix, MySQL
etc. PHP is embedded in HTML.
Automation
Automation web page will allow the user to turn on or off bulbs with the single tap. The bulb will
be remotely controlled thus providing convenience to the user.
Baud Rate
How speedily data transfer takes place can be known with the help of a baud rate. It is usually
measured in bits per second. Higher value of baud rate indicates the fast data transferring. Setting
baud rate too high usually greater than 115200 can cause errors.
Frame of data
Data is sent as a packet or frame of bit. Basically serial packet is the data it carries. The block of
data is known as data chunk as it has no specific size.
Synchronization bits
The bits which are sent with each frame of data are known as synchronization bits. The stop bit
and start bits are synchronization bits. These bits indicate the beginning and ending of the data
packet.
Parity bits
Parity bits are used to check the error in transmissions. The two types of parity bits are there even
parity and odd parity. If even parity is set, the bit will be 0 if the data contains even number of 1s.
Similarly, in case of odd parity the bit will be set to 0 for odd 1s.
Tx Tx
Rx Rx
GND GND
VCC VCC
Transmission pin is connected to the receiving pin and receiving pin is connected to transmitting
device. Ground is connected with ground and VCC with VCC.
In our project biometric scanner, GSM, XBees and voice module are working on serial protocol.
The data sent from master to slave is known as Master Out Slave In (MOSI) and the data sent by
slave to master is called Master In Slave Out (MISO).
SCK SCK
MOSI MOSI
MISO MISO
SS SS
SCK is connected with SCK, MOSI with MOSI, MISO with MISO and SS with SS.
Ethernet shield and RFID reader is interfaced with microcontroller using this protocol.
9.1 Outcome
In this project, we successfully implemented a security system consisting of proper monitoring
and wireless alerts through text messages or email. The designed system meets the modern concept
of security which revolves around the sophisticated technologies such as biometric scanning and
RFID technology. The hardware equipment including RFID and biometric were tested and
required results were obtained. The system is smart enough to sense temperature, fire, smoke and
motion of area of interest through an independent unit called sensor node. We also tested the
wireless communication of sensed data though XBees and it gives positive results too. Designed
Wireless Sensor Network (WSN) meets our expected requirements including scalability and
autonomous operation. This project is also successful in providing mobile controlled and user
friendly system for automation of appliances. We programmed a software and websites where
credentials user can log in to the desktop application, android application or website to monitor
current status of sensor data, update the information of the persons enrolled, view all entries and
toggling of the electrical devices. The software part is also successfully interfaced with hardware
equipment and gets the results as expected. This project is cost effective. Implementation of this
project in present day will effectively provide a peace of mind to a resident. This project can be
implemented in homes, schools, banks, offices or any other organization.