Addis Ababa University Addis Ababa Institute of Technology

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

ADDIS ABABA UNIVERSITY

ADDIS ABABA INSTITUTE OF TECHNOLOGY


SCHOOL OF ELECTRICAL AND COMPUTER ENGINEERING

Title: Wireless Robbery and Fire alarm System for Residence

Advisor: Bethlehem Seyifu

Name ID No

Abel Birhanu ATR/5111/05

Abel Geremew ATR/4435/05

Date 11/01/2017

Addis Ababa, Ethiopia

1
Contents page

Abstract............................................................................................................................... v

CHAPTER ONE.................................................................................................................. 1

1. Introduction and Background..................................................................................... 1

1.1 Introduction ................................................................................................................ 1

1.2 Problem Identification................................................................................................ 2

1.3 Objective......................................................................................................................... 2

CHAPTER TWO................................................................................................................. 4

LITERATURE REVIEW ....................................................................................................4

2.1 WIFI...................................................................................................................................7

2.2.2 Why we didn’t use WIFI?...........................................................................................7

2.2 CDMA……………………………………………………………………………………7

2.1.1 Why we didn’t use CDMA?.......................................................................................11

2.3 GSM……………………………………………………………………………………...

2.3.1 Why we used GSM?.................................................................................................

2.2 Types of motion sensors............................................................................ 9

2.2.1 Why we used Thermal IR Sensors? ................................................................. 9

i
CHAPTER THREE ..................................................................................................12

3. System Requirement for the application .....................................................12

3.1 Thermal IR Sensor ..........................................................................................12

3.1.1 Smoke Sensor ............................................................................................12

3.1.2 Shock Sensor .............................................................................................14

3.1.3 Other motion Sensor Considerations ........................................................16

3.1.4 Working Principle........................................................................................17

3.2 GSM (Global System for Mobile Communication) .........................................18

3.2.3 Properties of GSM ............................................................................................20

3.2.3 Advantages of GSM ..............................................................................20

CHAPTER FOUR ........................................................................................................21

4. Methodology ...................................................................................................21

4.1 Hard ware components requirement .............................................................21

4.2 GSM Modem ..........................................................................................23

4.2.1 WHY GSM SIM 300 MODEM ISUSED? ........................................................24

ii
4.2.2 16x4 LCD ...................................................................................................25

4.2.3 Alternative device for GSM module ..............................................................25

4.3 Arduino Mega 2560...........................................................................................25

4.4 WHY ARUDINO IS USED? ..............................................................................26

CHAPTER FIVE ..................................................................................................27

5.SIMULATIONANDIMPLIMENTATION ...........................................................27

CHAPTER 6 .............................................................................................................34

Conclusion Recommendation and Future Work .................................................34

6.1 Conclusion ..................................................................................................34

6.2 Recommendation and Future Work .................................................................35

REFERENCE .......................................................................................................36

APPENDEX ......................................................................................................37

iii
List of figures …………………………………………………………….page

Figure 3.1 Thermal IR sensor……………………………………………

Figure 3.2 field of view characteristic of thermal IR sensor…………

Figure 3.3 MQ2 Gas sensor………………………………………………

Figure 3.4 Arduino MQ-2 Smoke Sensor Circuit Schematic …………………..

Figure 3.5 vibration /shock sensor…………………………………….

Figure 3.6 GSM Architecture…………………………………………

Figure 4.1 flow chart…………………………………………………..

Figure 4.2 GSM modem………………………………………….

Figure 4.2 Arduino module……………………………………..

iv
Abstract

Robbery is a headache for everybody in one or another way. Police news headlines are

about robbery. Fire accidents on the other hand happen and cause a lot of damage. Most

of the time both robbery and fire accidents happen when the home owner is either away

from home or when he/she is asleep. It will be possible to control both fire and robbery

if there is an intelligent home security mechanism which helps the home owner to get

fire/robbery alarm message when he/she is away from home and alerts his/her

neighbors by generating alarm. Unfortunately it is very rare to see such type of home

security mechanism in our country.

Now days, remote controlling system is becoming emerging market and hot topic

due to technological advancement achieved in the past decades. This project work is

also on remote alarming system .The system monitors the status of a home and notify

the home owner if something goes wrong at his home while he is away from home by

sending a text message. The system immediately reports to the home owner or any

concerned body if there is intruder or a fire accident including temperature arise

beyond a certain limit. This system also alerts the neighbors or anyone around by

generating alarm sound. We used the cellular network and different sensors.In addition

we used an application called SMS Backup+ in order to save the texts received into e-

mail.

v
1
i
CHAPTER ONE

1. Introduction and Background


1.1 Introduction

Ethiopia is one of the growing countries in the world. With the booming economy,

the influx of people from all over Ethiopia and other countries takes the country’s

population to a new height every year. Robbery and fire accidents are also

