A Major Project on
“AUTOMATED HOME SECURITY SYSTEM”
Submitted in partial fulfilment
Of the requirements for
B.Tech Degree
In
Information technology
By
Siddharth Chaudhary A12405212068
Arunendra Choudhary A12405212067
Abhishek Sholat A12405312007
Janhvi Singhal A12405312003
Under the guidance of
Mr. Anant Jayswal
(Assistant professors department of Computer Science)
Amity School of Engineering, Amity university, Noida
May 2016
AUTOMATED HOME SECURITY SYSTEM
2
TABLE OF CONTENT
Contents
ACKNOWLEDGEMENT...................................................................................................................4
CANDIDATE’S DECLARATION.........................................................................................................5
CERTIFICATE ..................................................................................................................................6
Chapter I: Introduction..................................................................................................................7
1.1 Preface ................................................................................................................................7
1.2 Background .........................................................................................................................8
1.3 Description about the project.............................................................................................9
1.4 Program Flow Chart of the Automated Home Security System .......................................10
Chapter II: Requirement Analysis and Feasibility Study .............................................................11
2.1 Requirement Analysis .......................................................................................................11
2.2 Feasibility Study ..........................................................................................................13
2.3 Project Planning (Using MS Project) .................................................................................15
Chapter III: System Analysis and Design .....................................................................................19
3.1 System Analysis.................................................................................................................19
3.2 System Design ...................................................................................................................19
Chapter IV: Coding and Testing...................................................................................................26
4.1 Coding ...............................................................................................................................26
4.2 Testing...............................................................................................................................28
Chapter V: Implementation ........................................................................................................32
5.1 Implementation Activities...........................................................................................32
Chapter VI: Working of different modules..................................................................................34
6.1 RFID Technology................................................................................................................34
6.2 RELAY.................................................................................................................................36
6.3 DC Motor...........................................................................................................................37
6.4TEMPERATURE SENSOR (LM 35)........................................................................................37
6.5 SMOKE SENSOR (MQ-2) ....................................................................................................38
AUTOMATED HOME SECURITY SYSTEM
3
6.6 PIR SENSOR........................................................................................................................39
6.7 GSM Module .....................................................................................................................40
Chapter VII: Maintenance Features............................................................................................41
Chapter VIII: Market Survey and Cost Analysis...........................................................................43
Chapter IX: Advantages and Limitations of developed project ..................................................44
9.1 Advantages of developed system .....................................................................................44
9.2 Limitations.........................................................................................................................44
Chapter X: Conclusion and Suggestions for further work...........................................................46
10.1 Conclusions .....................................................................................................................46
10.2Suggestions for further work ...........................................................................................46
Snapshots....................................................................................................................................47
Appendix (for source code).........................................................................................................52
Reference....................................................................................................................................60
AUTOMATED HOME SECURITY SYSTEM
4
ACKNOWLEDGEMENT
We would like to express our sincerest gratitude to all the people who have
contributed towards the successful completion of our project.
We would like to extent our heartiest thanks to the Head of
Computer Science Department Professor Sheetal Sharma, for nurturing
a congenial yet competitive environment in the department, which
motivates all the students to pursue higher goals.
We want to express our special gratitude to our guide "Mr. Anant jayswal
Assistant Professor", Department of Computer Science, Amity School of
Engineering, Noida for his constant support, guidance, encouragement and
much needed motivation. His sincerity, thoroughness and perseverance
have been a constant source of inspiration for us.
Last but not the least we would like to extent our thanks to all the teaching
and non-teaching staff members of our department, and to all our
colleagues who helped me in completion of the project.
AUTOMATED HOME SECURITY SYSTEM
5
CANDIDATE’S DECLARATION
We, Siddharth Chaudhary, Arunendra Choudhary, Abhishek Sholat,
Janhvi Singhal, an understudy of B.TECH, thusly announce that the work
exhibited in undertaking entitled "Automated Home Security System",
presented by us to Department of CSE, Amity School of Engineering,
Amity University Uttar Pradesh, Noida in fractional satisfaction of the
prerequisites for the recompense of level of Bachelor of Technology in
Information and Technology is a bona fide record we could call our own
work did under the direction of Mr.Anant Jayswal, Assistant Professor,
Amity School Of Engineering.
AUTOMATED HOME SECURITY SYSTEM
6
CERTIFICATE
We hereby declare that the project work entitled "Automated Home
Security System" submitted to the Department of Computer Science, is a
record of an original work done by us under the guidance of Mr. Anant
Jayswal (Assistant Professor), Department of Computer Science, Amity
School of Engineering, Noida, and this project work is submitted as part of
fulfilment of award of the degree of Bachelor of Technology under Amity
University.
AUTOMATED HOME SECURITY SYSTEM
7
Chapter I: Introduction
1.1 Preface
Security has becoming an important issue everywhere. Home security is becoming
necessary nowadays as the possibilities of intrusion are increasing day by day. Safety
from theft, leaking of raw gas and fire are the most important requirements of home
security system for people.
Smart Home can be also known as Automated Home or intelligent home which
indicates the automation of daily tasks with electrical appliances used in homes. This
could be the control of lights, fans, viewing of the house interiors for surveillance
purposes or giving the alarm alteration or indication in case of gas leakage.
Home security has changed a lot from the last century and will be changing in coming
years . Security is an important aspect or feature in the smart home applications. The
new and emerging concept of smart homes offers a comfortable, convenient, and safe
environment for occupants. Conventional security systems keep homeowners, and their
property, safe from intruders by giving the indication in terms of alarm.
Those home security systems were very expensive and surprisingly ineffective. The
requirement for an efficient and cost effective system to cater the disastrous situations
and in order to fulfil the security concerns of home owners when the user is away from
home, there was a strong need to develop a cost effective and reliable system to satisfy
the security related needs of occupants.
However, a smart home security system offers many more benefits over conventional
security systems
Nowadays, embedded system is designed to provide security due to tremendous
improvement in microcontroller unit and widespread applications of GSM technology.
Our group develops an automated home security system. This system will be able to
detect fires at all locations, unauthorised access through doors & windows and detect
leakage of gases like LPG, Propane and Hydrogen. The system will get activated
automatically with the help of smoke and temperature detection sensors, PIR motion
sensor, RFID technology. If anyone tries to unlock the system without authority, then
those sensors will activate and controller will receive a suitable pulse. According to the
pulse of input devices, the controller section takes decision and activates the output
section which includes LCD display, GSM Module, Servo Motor, LED and Buzzer.
These systems help in reducing the cost of fire-insurance protection as well as provide
security for the owner of the place..
AUTOMATED HOME SECURITY SYSTEM
8
1.2 Background
Nowadays, securing one’s property and business against fire, leaking of raw gas, safety
from theft is becoming more and more important. Monitoring commercial and
residential areas all-round is an effective method to reduce personal and property losses
due to fire disasters and unauthorised access to home.. Large numbers of small
temperature, smoke and PIR sensors should report their information to the control
centre of a building or a block by alarm and text message notification. Fire disaster is a
great threat to lives and property. Automatic home security system provides real-time
surveillance, monitoring and automatic alarm. It alerts the owner of the house by
sending text and alarm notification It sends early alarm when the fire occurs and helps
to reduce the fire damage.
PIR(Pyro electric infrared sensor) motion Sensor Compact, complete easy to use for
human body detection. This module will detect motion up to 6 meters away. All PIR
sensors detect changes in infra-red radiation, in the form of heat emitted by a number of
bodies including people, cars and, to a lesser extent, dogs or other small animals. The
bigger the body, the more infra-red radiation is emitted and the easier it is for a PIR
sensor to detect. It alerts the home owner by text message and alarm notification in case
of any intruder detection in the house.
The electronic access control industry has been shifting from basic systems to more
complex mechanisms. In the past, keys, keypads, and magnetic stripe cards were used
simply to open doors. These technologies are being phased out as more sophisticated
systems such as smart cards and biometrics provide more security and more
functionality like tracking of individuals entering and exiting buildings.
The use of RFID for access control is becoming very popular because it can remove the
manual aspect of entry involved with keys, keypads, and magnetic stripe cards while
also increasing security due to unique identification. Using RFID for entrance into a
building will not only increase convenience but also allow for tracking of who has
entered the building premises at a given time. This will increase building security and
thus the safety of the occupants.
AUTOMATED HOME SECURITY SYSTEM
9
1.3 Description about the project
The purpose of our project is to develop a automated home security system, with the
ability to alert the owner of the house via text message and alarm notification in case of
fire, leaking of raw gas, intrusion detection. The system is wireless therefore more
adaptable and cost-effective. The project is aimed at developing the security of Home
against Intruders and Fire. In any of the above cases if any one met while you are out of
your home then the device sends SMS to the emergency number provided to it.
GSM (Global System for Mobile communications) based security systems provides
enhanced security as whenever a signal from sensor occurs, a text message is sent to a
desired number to take necessary actions. This security system is SMS based and sends
a text message to the owner. This system is equipped with motion sensor, smoke
detector, temperature sensor and RFID module(smart card access system).
The system is designed with the aim for the protection of life and securing one’s
property. This system has automatic detectors such as smoke detectors and temperature
detectors installed throughout all areas of the building (including roof spaces and voids)
with the aim of providing the earliest possible way. This system also include PIR sensor
installed throughout all areas of the house. It is Compact, complete easy to use for
human body detection. This module will detect motion up to 6 meters away. All PIR
sensors detect changes in infra-red radiation, in the form of heat emitted by a number of
bodies including people, cars and, to a lesser extent, dogs or other small animals. The
bigger the body, the more infra-red radiation is emitted and the easier it is for a PIR
sensor to detect. Each zone is constantly monitored by the sensor. When a person or
other heat source enters any zone, the level of infra-red radiation in that zone increases.
This change is detected and processed by the sensor, sending signals to IC which will
send SMS “someone is there in the house” to owner via GSM module
The smoke detector used in our project is MQ2 smoke sensor and the temperature
detector used is LM35 temperature sensors. When the threshold value of both the
sensors is crossed the alarm is generated and text message “fire detected” Is convey to
the authorities about the fire. Fire detection, alarm and signalling systems can play a
vital role in risk reduction by helping to control fires at early stages or by initiating
smaller, controlled, manual suppression efforts before fire grows to the size needed to
initiate automatic sprinkle operation.
The Smart Home security system also contains an RFID access control that will provide
ID-based entry into a building. This system will use an RFID authentication mechanism
to communicate with a microcontroller that will release an electric door strike for
access. Using an electronic door strike provides convenience of hands-free access. The
unique identification of the entrant using passive RFID tags will permit tracking of
individuals entering and exiting the premises. Using RFID for entrance into a building
will not only increase convenience but also allow for tracking of who has entered the
building premises at a given time and if different RFID tag is used by some intruder
then system will alert the authorities by alarm and text message notification. This will
increase building security and thus the safety of the occupants
AUTOMATED HOME SECURITY SYSTEM
10
1.4 Program Flow Chart of the Automated Home Security System
START
Initialize GSM module, PIR
sensor, Temperature sensor
smoke sensor , buzzer
Obstacle
detection?
YES
NO
YES
YES
NO
NO
NO
Unlock the Door
RFID Reader verify tag?
RFID tag is placed near RFID
reader
Heat
detection?
Smoke
detection?
Turn on Buzzer and
Send SMS to Owner
mobile phone
END
YES
AUTOMATED HOME SECURITY SYSTEM
11
Chapter II: Requirement Analysis and Feasibility Study
2.1 Requirement Analysis
Requirement analysis is system engineering and software engineering, encompasses
those tasks that go into determining the needs or conditions to meet for a new or altered
product, taking account of the possibility conflicting requirements of the conflicting
stakeholders, analysing, managing, documenting and validating system requirements.
Requirements analysis is critical to the success of the system of the software project.
The requirements should be documented, actionable, measureable, testable, traceability,
related to identified business needs or opportunities, and defined to a level of detail
sufficient for system design.
2.1.1 Information Gathering
Various sites have been analysed to get a better idea to build the project. We have
gathered information by analysing different means and requirements of the potential
cases of fire that may occur. Information gathering is a key part of feasibility analysis.
We must know what information to gather, where to find it, how to collect it, and
ultimately how to process the collected information. Information gathering is both an
art and a science. It is an art because the person who collects the information needs to
be sensitive, and must have an understanding of what to collect and what to focus on,
the channels where the source of information can be gathered. It is a science because it
requires proper methodology and the use of specifics tools in order to be effective.
None the less, there is always a chance that one can find oneself drowned in an ocean of
information, not knowing which specific information to collect, where to collect it and
how to collect it. Based on the information gathered, the new system is built.
2.1.2 Functional Requirement
This section specifies what is to be done by the product, to what level or specific
requirements, what inputs should be transformed to what outputs, what specific
operations are required. The functional requirements are those which describe what
activities the software/application is going to perform once it is implemented.
Functional requirements drive the application architecture of a system. These
requirements define a function of a system or its components. A function is described as
asset of inputs, the behaviour, and outputs.
For each function, specify requirements on input, processing and outputs. These are
usually organized with these four subparagraphs: -
• Purpose of the function: Provide rationale to clarify the intent of the function.
• Inputs: Source, valid ranges of the values, any timing concerns, operators
requirements, special interface.
AUTOMATED HOME SECURITY SYSTEM
12
• Operations to be performed: validity Checks, response to abnormal conditions,
types of processing required.
• Outputs: Valid range of values, timing concerns and handling of illegal values,
error messages and interfaces required.
Functions required by the automated Home Security system include the following
requirements: -
• The system should be designed for very early detection of fire incidence.
• The system should be designed for early detection of any gas leakage.
• The design should incorporate any suitable principle for higher sensitivity to
detect all possible size of smoke particles and/or elevated heat.
• The System should be designed to give alert via SMS.
• The System should be designed to give alert in case of intrusion.
• The system should not give false alarms.
• The System should display correct output on LCD screen.
• The system should grant entrance only to person with correct RFID tag.
• The system should be designed to give very early warning against any security
threat.
• The system should be compact, lightweight and highly reliable and robust in
design with inbuilt redundancy to cater for any sensor failure.
2.1.3 Non Functional Requirement
In systems engineering and requirements engineering, a non-functional requirement is a
requirement that specifies criteria that can be used to judge the operation of a system,
rather than specific behaviours. This should be contrasted with functional requirements
that define specific behaviour or functions. The plan for implementing functional
requirements is detailed in the system design. The plan for implementing non-functional
requirements is detailed in the system architecture.
Broadly, functional requirements define what a system is supposed to do and non-
functional requirements define how a system is supposed to be. Functional requirements
are usually in the form of "system shall do requirement", while non-functional
requirements are in the form of "system shall be requirement".
Non-functional requirements are often called qualities of a system. Other terms for non-
functional requirements are "constraints", "quality attributes", "quality goals", "quality
of service requirements" and "non-behavioural requirements". Informally these are
sometimes called the "ilities", from attributes like stability and portability.
Qualities, that are non-functional requirements, can be divided into two main
categories: -
• Execution qualities, such as security and usability, which are observable at run
time.
• Evolution qualities, such as testability, maintainability, extensibility and
scalability, which are embodied in the static structure of the software system.
Non-functional requirements for the automated fire alarm system are as follows: -
AUTOMATED HOME SECURITY SYSTEM
13
• The system should be robust and reliable.
• The system should be user friendly.
• The system should be completely consistent and secure.
• Interface requirement.
• Interface should be easy to follow.
2.1.3.1 Hardware Requirements
• LM 35 temperature sensor.
• MQ2 smoke sensor.
• PIR sensor
• RFID Reader
• RFID Tag
• Relay
• Stepper motor
• MCU IP16F887
• Power supply unit (5V).
• Computer.
• Programmer.
• TTL Bridge.
2.1.3.2 Software Requirements
• Embedded C.
• Proteus
• MPLAB
2.1.3.3 Usability Requirements
Usability includes methods of measuring usability, such as needs analysis and the study
of the principles behind an object's perceived efficiency or elegance. In human-
computer interaction and computer science, usability studies the elegance and clarity
with which the interaction with a computer program or a web site (web usability) is
designed. Usability differs from user satisfaction and user experience because usability
also considers usefulness. The project designed should be user friendly.
2.2 Feasibility Study
Feasibility studies aim to objectively and rationally uncover the strengths and
weaknesses of an existing business or proposed venture, opportunities and threats
present in the environment, the resources required to carry through, and ultimately the
prospects for success. In its simplest terms, the two criteria to judge feasibility are cost
required and value to be attained.
A well-designed feasibility study should provide a historical background of the business
or project, a description of the product or service, accounting statements, details of the
operations and management, marketing research and policies, financial data, legal
AUTOMATED HOME SECURITY SYSTEM
14
requirements and tax obligations. Generally, feasibility studies precede technical
development and project implementation.
A feasibility study evaluates the project's potential for success; therefore, perceived
objectivity is an important factor in the credibility of the study for potential investors
and lending institutions. It must therefore be conducted with an objective, unbiased
approach to provide information upon which decisions can be based.
When we are developing the system (software), we must know the proposed system
will be feasible or that is practically implemented or not it may be possible the proposed
system may not be implemented due to many reasons like it may take long time in
development than the specified time limit, cost may increase than proposed one etc.
Therefore we must analyse the feasibility of the system. Feasibility is the analysis of
risks, costs and benefits relating to economics, technology and user operation
Facts considered in the feasibility analysis are: -
• Technical Feasibility
• Economic Feasibility
• Operational Feasibility
2.2.1 Technical Feasibility
The technical feasibility assessment is focused on gaining an understanding of the
present technical resources of the organization and their applicability to the expected
needs of the proposed system. It is an evaluation of the hardware and software and how
it meets the need of the proposed system.
As far as our project is concerned we have the necessary expertise so that the proposed
solution can be made feasible for the design and development of the system, several
software products has been accommodated.
Technology used is embedded C . This software has the enough efficiency in producing
the required output. Also the hardware requirements used are compatible with all OS.
The system can also be expanded as per the needs of requirement specification.
Therefore the project is technically feasible.
2.2.2 Economic Feasibility
The purpose of the economic feasibility assessment is to determine the positive
economic benefits to the organization that the proposed system will provide. It includes
quantification and identification of all the benefits expected. This assessment typically
involves a cost/ benefits analysis.
Thus feasibility study should centre along the following points: -
• Improvement resulting over the existing method in terms of accuracy,
timeliness.
AUTOMATED HOME SECURITY SYSTEM
15
• Cost comparison
• Estimate on the life expectancy of the hardware.
• Overall objective.
Automated Home security system is a cost effective system. All sensors used in this
project are cost effective. Our project is economically feasible, it does not require much
cost to be involved in the overall process.
2.2.3 Operational Feasibility
Operational feasibility is a measure of how well a proposed system solves the problems,
and takes advantage of the opportunities identified during scope definition and how it
satisfies the requirements identified in the requirements analysis phase of system
development.
The operational feasibility assessment focuses on the degree to which the proposed
development projects fits in with the existing business environment and objectives with
regard to development schedule, delivery date, corporate culture, and existing business
processes.
Our project solves the problem very efficiently and takes advantage of the opportunities
identified during scope definition and it satisfies the requirements identified in the
requirements analysis phase of the system development. People are inherently resistant
to change and computers have been known to facilitate change. The new proposed
system is very much useful to the users and therefore it will accept broad audience from
around the world. Automated fire alarm system is user friendly system one can use very
easily.
2.3 Project Planning (Using MS Project)
Project management is the process of planning , organising and managing task and
resource to accomplish a defined objective, usually within limitations on time,
resources or cost, A project plan can be simple, for example, a list of task and their start
and finish dates written on a notepad.
Whether simple or complex, however, all projects consist of three major phases: -
• Build the plan
• track and manage the project
• close the project
As a project plan is built, Microsoft project calculates and creates a working schedule
based on information you provide about the task to be done, the people who work on
them, the equipment and supplies used to accomplish them, and the costs involved.
Typically information required is: -
• Task
AUTOMATED HOME SECURITY SYSTEM
16
• Duration
• Task dependencies
• Resources
• Costs
To create project plan, start a new project plan and then enter and organize the list of
task to be completed, along with each task's duration and any dependencies. Next, add
people, equipment, and materials and their costs to the plan, and then assign these
resources to task. With this resources and task information, Microsoft Project creates a
schedule. With this information, MS Project can calculate the schedule, costs and
resource work load.
Gantt chart:
A Gantt chart is a horizontal bar or line chart which will commonly include the
following features: -
• Activities identified on the left hand side
• Time scale is drawn on the top(or bottom) of the chart.
• A horizontal open oblong are shaded to represent the actual time spent (an
alternative is to represent actual and estimated by 2 separate lines).
• A vertical cursor (such as a transport ruler) placed at the review point makes it
possible to establish activities which are behind or ahead of schedule.
AUTOMATED HOME SECURITY SYSTEM
17
AUTOMATED HOME SECURITY SYSTEM
18
AUTOMATED HOME SECURITY SYSTEM
19
Chapter III: System Analysis and Design
3.1 System Analysis
System Analysis is the detailed study of the various operations performed by the system
and their relationships within and outside the system. Analysis is the process of
breaking something into its parts so that the whole may be understood. System analysis
is concerned with becoming aware of the problem, identifying the relevant and most
decisional variables, analysing and synthesizing the various factors and determining an
optional or at least a satisfactory solution. During this a problem is identified, alternate
system solutions are studied and recommendations are made about committing the
resources used to the system. Description of the present system: Presently, in some
systems the smoke detectors may not sense the fire when smoke cannot reach the
detectors such as in chimneys, in or behind walls, on roofs, or on the other side of
closed doors. Also the most common cause of fire alarm malfunction is inadequate
maintenance. To keep the entire fire alarm system in excellent working order, on going
maintenance is required per the manufacturers’ recommendation.
The major flaws in the present system are as follows: -
• Wastage of money
• High amount of maintenance is required.
3.2 System Design
The most creative and challenging face of the system development is System Design. It
provides the understanding and procedural details necessary for the logical and physical
stages of development. In designing a new system, the system analyst must have a clear
understanding of the objectives, which the design is aiming to fulfil. The first step is to
determine how the output is to be produced and in what format. Second, input data and
master files have to be designed to meet the requirements of the proposed output.
The operational phases are handled through program construction and testing. Design of
the system can be defined as a process of applying various techniques and principles for
the purpose of defining a device, a process or a system in sufficient detail to permit its
physical realization. Thus system design is a solution to "how to" approach to the
creation of a new system. This important phase provides the understanding and the
procedural details necessary for implementing the system recommended in the
feasibility study. The design step provides a data design, architectural design, and a
procedural design.
OUTPUT DESIGN
AUTOMATED HOME SECURITY SYSTEM
20
The output design is the part of the project which interacts with the world outside. In
the output design, the emphasis is on developing a system for real time monitoring of
data. There is a provision of an LCD display for displaying the output values of the
smoke sensor and temperature sensor in a predetermined format. Messages which are
sent to ower’s phone are also displayed on LCD screen. The task of display the output
values is achieved by connecting the LCD display to the Micro Controller Unit (MCU).
Different outputs displayed on screen:
• Access Denied—when false RFID tag is used at door entrance
• Access Granted—when corrected RFID tag is used
• Smoke detected—in case of any gas leakage
• Fire detected—in case of fire in the house
• Someone is there in house—in case of any intruder in house
The output design of our project also focuses on the notification that will be provided
by the various sensors when the output values of the temperature sensor and smoke
sensor exceeds the threshold value. These output is the most important and direct source
of information to the user, efficient, logical, output design should improve the systems
relations with the user and help in decision-making. There should not be any false alarm
and also there must be an alarm in case to threat. The output device's capability, print
quality, response time requirements etc. should also be considered, form design
elaborates the way the output is presented and layout available for capturing
information. It's very helpful to produce the clear, accurate and speedy formation for
end users.
INPUT DESIGN
In the input design, user-originated inputs are converted into a computer-based system
format. It also includes determining the record media, method of input, speed of capture
any entry on to the screen. This deals with the collection of data from the environment
and the regulated source of power supply. The data flow diagram indicates logical data
flow, data stores, source and destination. Input data are collected and organized into a
group of similar data once identified input media are selected for processing.
It this software, the main focus is to get data in analogform from environment that can
be processed to detect the act of fire according to the predefined guidelines. The
importance is given to develop Graphical User Interface (GUI), which is an important
factor in developing efficient and user friendly software. For inputting user data,
attractive forms are designed. Also the important input format is designed it such a way
that accidental errors are avoided. The user has to input only just the minimum data
required, which also helps in avoiding the errors that the users may make. Accurate
designing of the input format is very important in developing efficient software. The
goal of input design is to make entry as easy, logical and free from errors.
LOGICAL DESIGN
Logical data design is about the logically implied data. Each and every data in the form
can be designed in such a manner to understand the meaning. Logical data designing
should give a clear understanding & idea about the related data used to construct a
AUTOMATED HOME SECURITY SYSTEM
21
form.During the logical design phase of the project life cycle, we design a logical
architecture showing the interrelationships of the logical components of the solution.
The logical architecture and the usage analysis from the technical requirements phase
form a deployment scenario, which is the input to the deployment design phase.
When developing a logical architecture you need to identify not only the components
that provide services to users, but also other components that provide necessary
middleware and platform services. Infrastructure service dependencies and logical tiers
provide two complementary ways of performing this analysis.
The logical design of a system pertains to an abstract representation of the data flows,
inputs and outputs of the system. This is often conducted via modelling, using an over-
abstract (and sometimes graphical) model of the actual system. In the context of
systems, designs are included. Logical design includes entity-relationship (ER
diagrams), use case diagrams, data flor diagrams, sequence diagrams, class diagrams.
3.2.1 Data Flow Diagram (DFD)
A data flow diagram (DFD) is a graphical representation of the "flow" of data through
an information system, modelling its process aspects. Often they are a preliminary step
used to create an overview of the system which can later be elaborated. DFDs can also
be used for the visualization of data processing (structured design).
A DFD shows what kinds of information will be input to and output from the system,
where the data will come from and go to, and where the data will be stored. It does not
show information about the timing of processes, or information about whether
processes will operate in sequence or in parallel.
With a data flow diagram, users are able to visualize how the system will operate, what
the system will accomplish, and how the system will be implemented. Data flow
diagrams can be used to provide the end user with a physical idea of where the data
they input ultimately has an effect upon the structure of the whole system from order to
dispatch to report.
Data Flow Diagram Symbols:-
AUTOMATED HOME SECURITY SYSTEM
22
Fig. Symbols DFD
3.2.1.1 Level-0
This is a top level data flow diagram. It only contains one process node that generalises
the functions of the entire system in relationship to external entities.
Some important points are: -
• Inputs going into a process are different from outputs leaving the process.
• Data stores are first shown at this level.
SENSORS
SMS on
Phone
ALARM
MCU
AUTOMATED HOME SECURITY SYSTEM
23
Fig. DFD Level-0
3.2.1.2 Level-1
The Level 1 DFD shows how the system is divided into sub-systems (processes), each
of which deals with one or more of the data flows to or from an external agent, and
which together provide all of the functionality of the system as a whole. It also
identifies internal data stores that must be present in order for the system to do its job,
and shows the flow of data between the various.
Fig. DFD Level-1
AUTOMATED HOME SECURITY SYSTEM
24
3.2.2 Use Case Diagram
A use case diagram at its simplest is a representation of a user's interaction with the
system and depicting the specifications of a use case. A use case diagram can portray
the different types of users of a system and the various ways that they interact with the
system. This type of diagram is typically used in conjunction with the textual use case
and will often be accompanied by other types of diagrams as well.
Fig. Use Case Diagram
AUTOMATED HOME SECURITY SYSTEM
25
3.2.4 Class Diagram
The class diagram is the main building block of object-oriented modelling. It is used
both for general conceptual modelling of the systematics of the application, and for
detailed modelling translating the models into programming code. Class diagrams can
also be used for data modelling. The classes in a class diagram represent both the main
elements, interactions in the application, and the classes to be programmed.
In the diagram, classes are represented with boxes that contain three compartments:
• The top compartment contains the name of the class. It is printed in bold and
centred, and the first letter is capitalized.
• The middle compartment contains the attributes of the class. They are left-
aligned and the first letter is lowercase.
• The bottom compartment contains the operations the class can execute. They are
also left-aligned and the first letter is lowercase.
Fig.Class Diagram
AUTOMATED HOME SECURITY SYSTEM
26
Chapter IV: Coding and Testing
4.1 Coding
4.1.1 About the technology used
Embedded C
Embedded C is a set of language extensions for the C Programming language by the C
Standards committee to address commonality issues that exist between C extensions for
different embedded systems. Historically, embedded C programming requires
nonstandard extensions to the C language in order to support exotic features such as
fixed point arithmetic, multiple distinct memory banks, and basic I/O operations.
In 2008, the C Standards Committee extended the C language to address these issues by
providing a common standard for all implementations to adhere to. It includes a number
of features not available in normal C, such as, fixed point arithmetic, named address
spaces, and basic I/O hardware addressing. Embedded C uses most of the syntax and
semantics of standard C, e.g., main() function, variable definition, datatype declaration,
conditional statements (if, switch, case), loops (while, for), functions, arrays and strings,
structures and union, bit operations, macros, etc.
As assembly language programs are specific to a processor, assembly language
didn’t offer portability across systems. Assembly language seems to be an obvious
choice for programming embedded devices. However, use of assembly language is
restricted to developing efficient codes in terms of size and speed. Also, assembly codes
lead to higher software development costs and code portability is not there. To
overcome this disadvantage, several high level languages, including C, came up.
Language C got wide acceptance for not only embedded systems, but also for desktop
applications. Even though C might have lost its sheen as a mainstream language for
general purpose applications, it still has a stronghold in embedded programming. Due to
the wide acceptance of C in embedded systems, various kinds of support tools like
compilers & cross compilers, ICE, etc. came up, and all this facilitated development of
embedded systems using C. Hence high level languages are preferred for embedded
systems programming
.
An Embedded system is combination of computer hardware and software, and perhaps
additional mechanical or others parts, designed to perform a specific task .An embedded
system is a computer system designed to do one or a few dedicated and/or specific
functions often with real-time computing constraints. Example: microwave oven, AC
etc. Embedded systems are designed to do some specific task, rather than be a general-
purpose computer for multiple tasks.
Embedded systems are not always standalone devices. The program instructions written
for embedded systems are referred to as firmware, and are stored in read-only memory
or Flash memory chips. They run with limited computer hardware resources.
AUTOMATED HOME SECURITY SYSTEM
27
Advantages of Embedded C are as follows:
• Compared to assembly language, C code written is more reliable and scalable,
more portable between different platforms.
• C compilers are available for almost all embedded devices in use today, and
there is a large pool of experienced C programmers.
• Unlike assembly, C has advantage of processor independence and is not specific
to any particular microprocessor/microcontroller or any system. This makes it
convenient for a user to develop programs that can run on most of the systems.
• As C combines functionality of assembly language and features of high level
languages, C is treated as a ‘middle level computer language’ or ‘high level
assembly language’.
• It is fairly efficient.
• It supports access to I/O and provides ease of management of large embedded
projects.
• Java is also used in many embedded systems but Java programs require the Java
Virtual Machine (JVM), which consumes a lot of resources. Hence it is not used
for smaller embedded devices.
MPLAB v 8.40
In this system MPLAB v8.40 is used to develop the program for PIC microchip. This
compiler consists of Hitech C as well. So this compiler can be used to program in C
language. Here the program is divided into six macros. The main macro con-trols the
whole program. It calls the three sub macros „Unauthorized‟, „Fire‟ and „Smoke‟
whether there is any fault in the system. Inside these three sub macros two sub macro,
„Tx‟ and „Rx‟ are developed. This two macros help to set communication with
network and send the SMS properly. If there is any fault in RB0 or RB1 or RB2 pin of
microcontroller then the sys-tem will send a preloaded SMS, to two certain number of
home owner. Again if there is any fault in RB3 the PIC will send a message „Fire!!!‟ to
home owner. If the condition of RB4 is changed then the system will generate only one
SMS „Smoke detected ‟ to home owner only.
4.1.2 Programming/ Coding Standards
Some important coding standards need to be followed in order to make implementation
of code less error-prone and improve the maintainability of the code. The chief
standards mete incorporated are proper indentation of code, the use of white space
around and keywords, the capitalization of keywords and variable names, the style and
of user-defined identifiers, such as function, procedure and variable names, the use mod
style of comments, and the use or avoidance of particular programming constructs emit
as avoiding GOTO statements. To ensure better readability of code, the following
coding conventions were followed:
AUTOMATED HOME SECURITY SYSTEM
28
• To make it easier to distinguish classes from other entities, Class names should
be nouns in Camel Case.
• To ensure that the functionality of the method is clear while using it, methods
should be verbs, in mixed case with the first letter lowercase, with the first letter
of each internal word capitalized.
• To ensure that the developer is able to grasp the meaning of an identifier,
variable names should be short yet meaningful. The choice of a variable name
should be mnemonic- that is, designed to indicate to the observer the intent of its
use. One-character variable names should be avoided except for temporary
variables.
• Hungarian Notation must be incorporated wherever necessary. This helps in
increasing the clarity of the source code and it becomes easier for the developer
to use the variables and methods.
4.2 Testing
Testing Software Testing is the process used to identify the completeness, correctness,
security and quality of the product being developed. Testing involves technical
investigation which is performed on behalf of end users. This is intended to reveal
quality related information about the product in a context in which it is intended to
operate. This is just not limited to the process of executing a program or application
with the intent of finding errors. Quality is not an absolute and never completely
establishes the correctness of computer software.
Objectives of software testing-
The software testing is usually performed for the following objectives:-
Software Quality improvement: - The computer and the software are mainly used for
complex and critical applications and a bug or fault in software causes severe losses. So
a great consideration is required for checking for quality of software.
Verification and Validation: -Verification means to test that we are building the product
in right way .i.e. are we using the correct procedure for the development of software
so that it can meet the user requirements. Validation means to check whether we are
building the right product or not.
Software Reliability Estimation: - The objective is to discover the residual designing
errors before delivery to the customer. The failure data during process are taken down
in order to estimate the software reliability.
4.2.1 System Testing
System testing tests a completely integrated system to verify that it meets its
requirements. In addition, the software testing should ensure that the program, as well
as working as expected, does not also destroy or partially corrupt its operating
environment or cause other processes within that environment to become inoperative
(this includes not corrupting shared Memory, not consuming or locking up excessive
AUTOMATED HOME SECURITY SYSTEM
29
resources arid leaving any parallel processes unharmed by its presence).The automated
Home security system has been undergone system testing very carefully and the system
meets the desired outcome and performs well without effecting the operating
environment.
4.2.2 Unit Testing
Unit testing is a method in which each unit or set of one or more modules are tested
with associated data, operating procedure and usage method for determining fitness of
product for use. Each unit can be defined as smallest testable part of the product. A unit
can be entire module but commonly it is commonly individual procedure or function.
We have tested all the parts of the project individually such as sensors and all the
function are also tested and the expected result is obtained.
4.2.3 Integration Testing
Integration testing is a part of software testing in which each individual module are
combined into a group and tested. It occurs after finishing unit testing. Integration takes
modules that have been tested in unit testing as input, groups them and applies test case
defined. The need of integration testing is to verify performance, functional and reliable
requirements mentioned during design phase. Test cases are defined to test that all
components connected interact correctly using procedure calls. If some module fails to
meet minimum requirement, changes are made to that module so that it starts
functioning properly. The various modules of the automated system are integrated and
tested to check whether they perform well together or not.
4.2.4 Regression Testing
Regression testing is any type of software testing that seeks to uncover new software
bugs, or regressions, in existing functional and non-functional areas of a system after
changes, such as enhancements, patches or configuration changes, have been made to
them. The intent of regression testing is to ensure that a change such as those mentioned
above has not introduced new faults. One of the main reasons for regression testing is to
determine whether a change in one part of the software affects other parts of the
software. Common methods of regression testing include rerunning previously-
completed tests and checking whether program behaviour has changed and whether
previously-fixed faults have re-emerged.
4.2.5 Black box Testing
Black box testing is a method of software testing that examines the functionality of an
application without peering into its internal structures or workings. This method of test
can be applied to virtually every level of software testing: unit, integration, system and
acceptance. It typically comprises most if not all higher level testing, but can also
dominate unit testing as well. Specific knowledge of the application's code/internal
structure and programming knowledge in general is not required. The tester is aware of
what the software is supposed to do but is not aware of how it does it. For instance, the
AUTOMATED HOME SECURITY SYSTEM
30
tester is aware that a particular input returns a certain, invariable output but is not aware
of how the software produces the output in the first place.
Test Cases: -
Test cases are built around specifications and requirements, i.e., what the application is
supposed to do. Test cases are generally derived from external descriptions of the
software, including specifications, requirements and design parameters. Although the
tests used are primarily functional in nature, non-functional tests may also be used. The
test designer selects both valid and invalid inputs and determines the correct output,
often with the help of an oracle or a previous result that is known to be good, without
any knowledge of the test object's internal structure.
Test cases to test the automated Home Security system: -
1. Input: - The value of the temperature and smoke sensor is slightly above than
the threshold values of both the sensors.
Output: - The alarm will be activated and SMS is receiver by owner about fire
or smoke in the house
Status: - The developed project cleared the respective test case.
2. Input: - The variation in infra-red radiation coming from the heat source(human)
is received by PIR sensor.
Output: - The alarm will be activated and SMS(Someone is there in house) is
receiver by owner.
Status: - The developed project cleared the respective test case.
3. Input: - The no variation in infra-red radiation detected by PIR sensor.
Output: - The alarm will be not get activated and SMS(Someone is there in
house) is not receiver by owner.
Status: - The developed project cleared the respective test case.
4. Input: - authenticated RFID tag is placed near RFID reader
Output: - The door will open and get close after few second.
Status: - The developed project cleared the respective test case.
5. Input: - unauthorised RFID tag is placed near RFID reader
Output: - The door will not open and SMS(someone tries to enter in house) is
received by the owner.
Status: - The developed project cleared the respective test case.
6. Input: -The value of temperature sensor is above threshold and the value of
smoke sensor is below threshold.
Output: - The alarm will get activated and SMS is receiver by owner about fire
in the house
Status: - Developed project successfully passed the respective test case.
AUTOMATED HOME SECURITY SYSTEM
31
7. Input: - The values of the temperature sensor and the smoke sensor are below
threshold.
Output: - The alarm will not get activated because the values of both the sensors
are not fulfilling the minimum requirements.
Status: - Developed project works on the basic requirement and have cleared the
respective test.
8. Input: - The values of the temperature sensor and smoke sensor are very high as
compared to the minimum values.
Output: - The alarm will get activated and SMS is received by owner.
Status: - Developed project works in critical condition and have passed the
respective test case.
4.2.6White box Testing
White Box Testing (also known as Clear Box Testing, Open Box Testing, Glass Box
Testing, Transparent Box Testing, Code Based Testing or Structural Testing) is a
software testing method in which the internal structure/ design/ implementation of the
item being tested is known to the tester. The tester chooses inputs to exercise paths
through the code and determines the appropriate outputs. Programming knows how and
the implementation knowledge is essential. White box testing is testing beyond the user
interface and into the nitty-gritty of a system.
The code of the developed project has been tested successfully with various inputs to
achieve the desired output. For example, the code including the port that connects the
temperature sensor and smoke sensor provide input to the respective port mentioned in
the code. Thus the developed project also satisfies the white box testing.
Steps to test a Home Security system are as follows:-
1. Test and calibrate sensors, such as temperature, PIR sensor, smoke detectors,
per manufacturer specifications. This requires knowing about the different
sensors and their testing requirements, failure modes, and reinstallation
requirements.
2. Simulate inputs and test the annunciators. This requires specific knowledge of
the system under test.
3. Set sensitivity. This requires an understanding of the particular system, the
application, and the fire detection theory.
AUTOMATED HOME SECURITY SYSTEM
32
Chapter V: Implementation
5.1 Implementation Activities
We have used SDLC (Software Development Life Cycle)Model for the development of
our project. To design each module we follow the iterative model till we get the right
module that fulfils our requirements. SDLC, an acronym for Software Development
Life Cycle, is a well-defined and systematic approach, put into practice for the
development of a reliable high quality information system. It’s a methodology that is
employed by business analysts which describes the activities carried out at each
juncture of the development of software. The end result of a well described and handled
SDLC would be a highly dependable software system that leaves the customer ecstatic
in terms of its working, completion accomplished well within time and expense
estimates, works proficiently and effectively in the prevailing environment and
infrastructure, and is easy on the pocket to maintain and economical to enhance. We
have used the most widely used SDLC model which is Iterative Enhancement Model.
The Iterative Enhancement model is a sequential design process, often used in software
development processes, in which progress is seen as flowing steadily downwards
through the phases of Conception,Initiation, Analysis, Design, Construction, Testing,
Production/Implementation.
Fig. Iterative Enhancement Model
The various phases can be described as follows:
• Requirement Analysis and Software Definition: This is the first phase of
waterfall model which includes analysing the project motive and what all
hardware’s or software’s will be required to fulfil the desired motive. This is the
most crucial phase as any misinterpretation at this stage may give rise to
validation issues later. The software definition must be detailed and accurate
AUTOMATED HOME SECURITY SYSTEM
33
with no ambiguities. It is very important to understand the customer
requirements and expectations so that the end product meets his specifications.
• System design: The inter relation between the various logical modules is
established at this stage. Algorithms and diagrams defining the scope and
objective of each logical model are developed. In short, this phase lays a
fundamental for actual programming and implementation.
• System Implementation: This is the software process in which actual coding
takes place. A software program is written based upon the algorithm designed in
the system design phase. A piece of code is written for every module and
checked for the output.
• System Testing: The programmatically implemented software module is tested
for the correct output. Bugs, errors are removed at this stage. In the process of
software testing, a series of tests and test cases are performed to check the
module for bugs, faults and other errors. Erroneous codes are rewritten and
tested again until desired output is achieved.
• System Deployment and maintenance: This is the final phase of the waterfall
model, in which the completed software product is handed over to the client
after alpha, beta testing. After the software has been deployed on the client site,
it is the duty of the software development team to undertake routine
maintenance activities by visiting the client site. If the customer suggests
changes or enhancements the software process has to be followed all over again
right from the first phase i.e. requirement analysis. This is the biggest
shortcoming of the waterfall model.
Thus, Iterative Enhancement model is easy to implement and more often than not
produces desired result. The inter-dependence of waterfall model phases may lead to
developmental issues, if a systematic approach is not followed at each step. However, in
spite of these shortcomings, waterfall model is adopted all across the world.
AUTOMATED HOME SECURITY SYSTEM
34
Chapter VI: Working of different modules
6.1 RFID Technology
The proposed scheme is to develop an intelligent security system using RFID reader
and tags to stop entries of unwanted persons in a critical area where only few persons
are given permission to come in side. In this system the RFID reader is to be fixed to
the door through which we want to stop unauthorized persons .RFID reader is
connected to microcontroller which is connected to motors. When a person with valid
tag comes in the range of RFID reader the reader detects the tag, sends signal to
microcontroller, then the microcontroller turns on the motor to open the door. After the
person passes through door another motor closes the door.
6.1.1 Working of RFID System
RFID systems operates from very low frequency(VLF) to extremely high
frequency(EHF).RFID system operating in low frequency range make use of
electromagnetic wave propagation to communicate their data and commands,
these use passive tags. RFID systems operating in low frequency range operates on
principle of near
field coupling
between tag and
reader. Faraday’s
principle of
electromagnetic
induction is the
basis of near field
coupling. In near
field RFID system,
electromagnetic
waves are
transmitted by
reader or
interrogator which propagates outwards with spherical wave front. Tags placed
within field collect some energy. Then exchange of data between tag and reader
takes place. The amount of energy available at any particular point is related to
distance from the transmitter as expressed as 1/d (2) where d is distance from the
transmitter.
6.1.2 RFID TAG
Tag is the basic building block of RFID. It consists of small silicon chip and an antenna.
Silicon chip is used to store the data and antenna is used to energize the chip and
communicate with reader. There are two types of tags: Active tag and passive tag.
Active tag are those Active tags require a power source—they’re either connected to a
powered infrastructure or use energy stored in an integrated battery. Passive RFID is of
interest because the tags don’t require batteries or maintenance.
AUTOMATED HOME SECURITY SYSTEM
35
6.1.3 RFID Reader
The RFID reader sends a pulse of radio energy to the tag and listens for tags response.
The tag detects this energy and sends back a response that contains the tags serial
number and other information as well. It reads the tags and output their information to
the microcontroller.
6.1.3 NEAR FIELD RFID
In this project we have used Near field RFID, how this technology works is explained
below:
Faraday’s principle of magnetic induction is the basis of near-field coupling between a
reader and tag. A reader passes a large alternating current through a reading coil,
resulting in an alternating magnetic field in its locality. If you place a tag that
incorporates a smaller coil in this field, an alternating voltage will appear across it. If
this voltage is rectified and coupled to a capacitor, a reservoir of charge accumulates,
which you can then use to power the tag chip.
Tags that use near-field coupling send data back to the reader using load modulation.
Because any current drawn from the tag coil will give rise to its own small magnetic
field—which will oppose the reader’s field—the reader coil can detect this as a small
increase in current flowing through it. This current is proportional to the load applied to
the tag’s coil.
AUTOMATED HOME SECURITY SYSTEM
36
if the tag’s electronics applies a load to its own antenna coil and varies it over time, a
signal can be encoded as tiny variations in the magnetic field strength representing the
tag’s ID. The reader can then recover this signal by monitoring the change in current
through the reader coil.
Each passive tag has different serial number stored in chip inside the tag. The serial
number is given by manufacturer. In this project, we have stored serial number
information in programming; We have used here three passive tags. Serial number of
the only two passive tags are stored in programming. when these two tags will place
there card in field of reader, then door opens and “Access granted” is displayed in LCD
display. One card is access denied. When this card will be shown the door does not
open and „Access restricted‟ message is displayed in LCD display and text message
“someone tries to enter”.
6.2 RELAY
A relay is an electromagnetic switch which is used to switch High Voltage/Current
using Low power circuits. Relay isolates low power circuits from high power circuits. It
is activated by energizing a coil wounded on a soft iron core. A relay should not be
directly connected to a microcontroller, it needs a driving circuit.
A relay should not be connected directly to a microcontroller due to following reasons..
• A microcontroller is not able to supply current required for the working of a
relay. The maximum current that a PIC Microcontroller can source or sink is
25mA while a relay needs about 50 – 100mA current.
• A relay is activated by energizing its coil. Microcontroller may stop working
by the negative voltages produced in the relay due to its back emf.
6.2.1 Energized Relay (ON)
the current flowing through the coils represented by pins 1 and 3 causes a magnetic
field to be aroused. This magnetic field causes the closing of the pins 2 and 4. Thus the
switch plays an important role in the relay working. As it is a part of the load circuit, it
is used to control an electrical circuit that is connected to it. Thus, when the relay in
energized the current flow will be through the pins 2 and 4.
AUTOMATED HOME SECURITY SYSTEM
37
6.2.2 De – Energized Relay (OFF)
As soon as the current flow stops through pins 1 and 3, the switch opens and thus the
open circuit prevents the current flow through pins 2 and 4. Thus the relay becomes de-
energized and thus in off position.
6.3 DC Motor
The DC Motor has 2 wires, simply Positive and Negative. When the positive and
negative of the dc motor is connected to a power source then the motor will start turing
until the power is removed .A DC motor is usually able to reverse its turning direction
by simply switching the positive and negative wires around.
since we want to control the motor both directions, we are using 2 relays in this project.
Say for instance, we have a DC motor with a green wire and a red wire, if we apply
positive the green and negative to the red it will turn, and if we switch the green and red
around it will go the other way.
6.4TEMPERATURE SENSOR (LM 35)
Temperature sensor is a device which senses variations in
temperature across it. LM35 is a basic temperature sensor that can
be used for experimental purpose. It give the readings in
centigrade(degree Celsius)since its output voltage is linearly
proportional to temperature. It uses the fact that as temperature
increases, the voltage across diode increases. The range of LM 35
sensor is -55 to +150 Celsius.
The output of LM35 is of 10mV/°C scale factor, that means for
each 1°C increase in temperature there will be a corresponding
increase in 10mV, so we can easily read temperature value.
Programmic logic:
• First we may have to declare a long variable ‘A’ to store the value read from
LM35, which has its range from 0 to 1023.
• Then declare another integer variable, ‘B‘ to store mapped (converted) value.
• The temperature value obtained from pin A0 which is stored to variable ‘A’.
• Variable A is then mapped or converted to 0 to 500 range and stored on
variable ‘B’
• The value of ‘B’ is directly displayed on 16×2 LCD screen.
AUTOMATED HOME SECURITY SYSTEM
38
6.5 SMOKE SENSOR (MQ-2)
MQ-2 gas sensor has high sensitity to LPG, Propane and Hydrogen, also could be used
to Methane and other combustible steam, it is with low cost and suitable for different
application.
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.
Character Configuration
• Good sensitivity to Combustible gas in wide
range
• High sensitivity to LPG, Propane and
Hydrogen
• Long life and low cost
• Simple drive circuit
We will wire the MQ-2 to an Microcontroller so that it can read the amount of voltage
output by the sensor and sound a buzzer if the sensor outputs a voltage above a certain
threshold. This way, we will know that the sensor is detecting smoke and we will sound
a buzzer alerting a person such as a homeowner to this fact.
The 3 leads are Output, Vcc, and GND. 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.
In the code analogRead() function is used to read the value from the sensorPin (the
smoke sensor). This will be a numerical value from 0 to 1023. 0 represents no smoke,
while 1023 represents smoke at the absolute maximum highest level. if this value rises
above 836,a message “smoke detected “ is received by the owner.
AUTOMATED HOME SECURITY SYSTEM
39
6.6 PIR SENSOR
PIR(Pyro electric infrared sensor) motion Sensor Compact, complete easy to use for
human body detection. This module will detect motion up to 6 meters away. All PIR
sensors detect changes in infra-red radiation, in the form of heat emitted by a number of
bodies including people, cars and, to a lesser extent, dogs or other small animals. The
bigger the body, the more infra-red radiation is emitted and the easier it is for a PIR
sensor to detect. It alerts the home owner by text message and alarm notification in case
of any intruder detection in the house.
Providing the heat source (person) continues to move in the field of view, the PIR
sensor will keep processing the changes in infra-red radiation and the lighting will stay
on. If a person stands still in the field of view or moves out of the detection area, the
sensor will not detect any changes in infra-red radiation between the zones. In order for
the sensor to most effectively detect changes in heat between zones, it is advisable to
walk across the zones not up or along a zone.
PIR sensors are passive devices, they do not emit or radiate any energy or beams.
PIR sensor consists these two important components:
6.6.1 Multi Element Fresnel Lens
The lens focuses the infra-red radiation given out by a heat source (person) on to the
Pyroelectric sensor. The different elements or facets of the lens divide the incoming
infrared radiation into vertical and horizontal zones.
6.6.2 Pyro electric Passive Infra-Red Sensor
The dual element Pyroelectric sensor receives the incoming infra-red radiation from the
various zones. The two elements of the sensor receive varying amounts of infra-red
radiation and this difference is amplified, turning into a signal via the IC. This signal
activates the switching relay.
6.6.3 Effects of temperature change on PIR sensor
All PIRs operate by detecting the
temperature difference between the ambient
air temperature and a moving heat source
(person). Outside air temperature changes
have the greatest effect on the operating
performance of PIRs. The sensitivity of the
sensor increases on cold nights and decreases
on hot nights.
AUTOMATED HOME SECURITY SYSTEM
40
6.7 GSM Module
GSM (Global System for Mobile communications) is an open, digital cellular
technology used for transmitting mobile voice and data services. GSM differs from first
generation wireless systems in that it uses digital technology and Time Division
Multiple Access (TDMA) transmission methods. The GSM modem is a specialized type
of modem which accepts a SIM card operates on a subscriber’s mobile number over a
network, just like a cellular phone. It is a cell phone without display.
The network architecture of GSM can be broadly divided into these main areas –Mobile
station, Base-station subsystem, Network and switching subsystem, Operation and
support subsystem.
To send SMS messages, first place a valid SIM card from a wireless carrier into a
mobile phone or GSM/GPRS modem, which is then connected to a computer.
After connecting a mobile phone or GSM/GPRS modem to a computer, you can control
the mobile phone or GSM/GPRS modem by sending instructions to it. The instructions
used for controlling the mobile phone or GSM/GPRS modem are called AT commands.
(AT commands are also used to control dial-up modems for wired telephone system.)
The following table lists the AT commands that are related to the writing and sending
of SMS messages:
AT command Meaning
+CMGS Send message
+CMSS Send message from storage
+CMGW Write message to memory
+CMGD Delete message
+CMGC Send command
AUTOMATED HOME SECURITY SYSTEM
41
Chapter VII: Maintenance Features
Automated home security systems are expected to protect people, property, and assets.
But we can’t tell if they’re fully operational just by looking at them. As with any other
system, electronics and other components can degrade over time and compromise the
system’s operation. Dust, dirt, and other contaminants can cause problems with smoke
detectors. Such things as vandalism, remodelling, and improper maintenance
procedures can also damage fire protection equipment. The good news is that with
proper testing, inspection, and maintenance you can keep your security system at
optimum operating performance. In addition to ensuring protection, keeping your
system in good condition reduces expenses by preventing unbudgeted emergency
repairs and costly false alarms.
Common issues inspectors include non-operational equipment or equipment that does
not operate as originally installed, according to such parameters as sound pressure
levels and detector sensitivity.
Other issues commonly encountered in an automated Home secuirty system include:
systems that have not been maintained properly, such as not cleaning detectors in harsh
environments, system modifications that are not code compliant and, as a result, hinder
system performance and integrity, and poor system installations and modifications. A
lack of knowledge about the system, improper documentation, and improper component
and circuit labelling also can pose problems during maintaining the system. Also,
accidental discharges of fire suppression systems, such as clean agents and deluge
sprinklers, can occur if the service company is not aware of specific system functions or
does not follow proper testing protocol.
The age of a security system and detection system also can pose problems during
maintaining the system. Systems that are 15 years old and older might have lived out
their performance lives. Maintaining systems of this age typically uncovers problems
that include equipment that no longer functions properly, defective components
requiring replacement, and poorly maintained equipment. Addressing system problems
can be as simple as replacing faulty components, repairing wiring and conducting
routine maintenance. Using competent, experienced contractors for system installations
can reduce future problems resulting from poor installations.
The potential problem, however, is that not all fire alarm systems are subject to the
same environmental and ambient conditions. Therefore, meeting minimum standards of
all applicable codes and standards may not provide the optimum protection for a
facility. Because of this, service organizations may recommend inspections and
maintenance that exceed published standards and guidelines.
The maintenance activities for fire alarm systems can be summed up in five steps-
• Test and calibrate sensors, such as temperature, PIR sensor, smoke detectors,
RFID reader. This requires knowing about the different sensors and their testing
requirements, failure modes, and reinstallation requirements.
• Simulate inputs and test the annunciators. This requires specific knowledge of
the system under test.
AUTOMATED HOME SECURITY SYSTEM
42
• Set sensitivity. This requires an understanding of the particular system, the
specific application, and fire detection theory.
• Check the battery for corrosion and expiration date, and then take appropriate
action, if necessary.
System maintenance: In addition to system age, budget and staffing resources are also
considered whether the staffs has the time and expertise to properly maintain this
critical life safety system or will it be more cost effective to have the manufacturer’s
service organization or a contractor specializing in fire alarms perform the
maintenance? The most stringent standards and guidelines are meaningless unless the
people performing the inspection, testing, and maintenance are knowledgeable and
qualified to service the fire alarm system. Facility maintenance people usually don’t
possess the experience and knowledge found in manufacturer’s service technicians,
whose daily work revolves around fire alarm system technology in a variety of
environments and circumstances. This problem can be solved by training people for the
defined task. This approach works, if done on an on going basis. We can get around the
training dilemma by using a service agreement. These can range from a basic on call
agreement to regularly scheduled service visits. Emergency service offering four hour
and eight hour response times, on a 24hr a day basis, is an option available in most
service agreements. This service usually provides response within the specified time,
along with repair and replacement of equipment. Rapid emergency response is almost
universal for the healthcare and lodging industries because of around the clock.
Sensors maintenance: The most crucial parts of the automated Home security system
are the temperature, smoke sensors, PIR sensor. RFID re ader and GSM module. In our
project we have used the Lm35 temperature sensor , MQ2 smoke sensor ,PIR Sensor
and RFID reader. If these sensors would not work properly, the fire developed, any
leakage of gas and intrusion entry cannot be identified and hence the project is of no
use. Therefore it is important to maintain these sensors. The maintenance of the sensors
includes some important parameters such as the sensors should calibrate properly the
sensors should sense the values as early as possible. The sensors should also be tested
from time to time as to check that whether they are in working condition and perform
their desired function. The sensors should cover as much area as possible to prevent the
damage form fire. The sensors used should be scalable. The PIR sensors enhances the
systems performance. In winter and summer, the PIR sensor operates differently due to
the differences in ambient air temperature. The SENS control may have to be adjusted
at the beginning of winter and against the beginning of summer to maintain the desired
operating performance.
AUTOMATED HOME SECURITY SYSTEM
43
Chapter VIII: Market Survey and Cost Analysis
The global home security solutions market is expected to grow from $28,318.69 Million
in 2014 to $47,542.52 Million by 2020, at a CAGR of 8.7% between 2015 and 2020.
The global home security solutions market is growing rapidly and the major reasons
behind this could be the alarming crime rates on global basis and growing concerns of
society toward security measures and concerns.
The major players in the global home security solutions market are Tyco (Ireland),
ASSA ABLOY (Sweden), UTC Fire & Security (U.S.), Honeywell International, Inc.
(U.S.), Bosch Security Systems (Germany), Ingersoll Rand Solutions (Ireland),
AllegionPlc (Ireland), Godrej & Boyce Manufacturing Company Limited (India),
Control4 Corporation (U.S.), Alarm.com (U.S.), and Nortek Security & Control LLC
(U.S.).
The market currently provides many home automation products that focus on one
particular task. Several of these single-task devices could be bought separately and
combined to mimic the functionality of the proposed AUTOMATED HOME
SECURITY SYSTEM.
This project several features like entry in the house using RFID technology at the gate,
alerting the owner via SMS and alarm system in case of fire and any intruder entrance
in the house. Whereas the security system that are already available in market include
one or two features at a time.
COST ANALYSIS
AUTOMATED HOME SECURITY SYSTEM
44
Chapter IX: Advantages and Limitations of developed project
9.1 Advantages of developed system
The technology can find applications in the following ways: -
• Automatic Home Security system provides real-time surveillance, monitoring
and automatic alarm.
• This system is a way to help protect your home while you're away, when you're
sleeping, or during times when you're preoccupied with household
responsibilities and might not be aware of intruders.
• Crime Deterrence ;A big advantage of a home alarm system is its usefulness in
deterring crime. When potential burglars or intruders see you have an alarm
system, they may go elsewhere because it isn't worth the time to try to
deactivate it.
• It sends early notifications when the fire occurs and helps to reduce the fire
damage.
• The sensors are scalable and can sense the fire as early as possible.
• The automated system is a compatible system.
• The MQ 2 smoke sensor is capable of sensing leakage of gases like LPG,
methane etc.
• Entry in the house is based on RFID technology which provide highly secure
environment.
• Tags are less sensitive to adverse conditions (dust, chemicals, physical
damage etc.).
• Many tags can be read simultaneously.
• Tag detection not requiring human intervention.
• This system alerts the owner of house by SMS notification which is a great plus
9point when he/she is away from home.
9.2 Limitations
An automatic fire alarm system made up of smoke detectors, heat detectors, audible
warning devices, and a fire alarm control panel which provides early warning of a
developing fire. Such a system, however, does not assure protection against property
damage or loss of life resulting from a fire.
Power Supply
The automated fire alarm system does not operate without any electrical power. If AC
power fails, the system operates from standby batteries only for a specified time and
only if the batteries are properly maintained and replaced regularly.
Smoke detectors
Smoke detectors may not sense fire where smoke cannot reach the detectors such as in
Chimneys, in or behind walls, on roofs, or on the other side of closed doors. Smoke
detectors also may not sense a fire on another level or floor of a building. A second-
AUTOMATED HOME SECURITY SYSTEM
45
floor detector, for example, a second-floor detector, may not sense a first floor or
basement fire.
Particles of combustion or “smoke”from a developing fire may not reach the sensing
chambers of smoke detectors because:
• Barriers such as closed or partially closed doors, walls, or chimneys may inhibit
particle or smoke flow.
• Smoke particles may become “cold,” stratify, and not reach the ceiling or upper
walls where detectors are located.
• Smoke particles may be blown away from detectors by air outlets.
PIR Sensor
Protect the sensor from the extremes of weather by sheltering it under a soffit or eave if
possible.
The electronics inside the sensor can be destroyed by aiming the head at the sun or by
light reflected from bright surfaces such as mirror windows or swimming pools.
Mount the sensor 2.5 to 3.5 metres above ground level to achieve the optimum
detection area.
RFID Tag
• Faulty manufacture of tags : Manufacturing of tags is not yet 100% failure-free
today; about 20–30% of tags used in early RFID pilots have been
defective
• Prices of active or semi-passive tags (at least $1 per tag) are even more
of a hindrance
• Faulty or deficient detection of tags :Tags may be damaged during usage.
Adverse conditions of the environment and improper placement may corrupt
reading.
• Registration of data from tags which pass within range of an RFID reader
accidentally.
• Quick technology obsolescence :Technology is continuously evolving and new
protocol standards, faster and more fault-tolerant readers quickly outdate their
predecessors.
• encryption must be ensured at all interfaces where data could be
intercepted or transmitted (on the medium itself, as well as tag–reader and
reader–host communication)
Audible warning devices
Audible warning devices used in our project is an alarm, it may not alert people if the
devices are located on the other side of closed or partly open doors or are located on
another floor of a building. Any warning device may fail to alert people with a
disability or those who have recently consumed drugs, alcohol or medication.
AUTOMATED HOME SECURITY SYSTEM
46
Chapter X: Conclusion and Suggestions for further work
10.1 Conclusions
The GSM based home security system has been designed and tested with the mobile
network. The user can get alerts anywhere through the GSM technology thus making
the system location independent. A flexible way to control and explore the services of
the mobile, AT commands is used in the system. The communication of home is only
through the SMS which has been tested with the mobile networks and is working on
any mobile network.People are getting more and more concerned about how to protect
themselves and their houses from emergencies. These emergencies include not only
thief intrusion, but also fire attack. This device provides a means for being able to
secure-ly monitor a house by use of sensors integrated with a micro-controller and a
GSM unit. SMS provides an economical and convenient way to alert users of a possible
intrusion into the property. The use of mobile handsets as a client device to receive
warning messages on implies that the user will not have to carry an additional piece of
equipment as most people already have a mobile phone with them most of the time.So
this system is safe and cost effective as well.
This system will be able to detect fires, smoke and intruder at all locations. The system
will get activated automatically with the help of various sensors. This system helps in
reducing the cost of fire-insurance protection as well as provides security for the owner
of the place We are using a temperature sensor and a smoke sensor. Theses sensors will
sense the conditions and send their output to the microcontroller chip. This
microcontroller chip has been programed using embedded C, thereby as programed it
will send a notification to the local authorities if the output of the temperature sensor
and smoke sensor crosses the threshold value. There is a LED attached to display the
and the PC is attached for real time monitoring. The working plan is simple and easy
for everyone to understand.
10.2Suggestions for further work
The automated Home security system may be improved by addressing some of the extra
features. CCTV camera could be installed at various sections of the house. Motion
sensor cameras can also be installed which will detect any motion in the house plus
record the video at that moment and house owner can see live video on his phone. It can
also capture the images of the affected area in order to guide the fire brigades. This will
help the authorities to know about the severity of the fire and hence they can prepare the
help according to that. This will help them in identifying the number of members or
resources that will be required to control the fire. Another common function that can be
added to the developed system is the transmission of notifications message to the
police station or other emergency response organization. This notification will result in
early help and preventing the damage.
AUTOMATED HOME SECURITY SYSTEM
47
Snapshots
Representation of the connections/circuit of the automated Home Security system.
AUTOMATED HOME SECURITY SYSTEM
48
When the system started.
AUTOMATED HOME SECURITY SYSTEM
49
AUTOMATED HOME SECURITY SYSTEM
50
Representing connection establishment.
AUTOMATED HOME SECURITY SYSTEM
51
Representing values of temperature and smoke sensor.
AUTOMATED HOME SECURITY SYSTEM
52
Appendix (for source code)
AUTOMATED HOME SECURITY SYSTEM
53
#define RS RD7
#define EN RD6
#define lcd PORTB
unsignedinttemp,smoke,i=0,j=0,bytes=0,fstcard=0,scndcard=0;
charuid[12];
unsigned int card1[12]={'3','E','0','0','F','D','5','E','7','E','E','2'};
unsigned int card2[12]={'1','5','0','0','1','C','2','5','F','F','D','2'};
void delay(unsigned int x)
{
while(x--);
}
voidlcd_value(unsigned intdata,unsignedintcmd)
{
RS=cmd;
lcd=data;
EN=1;
delay(10);
EN=0;
delay(100);
}
voiddisp(unsigned char *string,intline,int place)
{
if(line==1)
lcd_value((0x80+place),0);
if(line==2)
lcd_value((0xc0+place),0);
while(*string!='0')
{
lcd_value(*string,1);
string++;
}
}
voidadc(int channel)
{
int a;
if(channel==1)
ADCON0=0x00;
if(channel==2)
ADCON0=0x04;
ADCON1=0x80;
delay(10000);
GO=1;
while(GO==1);
a=(ADRESH*256)+ADRESL;
if(channel==1)
{
AUTOMATED HOME SECURITY SYSTEM
54
temp=(a/1023)*500;
lcd_value(0xc0,0);
lcd_value(((temp/100)+48),1);
lcd_value(((temp/10)%10)+48,1);
lcd_value(((temp%10)+48),1);
}
if(channel==2)
{
smoke=a;
lcd_value(0xcc,0);
lcd_value(((a/100)+48),1);
lcd_value(((a/10)%10)+48,1);
lcd_value(((a%10)+48),1);
}
}
voidgsminit(int system)
{
unsigned char *msginit="AT+CMGF=1";
unsigned char *msgno="AT+CMGS="9899535962"";
unsigned char *msgbody1="SOMEONE IS THERE IN THE HOUSE";
unsigned char *msgbody2="SMOKE DETECTED";
unsigned char *msgbody3="TEMP. BEYOND LIMIT";
unsigned char *msgbody4="FIRE IN THE HOUSE";
unsigned char *msgbody6="SOMEONE TRIED TO ENTER THE HOUSE";
while(*msginit!='0')
{
RCIE=0;
TXREG=*msginit;
while(TXIF==0);
TXIF=0;
msginit++;
delay(10000);
}
TXREG='r';
while(TXIF==0);
TXIF=0;
delay(10000);
while(*msgno!='0')
{
TXREG=*msgno;
while(TXIF==0);
TXIF=0;
msgno++;
delay(10000);
}
TXREG='r';
while(TXIF==0);
TXIF=0;
AUTOMATED HOME SECURITY SYSTEM
55
delay(10000);
if(system==1)
{
while(*msgbody1!='0')
{
TXREG=*msgbody1;
while(TXIF==0);
TXIF=0;
msgbody1++;
delay(10000);
}
TXREG=0x1a;
while(TXIF==0);
TXIF=0;
}
else if(system==2)
{
while(*msgbody2!='0')
{
TXREG=*msgbody2;
while(TXIF==0);
TXIF=0;
msgbody2++;
delay(10000);
}
TXREG=0x1a;
while(TXIF==0);
TXIF=0;
}
else if(system==3)
{
while(*msgbody3!='0')
{
TXREG=*msgbody3;
while(TXIF==0);
TXIF=0;
msgbody3++;
delay(10000);
}
TXREG=0x1a;
while(TXIF==0);
TXIF=0;
}
else if(system==4)
{
while(*msgbody4!='0')
{
TXREG=*msgbody4;
AUTOMATED HOME SECURITY SYSTEM
56
while(TXIF==0);
TXIF=0;
msgbody4++;
delay(10000);
}
TXREG=0x1a;
while(TXIF==0);
TXIF=0;
}
else if(system==6)
{
while(*msgbody6!='0')
{
TXREG=*msgbody6;
while(TXIF==0);
TXIF=0;
msgbody6++;
delay(10000);
}
TXREG=0x1a;
while(TXIF==0);
TXIF=0;
}
RCIE=1;
}
void main()
{
ANSEL=0xff;
ANSELH=0x00;
TRISA=0xff;
TRISB=0x00;
TRISD=0x00;
TRISC=0x82;
RD2=0;
RD3=0;
RC4=0;
TXSTA=0x14;
RCSTA=0x90;
SPBRG=129;
GIE=1;
PEIE=1;
RCIE=1;
RCIF=0;
TXIF=0;
lcd_value(0x38,0);
lcd_value(0x0c,0);
lcd_value(0x01,0);
disp("TEMP. SMOKE",1,0);
AUTOMATED HOME SECURITY SYSTEM
57
while(1)
{
adc(1);
delay(2000);
adc(2);
if(RC1==1)
{
RC4=1;
lcd_value(0x01,0);
disp("SOMEONE TRIED TO",1,0);
disp("ENTER THE HOUSE",2,0);
for(i=0;i<=20;i++)
delay(12000);
RC4=0;
gsminit(1);
lcd_value(0x01,0);
disp("TEMP. SMOKE",1,0);
}
if(smoke>=840)
{
RC4=1;
lcd_value(0x01,0);
disp("SMOKE DETECTED",1,0);
for(i=0;i<=20;i++)
delay(12000);
RC4=0;
gsminit(2);
lcd_value(0x01,0);
disp("TEMP. SMOKE",1,0);
}
if(temp>=55)
{
RC4=1;
lcd_value(0x01,0);
disp("TEMP. BEYOND",1,0);
disp(" LIMIT ",2,0);
for(i=0;i<=20;i++)
delay(12000);
RC4=0;
gsminit(3);
lcd_value(0x01,0);
disp("TEMP. SMOKE",1,0);
}
if(smoke>=840&&temp>=55)
{
RC4=1;
lcd_value(0x01,0);
disp("FIRE",1,0);
AUTOMATED HOME SECURITY SYSTEM
58
disp("IN THE HOUSE",2,0);
for(i=0;i<=20;i++)
delay(12000);
RC4=0;
gsminit(4);
lcd_value(0x01,0);
disp("TEMP. SMOKE",1,0);
}
if(bytes==12)
{
j=0;
bytes=0;
if(uid[0]==card1[0]&&uid[1]==card1[1]&&uid[2]==card1[2]&&uid[3]==card1[3]&&
uid[4]==card1[4]&&uid[5]==card1[5]&&uid[6]==card1[6]&&uid[7]==card1[7]&&uid
[8]==card1[8]&&uid[9]==card1[9]&&uid[10]==card1[10]&&uid[11]==card1[11])
fstcard=1;
if(uid[0]==card2[0]&&uid[1]==card2[1]&&uid[2]==card2[2]&&uid[3]==card2[3]&&
uid[4]==card2[4]&&uid[5]==card2[5]&&uid[6]==card2[6]&&uid[7]==card2[7]&&uid
[8]==card2[8]&&uid[9]==card2[9]&&uid[10]==card2[10]&&uid[11]==card2[11])
scndcard=1;
if(fstcard==1||scndcard==1)
{
lcd_value(0x01,0);
fstcard=0;
scndcard=0;
disp("ACCESS GRANTED",2,0);
RD2=1;
RC4=1;
for(i=0;i<=20;i++)
delay(12000);
RC4=0;
RD2=0;
delay(25000);
RD3=1;
for(i=0;i<=20;i++)
delay(12000);
RD3=0;
lcd_value(0x01,0);
disp("TEMP. SMOKE",1,0);
}
else
{
lcd_value(0x01,0);
disp("ACCESS DENIED",2,0);
RC4=1;
for(i=0;i<=20;i++)
delay(12000);
RC4=0;
AUTOMATED HOME SECURITY SYSTEM
59
gsminit(6);
lcd_value(0x01,0);
disp("TEMP. SMOKE",1,0);
}
}
}
}
void interrupt isr()
{
RCIF=0;
j++;
bytes++;
uid[j]=RCREG;
}
AUTOMATED HOME SECURITY SYSTEM
60
Reference
1. https://www.smartapp.com/gantterforgoogledrive/index.html?fileID=0B0jKwFz
xgplVV0NQck82dVpYeEkyRkJyQ21CUm13aWpmOTZv#
2. https://www.google.co.in/search?q=black+box+testing&oq=black+bo&aqs=chr
ome.0.69i59j0j69i57j0l3.11603j0j1&sourceid=chrome&ie=UTF-8
3. http://forum.researchdesignlab.com/datasheet/sensors/gas%20sensor%20mq2.pd
f
4. https://www.google.co.in/search?sclient=psy-
ab&biw=1517&bih=665&q=putty%20similar%20software&oq=putty%20simul
ati&gs_l=serp.1.0.0i13l4.505841.511818.0.520274.9.6.3.0.0.0.2353.8829.6-
2j2j0j2.6.0....0...1c.1.64.psy-
ab..1.8.6460.DEbVpPRoAho&pbx=1&dpr=0.9&ion=1&cad=cbv&bvch=u&sei
=hkoPV9-5J4ml0AS-0K2ICg&rct=j#q=putty+software
5. http://www.facilitiesnet.com/firesafety/article/Trouble-Spots-for-Fire-Alarm-
and-Detection-Systems--11442?source=next
6. https://www.smartdraw.com/data-flow-diagram/
7. https://www.visual-paradigm.com/tutorials/leveled-dfd.jsp
8. http://www.facilitiesnet.com/firesafety/article/Fire-Alarm-and-Detection-
Systems-Common-Maintenance-Activities-Facility-Management-Fire-Safety-
Feature--11441
9. http://www.ijcee.org/papers/306-E794.pdf
10. http://www.developershome.com/sms/howToSendSMSFromPC.asp
11. http://www.marketsandmarkets.com/Market-Reports/home-security-solutions-
market-701.html
12. www.learningaboutelectronics.com/Articles/MQ-2-smoke-sensor-circuit-with-
arduino.php
13. https://electrosome.com/interfacing-relay-with-pic-microcontroller/
14. http://www2.ece.gatech.edu/academic/courses/ece4007/08fall/ece4007l02/lm3/i
mages/written_proposal.pdf
15. http://fritzing.org/projects/relay-control-dc-motor-with-direction-control
16. http://www.circuitsgallery.com/2014/10/arduino-temperature-sensor.html
17. http://www.zseries.in/electronics%20lab/sensors/temperature%20sensor/#.VyT
OK3pYiyw
AUTOMATED HOME SECURITY SYSTEM
61
AUTOMATED HOME SECURITY SYSTEM
62

Automated home secuirty project

  • 1.
    A Major Projecton “AUTOMATED HOME SECURITY SYSTEM” Submitted in partial fulfilment Of the requirements for B.Tech Degree In Information technology By Siddharth Chaudhary A12405212068 Arunendra Choudhary A12405212067 Abhishek Sholat A12405312007 Janhvi Singhal A12405312003 Under the guidance of Mr. Anant Jayswal (Assistant professors department of Computer Science) Amity School of Engineering, Amity university, Noida May 2016
  • 2.
    AUTOMATED HOME SECURITYSYSTEM 2 TABLE OF CONTENT Contents ACKNOWLEDGEMENT...................................................................................................................4 CANDIDATE’S DECLARATION.........................................................................................................5 CERTIFICATE ..................................................................................................................................6 Chapter I: Introduction..................................................................................................................7 1.1 Preface ................................................................................................................................7 1.2 Background .........................................................................................................................8 1.3 Description about the project.............................................................................................9 1.4 Program Flow Chart of the Automated Home Security System .......................................10 Chapter II: Requirement Analysis and Feasibility Study .............................................................11 2.1 Requirement Analysis .......................................................................................................11 2.2 Feasibility Study ..........................................................................................................13 2.3 Project Planning (Using MS Project) .................................................................................15 Chapter III: System Analysis and Design .....................................................................................19 3.1 System Analysis.................................................................................................................19 3.2 System Design ...................................................................................................................19 Chapter IV: Coding and Testing...................................................................................................26 4.1 Coding ...............................................................................................................................26 4.2 Testing...............................................................................................................................28 Chapter V: Implementation ........................................................................................................32 5.1 Implementation Activities...........................................................................................32 Chapter VI: Working of different modules..................................................................................34 6.1 RFID Technology................................................................................................................34 6.2 RELAY.................................................................................................................................36 6.3 DC Motor...........................................................................................................................37 6.4TEMPERATURE SENSOR (LM 35)........................................................................................37 6.5 SMOKE SENSOR (MQ-2) ....................................................................................................38
  • 3.
    AUTOMATED HOME SECURITYSYSTEM 3 6.6 PIR SENSOR........................................................................................................................39 6.7 GSM Module .....................................................................................................................40 Chapter VII: Maintenance Features............................................................................................41 Chapter VIII: Market Survey and Cost Analysis...........................................................................43 Chapter IX: Advantages and Limitations of developed project ..................................................44 9.1 Advantages of developed system .....................................................................................44 9.2 Limitations.........................................................................................................................44 Chapter X: Conclusion and Suggestions for further work...........................................................46 10.1 Conclusions .....................................................................................................................46 10.2Suggestions for further work ...........................................................................................46 Snapshots....................................................................................................................................47 Appendix (for source code).........................................................................................................52 Reference....................................................................................................................................60
  • 4.
    AUTOMATED HOME SECURITYSYSTEM 4 ACKNOWLEDGEMENT We would like to express our sincerest gratitude to all the people who have contributed towards the successful completion of our project. We would like to extent our heartiest thanks to the Head of Computer Science Department Professor Sheetal Sharma, for nurturing a congenial yet competitive environment in the department, which motivates all the students to pursue higher goals. We want to express our special gratitude to our guide "Mr. Anant jayswal Assistant Professor", Department of Computer Science, Amity School of Engineering, Noida for his constant support, guidance, encouragement and much needed motivation. His sincerity, thoroughness and perseverance have been a constant source of inspiration for us. Last but not the least we would like to extent our thanks to all the teaching and non-teaching staff members of our department, and to all our colleagues who helped me in completion of the project.
  • 5.
    AUTOMATED HOME SECURITYSYSTEM 5 CANDIDATE’S DECLARATION We, Siddharth Chaudhary, Arunendra Choudhary, Abhishek Sholat, Janhvi Singhal, an understudy of B.TECH, thusly announce that the work exhibited in undertaking entitled "Automated Home Security System", presented by us to Department of CSE, Amity School of Engineering, Amity University Uttar Pradesh, Noida in fractional satisfaction of the prerequisites for the recompense of level of Bachelor of Technology in Information and Technology is a bona fide record we could call our own work did under the direction of Mr.Anant Jayswal, Assistant Professor, Amity School Of Engineering.
  • 6.
    AUTOMATED HOME SECURITYSYSTEM 6 CERTIFICATE We hereby declare that the project work entitled "Automated Home Security System" submitted to the Department of Computer Science, is a record of an original work done by us under the guidance of Mr. Anant Jayswal (Assistant Professor), Department of Computer Science, Amity School of Engineering, Noida, and this project work is submitted as part of fulfilment of award of the degree of Bachelor of Technology under Amity University.
  • 7.
    AUTOMATED HOME SECURITYSYSTEM 7 Chapter I: Introduction 1.1 Preface Security has becoming an important issue everywhere. Home security is becoming necessary nowadays as the possibilities of intrusion are increasing day by day. Safety from theft, leaking of raw gas and fire are the most important requirements of home security system for people. Smart Home can be also known as Automated Home or intelligent home which indicates the automation of daily tasks with electrical appliances used in homes. This could be the control of lights, fans, viewing of the house interiors for surveillance purposes or giving the alarm alteration or indication in case of gas leakage. Home security has changed a lot from the last century and will be changing in coming years . Security is an important aspect or feature in the smart home applications. The new and emerging concept of smart homes offers a comfortable, convenient, and safe environment for occupants. Conventional security systems keep homeowners, and their property, safe from intruders by giving the indication in terms of alarm. Those home security systems were very expensive and surprisingly ineffective. The requirement for an efficient and cost effective system to cater the disastrous situations and in order to fulfil the security concerns of home owners when the user is away from home, there was a strong need to develop a cost effective and reliable system to satisfy the security related needs of occupants. However, a smart home security system offers many more benefits over conventional security systems Nowadays, embedded system is designed to provide security due to tremendous improvement in microcontroller unit and widespread applications of GSM technology. Our group develops an automated home security system. This system will be able to detect fires at all locations, unauthorised access through doors & windows and detect leakage of gases like LPG, Propane and Hydrogen. The system will get activated automatically with the help of smoke and temperature detection sensors, PIR motion sensor, RFID technology. If anyone tries to unlock the system without authority, then those sensors will activate and controller will receive a suitable pulse. According to the pulse of input devices, the controller section takes decision and activates the output section which includes LCD display, GSM Module, Servo Motor, LED and Buzzer. These systems help in reducing the cost of fire-insurance protection as well as provide security for the owner of the place..
  • 8.
    AUTOMATED HOME SECURITYSYSTEM 8 1.2 Background Nowadays, securing one’s property and business against fire, leaking of raw gas, safety from theft is becoming more and more important. Monitoring commercial and residential areas all-round is an effective method to reduce personal and property losses due to fire disasters and unauthorised access to home.. Large numbers of small temperature, smoke and PIR sensors should report their information to the control centre of a building or a block by alarm and text message notification. Fire disaster is a great threat to lives and property. Automatic home security system provides real-time surveillance, monitoring and automatic alarm. It alerts the owner of the house by sending text and alarm notification It sends early alarm when the fire occurs and helps to reduce the fire damage. PIR(Pyro electric infrared sensor) motion Sensor Compact, complete easy to use for human body detection. This module will detect motion up to 6 meters away. All PIR sensors detect changes in infra-red radiation, in the form of heat emitted by a number of bodies including people, cars and, to a lesser extent, dogs or other small animals. The bigger the body, the more infra-red radiation is emitted and the easier it is for a PIR sensor to detect. It alerts the home owner by text message and alarm notification in case of any intruder detection in the house. The electronic access control industry has been shifting from basic systems to more complex mechanisms. In the past, keys, keypads, and magnetic stripe cards were used simply to open doors. These technologies are being phased out as more sophisticated systems such as smart cards and biometrics provide more security and more functionality like tracking of individuals entering and exiting buildings. The use of RFID for access control is becoming very popular because it can remove the manual aspect of entry involved with keys, keypads, and magnetic stripe cards while also increasing security due to unique identification. Using RFID for entrance into a building will not only increase convenience but also allow for tracking of who has entered the building premises at a given time. This will increase building security and thus the safety of the occupants.
  • 9.
    AUTOMATED HOME SECURITYSYSTEM 9 1.3 Description about the project The purpose of our project is to develop a automated home security system, with the ability to alert the owner of the house via text message and alarm notification in case of fire, leaking of raw gas, intrusion detection. The system is wireless therefore more adaptable and cost-effective. The project is aimed at developing the security of Home against Intruders and Fire. In any of the above cases if any one met while you are out of your home then the device sends SMS to the emergency number provided to it. GSM (Global System for Mobile communications) based security systems provides enhanced security as whenever a signal from sensor occurs, a text message is sent to a desired number to take necessary actions. This security system is SMS based and sends a text message to the owner. This system is equipped with motion sensor, smoke detector, temperature sensor and RFID module(smart card access system). The system is designed with the aim for the protection of life and securing one’s property. This system has automatic detectors such as smoke detectors and temperature detectors installed throughout all areas of the building (including roof spaces and voids) with the aim of providing the earliest possible way. This system also include PIR sensor installed throughout all areas of the house. It is Compact, complete easy to use for human body detection. This module will detect motion up to 6 meters away. All PIR sensors detect changes in infra-red radiation, in the form of heat emitted by a number of bodies including people, cars and, to a lesser extent, dogs or other small animals. The bigger the body, the more infra-red radiation is emitted and the easier it is for a PIR sensor to detect. Each zone is constantly monitored by the sensor. When a person or other heat source enters any zone, the level of infra-red radiation in that zone increases. This change is detected and processed by the sensor, sending signals to IC which will send SMS “someone is there in the house” to owner via GSM module The smoke detector used in our project is MQ2 smoke sensor and the temperature detector used is LM35 temperature sensors. When the threshold value of both the sensors is crossed the alarm is generated and text message “fire detected” Is convey to the authorities about the fire. Fire detection, alarm and signalling systems can play a vital role in risk reduction by helping to control fires at early stages or by initiating smaller, controlled, manual suppression efforts before fire grows to the size needed to initiate automatic sprinkle operation. The Smart Home security system also contains an RFID access control that will provide ID-based entry into a building. This system will use an RFID authentication mechanism to communicate with a microcontroller that will release an electric door strike for access. Using an electronic door strike provides convenience of hands-free access. The unique identification of the entrant using passive RFID tags will permit tracking of individuals entering and exiting the premises. Using RFID for entrance into a building will not only increase convenience but also allow for tracking of who has entered the building premises at a given time and if different RFID tag is used by some intruder then system will alert the authorities by alarm and text message notification. This will increase building security and thus the safety of the occupants
  • 10.
    AUTOMATED HOME SECURITYSYSTEM 10 1.4 Program Flow Chart of the Automated Home Security System START Initialize GSM module, PIR sensor, Temperature sensor smoke sensor , buzzer Obstacle detection? YES NO YES YES NO NO NO Unlock the Door RFID Reader verify tag? RFID tag is placed near RFID reader Heat detection? Smoke detection? Turn on Buzzer and Send SMS to Owner mobile phone END YES
  • 11.
    AUTOMATED HOME SECURITYSYSTEM 11 Chapter II: Requirement Analysis and Feasibility Study 2.1 Requirement Analysis Requirement analysis is system engineering and software engineering, encompasses those tasks that go into determining the needs or conditions to meet for a new or altered product, taking account of the possibility conflicting requirements of the conflicting stakeholders, analysing, managing, documenting and validating system requirements. Requirements analysis is critical to the success of the system of the software project. The requirements should be documented, actionable, measureable, testable, traceability, related to identified business needs or opportunities, and defined to a level of detail sufficient for system design. 2.1.1 Information Gathering Various sites have been analysed to get a better idea to build the project. We have gathered information by analysing different means and requirements of the potential cases of fire that may occur. Information gathering is a key part of feasibility analysis. We must know what information to gather, where to find it, how to collect it, and ultimately how to process the collected information. Information gathering is both an art and a science. It is an art because the person who collects the information needs to be sensitive, and must have an understanding of what to collect and what to focus on, the channels where the source of information can be gathered. It is a science because it requires proper methodology and the use of specifics tools in order to be effective. None the less, there is always a chance that one can find oneself drowned in an ocean of information, not knowing which specific information to collect, where to collect it and how to collect it. Based on the information gathered, the new system is built. 2.1.2 Functional Requirement This section specifies what is to be done by the product, to what level or specific requirements, what inputs should be transformed to what outputs, what specific operations are required. The functional requirements are those which describe what activities the software/application is going to perform once it is implemented. Functional requirements drive the application architecture of a system. These requirements define a function of a system or its components. A function is described as asset of inputs, the behaviour, and outputs. For each function, specify requirements on input, processing and outputs. These are usually organized with these four subparagraphs: - • Purpose of the function: Provide rationale to clarify the intent of the function. • Inputs: Source, valid ranges of the values, any timing concerns, operators requirements, special interface.
  • 12.
    AUTOMATED HOME SECURITYSYSTEM 12 • Operations to be performed: validity Checks, response to abnormal conditions, types of processing required. • Outputs: Valid range of values, timing concerns and handling of illegal values, error messages and interfaces required. Functions required by the automated Home Security system include the following requirements: - • The system should be designed for very early detection of fire incidence. • The system should be designed for early detection of any gas leakage. • The design should incorporate any suitable principle for higher sensitivity to detect all possible size of smoke particles and/or elevated heat. • The System should be designed to give alert via SMS. • The System should be designed to give alert in case of intrusion. • The system should not give false alarms. • The System should display correct output on LCD screen. • The system should grant entrance only to person with correct RFID tag. • The system should be designed to give very early warning against any security threat. • The system should be compact, lightweight and highly reliable and robust in design with inbuilt redundancy to cater for any sensor failure. 2.1.3 Non Functional Requirement In systems engineering and requirements engineering, a non-functional requirement is a requirement that specifies criteria that can be used to judge the operation of a system, rather than specific behaviours. This should be contrasted with functional requirements that define specific behaviour or functions. The plan for implementing functional requirements is detailed in the system design. The plan for implementing non-functional requirements is detailed in the system architecture. Broadly, functional requirements define what a system is supposed to do and non- functional requirements define how a system is supposed to be. Functional requirements are usually in the form of "system shall do requirement", while non-functional requirements are in the form of "system shall be requirement". Non-functional requirements are often called qualities of a system. Other terms for non- functional requirements are "constraints", "quality attributes", "quality goals", "quality of service requirements" and "non-behavioural requirements". Informally these are sometimes called the "ilities", from attributes like stability and portability. Qualities, that are non-functional requirements, can be divided into two main categories: - • Execution qualities, such as security and usability, which are observable at run time. • Evolution qualities, such as testability, maintainability, extensibility and scalability, which are embodied in the static structure of the software system. Non-functional requirements for the automated fire alarm system are as follows: -
  • 13.
    AUTOMATED HOME SECURITYSYSTEM 13 • The system should be robust and reliable. • The system should be user friendly. • The system should be completely consistent and secure. • Interface requirement. • Interface should be easy to follow. 2.1.3.1 Hardware Requirements • LM 35 temperature sensor. • MQ2 smoke sensor. • PIR sensor • RFID Reader • RFID Tag • Relay • Stepper motor • MCU IP16F887 • Power supply unit (5V). • Computer. • Programmer. • TTL Bridge. 2.1.3.2 Software Requirements • Embedded C. • Proteus • MPLAB 2.1.3.3 Usability Requirements Usability includes methods of measuring usability, such as needs analysis and the study of the principles behind an object's perceived efficiency or elegance. In human- computer interaction and computer science, usability studies the elegance and clarity with which the interaction with a computer program or a web site (web usability) is designed. Usability differs from user satisfaction and user experience because usability also considers usefulness. The project designed should be user friendly. 2.2 Feasibility Study Feasibility studies aim to objectively and rationally uncover the strengths and weaknesses of an existing business or proposed venture, opportunities and threats present in the environment, the resources required to carry through, and ultimately the prospects for success. In its simplest terms, the two criteria to judge feasibility are cost required and value to be attained. A well-designed feasibility study should provide a historical background of the business or project, a description of the product or service, accounting statements, details of the operations and management, marketing research and policies, financial data, legal
  • 14.
    AUTOMATED HOME SECURITYSYSTEM 14 requirements and tax obligations. Generally, feasibility studies precede technical development and project implementation. A feasibility study evaluates the project's potential for success; therefore, perceived objectivity is an important factor in the credibility of the study for potential investors and lending institutions. It must therefore be conducted with an objective, unbiased approach to provide information upon which decisions can be based. When we are developing the system (software), we must know the proposed system will be feasible or that is practically implemented or not it may be possible the proposed system may not be implemented due to many reasons like it may take long time in development than the specified time limit, cost may increase than proposed one etc. Therefore we must analyse the feasibility of the system. Feasibility is the analysis of risks, costs and benefits relating to economics, technology and user operation Facts considered in the feasibility analysis are: - • Technical Feasibility • Economic Feasibility • Operational Feasibility 2.2.1 Technical Feasibility The technical feasibility assessment is focused on gaining an understanding of the present technical resources of the organization and their applicability to the expected needs of the proposed system. It is an evaluation of the hardware and software and how it meets the need of the proposed system. As far as our project is concerned we have the necessary expertise so that the proposed solution can be made feasible for the design and development of the system, several software products has been accommodated. Technology used is embedded C . This software has the enough efficiency in producing the required output. Also the hardware requirements used are compatible with all OS. The system can also be expanded as per the needs of requirement specification. Therefore the project is technically feasible. 2.2.2 Economic Feasibility The purpose of the economic feasibility assessment is to determine the positive economic benefits to the organization that the proposed system will provide. It includes quantification and identification of all the benefits expected. This assessment typically involves a cost/ benefits analysis. Thus feasibility study should centre along the following points: - • Improvement resulting over the existing method in terms of accuracy, timeliness.
  • 15.
    AUTOMATED HOME SECURITYSYSTEM 15 • Cost comparison • Estimate on the life expectancy of the hardware. • Overall objective. Automated Home security system is a cost effective system. All sensors used in this project are cost effective. Our project is economically feasible, it does not require much cost to be involved in the overall process. 2.2.3 Operational Feasibility Operational feasibility is a measure of how well a proposed system solves the problems, and takes advantage of the opportunities identified during scope definition and how it satisfies the requirements identified in the requirements analysis phase of system development. The operational feasibility assessment focuses on the degree to which the proposed development projects fits in with the existing business environment and objectives with regard to development schedule, delivery date, corporate culture, and existing business processes. Our project solves the problem very efficiently and takes advantage of the opportunities identified during scope definition and it satisfies the requirements identified in the requirements analysis phase of the system development. People are inherently resistant to change and computers have been known to facilitate change. The new proposed system is very much useful to the users and therefore it will accept broad audience from around the world. Automated fire alarm system is user friendly system one can use very easily. 2.3 Project Planning (Using MS Project) Project management is the process of planning , organising and managing task and resource to accomplish a defined objective, usually within limitations on time, resources or cost, A project plan can be simple, for example, a list of task and their start and finish dates written on a notepad. Whether simple or complex, however, all projects consist of three major phases: - • Build the plan • track and manage the project • close the project As a project plan is built, Microsoft project calculates and creates a working schedule based on information you provide about the task to be done, the people who work on them, the equipment and supplies used to accomplish them, and the costs involved. Typically information required is: - • Task
  • 16.
    AUTOMATED HOME SECURITYSYSTEM 16 • Duration • Task dependencies • Resources • Costs To create project plan, start a new project plan and then enter and organize the list of task to be completed, along with each task's duration and any dependencies. Next, add people, equipment, and materials and their costs to the plan, and then assign these resources to task. With this resources and task information, Microsoft Project creates a schedule. With this information, MS Project can calculate the schedule, costs and resource work load. Gantt chart: A Gantt chart is a horizontal bar or line chart which will commonly include the following features: - • Activities identified on the left hand side • Time scale is drawn on the top(or bottom) of the chart. • A horizontal open oblong are shaded to represent the actual time spent (an alternative is to represent actual and estimated by 2 separate lines). • A vertical cursor (such as a transport ruler) placed at the review point makes it possible to establish activities which are behind or ahead of schedule.
  • 17.
  • 18.
  • 19.
    AUTOMATED HOME SECURITYSYSTEM 19 Chapter III: System Analysis and Design 3.1 System Analysis System Analysis is the detailed study of the various operations performed by the system and their relationships within and outside the system. Analysis is the process of breaking something into its parts so that the whole may be understood. System analysis is concerned with becoming aware of the problem, identifying the relevant and most decisional variables, analysing and synthesizing the various factors and determining an optional or at least a satisfactory solution. During this a problem is identified, alternate system solutions are studied and recommendations are made about committing the resources used to the system. Description of the present system: Presently, in some systems the smoke detectors may not sense the fire when smoke cannot reach the detectors such as in chimneys, in or behind walls, on roofs, or on the other side of closed doors. Also the most common cause of fire alarm malfunction is inadequate maintenance. To keep the entire fire alarm system in excellent working order, on going maintenance is required per the manufacturers’ recommendation. The major flaws in the present system are as follows: - • Wastage of money • High amount of maintenance is required. 3.2 System Design The most creative and challenging face of the system development is System Design. It provides the understanding and procedural details necessary for the logical and physical stages of development. In designing a new system, the system analyst must have a clear understanding of the objectives, which the design is aiming to fulfil. The first step is to determine how the output is to be produced and in what format. Second, input data and master files have to be designed to meet the requirements of the proposed output. The operational phases are handled through program construction and testing. Design of the system can be defined as a process of applying various techniques and principles for the purpose of defining a device, a process or a system in sufficient detail to permit its physical realization. Thus system design is a solution to "how to" approach to the creation of a new system. This important phase provides the understanding and the procedural details necessary for implementing the system recommended in the feasibility study. The design step provides a data design, architectural design, and a procedural design. OUTPUT DESIGN
  • 20.
    AUTOMATED HOME SECURITYSYSTEM 20 The output design is the part of the project which interacts with the world outside. In the output design, the emphasis is on developing a system for real time monitoring of data. There is a provision of an LCD display for displaying the output values of the smoke sensor and temperature sensor in a predetermined format. Messages which are sent to ower’s phone are also displayed on LCD screen. The task of display the output values is achieved by connecting the LCD display to the Micro Controller Unit (MCU). Different outputs displayed on screen: • Access Denied—when false RFID tag is used at door entrance • Access Granted—when corrected RFID tag is used • Smoke detected—in case of any gas leakage • Fire detected—in case of fire in the house • Someone is there in house—in case of any intruder in house The output design of our project also focuses on the notification that will be provided by the various sensors when the output values of the temperature sensor and smoke sensor exceeds the threshold value. These output is the most important and direct source of information to the user, efficient, logical, output design should improve the systems relations with the user and help in decision-making. There should not be any false alarm and also there must be an alarm in case to threat. The output device's capability, print quality, response time requirements etc. should also be considered, form design elaborates the way the output is presented and layout available for capturing information. It's very helpful to produce the clear, accurate and speedy formation for end users. INPUT DESIGN In the input design, user-originated inputs are converted into a computer-based system format. It also includes determining the record media, method of input, speed of capture any entry on to the screen. This deals with the collection of data from the environment and the regulated source of power supply. The data flow diagram indicates logical data flow, data stores, source and destination. Input data are collected and organized into a group of similar data once identified input media are selected for processing. It this software, the main focus is to get data in analogform from environment that can be processed to detect the act of fire according to the predefined guidelines. The importance is given to develop Graphical User Interface (GUI), which is an important factor in developing efficient and user friendly software. For inputting user data, attractive forms are designed. Also the important input format is designed it such a way that accidental errors are avoided. The user has to input only just the minimum data required, which also helps in avoiding the errors that the users may make. Accurate designing of the input format is very important in developing efficient software. The goal of input design is to make entry as easy, logical and free from errors. LOGICAL DESIGN Logical data design is about the logically implied data. Each and every data in the form can be designed in such a manner to understand the meaning. Logical data designing should give a clear understanding & idea about the related data used to construct a
  • 21.
    AUTOMATED HOME SECURITYSYSTEM 21 form.During the logical design phase of the project life cycle, we design a logical architecture showing the interrelationships of the logical components of the solution. The logical architecture and the usage analysis from the technical requirements phase form a deployment scenario, which is the input to the deployment design phase. When developing a logical architecture you need to identify not only the components that provide services to users, but also other components that provide necessary middleware and platform services. Infrastructure service dependencies and logical tiers provide two complementary ways of performing this analysis. The logical design of a system pertains to an abstract representation of the data flows, inputs and outputs of the system. This is often conducted via modelling, using an over- abstract (and sometimes graphical) model of the actual system. In the context of systems, designs are included. Logical design includes entity-relationship (ER diagrams), use case diagrams, data flor diagrams, sequence diagrams, class diagrams. 3.2.1 Data Flow Diagram (DFD) A data flow diagram (DFD) is a graphical representation of the "flow" of data through an information system, modelling its process aspects. Often they are a preliminary step used to create an overview of the system which can later be elaborated. DFDs can also be used for the visualization of data processing (structured design). A DFD shows what kinds of information will be input to and output from the system, where the data will come from and go to, and where the data will be stored. It does not show information about the timing of processes, or information about whether processes will operate in sequence or in parallel. With a data flow diagram, users are able to visualize how the system will operate, what the system will accomplish, and how the system will be implemented. Data flow diagrams can be used to provide the end user with a physical idea of where the data they input ultimately has an effect upon the structure of the whole system from order to dispatch to report. Data Flow Diagram Symbols:-
  • 22.
    AUTOMATED HOME SECURITYSYSTEM 22 Fig. Symbols DFD 3.2.1.1 Level-0 This is a top level data flow diagram. It only contains one process node that generalises the functions of the entire system in relationship to external entities. Some important points are: - • Inputs going into a process are different from outputs leaving the process. • Data stores are first shown at this level. SENSORS SMS on Phone ALARM MCU
  • 23.
    AUTOMATED HOME SECURITYSYSTEM 23 Fig. DFD Level-0 3.2.1.2 Level-1 The Level 1 DFD shows how the system is divided into sub-systems (processes), each of which deals with one or more of the data flows to or from an external agent, and which together provide all of the functionality of the system as a whole. It also identifies internal data stores that must be present in order for the system to do its job, and shows the flow of data between the various. Fig. DFD Level-1
  • 24.
    AUTOMATED HOME SECURITYSYSTEM 24 3.2.2 Use Case Diagram A use case diagram at its simplest is a representation of a user's interaction with the system and depicting the specifications of a use case. A use case diagram can portray the different types of users of a system and the various ways that they interact with the system. This type of diagram is typically used in conjunction with the textual use case and will often be accompanied by other types of diagrams as well. Fig. Use Case Diagram
  • 25.
    AUTOMATED HOME SECURITYSYSTEM 25 3.2.4 Class Diagram The class diagram is the main building block of object-oriented modelling. It is used both for general conceptual modelling of the systematics of the application, and for detailed modelling translating the models into programming code. Class diagrams can also be used for data modelling. The classes in a class diagram represent both the main elements, interactions in the application, and the classes to be programmed. In the diagram, classes are represented with boxes that contain three compartments: • The top compartment contains the name of the class. It is printed in bold and centred, and the first letter is capitalized. • The middle compartment contains the attributes of the class. They are left- aligned and the first letter is lowercase. • The bottom compartment contains the operations the class can execute. They are also left-aligned and the first letter is lowercase. Fig.Class Diagram
  • 26.
    AUTOMATED HOME SECURITYSYSTEM 26 Chapter IV: Coding and Testing 4.1 Coding 4.1.1 About the technology used Embedded C Embedded C is a set of language extensions for the C Programming language by the C Standards committee to address commonality issues that exist between C extensions for different embedded systems. Historically, embedded C programming requires nonstandard extensions to the C language in order to support exotic features such as fixed point arithmetic, multiple distinct memory banks, and basic I/O operations. In 2008, the C Standards Committee extended the C language to address these issues by providing a common standard for all implementations to adhere to. It includes a number of features not available in normal C, such as, fixed point arithmetic, named address spaces, and basic I/O hardware addressing. Embedded C uses most of the syntax and semantics of standard C, e.g., main() function, variable definition, datatype declaration, conditional statements (if, switch, case), loops (while, for), functions, arrays and strings, structures and union, bit operations, macros, etc. As assembly language programs are specific to a processor, assembly language didn’t offer portability across systems. Assembly language seems to be an obvious choice for programming embedded devices. However, use of assembly language is restricted to developing efficient codes in terms of size and speed. Also, assembly codes lead to higher software development costs and code portability is not there. To overcome this disadvantage, several high level languages, including C, came up. Language C got wide acceptance for not only embedded systems, but also for desktop applications. Even though C might have lost its sheen as a mainstream language for general purpose applications, it still has a stronghold in embedded programming. Due to the wide acceptance of C in embedded systems, various kinds of support tools like compilers & cross compilers, ICE, etc. came up, and all this facilitated development of embedded systems using C. Hence high level languages are preferred for embedded systems programming . An Embedded system is combination of computer hardware and software, and perhaps additional mechanical or others parts, designed to perform a specific task .An embedded system is a computer system designed to do one or a few dedicated and/or specific functions often with real-time computing constraints. Example: microwave oven, AC etc. Embedded systems are designed to do some specific task, rather than be a general- purpose computer for multiple tasks. Embedded systems are not always standalone devices. The program instructions written for embedded systems are referred to as firmware, and are stored in read-only memory or Flash memory chips. They run with limited computer hardware resources.
  • 27.
    AUTOMATED HOME SECURITYSYSTEM 27 Advantages of Embedded C are as follows: • Compared to assembly language, C code written is more reliable and scalable, more portable between different platforms. • C compilers are available for almost all embedded devices in use today, and there is a large pool of experienced C programmers. • Unlike assembly, C has advantage of processor independence and is not specific to any particular microprocessor/microcontroller or any system. This makes it convenient for a user to develop programs that can run on most of the systems. • As C combines functionality of assembly language and features of high level languages, C is treated as a ‘middle level computer language’ or ‘high level assembly language’. • It is fairly efficient. • It supports access to I/O and provides ease of management of large embedded projects. • Java is also used in many embedded systems but Java programs require the Java Virtual Machine (JVM), which consumes a lot of resources. Hence it is not used for smaller embedded devices. MPLAB v 8.40 In this system MPLAB v8.40 is used to develop the program for PIC microchip. This compiler consists of Hitech C as well. So this compiler can be used to program in C language. Here the program is divided into six macros. The main macro con-trols the whole program. It calls the three sub macros „Unauthorized‟, „Fire‟ and „Smoke‟ whether there is any fault in the system. Inside these three sub macros two sub macro, „Tx‟ and „Rx‟ are developed. This two macros help to set communication with network and send the SMS properly. If there is any fault in RB0 or RB1 or RB2 pin of microcontroller then the sys-tem will send a preloaded SMS, to two certain number of home owner. Again if there is any fault in RB3 the PIC will send a message „Fire!!!‟ to home owner. If the condition of RB4 is changed then the system will generate only one SMS „Smoke detected ‟ to home owner only. 4.1.2 Programming/ Coding Standards Some important coding standards need to be followed in order to make implementation of code less error-prone and improve the maintainability of the code. The chief standards mete incorporated are proper indentation of code, the use of white space around and keywords, the capitalization of keywords and variable names, the style and of user-defined identifiers, such as function, procedure and variable names, the use mod style of comments, and the use or avoidance of particular programming constructs emit as avoiding GOTO statements. To ensure better readability of code, the following coding conventions were followed:
  • 28.
    AUTOMATED HOME SECURITYSYSTEM 28 • To make it easier to distinguish classes from other entities, Class names should be nouns in Camel Case. • To ensure that the functionality of the method is clear while using it, methods should be verbs, in mixed case with the first letter lowercase, with the first letter of each internal word capitalized. • To ensure that the developer is able to grasp the meaning of an identifier, variable names should be short yet meaningful. The choice of a variable name should be mnemonic- that is, designed to indicate to the observer the intent of its use. One-character variable names should be avoided except for temporary variables. • Hungarian Notation must be incorporated wherever necessary. This helps in increasing the clarity of the source code and it becomes easier for the developer to use the variables and methods. 4.2 Testing Testing Software Testing is the process used to identify the completeness, correctness, security and quality of the product being developed. Testing involves technical investigation which is performed on behalf of end users. This is intended to reveal quality related information about the product in a context in which it is intended to operate. This is just not limited to the process of executing a program or application with the intent of finding errors. Quality is not an absolute and never completely establishes the correctness of computer software. Objectives of software testing- The software testing is usually performed for the following objectives:- Software Quality improvement: - The computer and the software are mainly used for complex and critical applications and a bug or fault in software causes severe losses. So a great consideration is required for checking for quality of software. Verification and Validation: -Verification means to test that we are building the product in right way .i.e. are we using the correct procedure for the development of software so that it can meet the user requirements. Validation means to check whether we are building the right product or not. Software Reliability Estimation: - The objective is to discover the residual designing errors before delivery to the customer. The failure data during process are taken down in order to estimate the software reliability. 4.2.1 System Testing System testing tests a completely integrated system to verify that it meets its requirements. In addition, the software testing should ensure that the program, as well as working as expected, does not also destroy or partially corrupt its operating environment or cause other processes within that environment to become inoperative (this includes not corrupting shared Memory, not consuming or locking up excessive
  • 29.
    AUTOMATED HOME SECURITYSYSTEM 29 resources arid leaving any parallel processes unharmed by its presence).The automated Home security system has been undergone system testing very carefully and the system meets the desired outcome and performs well without effecting the operating environment. 4.2.2 Unit Testing Unit testing is a method in which each unit or set of one or more modules are tested with associated data, operating procedure and usage method for determining fitness of product for use. Each unit can be defined as smallest testable part of the product. A unit can be entire module but commonly it is commonly individual procedure or function. We have tested all the parts of the project individually such as sensors and all the function are also tested and the expected result is obtained. 4.2.3 Integration Testing Integration testing is a part of software testing in which each individual module are combined into a group and tested. It occurs after finishing unit testing. Integration takes modules that have been tested in unit testing as input, groups them and applies test case defined. The need of integration testing is to verify performance, functional and reliable requirements mentioned during design phase. Test cases are defined to test that all components connected interact correctly using procedure calls. If some module fails to meet minimum requirement, changes are made to that module so that it starts functioning properly. The various modules of the automated system are integrated and tested to check whether they perform well together or not. 4.2.4 Regression Testing Regression testing is any type of software testing that seeks to uncover new software bugs, or regressions, in existing functional and non-functional areas of a system after changes, such as enhancements, patches or configuration changes, have been made to them. The intent of regression testing is to ensure that a change such as those mentioned above has not introduced new faults. One of the main reasons for regression testing is to determine whether a change in one part of the software affects other parts of the software. Common methods of regression testing include rerunning previously- completed tests and checking whether program behaviour has changed and whether previously-fixed faults have re-emerged. 4.2.5 Black box Testing Black box testing is a method of software testing that examines the functionality of an application without peering into its internal structures or workings. This method of test can be applied to virtually every level of software testing: unit, integration, system and acceptance. It typically comprises most if not all higher level testing, but can also dominate unit testing as well. Specific knowledge of the application's code/internal structure and programming knowledge in general is not required. The tester is aware of what the software is supposed to do but is not aware of how it does it. For instance, the
  • 30.
    AUTOMATED HOME SECURITYSYSTEM 30 tester is aware that a particular input returns a certain, invariable output but is not aware of how the software produces the output in the first place. Test Cases: - Test cases are built around specifications and requirements, i.e., what the application is supposed to do. Test cases are generally derived from external descriptions of the software, including specifications, requirements and design parameters. Although the tests used are primarily functional in nature, non-functional tests may also be used. The test designer selects both valid and invalid inputs and determines the correct output, often with the help of an oracle or a previous result that is known to be good, without any knowledge of the test object's internal structure. Test cases to test the automated Home Security system: - 1. Input: - The value of the temperature and smoke sensor is slightly above than the threshold values of both the sensors. Output: - The alarm will be activated and SMS is receiver by owner about fire or smoke in the house Status: - The developed project cleared the respective test case. 2. Input: - The variation in infra-red radiation coming from the heat source(human) is received by PIR sensor. Output: - The alarm will be activated and SMS(Someone is there in house) is receiver by owner. Status: - The developed project cleared the respective test case. 3. Input: - The no variation in infra-red radiation detected by PIR sensor. Output: - The alarm will be not get activated and SMS(Someone is there in house) is not receiver by owner. Status: - The developed project cleared the respective test case. 4. Input: - authenticated RFID tag is placed near RFID reader Output: - The door will open and get close after few second. Status: - The developed project cleared the respective test case. 5. Input: - unauthorised RFID tag is placed near RFID reader Output: - The door will not open and SMS(someone tries to enter in house) is received by the owner. Status: - The developed project cleared the respective test case. 6. Input: -The value of temperature sensor is above threshold and the value of smoke sensor is below threshold. Output: - The alarm will get activated and SMS is receiver by owner about fire in the house Status: - Developed project successfully passed the respective test case.
  • 31.
    AUTOMATED HOME SECURITYSYSTEM 31 7. Input: - The values of the temperature sensor and the smoke sensor are below threshold. Output: - The alarm will not get activated because the values of both the sensors are not fulfilling the minimum requirements. Status: - Developed project works on the basic requirement and have cleared the respective test. 8. Input: - The values of the temperature sensor and smoke sensor are very high as compared to the minimum values. Output: - The alarm will get activated and SMS is received by owner. Status: - Developed project works in critical condition and have passed the respective test case. 4.2.6White box Testing White Box Testing (also known as Clear Box Testing, Open Box Testing, Glass Box Testing, Transparent Box Testing, Code Based Testing or Structural Testing) is a software testing method in which the internal structure/ design/ implementation of the item being tested is known to the tester. The tester chooses inputs to exercise paths through the code and determines the appropriate outputs. Programming knows how and the implementation knowledge is essential. White box testing is testing beyond the user interface and into the nitty-gritty of a system. The code of the developed project has been tested successfully with various inputs to achieve the desired output. For example, the code including the port that connects the temperature sensor and smoke sensor provide input to the respective port mentioned in the code. Thus the developed project also satisfies the white box testing. Steps to test a Home Security system are as follows:- 1. Test and calibrate sensors, such as temperature, PIR sensor, smoke detectors, per manufacturer specifications. This requires knowing about the different sensors and their testing requirements, failure modes, and reinstallation requirements. 2. Simulate inputs and test the annunciators. This requires specific knowledge of the system under test. 3. Set sensitivity. This requires an understanding of the particular system, the application, and the fire detection theory.
  • 32.
    AUTOMATED HOME SECURITYSYSTEM 32 Chapter V: Implementation 5.1 Implementation Activities We have used SDLC (Software Development Life Cycle)Model for the development of our project. To design each module we follow the iterative model till we get the right module that fulfils our requirements. SDLC, an acronym for Software Development Life Cycle, is a well-defined and systematic approach, put into practice for the development of a reliable high quality information system. It’s a methodology that is employed by business analysts which describes the activities carried out at each juncture of the development of software. The end result of a well described and handled SDLC would be a highly dependable software system that leaves the customer ecstatic in terms of its working, completion accomplished well within time and expense estimates, works proficiently and effectively in the prevailing environment and infrastructure, and is easy on the pocket to maintain and economical to enhance. We have used the most widely used SDLC model which is Iterative Enhancement Model. The Iterative Enhancement model is a sequential design process, often used in software development processes, in which progress is seen as flowing steadily downwards through the phases of Conception,Initiation, Analysis, Design, Construction, Testing, Production/Implementation. Fig. Iterative Enhancement Model The various phases can be described as follows: • Requirement Analysis and Software Definition: This is the first phase of waterfall model which includes analysing the project motive and what all hardware’s or software’s will be required to fulfil the desired motive. This is the most crucial phase as any misinterpretation at this stage may give rise to validation issues later. The software definition must be detailed and accurate
  • 33.
    AUTOMATED HOME SECURITYSYSTEM 33 with no ambiguities. It is very important to understand the customer requirements and expectations so that the end product meets his specifications. • System design: The inter relation between the various logical modules is established at this stage. Algorithms and diagrams defining the scope and objective of each logical model are developed. In short, this phase lays a fundamental for actual programming and implementation. • System Implementation: This is the software process in which actual coding takes place. A software program is written based upon the algorithm designed in the system design phase. A piece of code is written for every module and checked for the output. • System Testing: The programmatically implemented software module is tested for the correct output. Bugs, errors are removed at this stage. In the process of software testing, a series of tests and test cases are performed to check the module for bugs, faults and other errors. Erroneous codes are rewritten and tested again until desired output is achieved. • System Deployment and maintenance: This is the final phase of the waterfall model, in which the completed software product is handed over to the client after alpha, beta testing. After the software has been deployed on the client site, it is the duty of the software development team to undertake routine maintenance activities by visiting the client site. If the customer suggests changes or enhancements the software process has to be followed all over again right from the first phase i.e. requirement analysis. This is the biggest shortcoming of the waterfall model. Thus, Iterative Enhancement model is easy to implement and more often than not produces desired result. The inter-dependence of waterfall model phases may lead to developmental issues, if a systematic approach is not followed at each step. However, in spite of these shortcomings, waterfall model is adopted all across the world.
  • 34.
    AUTOMATED HOME SECURITYSYSTEM 34 Chapter VI: Working of different modules 6.1 RFID Technology The proposed scheme is to develop an intelligent security system using RFID reader and tags to stop entries of unwanted persons in a critical area where only few persons are given permission to come in side. In this system the RFID reader is to be fixed to the door through which we want to stop unauthorized persons .RFID reader is connected to microcontroller which is connected to motors. When a person with valid tag comes in the range of RFID reader the reader detects the tag, sends signal to microcontroller, then the microcontroller turns on the motor to open the door. After the person passes through door another motor closes the door. 6.1.1 Working of RFID System RFID systems operates from very low frequency(VLF) to extremely high frequency(EHF).RFID system operating in low frequency range make use of electromagnetic wave propagation to communicate their data and commands, these use passive tags. RFID systems operating in low frequency range operates on principle of near field coupling between tag and reader. Faraday’s principle of electromagnetic induction is the basis of near field coupling. In near field RFID system, electromagnetic waves are transmitted by reader or interrogator which propagates outwards with spherical wave front. Tags placed within field collect some energy. Then exchange of data between tag and reader takes place. The amount of energy available at any particular point is related to distance from the transmitter as expressed as 1/d (2) where d is distance from the transmitter. 6.1.2 RFID TAG Tag is the basic building block of RFID. It consists of small silicon chip and an antenna. Silicon chip is used to store the data and antenna is used to energize the chip and communicate with reader. There are two types of tags: Active tag and passive tag. Active tag are those Active tags require a power source—they’re either connected to a powered infrastructure or use energy stored in an integrated battery. Passive RFID is of interest because the tags don’t require batteries or maintenance.
  • 35.
    AUTOMATED HOME SECURITYSYSTEM 35 6.1.3 RFID Reader The RFID reader sends a pulse of radio energy to the tag and listens for tags response. The tag detects this energy and sends back a response that contains the tags serial number and other information as well. It reads the tags and output their information to the microcontroller. 6.1.3 NEAR FIELD RFID In this project we have used Near field RFID, how this technology works is explained below: Faraday’s principle of magnetic induction is the basis of near-field coupling between a reader and tag. A reader passes a large alternating current through a reading coil, resulting in an alternating magnetic field in its locality. If you place a tag that incorporates a smaller coil in this field, an alternating voltage will appear across it. If this voltage is rectified and coupled to a capacitor, a reservoir of charge accumulates, which you can then use to power the tag chip. Tags that use near-field coupling send data back to the reader using load modulation. Because any current drawn from the tag coil will give rise to its own small magnetic field—which will oppose the reader’s field—the reader coil can detect this as a small increase in current flowing through it. This current is proportional to the load applied to the tag’s coil.
  • 36.
    AUTOMATED HOME SECURITYSYSTEM 36 if the tag’s electronics applies a load to its own antenna coil and varies it over time, a signal can be encoded as tiny variations in the magnetic field strength representing the tag’s ID. The reader can then recover this signal by monitoring the change in current through the reader coil. Each passive tag has different serial number stored in chip inside the tag. The serial number is given by manufacturer. In this project, we have stored serial number information in programming; We have used here three passive tags. Serial number of the only two passive tags are stored in programming. when these two tags will place there card in field of reader, then door opens and “Access granted” is displayed in LCD display. One card is access denied. When this card will be shown the door does not open and „Access restricted‟ message is displayed in LCD display and text message “someone tries to enter”. 6.2 RELAY A relay is an electromagnetic switch which is used to switch High Voltage/Current using Low power circuits. Relay isolates low power circuits from high power circuits. It is activated by energizing a coil wounded on a soft iron core. A relay should not be directly connected to a microcontroller, it needs a driving circuit. A relay should not be connected directly to a microcontroller due to following reasons.. • A microcontroller is not able to supply current required for the working of a relay. The maximum current that a PIC Microcontroller can source or sink is 25mA while a relay needs about 50 – 100mA current. • A relay is activated by energizing its coil. Microcontroller may stop working by the negative voltages produced in the relay due to its back emf. 6.2.1 Energized Relay (ON) the current flowing through the coils represented by pins 1 and 3 causes a magnetic field to be aroused. This magnetic field causes the closing of the pins 2 and 4. Thus the switch plays an important role in the relay working. As it is a part of the load circuit, it is used to control an electrical circuit that is connected to it. Thus, when the relay in energized the current flow will be through the pins 2 and 4.
  • 37.
    AUTOMATED HOME SECURITYSYSTEM 37 6.2.2 De – Energized Relay (OFF) As soon as the current flow stops through pins 1 and 3, the switch opens and thus the open circuit prevents the current flow through pins 2 and 4. Thus the relay becomes de- energized and thus in off position. 6.3 DC Motor The DC Motor has 2 wires, simply Positive and Negative. When the positive and negative of the dc motor is connected to a power source then the motor will start turing until the power is removed .A DC motor is usually able to reverse its turning direction by simply switching the positive and negative wires around. since we want to control the motor both directions, we are using 2 relays in this project. Say for instance, we have a DC motor with a green wire and a red wire, if we apply positive the green and negative to the red it will turn, and if we switch the green and red around it will go the other way. 6.4TEMPERATURE SENSOR (LM 35) Temperature sensor is a device which senses variations in temperature across it. LM35 is a basic temperature sensor that can be used for experimental purpose. It give the readings in centigrade(degree Celsius)since its output voltage is linearly proportional to temperature. It uses the fact that as temperature increases, the voltage across diode increases. The range of LM 35 sensor is -55 to +150 Celsius. The output of LM35 is of 10mV/°C scale factor, that means for each 1°C increase in temperature there will be a corresponding increase in 10mV, so we can easily read temperature value. Programmic logic: • First we may have to declare a long variable ‘A’ to store the value read from LM35, which has its range from 0 to 1023. • Then declare another integer variable, ‘B‘ to store mapped (converted) value. • The temperature value obtained from pin A0 which is stored to variable ‘A’. • Variable A is then mapped or converted to 0 to 500 range and stored on variable ‘B’ • The value of ‘B’ is directly displayed on 16×2 LCD screen.
  • 38.
    AUTOMATED HOME SECURITYSYSTEM 38 6.5 SMOKE SENSOR (MQ-2) MQ-2 gas sensor has high sensitity to LPG, Propane and Hydrogen, also could be used to Methane and other combustible steam, it is with low cost and suitable for different application. 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. Character Configuration • Good sensitivity to Combustible gas in wide range • High sensitivity to LPG, Propane and Hydrogen • Long life and low cost • Simple drive circuit We will wire the MQ-2 to an Microcontroller so that it can read the amount of voltage output by the sensor and sound a buzzer if the sensor outputs a voltage above a certain threshold. This way, we will know that the sensor is detecting smoke and we will sound a buzzer alerting a person such as a homeowner to this fact. The 3 leads are Output, Vcc, and GND. 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. In the code analogRead() function is used to read the value from the sensorPin (the smoke sensor). This will be a numerical value from 0 to 1023. 0 represents no smoke, while 1023 represents smoke at the absolute maximum highest level. if this value rises above 836,a message “smoke detected “ is received by the owner.
  • 39.
    AUTOMATED HOME SECURITYSYSTEM 39 6.6 PIR SENSOR PIR(Pyro electric infrared sensor) motion Sensor Compact, complete easy to use for human body detection. This module will detect motion up to 6 meters away. All PIR sensors detect changes in infra-red radiation, in the form of heat emitted by a number of bodies including people, cars and, to a lesser extent, dogs or other small animals. The bigger the body, the more infra-red radiation is emitted and the easier it is for a PIR sensor to detect. It alerts the home owner by text message and alarm notification in case of any intruder detection in the house. Providing the heat source (person) continues to move in the field of view, the PIR sensor will keep processing the changes in infra-red radiation and the lighting will stay on. If a person stands still in the field of view or moves out of the detection area, the sensor will not detect any changes in infra-red radiation between the zones. In order for the sensor to most effectively detect changes in heat between zones, it is advisable to walk across the zones not up or along a zone. PIR sensors are passive devices, they do not emit or radiate any energy or beams. PIR sensor consists these two important components: 6.6.1 Multi Element Fresnel Lens The lens focuses the infra-red radiation given out by a heat source (person) on to the Pyroelectric sensor. The different elements or facets of the lens divide the incoming infrared radiation into vertical and horizontal zones. 6.6.2 Pyro electric Passive Infra-Red Sensor The dual element Pyroelectric sensor receives the incoming infra-red radiation from the various zones. The two elements of the sensor receive varying amounts of infra-red radiation and this difference is amplified, turning into a signal via the IC. This signal activates the switching relay. 6.6.3 Effects of temperature change on PIR sensor All PIRs operate by detecting the temperature difference between the ambient air temperature and a moving heat source (person). Outside air temperature changes have the greatest effect on the operating performance of PIRs. The sensitivity of the sensor increases on cold nights and decreases on hot nights.
  • 40.
    AUTOMATED HOME SECURITYSYSTEM 40 6.7 GSM Module GSM (Global System for Mobile communications) is an open, digital cellular technology used for transmitting mobile voice and data services. GSM differs from first generation wireless systems in that it uses digital technology and Time Division Multiple Access (TDMA) transmission methods. The GSM modem is a specialized type of modem which accepts a SIM card operates on a subscriber’s mobile number over a network, just like a cellular phone. It is a cell phone without display. The network architecture of GSM can be broadly divided into these main areas –Mobile station, Base-station subsystem, Network and switching subsystem, Operation and support subsystem. To send SMS messages, first place a valid SIM card from a wireless carrier into a mobile phone or GSM/GPRS modem, which is then connected to a computer. After connecting a mobile phone or GSM/GPRS modem to a computer, you can control the mobile phone or GSM/GPRS modem by sending instructions to it. The instructions used for controlling the mobile phone or GSM/GPRS modem are called AT commands. (AT commands are also used to control dial-up modems for wired telephone system.) The following table lists the AT commands that are related to the writing and sending of SMS messages: AT command Meaning +CMGS Send message +CMSS Send message from storage +CMGW Write message to memory +CMGD Delete message +CMGC Send command
  • 41.
    AUTOMATED HOME SECURITYSYSTEM 41 Chapter VII: Maintenance Features Automated home security systems are expected to protect people, property, and assets. But we can’t tell if they’re fully operational just by looking at them. As with any other system, electronics and other components can degrade over time and compromise the system’s operation. Dust, dirt, and other contaminants can cause problems with smoke detectors. Such things as vandalism, remodelling, and improper maintenance procedures can also damage fire protection equipment. The good news is that with proper testing, inspection, and maintenance you can keep your security system at optimum operating performance. In addition to ensuring protection, keeping your system in good condition reduces expenses by preventing unbudgeted emergency repairs and costly false alarms. Common issues inspectors include non-operational equipment or equipment that does not operate as originally installed, according to such parameters as sound pressure levels and detector sensitivity. Other issues commonly encountered in an automated Home secuirty system include: systems that have not been maintained properly, such as not cleaning detectors in harsh environments, system modifications that are not code compliant and, as a result, hinder system performance and integrity, and poor system installations and modifications. A lack of knowledge about the system, improper documentation, and improper component and circuit labelling also can pose problems during maintaining the system. Also, accidental discharges of fire suppression systems, such as clean agents and deluge sprinklers, can occur if the service company is not aware of specific system functions or does not follow proper testing protocol. The age of a security system and detection system also can pose problems during maintaining the system. Systems that are 15 years old and older might have lived out their performance lives. Maintaining systems of this age typically uncovers problems that include equipment that no longer functions properly, defective components requiring replacement, and poorly maintained equipment. Addressing system problems can be as simple as replacing faulty components, repairing wiring and conducting routine maintenance. Using competent, experienced contractors for system installations can reduce future problems resulting from poor installations. The potential problem, however, is that not all fire alarm systems are subject to the same environmental and ambient conditions. Therefore, meeting minimum standards of all applicable codes and standards may not provide the optimum protection for a facility. Because of this, service organizations may recommend inspections and maintenance that exceed published standards and guidelines. The maintenance activities for fire alarm systems can be summed up in five steps- • Test and calibrate sensors, such as temperature, PIR sensor, smoke detectors, RFID reader. This requires knowing about the different sensors and their testing requirements, failure modes, and reinstallation requirements. • Simulate inputs and test the annunciators. This requires specific knowledge of the system under test.
  • 42.
    AUTOMATED HOME SECURITYSYSTEM 42 • Set sensitivity. This requires an understanding of the particular system, the specific application, and fire detection theory. • Check the battery for corrosion and expiration date, and then take appropriate action, if necessary. System maintenance: In addition to system age, budget and staffing resources are also considered whether the staffs has the time and expertise to properly maintain this critical life safety system or will it be more cost effective to have the manufacturer’s service organization or a contractor specializing in fire alarms perform the maintenance? The most stringent standards and guidelines are meaningless unless the people performing the inspection, testing, and maintenance are knowledgeable and qualified to service the fire alarm system. Facility maintenance people usually don’t possess the experience and knowledge found in manufacturer’s service technicians, whose daily work revolves around fire alarm system technology in a variety of environments and circumstances. This problem can be solved by training people for the defined task. This approach works, if done on an on going basis. We can get around the training dilemma by using a service agreement. These can range from a basic on call agreement to regularly scheduled service visits. Emergency service offering four hour and eight hour response times, on a 24hr a day basis, is an option available in most service agreements. This service usually provides response within the specified time, along with repair and replacement of equipment. Rapid emergency response is almost universal for the healthcare and lodging industries because of around the clock. Sensors maintenance: The most crucial parts of the automated Home security system are the temperature, smoke sensors, PIR sensor. RFID re ader and GSM module. In our project we have used the Lm35 temperature sensor , MQ2 smoke sensor ,PIR Sensor and RFID reader. If these sensors would not work properly, the fire developed, any leakage of gas and intrusion entry cannot be identified and hence the project is of no use. Therefore it is important to maintain these sensors. The maintenance of the sensors includes some important parameters such as the sensors should calibrate properly the sensors should sense the values as early as possible. The sensors should also be tested from time to time as to check that whether they are in working condition and perform their desired function. The sensors should cover as much area as possible to prevent the damage form fire. The sensors used should be scalable. The PIR sensors enhances the systems performance. In winter and summer, the PIR sensor operates differently due to the differences in ambient air temperature. The SENS control may have to be adjusted at the beginning of winter and against the beginning of summer to maintain the desired operating performance.
  • 43.
    AUTOMATED HOME SECURITYSYSTEM 43 Chapter VIII: Market Survey and Cost Analysis The global home security solutions market is expected to grow from $28,318.69 Million in 2014 to $47,542.52 Million by 2020, at a CAGR of 8.7% between 2015 and 2020. The global home security solutions market is growing rapidly and the major reasons behind this could be the alarming crime rates on global basis and growing concerns of society toward security measures and concerns. The major players in the global home security solutions market are Tyco (Ireland), ASSA ABLOY (Sweden), UTC Fire & Security (U.S.), Honeywell International, Inc. (U.S.), Bosch Security Systems (Germany), Ingersoll Rand Solutions (Ireland), AllegionPlc (Ireland), Godrej & Boyce Manufacturing Company Limited (India), Control4 Corporation (U.S.), Alarm.com (U.S.), and Nortek Security & Control LLC (U.S.). The market currently provides many home automation products that focus on one particular task. Several of these single-task devices could be bought separately and combined to mimic the functionality of the proposed AUTOMATED HOME SECURITY SYSTEM. This project several features like entry in the house using RFID technology at the gate, alerting the owner via SMS and alarm system in case of fire and any intruder entrance in the house. Whereas the security system that are already available in market include one or two features at a time. COST ANALYSIS
  • 44.
    AUTOMATED HOME SECURITYSYSTEM 44 Chapter IX: Advantages and Limitations of developed project 9.1 Advantages of developed system The technology can find applications in the following ways: - • Automatic Home Security system provides real-time surveillance, monitoring and automatic alarm. • This system is a way to help protect your home while you're away, when you're sleeping, or during times when you're preoccupied with household responsibilities and might not be aware of intruders. • Crime Deterrence ;A big advantage of a home alarm system is its usefulness in deterring crime. When potential burglars or intruders see you have an alarm system, they may go elsewhere because it isn't worth the time to try to deactivate it. • It sends early notifications when the fire occurs and helps to reduce the fire damage. • The sensors are scalable and can sense the fire as early as possible. • The automated system is a compatible system. • The MQ 2 smoke sensor is capable of sensing leakage of gases like LPG, methane etc. • Entry in the house is based on RFID technology which provide highly secure environment. • Tags are less sensitive to adverse conditions (dust, chemicals, physical damage etc.). • Many tags can be read simultaneously. • Tag detection not requiring human intervention. • This system alerts the owner of house by SMS notification which is a great plus 9point when he/she is away from home. 9.2 Limitations An automatic fire alarm system made up of smoke detectors, heat detectors, audible warning devices, and a fire alarm control panel which provides early warning of a developing fire. Such a system, however, does not assure protection against property damage or loss of life resulting from a fire. Power Supply The automated fire alarm system does not operate without any electrical power. If AC power fails, the system operates from standby batteries only for a specified time and only if the batteries are properly maintained and replaced regularly. Smoke detectors Smoke detectors may not sense fire where smoke cannot reach the detectors such as in Chimneys, in or behind walls, on roofs, or on the other side of closed doors. Smoke detectors also may not sense a fire on another level or floor of a building. A second-
  • 45.
    AUTOMATED HOME SECURITYSYSTEM 45 floor detector, for example, a second-floor detector, may not sense a first floor or basement fire. Particles of combustion or “smoke”from a developing fire may not reach the sensing chambers of smoke detectors because: • Barriers such as closed or partially closed doors, walls, or chimneys may inhibit particle or smoke flow. • Smoke particles may become “cold,” stratify, and not reach the ceiling or upper walls where detectors are located. • Smoke particles may be blown away from detectors by air outlets. PIR Sensor Protect the sensor from the extremes of weather by sheltering it under a soffit or eave if possible. The electronics inside the sensor can be destroyed by aiming the head at the sun or by light reflected from bright surfaces such as mirror windows or swimming pools. Mount the sensor 2.5 to 3.5 metres above ground level to achieve the optimum detection area. RFID Tag • Faulty manufacture of tags : Manufacturing of tags is not yet 100% failure-free today; about 20–30% of tags used in early RFID pilots have been defective • Prices of active or semi-passive tags (at least $1 per tag) are even more of a hindrance • Faulty or deficient detection of tags :Tags may be damaged during usage. Adverse conditions of the environment and improper placement may corrupt reading. • Registration of data from tags which pass within range of an RFID reader accidentally. • Quick technology obsolescence :Technology is continuously evolving and new protocol standards, faster and more fault-tolerant readers quickly outdate their predecessors. • encryption must be ensured at all interfaces where data could be intercepted or transmitted (on the medium itself, as well as tag–reader and reader–host communication) Audible warning devices Audible warning devices used in our project is an alarm, it may not alert people if the devices are located on the other side of closed or partly open doors or are located on another floor of a building. Any warning device may fail to alert people with a disability or those who have recently consumed drugs, alcohol or medication.
  • 46.
    AUTOMATED HOME SECURITYSYSTEM 46 Chapter X: Conclusion and Suggestions for further work 10.1 Conclusions The GSM based home security system has been designed and tested with the mobile network. The user can get alerts anywhere through the GSM technology thus making the system location independent. A flexible way to control and explore the services of the mobile, AT commands is used in the system. The communication of home is only through the SMS which has been tested with the mobile networks and is working on any mobile network.People are getting more and more concerned about how to protect themselves and their houses from emergencies. These emergencies include not only thief intrusion, but also fire attack. This device provides a means for being able to secure-ly monitor a house by use of sensors integrated with a micro-controller and a GSM unit. SMS provides an economical and convenient way to alert users of a possible intrusion into the property. The use of mobile handsets as a client device to receive warning messages on implies that the user will not have to carry an additional piece of equipment as most people already have a mobile phone with them most of the time.So this system is safe and cost effective as well. This system will be able to detect fires, smoke and intruder at all locations. The system will get activated automatically with the help of various sensors. This system helps in reducing the cost of fire-insurance protection as well as provides security for the owner of the place We are using a temperature sensor and a smoke sensor. Theses sensors will sense the conditions and send their output to the microcontroller chip. This microcontroller chip has been programed using embedded C, thereby as programed it will send a notification to the local authorities if the output of the temperature sensor and smoke sensor crosses the threshold value. There is a LED attached to display the and the PC is attached for real time monitoring. The working plan is simple and easy for everyone to understand. 10.2Suggestions for further work The automated Home security system may be improved by addressing some of the extra features. CCTV camera could be installed at various sections of the house. Motion sensor cameras can also be installed which will detect any motion in the house plus record the video at that moment and house owner can see live video on his phone. It can also capture the images of the affected area in order to guide the fire brigades. This will help the authorities to know about the severity of the fire and hence they can prepare the help according to that. This will help them in identifying the number of members or resources that will be required to control the fire. Another common function that can be added to the developed system is the transmission of notifications message to the police station or other emergency response organization. This notification will result in early help and preventing the damage.
  • 47.
    AUTOMATED HOME SECURITYSYSTEM 47 Snapshots Representation of the connections/circuit of the automated Home Security system.
  • 48.
    AUTOMATED HOME SECURITYSYSTEM 48 When the system started.
  • 49.
  • 50.
    AUTOMATED HOME SECURITYSYSTEM 50 Representing connection establishment.
  • 51.
    AUTOMATED HOME SECURITYSYSTEM 51 Representing values of temperature and smoke sensor.
  • 52.
    AUTOMATED HOME SECURITYSYSTEM 52 Appendix (for source code)
  • 53.
    AUTOMATED HOME SECURITYSYSTEM 53 #define RS RD7 #define EN RD6 #define lcd PORTB unsignedinttemp,smoke,i=0,j=0,bytes=0,fstcard=0,scndcard=0; charuid[12]; unsigned int card1[12]={'3','E','0','0','F','D','5','E','7','E','E','2'}; unsigned int card2[12]={'1','5','0','0','1','C','2','5','F','F','D','2'}; void delay(unsigned int x) { while(x--); } voidlcd_value(unsigned intdata,unsignedintcmd) { RS=cmd; lcd=data; EN=1; delay(10); EN=0; delay(100); } voiddisp(unsigned char *string,intline,int place) { if(line==1) lcd_value((0x80+place),0); if(line==2) lcd_value((0xc0+place),0); while(*string!='0') { lcd_value(*string,1); string++; } } voidadc(int channel) { int a; if(channel==1) ADCON0=0x00; if(channel==2) ADCON0=0x04; ADCON1=0x80; delay(10000); GO=1; while(GO==1); a=(ADRESH*256)+ADRESL; if(channel==1) {
  • 54.
    AUTOMATED HOME SECURITYSYSTEM 54 temp=(a/1023)*500; lcd_value(0xc0,0); lcd_value(((temp/100)+48),1); lcd_value(((temp/10)%10)+48,1); lcd_value(((temp%10)+48),1); } if(channel==2) { smoke=a; lcd_value(0xcc,0); lcd_value(((a/100)+48),1); lcd_value(((a/10)%10)+48,1); lcd_value(((a%10)+48),1); } } voidgsminit(int system) { unsigned char *msginit="AT+CMGF=1"; unsigned char *msgno="AT+CMGS="9899535962""; unsigned char *msgbody1="SOMEONE IS THERE IN THE HOUSE"; unsigned char *msgbody2="SMOKE DETECTED"; unsigned char *msgbody3="TEMP. BEYOND LIMIT"; unsigned char *msgbody4="FIRE IN THE HOUSE"; unsigned char *msgbody6="SOMEONE TRIED TO ENTER THE HOUSE"; while(*msginit!='0') { RCIE=0; TXREG=*msginit; while(TXIF==0); TXIF=0; msginit++; delay(10000); } TXREG='r'; while(TXIF==0); TXIF=0; delay(10000); while(*msgno!='0') { TXREG=*msgno; while(TXIF==0); TXIF=0; msgno++; delay(10000); } TXREG='r'; while(TXIF==0); TXIF=0;
  • 55.
    AUTOMATED HOME SECURITYSYSTEM 55 delay(10000); if(system==1) { while(*msgbody1!='0') { TXREG=*msgbody1; while(TXIF==0); TXIF=0; msgbody1++; delay(10000); } TXREG=0x1a; while(TXIF==0); TXIF=0; } else if(system==2) { while(*msgbody2!='0') { TXREG=*msgbody2; while(TXIF==0); TXIF=0; msgbody2++; delay(10000); } TXREG=0x1a; while(TXIF==0); TXIF=0; } else if(system==3) { while(*msgbody3!='0') { TXREG=*msgbody3; while(TXIF==0); TXIF=0; msgbody3++; delay(10000); } TXREG=0x1a; while(TXIF==0); TXIF=0; } else if(system==4) { while(*msgbody4!='0') { TXREG=*msgbody4;
  • 56.
    AUTOMATED HOME SECURITYSYSTEM 56 while(TXIF==0); TXIF=0; msgbody4++; delay(10000); } TXREG=0x1a; while(TXIF==0); TXIF=0; } else if(system==6) { while(*msgbody6!='0') { TXREG=*msgbody6; while(TXIF==0); TXIF=0; msgbody6++; delay(10000); } TXREG=0x1a; while(TXIF==0); TXIF=0; } RCIE=1; } void main() { ANSEL=0xff; ANSELH=0x00; TRISA=0xff; TRISB=0x00; TRISD=0x00; TRISC=0x82; RD2=0; RD3=0; RC4=0; TXSTA=0x14; RCSTA=0x90; SPBRG=129; GIE=1; PEIE=1; RCIE=1; RCIF=0; TXIF=0; lcd_value(0x38,0); lcd_value(0x0c,0); lcd_value(0x01,0); disp("TEMP. SMOKE",1,0);
  • 57.
    AUTOMATED HOME SECURITYSYSTEM 57 while(1) { adc(1); delay(2000); adc(2); if(RC1==1) { RC4=1; lcd_value(0x01,0); disp("SOMEONE TRIED TO",1,0); disp("ENTER THE HOUSE",2,0); for(i=0;i<=20;i++) delay(12000); RC4=0; gsminit(1); lcd_value(0x01,0); disp("TEMP. SMOKE",1,0); } if(smoke>=840) { RC4=1; lcd_value(0x01,0); disp("SMOKE DETECTED",1,0); for(i=0;i<=20;i++) delay(12000); RC4=0; gsminit(2); lcd_value(0x01,0); disp("TEMP. SMOKE",1,0); } if(temp>=55) { RC4=1; lcd_value(0x01,0); disp("TEMP. BEYOND",1,0); disp(" LIMIT ",2,0); for(i=0;i<=20;i++) delay(12000); RC4=0; gsminit(3); lcd_value(0x01,0); disp("TEMP. SMOKE",1,0); } if(smoke>=840&&temp>=55) { RC4=1; lcd_value(0x01,0); disp("FIRE",1,0);
  • 58.
    AUTOMATED HOME SECURITYSYSTEM 58 disp("IN THE HOUSE",2,0); for(i=0;i<=20;i++) delay(12000); RC4=0; gsminit(4); lcd_value(0x01,0); disp("TEMP. SMOKE",1,0); } if(bytes==12) { j=0; bytes=0; if(uid[0]==card1[0]&&uid[1]==card1[1]&&uid[2]==card1[2]&&uid[3]==card1[3]&& uid[4]==card1[4]&&uid[5]==card1[5]&&uid[6]==card1[6]&&uid[7]==card1[7]&&uid [8]==card1[8]&&uid[9]==card1[9]&&uid[10]==card1[10]&&uid[11]==card1[11]) fstcard=1; if(uid[0]==card2[0]&&uid[1]==card2[1]&&uid[2]==card2[2]&&uid[3]==card2[3]&& uid[4]==card2[4]&&uid[5]==card2[5]&&uid[6]==card2[6]&&uid[7]==card2[7]&&uid [8]==card2[8]&&uid[9]==card2[9]&&uid[10]==card2[10]&&uid[11]==card2[11]) scndcard=1; if(fstcard==1||scndcard==1) { lcd_value(0x01,0); fstcard=0; scndcard=0; disp("ACCESS GRANTED",2,0); RD2=1; RC4=1; for(i=0;i<=20;i++) delay(12000); RC4=0; RD2=0; delay(25000); RD3=1; for(i=0;i<=20;i++) delay(12000); RD3=0; lcd_value(0x01,0); disp("TEMP. SMOKE",1,0); } else { lcd_value(0x01,0); disp("ACCESS DENIED",2,0); RC4=1; for(i=0;i<=20;i++) delay(12000); RC4=0;
  • 59.
    AUTOMATED HOME SECURITYSYSTEM 59 gsminit(6); lcd_value(0x01,0); disp("TEMP. SMOKE",1,0); } } } } void interrupt isr() { RCIF=0; j++; bytes++; uid[j]=RCREG; }
  • 60.
    AUTOMATED HOME SECURITYSYSTEM 60 Reference 1. https://www.smartapp.com/gantterforgoogledrive/index.html?fileID=0B0jKwFz xgplVV0NQck82dVpYeEkyRkJyQ21CUm13aWpmOTZv# 2. https://www.google.co.in/search?q=black+box+testing&oq=black+bo&aqs=chr ome.0.69i59j0j69i57j0l3.11603j0j1&sourceid=chrome&ie=UTF-8 3. http://forum.researchdesignlab.com/datasheet/sensors/gas%20sensor%20mq2.pd f 4. https://www.google.co.in/search?sclient=psy- ab&biw=1517&bih=665&q=putty%20similar%20software&oq=putty%20simul ati&gs_l=serp.1.0.0i13l4.505841.511818.0.520274.9.6.3.0.0.0.2353.8829.6- 2j2j0j2.6.0....0...1c.1.64.psy- ab..1.8.6460.DEbVpPRoAho&pbx=1&dpr=0.9&ion=1&cad=cbv&bvch=u&sei =hkoPV9-5J4ml0AS-0K2ICg&rct=j#q=putty+software 5. http://www.facilitiesnet.com/firesafety/article/Trouble-Spots-for-Fire-Alarm- and-Detection-Systems--11442?source=next 6. https://www.smartdraw.com/data-flow-diagram/ 7. https://www.visual-paradigm.com/tutorials/leveled-dfd.jsp 8. http://www.facilitiesnet.com/firesafety/article/Fire-Alarm-and-Detection- Systems-Common-Maintenance-Activities-Facility-Management-Fire-Safety- Feature--11441 9. http://www.ijcee.org/papers/306-E794.pdf 10. http://www.developershome.com/sms/howToSendSMSFromPC.asp 11. http://www.marketsandmarkets.com/Market-Reports/home-security-solutions- market-701.html 12. www.learningaboutelectronics.com/Articles/MQ-2-smoke-sensor-circuit-with- arduino.php 13. https://electrosome.com/interfacing-relay-with-pic-microcontroller/ 14. http://www2.ece.gatech.edu/academic/courses/ece4007/08fall/ece4007l02/lm3/i mages/written_proposal.pdf 15. http://fritzing.org/projects/relay-control-dc-motor-with-direction-control 16. http://www.circuitsgallery.com/2014/10/arduino-temperature-sensor.html 17. http://www.zseries.in/electronics%20lab/sensors/temperature%20sensor/#.VyT OK3pYiyw
  • 61.
  • 62.