increasing from time to time due to minimal and inefficient home security

mechanisms. GSM network coverage, on the other hand, is spreading to the whole

country and its quality is also increasing from time to time. Until now, we mostly

use the mobile mainly for calling, texting and using internet. Besides these basic

services we can use this GSM network and the mobile for real time remote

controlling/ alarming as used in other developed countries.

This project we designed wireless security system to home, office, and cabinet via

SMS using GSM technology. The system notifies the home owner or any concerned

body if there is an intrusion or fire accident by sending a text and generating an

alarm sound

2
1.2 Problem Identification

Robbery and fire accidents are increasing from time to time in our country and

other corners of the world .Most of us are victims of robbery and fire accidents in

one or another way. As a Communication Engineering student we have tried to

come up with a solution for this problem. We tried to figure out the main causes of

the problem. When we do survey very small number of houses, trade centers and

industries have a home security mechanism in Addis Ababa and other big cities like

Bahirdar, Mekelle, Adama etc. The home security goes worse in rural areas and

other cities. From this we generalize that lack of a good home security is the reason

for a rapid increase in robbery and fire accidents.

There are Modern complex home security systems include several security features

like fire, intruders, electronic door lock, heat, smoke, temperature, etc. Some security

systems may be a combination of all the security measures. However, such complex

systems may be expensive and may not be affordable by everyone. Looking on the

depth of the problem we designed a simple, cost effective and affordable home

security mechanism which mainly monitors robbery and fire.

This project presents a model that will provide s a wireless security system to home,

office, and cabinet via SMS using GSM technology. The system can be deployed

anywhere, where there is a GSM network and a neighbor. Incase if the network goes

down the alarm sound can awake the people on the surrounding.

1
1.3 Objective

Most of the time our society is vulnerable to robbery and fire .We are vulnerable in one

or another way. Such accidents usually happen while the home owner is away from

home. There must be a solution in which the home owner is provided with information

instantly when something goes wrong at his home. In order to achieve this, there must

be a wireless home security technology which sends alarm message to the home owner

if intruder is detected or if the home is caught by fire. In addition there must be an

alarm which will be activated if there is intruder or fire. The Sensors which will be used

for this purpose must be pet friendly and accurate to prevent a false alarm. The wireless

technology must be easily accessible.

Our objective is to design and implement a wireless home security alarm system which

is not expensive but efficient and usable in every part of our country where there is a

GSM infra-structure.

2
CHAPTER TWO

LITERATURE REVIEW
There are different types of home security mechanisms throughout the world.
Hiring a watchman, building a robust fence, lining an electric fence, looking
doors with strong locks etc. can be a way practiced to keep once home safe.As
technology advances other types of home security alarm mechanisms come
into the market. These modern types of security mechanisms provide
intruder detection, fire accidents alarms, smoke detection, temperature
detection and soon. The development in the wireless technology paves
another way for the introduction of new types of wireless home security and
alarm mechanisms.Eventhough these security systems are good enough they
are not affordable. The advantage of wireless security alarms inspired as to
do a cost effective, efficient and simple system which detects fire and
intruder. Choosing the proper type of wireless technology for our project
was the first step of our work.There are different types of wireless
technologies we have to choose from for our project.The main technologies
were

 GSM
 WIFI
 CDMA

Choosing the good and efficient type of sensors inorder to detect intrusion was
another task we have to accomplish in order to realize our project.Some of the common
types of motion sensors were

 Active motion sensors


 Passive infrared sensors
 Thermal IR Sensors

3
2.1 Wi-Fi
Wi-Fi is a technology for wireless local area networking with devices based on the
IEEE 802.11 standards. Wi-Fi is a trademark of the Wi-Fi alliance. Devices that can use
Wi-Fi technology include personal computers, smartphones, digital cameras, tablet
computers. Wi-Fi compatible devices can connect to the Internet via a WLAN
network and a wireless access point.

2.1.1 Why we didn’t use WIFI?

4
2.2 CDMA
In TDMA Band width available for transmission is small which leads to compromise in
quality of transmission. Whereas in CDMA systems entire spectrum is used which
enhances voice quality.

In TDMA/FDMA, cell design requires more frequency planning which is tough job.
Whereas in CDMA frequency planning is minimal.

TDMA is Band limited system. CDMA is Power limited system

2.1.1 Why we didn’t use CDMA?


CDMA will work in USA, Asia, but not France, Germany, the U.K. and other
popular European destinations.

2.3 GSM
GSM (Global System For Mobile Communication) is widely used digital mobile
telephony system. It works on TDMA (Time Division Multiple Access) approach and
it is used in three digital wireless telephony technologies (TDMA, GSM and
CDMA).Today, more than 690 mobile networks provide GSM services across 213
countries and GSM represents 82.4% of all global mobile connections. According to
GSM World, there are now more than 2 billion GSM mobile phone users worldwide.

2.3.1 Why we used GSM?


GSM is already used worldwide with over 450 million subscribers.

International roaming permits subscribers to use one phone throughout Western


Europe. CDMA will work in Asia, but not France, Germany, the U.K. and other popular
European destinations.

5
GSM is mature; having started in the mid-80s.This maturity means a more stable
network with robust features. CDMA is still building its network.

2.4 Types of motion sensors

 Thermal IR Sensor
 Hermetically sealed reed switches
 Passive infrared detectors
 Ultrasonic detectors
 Microwave detectors
 Compact Surveillance Radar etc. .

2.4.1 Why we used Thermal IR Sensor

•OMRON’s unique MEMS and ASIC technologies achieve a high SNR

 Superior noise immunity with a digital output

•High-precision area temperature detection with low crosstalk field of view


characteristics

6
CHAPTER THREE

3. System Requirement for the application


3.1 Thermal IR Sensor

Omron's D6T Series MEMS Thermal Sensors are a super-sensitive infrared

temperature sensor that makes full use of Omron's proprietary MEMS sensing

technology. Unlike typical pyro electric human presence sensors that rely on motion

detection, the D6T thermal sensor is able to detect the presence of stationary humans by

detecting body heat, and can therefore be used to automatically switch off unnecessary

lighting, air conditioning, etc. when people are not present. As the D6T sensor is also

able to monitor the temperature of a room, it can also be used to continually maintain

optimal room temperature levels, instantly sense unusual changes in temperature

thereby detecting factory line stoppages, or discover areas of overheating for early

prevention of fire outbreaks.

Features

• OMRON’s unique MEMS and ASIC technologies achieve a high SNR

• Superior noise immunity with a digital output

• High-precision area temperature detection with low crosstalk field of view

characteristics

7
Field of View Characteristics

Safety Precautions

8
Installation

• The Sensor may not achieve the characteristics given in this datasheet due to the

ambient environment or installation location. Before using the Sensor, please acquire an

adequate understanding and make a prior assessment of Sensor characteristics in your

actual system.

Operating Environment

• Do not use the Sensor in locations where dust, dirt, oil, and other foreign matter will

adhere to the lens. This may prevent correct temperature measurements.

Do not use the Sensor in any of the following locations

• Locations where the Sensor may come into contact with water or oil

• Outdoors

• Locations subject to direct sunlight.

• Locations subject to corrosive gases (in particular, chloride, sulfide, or ammonia

gases).

• Locations subject to extreme temperature changes

• Locations subject to icing or condensation.

• Locations subject to excessive vibration or shock.

●Noise Countermeasures

• The Sensor does not contain any protective circuits. Never subject it to an electrical

load that exceeds the absolute maximum ratings for even an instance.
9
The circuits may be damaged. Install protective circuits as required so that the absolute

maximum ratings are not exceeded.

• Keep as much space as possible between the Sensor and devices that generates high

frequencies (such as high-frequency welders and high-frequency sewing machines) or

surges.

• Attach a surge protector or noise filter on nearby noise-generating devices (in

particular, motors, transformers, solenoids, magnetic coils, or devices that have an

inductance component).

• In order to prevent inductive noise, separate the connector of the Sensor from power

lines carrying high voltages or large currents. Using a shielded line is also effective.

3.1.1 Smoke Sensor

The smoke sensor we will use is the MQ-2. This is a sensor that is not only sensitive to

smoke, but also to flammable gas.

The MQ-2 smoke sensor reports smoke by the voltage level that it outputs. The more

smoke there is, the greater the voltage that it outputs. Conversely, the less smoke that it

is exposed to, the less voltage it outputs.

The MQ-2 also has a built-in potentiometer to adjust the sensitivity to smoke. By

adjusting the potentiometer, you can change how sensitive it is to smoke, so it's a form

10
of calibrating it to adjust how much voltage it will put out in relation to the smoke it is

exposed to.

The gas sensor needs about 5 volts of power in order to operate. This is done by

connecting 5 volts to Vcc and GND.

The Output pin gives out the voltage reading, which is proportional to the amount of

smoke that the sensor is exposed to. Again, a high voltage output means the sensor is

exposed to a lot of smoke. A low or 0 voltage output means the sensor is exposed to

either little or no smoke.

Arduino MQ-2 Smoke Sensor Circuit Schematic The circuit we will build is shown
below.

11
So to power the smoke sensor, we connect pin 2 of the smoke sensor to the 5V terminal

of the arduino and terminal 3 to the GND terminal of the arduino. This gives the smoke

sensor the 5 volts it needs to be powered.

The output of the sensor goes into analog pin A0 of the arduino. Through this

connection, the arduino can read the analog voltage output from the sensor. The

arduino board has a built-in analog-to-digital converter, so it is able to read analog

values without any external ADC chip.

12
Depending on the value that the arduino reads determines the action that will occur

with the circuit. We will make it in our code that if the sensor outputs a voltage above a

certain threshold, the buzzer will go off, alerting a user that smoke has been detected

3.1.2 Shock Sensor

Used to defend high-security locations around the world, Terminus Shock Sensors alert

customers to entry attempts while any harmful activity is taking place. This early

intrusion detection gives you the safety and peace of mind of being able to detect

perimeter intrusion before they’re inside most physical barriers.

Terminus Shock Sensors reliably safeguard your assets from intruders, even in the most

rugged environments. Terminus Shock Sensors are specially designed to be mounted on

physical barriers such as doors, fences, windows, walls, roofs, and more.

In addition, Terminus Shock Sensors provide the highest level of intrusion detection for

a variety of financial institution applications, including safes, vaults, ATMs or night

depositories.

13
3.1.3 Other motion Sensor Considerations

 A passive infrared sensor (PIR sensor): is an electronic sensor that measures


infrared (IR) light radiating from objects in it-s field of view.

All objects with a temperature above absolute zero emit heat energy in the form of
radiation. Usually this radiation isn't visible to the human eye because it radiates at
infrared wavelengths, but it can be detected by electronic devices designed for such a
purpose.

The term passive in this instance refers to the fact that PIR devices do not generate or
radiate any energy for detection purposes. They work entirely by detecting the energy
given off by other objects.[1] PIR sensors don't detect or measure "heat"; instead they
detect the infrared radiation emitted or reflected from an object.

A PIR-based motion detector is used to sense movement of people, animals, or other


objects. They are commonly used in burglar alarms and automatically-activated lighting
systems. They are commonly called simply "PIR", or sometimes "PID", for "passive
infrared detector".

Operation

An individual PIR sensor detects changes in the amount of infrared radiation impinging
upon it, which varies depending on the temperature and surface characteristics of the
objects in front of the sensor. When an object, such as a human, passes in front of the
background, such as a wall, the temperature at that point in the sensor's field of view
will rise from room temperature to body temperature, and then back again. The sensor
converts the resulting change in the incoming infrared radiation into a change in the
output voltage, and this triggers the detection. Objects of similar temperature but
different surface characteristics may also have a different infrared emission pattern, and
thus moving them with respect to the background may trigger the detector as well.

PIRs come in many configurations for a wide variety of applications. The most common
models have numerous Fresnel lenses or mirror segments, an effective range of about
ten meters (thirty feet), and a field of view less than 180 degrees.

Models with wider fields of view, including 360 degrees, are available—typically
designed to mount on a ceiling. Some larger PIRs are made with single segment mirrors

14
and can sense changes in infrared energy over one hundred feet away from the PIR.
There are also PIRs designed with reversible orientation mirrors which allow either
broad coverage (110° wide) or very narrow "curtain" coverage or with individually
selectable segments to "shape" the coverage.

 AIR (Active Infrared): They mainly have two implementation. Proximity

sensors, used in the automatic trash bin, automatic water taps, and different

others; and motion sensors. In AIR-based motion sensors, an IR emitter sends a

beam of IR which will be received by an IR receiver, when the beam is

interrupted, a motion is detected. Due to the way they're implemented

(monitoring a specific scope) they're less prone to false positives. Their main

disadvantage is detectability, they can be easily "seen" using a regular camera

(your phone's camera works) or any IR detection mechanism, after that they can

be easily avoided. In some cases, they might be impossible to avoid (they're

monitoring the only door to a room), the adversary can detect the source of the

beam and find the receiver, then emit a beam of their own. Some AIR-based

motion sensors emit IR in a pattern of a certain frequency to make it difficult to

replicate, but of course the adversary can learn that pattern and replay it to the

receiver.

 Optic-based: Basically a camera watches an area and it's recording at a certain

frame rate, each frame (or several frames) are analyzed by an algorithm that can

detect the difference between the last frames. If something is different, a motion

is detected. They can be overcome with utilizing shadows and exploiting

backgrounds with a solid color. That, of course, can be solved with using thermal

imaging and/or installation-specific measures (eliminating shadows with

controlled light). There's a lot of cutting-edge research in this area, especially in

video amplification. Researchers at MiT were able to detect a person's heart rate

from a normal video footage.

15
 Piezoelectric: I personally haven't seen or used those. They basically use the

piezoelectric effect (mechanical forces having an electrical effect on some

materials). They can be mounted on the floor in order to detect pressure and

vibration. They're vulnerable to Flying Nimbus attacks.

 Ultrasonic: They work by emitting an ultrasonic "beam". They work the same

way as sonar. They can be defeated by wearing an anechoic suit.

 Photoelectric beam: systems detect the presence of an intruder by transmitting

visible or infrared light beams across an area, where these beams may be

obstructed. To improve the detection surface area, the beams are often employed

in stacks of two or more. However, if an intruder is aware of the technology's

presence, it can be avoided. The technology can be an effective long-range

detection system, if installed in stacks of three or more where the transmitters

and receivers are staggered to create a fence-like barrier. Systems are available

for both internal and external applications. To prevent a clandestine attack using

a secondary light source being used to hold the detector in a 'sealed' condition

whilst an intruder passes through, most systems use and detect a modulated

light source.

3.1.4 Working Principle

16
3.2 GSM (Global System for Mobile Communication)

3.2.1 WHAT IS GSM SYSTEM?

GSM (Global System for Mobile Communication) is widely used digital mobile

telephony system. It works on TDMA (Time Division Multiple Access) approach and

it is used in three digital wireless telephony technologies (TDMA, GSM and

CDMA).Today, more than 690 mobile networks provide GSM services across 213

countries and GSM represents 82.4% of all global mobile connections. According to

GSM World, there are now more than 2 billion GSM mobile phone users worldwide.

GSM, which stands for Global System for Mobile communications, reigns

(important) as the world’s most widely used cell phone technology. Cell phones use a

cell phone service carrier’s GSM network by searching for cell phone towers in the

nearby area. GSM is a globally accepted standard for digital cellular communication.

GSM is the name of a standardization group established in 1982 to create a common

European mobile telephone standard that would formulate specifications for a

pan-European mobile cellular radio system operating at 900 MHz It is estimated that

many countries outside of Europe will join the GSM partnership.

3.2.2 GSM – ARCHITECTURE

A GSM network consists of several functional entities whose functions and interfaces

are defined. The GSM network can be divided into following broad parts

 The Mobile Station (MS)

 The Base Station Subsystem (BSS)

 The Network Switching Subsystem (NSS)

 The Operation Support Subsystem (OSS)

17
Figure GSM Archtecture

3.2.3 Properties of GSM

Transmission Rate

The total symbol rate for GSM at 1 bit per symbol in GMSK produces 270.833

K symbols/second. The gross transmission rate of the time slot is 22.8 Kbps. GSM is

a digital system with an over-the-air bit rate of 270 kbps.

Frequency Band

The uplink frequency range specified for GSM is 933 - 960 MHz (basic 900 MHz band

only). The downlink frequency band 890 - 915 MHz (basic 900 MHz band only).

Channel Spacing

This indicates separation between adjacent carrier frequencies. In GSM, this is 200 kHz.

18
Why we choose SMS Service?

most of the service providers are charging their customer's SMS services based on

number of text messages sent from their mobile phone. There are other prime SMS

services available where service providers are charging more than normal SMS charge.

And also we can send the text even if the network is poor to make a call

3.2.3 Advantages of GSM

 GSM is already used worldwide with over 450 million subscribers.

 International roaming permits subscribers to use one phone throughout Western

Europe. CDMA will work in Asia, but not France, Germany, the U.K. and other

popular European destinations.

 GSM is mature; having started in the mid-80s.This maturity means a more stable

network with robust features. CDMA is still building its network.

19
CHAPTER FOUR

4. Methodology
The Thermal IR Sensor detects both motion and raise in temperature. When the

Thermal infrared Sensor finds that some people intrudes into the house or when the

temperature is too high it will send a signal to the Microcontroller. The Smoke Sensor

detects smoke in the house and notifies the microcontroller if there is a smoke in the

house. The Shock Sensor is used to detect a shock or a vibration on the door and

window .It sends alarm signal the microcontroller via data collecting node of the

microcontroller if there is a shock. Once the microcontroller receives alarm signal, it will

send short message alarm to the user or the home owner and any concerned body

through the GSM module and GSM network immediately. The system can be activated

and deactivate if needed by using the keypad interface with the system. In order to

differentiate the home owner with the intruder there will be a password based control

mechanism. The home owner can activate or deactivate the system by inserting a

password.

The motion and shock sensing unit will deactivated by inserting a correct password. If

incorrect password is inserted the system stay at active state.

20
Flow Chart
Start

Check Values of the


sensors

No
Is value Yes
of
TIR/Shock
>
Threshold

Correct
Incorrect Check
keypad
value

No
Yes No Yes Is value of
Attempt
>3 TIR/Smoke
>
Threshold

Activate buzzer & remote


Call/SMS

End

4.1 Hard ware components requirement


21
4.1.2 16x2 LCD
The experiment used 16x2 LCD as it is economical, and easily programmable. 16x2 LCD

means that it is able to display 16 characters per line on two lines. This LC D has two

resisters.

Liquid Crystal Display (LCD) is an optical device consisting crystals arranged on a thin

surface.

LCD has certain features such as; its size is much less than the regular screen, light and

easy to transport, does not need high voltage of electricity like in the regular

screens, Comfortable for the eyes compared to regular screen, their shape is much better

than normal screen and its quality is higher than normal screens in terms of colors.

4.1.2 SIM900 GSM modem

22
Figure GSM modem

Is use in this implementation as it allows sending SMS to the owner of the home via

internet? This modem is a type of modem that accepts SIM card, and operates through a

subscription to a mobile operator. It works like a mobile phone for sending and

receiving SMS or MMS through radio waves. It is slim and compact, the main

advantage of choosing this particular modem is, it has low power consumption. This

modem has a GPRS feature that allows transmitting the data via the internet in different

methods such as SMS, GPRS, or CSD.

The specialized feature of this modem is that it also accepts a SIM card, and just like a

mobile phone, it operates over a subscription to a mobile operator. So, it just looks like

a mobile phone. It provides various applications like SMS for sending and receiving

messages over the modem. Here the charges are to be taken for sending and receiving

messages as done on a mobile phone. All these tasks are performed on a GSM modem

and that modem must support an “extended AT command set” for sending/receiving

SMS messages.

4.1.3 Arduino Uno

23
The Arduino Uno is a microcontroller board based on the ATmega328 (datasheet). It

has 14 digital input/output pins (of which 6 can be used as PWM outputs), 6 analog

inputs, a 16 MHz crystal oscillator, a USB connection, a power jack, an ICSP header,

and a reset button. It contains everything needed to support the microcontroller; simply

connect it to a computer with a USB cable or power it with an AC-to-DC adapter or

battery to get started. The Uno differs from all preceding boards in that it does not

use the FTDI USB-to-serial driver chip. Instead, it features the Atmega8U2

programmed as a USB-to-serial converter.

4.1.3.1 WHY ARUDINO IS USED?


24
Arduino is an open-source electronics prototyping platform based on flexible,

easy-to-use Hardware and software. It's intended for artists, designers, hobbyists,

and anyone interested in Creating interactive objects or environments. Arduino can

sense the environment by receiving input from a variety of sensors and can affects its

surroundings by controlling lights, motors and other actuators. The microcontroller on

the board is programmed using the Arduino programming language and the Arduino

development environment. Arduino projects can be stand-alone or they can

communicate with software running on a computers.

4.2.4 Alternative device for GSM module


GSM was our first priority because of its property which is discussed above. However,
we couldn’t find GSM module for now, thus we use Nokia mobile device in place of the
GSM. The mobile execute the function what we wanted, and it is very good alternative
that it is easily accessible and cheap.

CHAPTER FIVE

25
5. SIMULATION AND IMPLIMENTATION
For simulation we have used Protues.The code for the Arduino is written on Arduino IDE. We

preferred Proteus due to its simplicity and the presence of vast majority of components.

Arduino

Arduino is the main processing component of the system. It is the heart of our project.

The Arduino reads values of the sensors and interpret it to action following the code

written for it.

COMPI Port

 The COMPIM model is a Physical Interface Model of a serial port. Incoming serial data

is buffered and presented to the circuit as a digital signal, whilst serial digital data

generated by a CPU or UART model appears at the PC's physical COM port. The

COMPIM model also provides for baud rate translation, and for optional hardware or

software handshaking on both the physical and virtual sides of the device.

Virtual Serial Port Emulation (VSPE): VSPE is used to help developers to create

applications that use serial ports. It is able to create various virtual devices to

transmit/receive data. One Serial port can be opened into many different applications

and use their different functionality. With VSPE it is possible to share physical serial

port data for several applications, create virtual serial port device pairs and so on.In our

project we used VSPE to map virtual port of COMPIM with the physical port of our PC

in which a mobile with a serial port is connected.

By using a mobile which has a serial port we are able to send message from proteus

simulation.

26
Protues Simulation Description

CHAPTER 6

27
Conclusion Recommendation and Future
Work
6.1 Conclusion
In order to have a stabilized society the properties of the members of the society should
be secured. Every home should be safe no matter where the home owner is.This system
is designed to help people to know the status of their home and other properties
from anywhere. This project has many benefits, some of the advantages include;

 It help home owners to see the status of their home


 It help to minimize robbery and fire accidents
 It provides a simple and efficient home security mechanism
 It brings mind peace to everyone
 It alerts watchmen and security organizations

In general, the implementation of the project provides a valuable security asset for a
society.

6.2 Recommendation and Future Work

28
This project aims to use GSM network cooperatively with some other device such as
sensors, sound systems and a microcontroller to create automatic remote alarming
system. Using the same basic principles and technology it can be extended into many
applications such as; home security, car security, property security and etc. The
system can provide efficient remote security while the owner is away from his
properties.

Next semester the project will be implemented in hardware level. Since we have done
most part of the job the implementation will not be difficult. In addition to that we don’t
stop trying to add many features to the project. Therefore, next part of the project will
be implementation to the hardware by adding additional features as much as possible.
We have already started gathering the required hardware and we will implement the
project as soon as we can if we get all the materials we need.

References

29
[1]Bill Waters. "How Motion Sensors Work with a Security System". The Home
Security Adviser.com.

[2] G.Gunnarsson, M. Allen, T. Rantalainen, V. Ruutu andV-M.Teittinen, Location Trial


System for Mobile Phones, in: Proceedings of the IEEE Global Telecommunication
Conference. The Bridge to Global Integration, 1998, 2211-2216.

[3] GSM SECURITY SYSTEM MAY, 2012, MOHD AZWAN BIN RAMLAN, Faculty of
Electrical & Electronics Engineering University Malaysia Pahang

[4] K Fujimoto, J. R. James, Mobile Antenna Systems Handbook, ArtechHouse, NY2nd


Edition, 2001

[5] ZTE CORPORATION, 2011. ZXWN MSCS MSC Server Product Description.
Version: V3.10.20

Appendix

30
The code written on the Arduino IDE is given bellow

#include<LiquidCrystal.h>

LiquidCrystal lcd(12, 11, 5, 4, 3, 2);

int row [] = {A0, A1, A2, A3}; // Defining row pins of keypad
connected to Arduino pins

int col[] = {A5,13,7, 6}; //Defining column pins of keypad connected


to Arduino

int i, j, lcd_count, count = 1, key_id = 0, flag, entry = 0,errorcounter;

int col_scan;// Variable to identify a key press

const int smokePin= 8;

const int TempPin= A4;

const int vibration Pin=9;

const int buzzerPin= 10;

int smoke_level,vib_level,TempValue;

char temp_press; // Variable to hold value of key press

char check[6], pass[6]; // See About the Program

void setup()

pinMode(smokePin, INPUT);//the smoke sensor will be an input to the arduino

pinMode(vibrationPin, INPUT);

pinMode(TempPin, INPUT);

pinMode(buzzerPin, OUTPUT);//the buzzer serves an output in the circuit

31
lcd.begin(16, 2);

for (i = 0; i <= 3; i++)

pinMode(row[i], OUTPUT);

pinMode(col[i], INPUT);

digitalWrite(col[i], HIGH);

lcd.print("SET 5 Digit PASS");

Serial.begin(9600); //sets the baud rate for data transfer in bits/second

while(!Serial)

/* Main Program Begins */

void loop()

output();

while (entry <= 4) // Password Setting Loop begins

SetPassword();

32
// Password Setting Loop Ends

key_id = 0;

keyscan(); // Scan for a Key Press

/* Actions on Key Press begins */

if (key_id == 1) // Condition to Check Key is Pressed

check[count] = temp_press;

count++;

/* Condition to Unlock Begins*/

if (temp_press == '*')

checkPassword();

if (flag == 0 )

lcd.setCursor(0, 0);

lcd.print("UNLOCKED");

errorcounter=0;

else

{
33
lcd.setCursor(0, 0);

lcd.print(" try again");

errorcounter++;

if(errorcounter==3)

lcd.setCursor(0, 0);

intrusion();

digitalWrite(buzzerPin, HIGH);

count = 1; // Resetting the counter variable

/* Condition to Unlock Ends*/

/* Condition to Change Password Begins */

else if (temp_press == '0')

checkPassword();

if (flag == 0)

lcd.setCursor(0, 0);

lcd.print("ENTER NEW PASS");

34
key_id = 0;

entry = 0;

} else {

lcd.setCursor(0, 0);

lcd.print("WRONG PASSWORD");

count = 1; // Resetting the counter variable

/* Condition to Change Password Ends */

/* Condition to LOCK Begins*/

else if (temp_press == '#')

lcd.setCursor(0, 0);

lcd.print("LOCKED");

count = 1; // Resetting the counter variable

/* Condition to LOCK Ends*/

/* Actions on Key Press Ends*/

35
/* Main Program Ends */

void output()

TempValue = analogRead(TempPin); // Getting LM35 value and saving it in variable

TempValue=0.48828125*TempValue;

smoke_level= digitalRead(smokePin); //arduino reads the value from the smoke


sensor

vib_level=digitalRead(vibrationPin);

checkPassword();//Call function to check password

keyscan(); //checks for key press

if (TempValue>45){

digitalWrite(buzzerPin, HIGH);

send_SMS("message from home.Temprature is very high at home!");//call a function


for sending SMS

lcd.setCursor(1, 1);

lcd.clear();

lcd.print("FIRE!UUUU!!!");

delay(7000);

digitalWrite(buzzerPin, LOW);

lcd.clear();

delay(100000);

36
}

else if(smoke_level==HIGH){

digitalWrite(buzzerPin, HIGH);

send_SMS("message from home.Smoke is sensed at home!");

send_SMS2("message from home numb 1123 at Arada subcity .Smoke is


sensed at this home!");

lcd.setCursor(1, 1);

lcd.print("Smoke!UUUU!!!");

delay(7000);

digitalWrite(buzzerPin, LOW);

lcd.clear();

delay(1000000);

else if(vib_level==HIGH)

digitalWrite(buzzerPin, HIGH);

lcd.clear();

lcd.setCursor(1, 1);

lcd.print("INTRUDER!UUUU!!!");

send_SMS("message from home.Intruder is at home! you should take a measure!");

send_SMS2("message from home numb 1123 at Arada subcity .Intruder is detected


at this home!");

37
intrusion();

else if (TempValue>35 &&TempValue<39 && flag==1 ){

digitalWrite(buzzerPin, HIGH);

send_SMS("message from home.Some one is in your home!");

send_SMS2("message from home numb 1123 at Arada subcity .Intruder is detected


at this home!");

intrusion();

else if (TempValue>35 &&TempValue<39 && temp_press=='#' ){

send_SMS("message from home.Some one is in your home!");

send_SMS2("message from home numb 1123 at Arada subcity .Intruder is detected


at this home!");

intrusion();

else if (TempValue>35 &&TempValue<39 && entry==5 ){

send_SMS("message from home.Some one is in your home!");

send_SMS2("message from home numb 1123 at Arada subcity .Intruder is detected


at this home!");

intrusion();

else{

38
lcd.setCursor(1, 1);

digitalWrite(buzzerPin, LOW);

Serial.begin(9600);

void intrusion()

digitalWrite(buzzerPin, HIGH);

lcd.setCursor(1, 1);

lcd.print("intruder!UUUU");

delay(2000);

digitalWrite(buzzerPin, LOW);

lcd.clear();

delay(1000000);

void send_SMS(String message)

Serial.println("AT\r");

delay(100);

Serial.println("AT+CMGF=1");

delay(100);

39
Serial.println("AT+CMGS=\"+251931670319\"");

delay(100);

Serial.println(message);

delay(500);

Serial.write(0x1A);

Serial.println("");

delay(100);

void send_SMS2(String message2)

Serial.println("AT\r");

delay(100);

Serial.println("AT+CMGF=1");

delay(100);

Serial.println("AT+CMGS=\"+251913990659\"");

delay(100);

Serial.println(message2);

delay(500);

Serial.write(0x1A);

Serial.println("");

delay(100);

40
}

void SetPassword() // Subroutine to SET User Defined Password

keyscan();

if(key_id==1)

if(temp_press=='*'||temp_press=='0'||temp_press=='#') // Condition to Check for an


Invalid Keypress

lcd.setCursor(0,0);

lcd.print("INVALID KEYS");

entry=0;

else

pass[entry]=temp_press;

key_id=0;

if(entry==5)

lcd.clear();

41
lcd.setCursor(0,0);

lcd.print("PASWORD SET & LOCKED");

} // Subroutine to SET Password ENDS

char keyscan()// Subroutine to Scan Keypad for a Keypress

for(i=0; i<=3; i++)

digitalWrite(row[0],HIGH);

digitalWrite(row[1],HIGH);

digitalWrite(row[2],HIGH);

digitalWrite(row[3],HIGH);

digitalWrite(row[i],LOW);

for(j=0; j<=3; j++)

col_scan=digitalRead(col[j]);

if(col_scan==LOW)

key_id=1;

entry++;

42
temp_press=keypress(i,j);

lcd.setCursor(lcd_count++,1);

lcd.print(temp_press);

if(temp_press=='*'||temp_press=='0'||temp_press=='#')

lcd_count=0;

lcd.clear();

delay(300);

break;

}}

}}// Subroutine to Scan Keypress Ends

char keypress(int i, int j) // Subroutine to Identify the value of Key pressed

if(i==0&&j==0)

return('1');

if(i==0&&j==1)

return('2');

43
}

if(i==0&&j==2)

return('2');

if(i==0&&j==3)

return('3');

if(i==1&&j==0)

return('4');

if(i==1&&j==1)

return('5');

if(i==1&&j==2)

return('5');

44
if(i==1&&j==3)

return('6');

if(i==2&&j==0)

return('7');

if(i==2&&j==1)

return('8');

if(i==2&&j==2)

return('8');

if(i==2&&j==3)

return('9');

if(i==3&&j==0)

45
{

return('*');

if(i==3&&j==1)

return('0');

if(i==3&&j==2)

return('0');

if(i==3&&j==3)

return('#');

} // Subroutine to identify Keypress Ends

void checkPassword() // Subroutine to Check User Input Data with SET Password

flag=0;

for(i=1;i<=5&&flag==0;i++)

46
{

if(check[i]==pass[i])

flag=0;

else

flag=1;

}// Subroutine to check password ends

47

You might also like