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

DESIGN AND CONSTRUCTION OF AN INTELLIGENT MULTI-FUNCTION

FIRE ALARM SYSTEM

SUBMITTED BY

OKEMS TIMOTHY UCHE


(AFIT/HND/EEE/19/0016)

TO

THE DEPARTMENT OF ELECTRICAL/ELECTRONICS ENGINEERING


FACULTY OF ENGINEERING

AIRFORCE INSTITUTE OF TECHNOLOGY (AFIT), KADUNA

BEING A PROJECT REPORT SUBMITTED

IN PARTIAL FULFILMENT FOR THE AWARD OF HIGHER NATIONAL


DIPLOMA (HND)

IN

ELECTRICAL/ELECTRONICS ENGINEERING TECHNOLOGY

JANUARY, 2022
DECLARATION

I declare that: Design and construction of an intelligent multi-function fire alarm system is
my own work and that all sources used have been indicated and duly referenced.

Okems Timothy Uche


Student Name

………………………….
Student Signature and date

ii
APPROVAL PAGE

This is to certify that the project report with title, “Design and Construction of an
Intelligent Multi-function Fire Alarm System” submitted by OKEMS Timothy Uche,
Registration Number AFIT/HND/EEE/19/0016, submitted in partial fulfillment of the
requirement for the award of a Higher National Diploma in Electrical/Electronics
Engineering, has been approved.

Engr. ATIE Flt Lt OA OLORUNSHOLA


Supervisor Head of Department

Signature: …………………. Signature: ………………….


DEDICATION

This project is dedicated firstly to Almighty God for His protection, kindness, strength
over my life throughout this period; He made my dreams come through, and to my
amiable wife for her encouragement and continual support.
ACKNOWLEDGEMENT

The successful completion of this project work would not have been a reality without the
encouragement and support of my parents Mr. & Mrs. Vitalis Okems Offoronanwa, my
guidance Engr. & Mrs. Innocent Agunanne, my wife and son Mrs. Okems Mba Vera and
Master Okems Miguel, the latter of which his birth brought me so much joy and passion
for achievement. I truly appreciate their efforts.
I wish to express my sincere thanks to my able supervisor Engr. Atie for his kindness in
supervising this project.
I must appreciate the efforts of the department of Electrical Electronics Engineering
(AFIT) for planting in me enthusiasm and an enabling environment to complete this
project. I appreciate the Head of department; Flt Lt OA Olorunshola, the project
coordinator; Engr. Charles Dyaji, and my lecturer; MWO Umar Sagir amongst others for
their mentorship.
ABSTRACT

Fire is one of the major concerns for designers, builders, residents of properties and
company/structure owners. Most of the traditional fire alarms function by blaring alarm
sounds to warn those in the building. Still, they do not inform people regarding detailed
information about a fire's location and directions to escape from the building. In many
cases, people in burning buildings often become lost or trapped; some even run towards
the fire resulting to severe injuries and fatalities. Because current fire alarm systems fail to
deliver accurate instructions about avoiding the fire, the location of the fire, the severity of
the fire, and do not provide direct contact to emergency response units, many scientists
have attempted to develop a better alarm system to prevent unnecessary casualties. To
solve this problem, this study attempts to propose an intelligent fire alarm system that
detects fire at its early stages, create a voice-directed fire alarm system using an Arduino
microcontroller and multiple flames, temperature, and cooking gas sensors. These sensors
were connected to an Arduino board with a wave shield, allowing us to activate the voice
message with audible tones and information regarding the location of hazard and the
degree of burning situations. A GSM module was also used with the Arduino to help
broadcast the predicted result to appropriate parties. Based on a dry run test, the voice-
directing system was able to guide people with higher efficiency than the traditional fire
alarm. The final outcome of this development also minimized false alarms, thus making
this system more reliable. More study might be needed, considering the importance of
early alert with more accurate information using other sensors.
TABLE OF CONTENTS

COVER PAGE
DECLARATION
APPROVAL PAGE
DEDICATION
ACKNOWLEDGEMENT
ABSTRACT
TABLE OF CONTENT
LIST OF FIGURES
LIST OF TABLES

CHAPTER ONE
1.0. GENERAL INTRODUCTION

1. INTRODUCTION
2. BACKGROUND OF THE PROJECT
3. PROBLEM STATEMENT
4. AIMS AND OBJECTIVES OF THE PROJECT
5. PROJECT SCOPE
6. PROJECT JUSTIFICATION
7. APPLICATION OF THE PROJECT
8. RESEARCH METHODOLOGY
9. PROJECT TIMELINE

CHAPTER TWO
2.0. LITERATURE REVIEW

1. INTRODUCTION
2. THEORETICAL FRAMEWORK
3. REVIEW OF RELATED STUDIES
2.3.1 N N MAHZAN ET AL 2018
2.3.2 ARTICLE ON OVERVIEW OF FIRE ALARM AND
DETECTION SYSTEMS
2.3.3 ODAUDU UGBEDE SUNDAY (2016)
4. REVIEW OF THE TYPES OF FIRE ALARM SYSTEM
2.4.1. CONVENTIONAL FIRE ALARM SYSTEMS
2.4.2. ADDRESSABLE FIRE ALARM SYSTEMS
2.4.3. INTELLIGENT FIRE ALARM SYSTEMS
2.4.4. WIRELESS FIRE ALARM SYSTEMS
5. REVIEW OF THE PROJECT DESIGN
6. REVIEW OF THE FIRE ALARM SYSTEM COMPONENTS

CHAPTER THREE
3.0. METHODOLOGY

1. SYTEM BLOCK DIAGRAM


2. SYSTEM CIRCUIT DIAGRAM
3. CIRCUIT DESCRIPTION AND SYSTEM OPERATION

CHAPTER FOUR
4.0. RESULT AND DISCUSSION

1. RESULT
2. COST ANALYSIS
3. DISCUSSION

CHAPTER FIVE
5.0. SUMMARY AND RECOMMENDATION

1. SUMMARY OF THE PROJECT


2. RECOMMENDATION
3. REFERENCES

CHAPTER SIX
6.0. CONCLUSION

1. CONCLUSION

APPENDIX

ii
LIST OF FIGURES

Figure 2.1 The 16th century Bell tower


Figure 2.2 The Electromagnetic Fire Alarm Telegraph Circuit
Figure 2.3 The Electromagnetic Fire Alarm Box
Figure 2.4 Block diagram of the home fire alarm system
Figure 2.5 The Hardware architecture of the home fire alarm system.
Figure 2.6 Actual positioning of detectors
Figure 2.7 Fire out-break at the Singer Market, Kano State
Figure 2.8 Grand Square Mall, Central Business District Area of Abuja
Figure 2.9 Conventional Fire Alarm Systems
Figure 2.10 Addressable Fire Alarm System
Figure 2.11 Intelligent Fire Alarm System
Figure 2.12 Wireless Fire Alarm System
Figure 2.13 Arduino Uno
Figure 2.14 Atmega328 Pin Layout
Figure 2.15 MQ-2 gas sensor
Figure 2.16 LM35
Figure 2.17 SIM800L Module
Figure 2.18 Mp3 Module
Figure 2.19 LCD
Figure 2.20 IR Flame sensor Module
Figure 2.21 Battery
Figure 3.1 Block Diagram
Figure 3.2 SIM 800L Module
Figure 3.3 Arduino-Flame-Sensor-Interface-Circuit-Diagram
Figure 3.4 The system setup
Figure 4.1 LM35 interface with Arduino
Figure 4.2 Basic Centigrade Temperature Sensor (2 °C to 150 °C)
Figure 4.3 Standard room temperatures
Figure 4.4 MQ2 interfaced with Arduino
Figure 4.5 LCD & LM35 interfaced with Arduino
Figure 4.6 SIM800L sms and call actions
LIST OF TABLES

Table 4.1 Average Temperatures in Nigeria (1991-2020)

Table 4.2 Costs of Materials Used


CHAPTER 1

GENERAL INTRODUCTION

1.1 Introduction

The Voice prompt fire detector and alarm system is considered better alternatives to
traditional audible alarms because a voice is typically less likely to instill panic, and the
voice feature can be used to give specific life-saving instructions for specific situations.
They not only let everyone know when an emergency arises but they also inform the
people of certain measures to take to avoid confusion and thereafter saving them valuable
time necessary for protection of life and properties.

Furthermore, the Voice prompt fire detector and alarm system can be programmed to give
voice alerts in diverse languages or dialects according to where it is being installed around
the world. It clears the problems of families or communities who do not understand a
particular global language or dialect. This thereby increases the number of lives saved
since there are no excuses on the ground of not understanding a particular language.
In addition, the GSM module helps to limits the spread of fire by ensuring that appropriate
security or emergency response units are notified on time to extinguish the fire.

1.2 Background of the project

Reports on the issue of recorded deaths due to fire hazards and gas explosions have
increased tremendously. According to the U. S. Fire Administration website, a reliable
resource for credible information; “Each year more than 2,500 people die and 12,600 are
injured in home fires in the United States, with direct property loss due to home fires
estimated at $7.3 billion annually”. If this number of deaths and casualties are recorded in
a highly developed nation with several means of controlling fire incidents already in place
such as the USA, it is therefore acceptable to conclude that a developing nation such as
Nigeria would suffer even more casualties and deaths due to the incessant fire outbreaks
and gas explosions experienced yearly. An example of such devastating fire incident is the
fire incident on the very important Treasury House; office of the Accountant general of
the Federation in Abuja on 8th April, 2020.

One major method of combating the catastrophic effects of a fire outbreak which leads to
loss of life and property is its early detection and the evacuation of people at the scene of
the incident. Many companies with the hope of bridging the gap in the number of deaths
and loss of properties caused by fire have developed the smoke alarms, gas sensors and
detectors, even the most recent GSM Based SMS Alert Fire Alarm Systems.  However
these new technologies have their limitations in successfully detecting smoke or gas and
triggering alarms or bells instantaneously for a timely evacuation.
In our modern life, fire protection has become a top concern, because there are always fire
hazards around us that can cause a great loss of property and human life. Therefore,
having a fire alarm system played an important role, which help prevent and handle the
fire in time when it occurred. Fire detection and alarm systems (FDAS) are all structured
and introduced with the same fundamental target in mind: to discover a fire; effective
alarm and provide information to the inhabitants; warn and give information to first
responders. How these objectives are satisfied is dependent on the particular situations;
and also, the standard of the area of the world under consideration.
A fire alarm system is one of the basic systems that is required to be installed in every
household and building in many countries. Having the system installed helps alert people
of a possible fire, give them early warnings; automatically call the emergency services and
contacts, minimize the time it takes for the fire department to come, lower the risks of
false fire alarm, and reduced fire damage to properties.
Because of the importance of fire alarm systems, this project was made. This thesis has
three main parts. The first part presents the history of fire detection and alarm systems.
This part helps readers understand how the first fire alarm system started. For the purpose
of gaining knowledge about fire detection and alarm system, this project provides its
standards in Nigeria and the United States of America for the second part. The reason the
author chose Nigeria is because she is the author’s home country, and USA was chosen
for verifiable statistical purposes. The final part consists of the design of a fire alarm
system by using Arduino Uno to demonstrate how the system operates.

1.3 Problem Statement

Traditional fire alarms loudly siren to alert the occupants in the building, but lacks detailed
information about the fire’s location, severity, fire type and where or which direction
people should move towards in order to avoid been trapped or injured by the fire. Due to
this flaw, people are not able to identify the cause of the fire and possible solution at a
glance most of the times and may also get trapped or stuck in burning buildings, leading to
severe injury or even death. As a result of the lack of information given by traditional fire
alarms leading to severe injury, scientists and academia have attempted to develop a new

ii
and improved alarm system to further minimizing fire-related injuries and casualties. 

1.4 Aims and Objectives of the project

The main aim of this project is to design and construct a system that will detect the
unwanted presence of fire by monitoring environmental changes associated with
combustion and to develop an advanced alarm system equipped with voice directing MP3
to inform and advise occupants of the building. It also includes a voice prompt system and
a GSM module for distant signal communication.

The objective of this work is to;


1. Design and construct a basic fire alarm system using smoke and gas sensors with
an Arduino Uno board.
2. Design a human voice control system to be used with the fire alarm
3. Construct a GSM message alert system using a SIM module to work with the fire
alarm and enable communication with fire safety department
4. Design and construct a prototype structure where this project can be tested on.
5. Design an alarm system using voice prompt that can be programmed to give voice
alerts in diverse languages according to where it is being installed around the
world
6. Ensure the project is in compliance with existing national fire alarm codes and
specifications.

1.5 Project Scope

This project is a microcontroller based intelligent multi-function fire detection and alarm
system, using ARDUINO UNO board. It uses an LM35 temperature sensor and MQ2 for
smoke sensing and a 16X2 LCD is used to display temperature and smoke level. A SIM
Module has also been employed for far distance signal (text message) transmission. The
microcontroller is programmed with an Mp3 Shield to give voice warning in different
languages, the Mp3 Shield has a capacity for storage of pre-recorded audio which can be
prompted to guide and advice in a fire incident. A relay is connected to the system and this
relay is activated when smoke or gas is detected and this activation triggers the Mp3
Shield and the SIM Module.

iii
1.6 Project Justification

This project exposes a more modern approach and technique for controlling and alerting
user against fire accident. There is an increase in reliability than regular fire alarms in
existence. The system has been designed to be highly sensitive and at lowest cost possible.
There is also the idea of not making this fire alarm system a ready-made system and this is
to ensure that every installation is done in consideration of environment-specific factors
because environmental conditions differ from one geographic location to another.
Different structures are also built with diverse materials and factors such as ventilation and
contents of the structures are different, all these have been put into consideration to ensure
the best result possible.
This project is designed to be of immense benefit to all countries because of the diverse
language of the audio prompt system. It also serves as a guide for anyone seeking to
purchase a fire alarm system, having modern trend at heart.
Finally, it will also serve as a useful piece of information for both producers and users of
the alarm.

1.7 Project Application

This system can be used in places such as;


1. Home / Office
2. Banks
3. Factories
4. Store Room
5. Industries
6. Movie theaters
7. Prison/Correctional facilities

1.8 Research Methodology

In the course of carrying out this design, numerous source were used which most of them
are by visiting libraries, consulting journals and newspapers and online research which
Google was the major source that was used.

iv
1.9 Project Timeline

This work is organized as follows;


Chapter One talks about the general introductory part of the work.
Chapter Two presents the literature review of the study.
Chapter Three describes the methods applied.
Chapter Four explains the result of the work.
Chapter Five summarizes the research outcomes and the recommendations.
Chapter Six is the conclusion.

v
CHAPTER 2

LITERATURE REVIEW

2.1 Introduction

This chapter includes an exhaustive but incisive review of relevant literature in the project
area. The exercise is geared towards justifying the defined objectives of the project and
establishing the theoretical framework for the project work. It will also identify gaps in the
literature in which the study attempts to fulfill.

2.2 Theoretical Framework

The Ancient Greeks and Romans set the first fire alarm system standards: the simple
method of applying water to fire, quickly, to extinguish it! Specifically, their creation was
a fire-extinguisher and pump, a prototype to the fire alarm in existence today.

By the 16th century, it was quickly understood within most civilizations that a water
supply must be kept close by, quickly accessible in case of a fire. Eventually, larger
communities and cities needed better ways to warn others from further distances. This was
where bell towers came into play as the first fire alarm system.
Traditionally, bell towers were meant as a public service, to track time. Bells were also
rung for Church, and town gatherings, but the difference was in the way they sounded the
bells.

It was 1828, in America; the Pennsylvania State House rebuilt their Independence Hall; a
new steeple, hung a new bell, and employed an official fire watchman.

A man named Franklin Peale came up with specific bell-ringing signals: ringing the bell
at certain intervals alerted folks of the general location where the fire was, and men would
quickly move in that direction, water in tow. This system was quickly adopted in other big
cities too and bell codes worked to a degree, but the unpredictability of fire itself called for
higher, more precise ways of locating and distinguishing fires before they reached a
detrimental level of destruction.
Figure 2.1 The 16th century Bell tower

America in the mid-17th century was an exciting era of life-changing and saving
inventions. Following Samuel Morse’s invention of the telegraph in 1837, and its
commercial usage starting in 1844, it was scholar of electromagnetism, Dr. William F.
Channing of Boston, MA, who invented the first official fire alarm system that wasn’t a
person. The system comprised two fire alarm boxes with a telegraphic key and a handle. If
someone cranked the handle, an operator at a nearby station would alert the fire
department to go to the scene. Although this system was better than a human fire alarm, it
still had significant drawbacks. The system’s most significant disadvantage was that
people couldn’t waste time cranking a handle rather than running away from a fire.

Channing, and his assistant Mr. Moses Farmer, both believed that the use of telegraphy
and electromagnetism could be used for different types of communication and location –
specifically for emergency situations. The end goal was to create a quick, reliable fire
alarm that could be used to alert fire fighters to the near-exact location of a fire as it
started.
Originally, the fire alarm system was a bit confusing. It was a large, hefty contraption with
several wires and levers, containing a telegraphic key with a metal handle. In 1852, when
a fire was detected, someone would crank the handle, relaying the fire box alarm number
to the nearest fire station location. Doing this also sounded the literal alarm, which would
ring at the location and at the nearest fire station.
Often, however, if the crank was turned too quickly, the telegraph signal couldn’t be sent
out. The relationship between the electric current that would pulse out this fire alarm
signal and the release of the bell-clappers (the alarm itself) was very touchy and had to be
done precisely. As one may assume, in a state of emergency, the operator may be a little
ii
scared and not necessarily aware that he should make sure to crank the handle correctly.
For a busy city, this invention was a monumental moment toward the improvement of
local and city-wide safety procedures, and it was quickly patented.
After refining their product, patent for Channing and Farmer’s “Electromagnetic Fire
Alarm Telegraph” was issued on May 19th, 1857.

Figure 2.2 The Electromagnetic Fire Alarm Telegraph Circuit

Channing (March 1855), set out his proposal describing the victories and merits of his
invention at the Smithsonian Institution lecture in Boston, Massachusetts. He described his
invention as “a higher system of municipal organization than any which has heretofore
been proposed or adopted.” However efficient, his product just wasn’t catching on, and he
was going into debt. John Nelson Gamewell, a postmaster and telegraph operator from
Camden, South Carolina, attended the same lecture Channing did, and recognized the
potential of the invention. Gamewell bought the rights to the fire alarm box Channing
and Farmer created. He adapted the fire box to become more easily handled, and it sold
to over 500 cities. Instead of all the intricate levers and pulleys arranged on Channing’s
product, the now universally-recognized “pull-down lever” was adapted. Gamewell’s
adaptations made all the difference and gave way to the fire alarm systems we have today.

iii
Figure 2.3 The Electromagnetic Fire Alarm Box

Francis Robbins Upton (1890), an associate of Thomas Edison invented the first
electrical fire alarm system. This was the first time a thermostat could detect heat and
trigger the sprinkler system to displace a fire. This was also the birth of fire protection
services. The system, although innovative for its day, but Upton’s work was often
overlooked.

The turn of the 20th century saw the invention of other detection devices like the smoke
detector and carbon monoxide detector that would eventually make up essential
components of modern fire alarm systems. While these technology existed over a hundred
years ago, the devices were often too expensive to produce or too large for viable use in a
home or business. It took significant improvements in manufacturing and fire alarm
technology before the modern fire alarm system could take on the form we’re familiar
with today.
Ionized smoke detectors that made use of trace amounts of radioactive particles to detect
smoke were developed for use in 1951 but were too large and costly for even most
commercial properties. It wasn’t until 1955 that compact, functional heat detectors began
to be used in homes. Cost-effective, battery-powered smoke detectors were developed by
Duane Pearsall and Stanley Peterson (1965), and by 1975 the devices were being mass-
produced for consumer use. Battery-powered carbon monoxide detectors were developed
in large quantities in the early 1990s, and the first combination smoke/carbon monoxide
detectors hit the market in 1996.

iv
For the first time in history, both businesses and homes were able to both locally alert
occupants to a fire and send the signal to a monitored control panel. This period of time
saw an emphasis on the development of central stations which could actually pinpoint
specific locations, produce alarm signals and relay the information to appropriate
dispatchers and fire departments. Firefighting tactics shifted dramatically from fighting
declining fires to trying to douse flames in the development phase before the fires could
transform into the block-burning uncontrollable fires of years-gone bye. Because of this
dramatic shift, fire fatalities have steadily dropped over the course of the past fifty years.

The beginning of the 21st century saw the development and wider acceptance of mass
notification systems, specifically, the voice evacuation fire alarm systems. Instead of the
same light flashes and sirens going off for every unique fire event, a voice evacuation
system could alert occupants to the location of a fire, the proper evacuation procedure, and
the fact that the alarm was not a drill. By customizing the evacuation procedure during an
alarm event, the ability to vacate buildings became even more efficient, further limiting
the loss of life associated with fires.

Fire codes regulating the proper design and installation of fire alarm systems are slow to
change, but rapidly improving technology may alter life safety systems for the better.
Already, fire-rated cellular communicators are gaining popularity and will likely overtake
old copper phone lines as the primary communication method for fire alarm systems as
telecommunications companies move toward voice over IP (VOIP) lines. Fire marshals
across the United States are pushing for stricter fire codes including widespread adoption
of Underwriter’s Laboratory (UL) and Factory Mutual (FM) standards. Voice evacuation
is set to make an ever bigger splash than it already has, and the technologies for early
smoke and carbon monoxide detection are consistently improving.

Fire alarm systems have been explained to be devices or systems that warn people
when smoke, fire, carbon monoxide or other fire-related emergencies are detected. These
alarms may be activated automatically from smoke and heat detectors or may also be
activated via manual fire alarm activation devices such as manual call points or pull
stations. Alarms can be either motorized bells or wall mountable sounders or horns. They
can also be speaker strobes which sound an alarm, followed by a voice evacuation
message which warns people inside the building not to use the elevators. Fire alarm
sounders can be set to certain frequencies and different tones including low, medium and
high, depending on the country and manufacturer of the device. Most fire alarm systems in
Nigeria sound like a siren with alternating frequencies. Fire alarm electronic devices are
v
known as horns in the United States, and can be either continuous or set to different codes.
Fire alarm warning devices can also be set to different volume levels.
Following the similarities in the various fire alarm systems, it became imperative to
identify basic and essential component parts of a regular fire alarm system and they
include the following;

1. Fire alarm control panel (FACP) also known as the fire alarm control unit (FACU):
This component is the hub of the system; it monitors inputs and system integrity, controls
outputs and relays information.

2. Primary power supply: Commonly the non-switched 120 or 240-volt alternating


current source supplied from a commercial power utility. In non-residential applications, a
branch circuit is dedicated to the fire alarm system and its constituents.

3. Secondary (backup) power supplies: This component, commonly consisting of sealed


lead-acid storage batteries or other emergency sources including generators, is used to
supply energy in the event of a primary power failure. The batteries can be either inside
the bottom of the panel or inside a separate battery box installed near the panel.

4. Initiating devices: These components act as inputs to the fire alarm control unit and are
either manually or automatically activated. Examples would be devices such as pull
stations, heat detectors, duct detectors, and smoke detectors. Heat and smoke detectors
have different categories of both kinds. Some categories are a beam, photoelectric,
ionization, aspiration, and duct.
 Manually actuated devices; also known as fire alarm boxes, manual pull stations,
or simply pull stations, break glass stations, and (in Nigeria) call points. Devices
for manual fire alarm activation are installed to be readily located (near the exits),
identified, and operated. They are usually actuated by means of physical
interaction, such as pulling a lever or breaking glass.
 Automatically actuated devices; can take many forms intended to respond to any
number of detectable physical changes associated with fire: converted thermal
energy; heat detector, products of combustion; smoke detector, radiant energy;
flame detector, combustion gases; fire gas detector, and release of extinguishing
agents; water-flow detector. The newest innovations can use cameras and
computer algorithms to analyze the visible effects of fire and movement in
applications inappropriate for or hostile to other detection methods.
vi
5. Building safety interfaces: This interface allows the fire alarm system to control
aspects of the built environment, prepare the building for fire, and control the spread of
smoke fumes and fire by influencing air movement, lighting, process control, human
transport and availability of exits.

6. Fire alarm notification appliance: This component uses energy supplied from the fire
alarm system or other stored energy source, to inform the proximate persons of the need to
take action, usually to evacuate. This is done by means of pulsing incandescent light,
flashing strobe light, electromechanical horn, siren, electronic horn, chime, bell, speaker,
or a combination of these devices. Strobes are either made of a xenon tube (most
common) or recently LEDs. Notification Appliances utilize audible, visible, tactile, textual
or even olfactory stimuli (odorized) to alert the occupants of the need to evacuate or take
action in the event of a fire or other emergency. Evacuation signals may consist of simple
appliances that transmit un-coded information, coded appliances that transmit a
predetermined pattern, and or appliances that transmit audible and visible textual
information such as live or pre-recorded instructions, and illuminated message displays. In
the United States, fire alarm evacuation signals generally consist of a standardized audible
tone, with visual notification in all public and common use areas. Emergency signals are
intended to be distinct and understandable to avoid confusion with other signals. As per
NFPA 72, 18.4.2 (2010 Edition) Temporal Code 3 is the standard audible notification in a
modern system. It consists of a repeated 3-pulse cycle (.5s on .5s off .5s on .5s off .5s on
1.5s off). Voice Evacuation is the second most common audible in a modern system.
Legacy systems, typically found in older schools and buildings have used continuous
tones alongside other audible schemas. Some fire alarm systems utilize emergency voice
alarm communication systems (EVAC) to provide pre-recorded and manual voice
messages. Voice alarm systems are typically used in high-rise buildings, arenas and other
large "defend-in-place" occupancies such as hospitals and detention facilities where total
evacuation is difficult to achieve. Voice-based systems provide response personnel with
the ability to conduct orderly evacuation and notify building occupants of changing event
circumstances.
In high rise buildings, different evacuation messages may be played on each floor,
depending on the location of the fire. The floor the fire is on along with ones above it may
be told to evacuate while floors much lower may simply be asked to stand by (this system
is yet to be actualized, it is still a suggestion and this project aims to proof its possibility).

vii
Buildings are divided up into sections in three ways as far as fire safety engineering is
concerned:
Fire compartments, detection zones and alarm zones.

Fire Compartments
A fire compartment is a part of a building that is separated from the rest of the building by
a fire resistant structure so as to limit the spread of fire within the building. The
requirements for designing a building and hence its fire compartments, are defined in
building regulations.

Detection Zones
Fire detection zones are essentially a convenient way of dividing up a building to assist in
quickly locating the position of a fire. The zone boundaries are not physical features of the
building, although it is normal to make the zone boundary coincide with walls, floors and
specifically fire compartments. The size and position of the detection zones will therefore
tend to be dependent on the shape of the buildings, but will also depend on what the
building is used for and to some extent the number of people the building is expected to
contain at any one time. Some specific recommendations with respect to detection zones
are:
1. Zones should be restricted to single floors, except where the total floor area of a
building is less than 3000 ft².
2. Voids above or below the floor area of a room may be included in the same zone
as the room so long as they are both in the same fire compartment.
3. Zones should not be larger than 20,000 ft² except for manual systems in single
storey open plan buildings, such as a warehouse, where up to 100,000 ft² is
allowed.
4. Fire detectors in an enclosed stairwell, lift shaft or the like should be considered as
a separate zone.
5. The search distance within a zone should be less than 300 ft in any direction (all
possible entrance points must be considered). This can be relaxed when using
addressable systems, if the information provided at the control and indicator
equipment would allow fire fighters, unfamiliar with the building, to proceed
directly to the location of the fire. The search distance only relates to the distance
from entering a zone to being able to determine the location of the fire, it is not
necessary to travel to the fire.

viii
6. Zones should not cross fire compartments, a fire compartment can contain several
zones but a zone should not contain more than one fire compartment.

Alarm Zones
Alarm zones are only needed in buildings where operation of the alarms needs to be
different in certain parts of the buildings. If the only requirement is to activate all the
alarm sounders to provide a single common evacuate signal once a fire is detected, then
alarm zones are not needed as the whole building is considered one alarm zone. For more
complex buildings where it is necessary to operate alarm devices differently in parts of the
building, then the building should be divided into alarm zones such that all of the alarm
devices in one alarm zone operate in the same way. Here are some recommendations for
alarm zones:
1. The boundaries of all alarm zones should comprise fire-resisting construction.
2. Signal overlap between alarm zones should not cause confusion.
3. The same alarm and alert signals should be used throughout a building.
4. A detection zone must not contain multiple alarm zones, alarm and detection zone
boundaries should coincide. An alarm zone may contain multiple detection zones.

Before embarking on a detailed design, it is highly recommended as a minimum to consult


the following agencies so as to ensure that the fire detection and alarm system meets the
requirements of all concerned including:
1. The authority responsible for enforcing health and safety legislation,
2. The property insurer,
3. The building user (where appropriate),
4. The proposed installer, and
5. Fire engineering specialists (where appropriate)

The first step in the design process is the risk assessment. It underpins the whole system
strategy and therefore could be argued as being the most important stage. Risk assessment
is the process of considering each part of a building from the point of view of what fire
hazards exist within an area and what would happen in the event of fire. This would
normally be done when considering the building from the point of view of general safety.
Clearly very small premises only require a first level of fire protection, such as safe
construction, clear escape routes and a fire extinguisher. Equally obviously, large hotels
will require fully automatic fire detection and alarm system, multiple sets fire protection
equipment and adequate emergency lighting and escape signage. The Risk Assessment

ix
process is to help owners of buildings between these two extremes make adequate and
appropriate provision.
Building owners or operators will often want to employ the services of a professional risk
assessor to ensure that the building is considered impartially and in adequate detail.
However there are checklists and technical advice available so that the task can be done
‘in-house’.
The designer must consider the size, complexity and use of the building, and the degree of
detection and warning desired. While the design of fire alarm systems is normally
regulated by building codes, the level of protection specified is usually a minimum and the
designer should consider providing higher levels of protection where circumstances
indicate the need. Before looking at the details of the alarm system, it is necessary to
understand some of the concepts that are used to assist the system designer.

Review of the Building


1. Review the physical properties of the building such as:
 Building height
 Number of floors
 Area of each floor
 Smoke compartments
 Sprinkler system, if any
2. What fire alarm equipment is required in this occupancy?
3. What locations is fire alarm devices required
4. Determine if there is a special use
Once the building zones and fire alarm requirements are determined, install per the
applicable standards.

2.3 Review of Related Work

2.3.1 N N Mahzan et al 2018 J. Phys.: Conf. Ser. 1019 012079, Faculty of Electrical
Engineering, Universiti Teknologi MARA (UiTM) Terengganu Malaysia; “Design of an
Arduino-based home fire alarm system with GSM Module”. The paper described the
design of a home fire alarm with Arduino-based system by means of GSM Module. The
project was designed purposely for house safety where the main aim is to avoid the fire
accidents destroying lives and the properties inside the house as well. It utilizes Arduino
Uno board in conjunction with ATmega328 chip. The main controller used is certainly the

x
ATmega328 which controls the home fire alert subjected to the temperature sensor. An
LM35 temperature sensor is used to detect the heat from the fire. An alert message will be
sent to the user through short message service (SMS) via GSM module. When the system
detects the temperature of 400C or more, it will immediately display an alert notification
on LCD display and simultaneously sending an SMS alert to the users upon the high raise
temperature in the house. Through this system, it was proposed that users can improve
their safety standards by having immediate response in preventing accidents. This will
eventually allow the users to protect their lives and the properties as well from the
disaster.

N N Mahzan et al argued that amongst the occurred disasters that happened in the
resident area, fires have been known as the most dangerous tragedy that could cause
destruction of property and life losses. In many disasters, fires have become recurrent,
destructive and most influential disasters if compared to others hazards. With the rapid
development of urban construction, the occurrence probability of fire increased year by
year. They also stated early detection and early warning are two important ways to
extinguish the fire promptly and avoid great casualties and property loss. Therefore, the
requirement of placing intelligent fire alarm system is important within buildings
especially in buildings that contains many people inside or valuable belongings.

According to the statistic stated by Fire and Rescue Department of Malaysia (JBPM), in
2016 only, almost 5500 of fire cases reported are concerned with the households followed
by transportations, electrical appliances and leaking gasses. Fires in the households are
often triggered by many common factors investigated which are from cooking equipment,
smoking in the house, electrical appliances, candles, curious children, faulty wiring and
many more. If the fire occurs when the residents are in the house, the possibility to
extinguish the fire is a bit high. It is because the residents themselves can take immediate
precaution from the fire to be spread all over by using fire extinguisher or call the fireman
instantly.
From their point of view, the main concern of their project is when the residents are not at
home or are not aware of the existence of the fire in the house. Having said that, the home
fire alert is purposely designed to alert the house residents whenever any possibilities for
having fire disaster prompted in their house.
The project was built based on Arduino board as the main controller board that interacts
with GSM module which works in the communication part. The interaction is for the user
to know the current situation in the house. This system works totally on wireless network
xi
communication as GSM module is performed by sending an SMS to the user. The
microcontroller inside the Arduino board is used as the mastermind of the circuit where it
controls the circuit flows and execute all the decision as well.
The GSM Module is responsible for the communication part of the circuit. It takes
information from the Arduino on where to send information and what information needs
to be sent. It uses a GSM SIM card for communication purposes. It is basically just a
modem which uses serial communication to interface with and needs Hayes compatible
AT commands for communicating with the Arduino. The alert message and the phone
number of the recipient are given by the user through the project codes. As soon as fire is
detected (temperature will hit certain temperature limit) an SMS will be sent to the
recipient’s phone number from the SIM card inserted into the module for giving
information to the user upon fire detection in the house.

The design and development of this project were divided into two main parts which are
hardware architecture and software details. In the hardware architecture, the design of the
circuit was constructed and the prototype of the project was built. While in the software
development, the whole complete prototype was operated via programming codes.

Figure 2.4 Block diagram of the home fire alarm system

xii
Figure 2.5 The Hardware architecture of the home fire alarm system.

In conclusion of the project, few tests were done to observe the system’s performance.
The tests were completed by applying heat near to the LM35. The system worked
perfectly as intended but gave room for further improvements in its functionality.

2.3.2 An article on the Overview of Fire Alarm and Detection Systems


(cedengineering.com) explains fire related standards, codes and regulations with focus on
the United States, and the article states;

Relevant Standards
The design, installation and testing of the fire detection and alarm system shall comply
with all state and local codes with no exception. Standards produced by agencies such as
Underwriters Laboratories (UL) and/or Approved by Factory Mutual (FM) and National
Fire Protection Association (NFPA) are generally endorsed by relevant building codes.
Often these standards are called up within guidance documents for pieces of legislation
and since they represent best current practice, can be generally be used by building owners
to demonstrate that equipment they have installed is adequate and appropriate.
Fire alarm system requirements are found in:
• NFPA 72, National Fire Alarm Code
• NFPA 101, Life Safety Code
• Model Building Codes

xiii
NFPA 72 was written to provide requirements for the installation, performance, testing,
inspection, and maintenance of the fire alarm system. If you want to know if a fire alarm
system is required for a given occupancy, then NFPA 101, Life Safety Code and other
related codes (building codes) make that determination.

NFPA Codes and Standards


NFPA publishes standards for the proper application, installation, and maintenance of
automatic smoke detectors. The principal codes which should be reviewed before
specifying or installing automatic smoke detectors are listed below:
NFPA publishes codes and standards concerning all phases of fire protection. Among
those which directly concern automatic smoke detectors are:

1. NFPA 70 National Electrical Code:


• Article 210, Branch Circuits
• Article 760, Fire Protective Signaling Systems
• Article 500, Hazardous Areas

2. NFPA 72 National Fire Alarm Code:


NFPA 72 covers minimum performance, location, mounting, testing, and maintenance
requirements of automatic fire detectors.
3. NFPA 90A Standard for the Installation of Air Conditioning and Ventilating
Systems
4. NFPA 92A Smoke Control Systems in Malls, Atria, and Large Areas
NFPA 90A and 92A provide information on the use of smoke detectors in ducts of
HVAC systems and smoke control systems.
5. NFPA 101 Life Safety Code
NFPA 101 specifies the requirements for smoke detection in both new and existing
buildings depending on the type of occupancy.

Building and Fire Codes


There are three independent regional organizations which write model building and fire
codes which become law when adopted by local and state governments. These codes
specify smoke detector requirements based on building type and occupancy. The
organizations are:
1. Building Officials and Code Administrators (BOCA) - BOCA’s National Building
Code is generally used throughout the Northeast and Midwest regions of the
xiv
United States.
2. International Conference of Building Officials (ICBO) - ICBO’s Uniform Building
Code is generally used throughout the West and Southwest regions of the United
States.
3. Southern Building Code Congress International (SBCCI) - SBCCI’s Standard
Building Code is generally used in the South and Southeast regions of the United
States.
In addition these above listed organizations have formed an umbrella organization known
as the International Code Council (ICC), for the purpose of combining the codes produced
by the above three organizations into a single set of model building and fire codes.

Testing Laboratories
Testing laboratories test detectors, control panels and other components of fire alarm
systems to verify conformance with NFPA requirements and their own standards.
Equipment that passes their tests is identified by a label.
Underwriters Laboratories, Inc. (UL) - UL publishes an annual report listing fire
protection equipment which bear the UL label. Its standards which apply to smoke
detectors are:

• UL 38 Manually Actuated Signaling Boxes


• UL 217 Single and Multiple Station Smoke Detectors
• UL 228 Door Closers-Holders for Fire Protective Signaling Systems
• UL 268 Smoke Detectors for Fire Protection Signaling Systems
• UL 268A Smoke Detectors for Duct Applications
• UL 346 Water flow Indicators for Fire Protective Signaling Systems
• UL 521 Heat Detectors for Fire Protective Signaling Systems
• UL 464 Audible Signaling Applications
• UL 864 Standards for Control Units for Fire Protective Signaling Systems
• UL 1481 Power supplies for Fire Protective Signaling Systems
• UL 1638 Visual Signaling Appliances
• UL 1971 Signaling devices for the hearing impaired

Factory Mutual Research (FM) - FM publishes an annual report listing fire protection
equipment which bears its label.
• Factory Mutual Loss Prevention Data Sheets, as appropriate for the hazard
• Factory Mutual Loss Prevention Data Sheet 5-40 Protective Signaling Systems
xv
• Factory Mutual Loss Prevention Data Sheet 5-43 Auxiliary Protective Signaling Systems

There are other testing laboratories listed here that may provide similar services:
• Industry Publications NEMA Guide for Proper Use of Smoke Detectors in Duct
Applications
• NEMA Training Manual on Fire Alarm Systems
• NEMA Guide to Code Requirements for Fire Protective Signaling and Detection
Systems
• NEMA Guide for proper Use of System Smoke Detectors
The final system shall receive an Underwriters Laboratories Field Certification from an
alarm service company authorized to issue Underwriters Laboratories certificates. Note
that there are other standards that relate to specific applications (such as hospitals or data
processing installations).

The writer further elaborated on standard practices for installation of smoke, heat, flame
and carbon-monoxide detectors as such;

Smoke Detectors
As the name implies, these devices are designed to identify a fire while in its smoldering
or early flame stages. Smoke detectors operate on either an ionization or photoelectric
principle, with each type having advantages in different applications.
Photoelectric Detectors: Photoelectric smoke detectors use light and how it is
reflected to detect smoke. Normally light is projected into a smoke sensing chamber inside
the detector assembly. The light hits a black background of the chamber and is absorbed.
When enough smoke enters the chamber it reflects the light on to a sensor inside the
chamber. This causes the sensor to indicate an alarm. Photoelectric detectors are suitable
for most applications giving the fastest response to slow burning fires - the most common
start to fire events. Use of photoelectric detectors is highly recommended to provide
coverage for escape routes due to their superior ability to detect optically dense smoke that
would easily obstruct the use of escape routes.
Ionization Detectors: Ionization detectors were the first type of detector to be
commercially developed and are also a popular choice. These generally contain two
chambers. One is used as a reference to compensate for changes in ambient temperature,
humidity or pressure. The second contains a radioactive source, usually alpha particle,
which ionizes the air passing through the chamber where a current flows between two

xvi
electrodes. Even when invisible smoke enters the chamber, it disrupts the flow of current
and generates an alarm.
Ionization detectors have superior response to fast burning fires but an inferior response to
slow smoldering fires, which are typical with modern construction materials. Ionization
detectors are also less acceptable from an environmental point of view due to the
radioactive material that they contain. There is increasing restriction on the transportation
and disposal of ionization detectors so it is recommended that alternative types are used
where possible.

Considerations in Selecting Smoke Detectors


The characteristics of an ionization detector make it more suitable for detection of fast
flaming fires that are characterized by combustion particles in the 0.01 to 0.3 micron size
range. Ionization smoke detectors are sensitive to the presence of ions, which are
electrically charged particles produced by the chemical reactions that take place during
combustion.
Photoelectric smoke detectors are better suited to detect slow smoldering fires that are
characterized by particulates in the 0.3 to 10.0 micron size range. Photoelectric detectors
react to visible particles of smoke.
Each type of detector can detect both types of fires, but their respective response times
will vary, depending on the type of fire. Because the protected buildings normally contain
a variety of combustibles, it is often very difficult to predict what size particulate matter
will be produced by a developing fire.
The fact that different ignition sources can have different effects on a given combustible
further complicates the selection. A lighted cigarette, for example, will usually produce a
slow smoldering fire if it is dropped on a sofa or bed. However, if the cigarette happens to
fall upon a newspaper on top of a sofa or bed, the resulting fire may be characterized more
by flames than by smoldering smoke.
The innumerable combustion profiles possible with various fire loads and possible ignition
sources make it difficult to select the type of detector best suited for a particular
application.

Self-Contained Smoke Detectors/Alarms


Some smoke detectors are self-contained with a sensor to sense the smoke and a very loud
electronic horn to wake people up. These are commonly used in apartment suites and
houses that are technically referred to as smoke alarms. Smoke alarms have a built in
audible alarm device in addition to a smoke sensor, and are intended to warn only the
xvii
occupants in the room or suite in which they are located. Smoke detectors on the other
hand are connected to the building fire alarm system and are designed to initiate an alarm
signal to warn the occupants of the entire building.
Self-contained smoke detector/alarm can run off of a 9-volt battery or 120-volt house
current. Some models run off of house current and change to battery backup if the power
fails. NFPA 72 requirements dictate that alarm notification appliances (including smoke
detectors with built in sounders) produce the 3-pulse temporal pattern fire alarm
evacuation signal described in ANSI S3.41. (Audible Emergency Evacuation Signals)

Smoke Detector Limitations


Smoke detectors offer the earliest possible warning of fire. Nevertheless, smoke detectors
do have limitations. They may not provide early warning of a fire developing on another
level of a building. A first floor detector, for example, may not detect a second floor fire.
For this reason, detectors should be located on every level of a building.
In addition, detectors may not sense a fire developing on the other side of a closed door. In
areas where doors are usually closed, detectors should be located on both sides of the
door.
As already indicated, detectors have sensing limitations. Ionization detectors are better at
detecting fast, flaming fires than slow, and smoldering fires. Photoelectric smoke detectors
sense smoldering fires better than flaming fires. Because fires develop in different ways,
and are often unpredictable in their growth, neither type of detector is always best. In
addition, a given detector may not always provide significant advance warning of fires
when fire protection practices are inadequate, or when caused by violent explosions,
escaping gas, improper storage of flammable liquids such as cleaning solvents, etc.

Heat Detectors
Heat detectors warn of fire when the temperature in the area around the smoke detector
reaches a certain level. The static response temperature of a heat detector should be a
minimum of 29°C above the maximum ambient temperature likely to be experienced for
long periods of time and 4°C above the maximum temperature likely to be experienced for
short periods of time.
Heat detectors are highly reliable and have good resistance to operation from non-hostile
sources. They are also very easy and inexpensive to maintain. On the down side, heat
detectors do not notice smoke. They do not function until room temperatures have reached
a substantial temperature, at which point the fire is well underway and damage is growing
exponentially. Subsequently, thermal detectors are usually not permitted in life safety
xviii
applications. They are also not recommended in locations where there is a desire to
identify a fire before substantial flames occur, such as spaces where high value thermal
sensitive contents are housed. However, a heat detector could be valuable additional
protection in areas such as kitchens and attics, where smoke detectors are not
recommended. They are not recommended for the use in bedrooms or sleeping areas.
There are several types of heat detectors including:

Fixed-temperature heat detectors: Fixed temperature heat detectors operate when the
sensing mechanism reaches its specific temperature threshold. Usually there is a fusible
metal element which melts and causes a short on the initiating circuit.
The most common units are fixed temperature devices that operate when the room reaches
a predetermined temperature (usually in the 135°-165°F/57°-74°C). Normally fixed
temperature detectors employ a fusible alloy element which must be replaced after the
detector has operated. Different temperature rated elements are available to take account
of varying ambient air temperatures. A typical set temperature might be 57.2ºC. These
detectors are non-restoring type (because it is destroyed when activated) and have to be
replaced, if another setting is required.
When a fixed temperature device operates, the temperature of the surrounding air will
always be higher than the operating temperature of the device itself. This difference
between the operating temperature of the device and the actual air temperature is
commonly spoken of as thermal lag, and is proportional to the rate at which the
temperature is rising.

Rate-of-rise (ROR) heat detectors: The second most common type of thermal sensor is
the rate-of-rise detector, which identifies an abnormally fast temperature climb over a
short time period. Rate of rise detectors also have a fixed temperature backstop to ensure
that even very slow increases in temperature will eventually raise an alarm, if the increase
continues for a sufficiently long period. Rate of rise detectors are not usually used for
suppression systems because they operate on a 12 to 15ºF temperature rise per minute.
This makes them too sensitive to sudden environmental changes causing false alarms and
unexpected discharges.
The rate of rise type is the most sensitive type of heat detector, particularly when used in
areas where the ambient temperature can reach low levels and therefore create a large
difference between the ambient temperature and the trigger temperature of a fixed
temperature detector. In order to avoid false alarms, the rate of rise detectors should not be
used in areas subject to frequent temperature swings, such as in kitchens, boiler rooms and
xix
warehouses with large doors to open air. In most of these detectors, when the rate of rise
element alone has been activated, the detector is self-restoring.
Both rate of rise and fixed temperature heat detectors are “spot type” detectors, which
mean that they are periodically spaced along a ceiling or high on a wall and are suitable
for inclusion in open, closed or line monitored systems.

Rate Compensating Type: Rate compensating heat detectors operate when the
surrounding air temperature reaches a specific temperature threshold. As a result the
thermal lag associated with fixed temperature detectors is eliminated. Usually there is a
hermetically sealed tube with two (2) sensing elements, an outer metal tube and an internal
pair of bi-metallic struts which are connected to both ends of the tube. During a slow rise
in temperature, the struts and the outer shell expand at the same time until the unit reaches
its specific temperature value, and operates. As the temperature rises quickly, the outer
shell expands faster than the struts, pulling them closer together, allowing the contacts to
close sooner. This compensates for the thermal lag time

Fixed Temperature Line Type Detector: The fourth detector type is the fixed
temperature line type detector, which consists of two cables and an insulated sheathing
that is designed to breakdown when exposed to heat. These can take the form of a heat
sensitive cable which will operate, at a predetermined temperature, as an open circuit
device. Melting of the cable insulation provides short-circuit between conductors. After
operation the destroyed length of cable must be replaced. Linear detectors may be used in
large areas such as warehouses. Alternative types of linear detector exist including the
heat pneumatic operating on the rate of rise principle. The advantage of line type over spot
detection is that thermal sensing density can be increased at lower cost.

Considerations in Selecting Heat Detectors


Each type of heat detector has its advantages, and one cannot say that one type of heat
detector should always be used instead of another. If you were to place a rate-of-rise
(ROR) heat detector above a large, closed oven, then every time the door is opened a false
alarm could be generated due to the sudden heat transient. In this circumstance the fixed
threshold detector would probably be best. If a room is protected with a fixed heat detector
filled with highly combustible materials, then a fast flaming fire could exceed the alarm
threshold due to thermal lag. In this case the ROR heat detector may be preferred.

A general comparison of smoke v/s heat detectors is as follows:


xx
1. A smoke detector transmits a signal to the control unit when the concentration of
airborne combustion products reaches a predetermined level. A heat detector
transmits a similar signal when the temperature reaches a predetermined level or
when there is an abnormal rate of temperature rise.
2. The key advantage of smoke detectors is their ability to identify a fire while it is
still in its incipient. As such, they provide added opportunity for emergency
personnel to respond and control the developing fire before severe damage occurs.
Smoke detectors give the earliest warning of fire, typically responding to a fire
1/10th of the size as that required to operate a heat detector.
3. Heat detectors are not prone to false alarms although it is rather insensitive to
smoldering fires of low temperature. Heat detectors are, therefore, preferred for the
environments where the ambient conditions might cause false alarms.
4. Heat detectors must be mounted closer together than smoke detectors, so while the
mounting bases are compatible for all types, care should be taken to ensure that the
spacing between detectors is appropriate for the detector type fitted. With analogue
systems it is possible for the photo thermal detector to act as a thermally enhanced
smoke detector during certain times and as a pure heat detector at other times. If
this mode of operation is envisioned, then spacing must be those appropriate for
heat detectors.

Beam Detectors
Beam detectors provide a cost effective method of covering wide open plan areas such as
galleries and atria, however care should be taken that activities in the space do not obstruct
the beam, and that the building structure is such that the beam does not ‘move’ or false
operation may result. This detector consists of two components, a light transmitter and a
receiver, that are mounted at some distance up to 300ft (100 m) apart. As smoke migrates
between the two components, the transmitted light beam becomes obstructed and the
receiver is no longer able to see the full beam intensity. This is interpreted as a smoke
condition, and the alarm activation signal is transmitted to the fire alarm panel.
If optical beam detectors are mounted within 2 feet (600 mm) of the ceiling level, they
should be positioned such that no point in a protected space is more than 25ft (7.6 m) from
the nearest part of the optical beam. If the beam detector be mounted more than 600 mm
below ceiling level, then spacing should be altered to 12.5% of the height of the beam
detector above the highest likely seat of any fire. Other than the part of the beam within
500 mm of the beam’s transmitter or receiver, if any other section of a beam which runs
closer than 500 mm to any wall partition or other obstruction to the flow of hot gasses,
xxi
that section of the beam should be discounted from providing protection. Where optical
beam detectors are mounted in the apex of pitched roofs then the same enhanced spacing
can be applied as for point smoke detectors.
The area covered by a single optical beam detector should not exceed that of a single
detection zone.

Aspirating Systems (VESDA)


Air aspirating detectors are extremely sensitive and are typically the fastest responding
automatic detection method. This type of system aspirates the smoke from various
locations into a tube where the smoke is analyzed electro-optically by a line of sight
transmitter-receiver set. This device consists of two main components: a control unit that
houses the detection chamber, an aspiration fan and operation circuitry; and a network of
sampling tubes or pipes. Along the pipes are a series of ports that are designed to permit
air to enter the tubes and be transported to the detector. Under normal conditions, the
detector constantly draws an air sample into the detection chamber, via the pipe network.
The sample is analyzed for the existence of smoke, and then returned to atmosphere. If
smoke becomes present in the sample, it is detected and an alarm signal is transmitted to
the main fire alarm control panel.
Aspirating systems should be specified where protection is required in areas such as cold
stores or areas where a very fast response to fire is needed, and while each sense point can
be considered a smoke detector, special training is needed to design such systems as they
are normally required to cover special risks. Many high technology organizations, such as
telephone companies, have standardized on aspiration systems.
In cultural properties they are used for areas such as collections storage vaults and highly
valuable rooms. These are also frequently used in aesthetically sensitive applications since
components are often easier to conceal, when compared to other detection methods.

Flame Detectors
The Optical detector is an electronic device containing electro-optical sensors that are
sensitive to electromagnetic radiation in the UV, VIS, IR spectral bands.
The Optical detector "sees" the fire by detecting the electromagnetic radiation emitted by
the combustion products. They are line of sight devices that operate on either an infrared,
ultraviolet or combination principle. As radiant energy in the approximate 4,000 to 7,700
angstroms range occurs, as indicative of a flaming condition, their sensing equipment
recognizes the fire signature and sends a signal to the fire alarm panel.
The advantage of flame detection is that it is extremely reliable in a hostile environment.
xxii
They are usually used in high value energy and transportation applications where other
detectors would be subject to spurious activation. Common uses include locomotive and
aircraft maintenance facilities, refineries and fuel loading platforms, and mines. A
disadvantage is that they can be very expensive and labor intensive to maintain. Flame
detectors must be looking directly at the fire source, unlike thermal and smoke detectors
which can identify migrating fire signatures. Their use in cultural properties is extremely
limited.

Detectors Sub-Classification
To further break down the detector groupings, there are two sub-groups known as "Spot
type" and "Line type" initiating devices. The NFPA definitions of Spot and Line type are
as follows:
NFPA Preferred Definition of a Line type device - A device in which detection is
continuous along a path. Typical examples are rate-of-rise pneumatic tubing detectors,
projected beam smoke detectors, and heat sensitive cable.
NFPA Preferred Definition of a Spot type device - A device in which the detecting
element is concentrated at a particular location. Typical examples are bimetallic detectors,
fusible alloy detectors, certain pneumatic rate-of-rise detectors, certain smoke detectors,
and thermoelectric detectors.
A Spot type detector will provide coverage for a limited area, or small spot, while the line
sensing type can protect or monitor very large areas, such as large atriums. Spot type
detectors have a maximum theoretical rated coverage of 900 sq. ft (30 ft x 30 ft) in large
open rooms. If placed in a narrow hallway, the maximum allowed rated coverage might be
increased.
The Line type sensors are typically of the “projected beam” or heat sensitive cable variety.
In the average residential home, all detectors will most likely be of the Spot type. The
maximum theoretical rated coverage area for the projected beam detector can be as large
20,000 sq. ft.
Note: This maximum coverage area for Spot type and Line type detectors is only a general
statement, and should not be used in every circumstance.

Positioning of Smoke & Heat Detectors


To provide effective early warning of a developing fire situation, smoke detectors should
be installed in all areas of the protected premises. Total coverage as defined by NFPA 72
should include all rooms, halls, storage areas, basements, attics, lofts, and spaces above
suspended ceilings including plenum areas utilized as part of the HVAC system.
xxiii
In addition, this should include all closets, elevator shafts, enclosed stairways, dumbwaiter
shafts, chutes and other subdivisions and accessible spaces.
Fire detection systems installed to meet local codes or ordinances may not be adequate for
early warning of fire. Some codes or ordinances have minimum objectives such as
capturing elevators or preventing circulation of smoke through the HVAC systems instead
of early detection of fire.
A user should weigh the costs against the benefits of installing a complete fire detection
system when any detection system is being installed. The location, quantity and zoning of
detectors should be determined by what objectives are desired rather than the minimum
requirements of any local codes or ordinances. Detectors may be omitted from
combustible blind spaces when any of the following conditions prevail:

1) Where the ceiling of a concealed space is attached directly to the underside of the
supporting beams of a combustible roof or floor deck.

2) Where the concealed space is entirely filled with noncombustible insulation. (In solid
joisted construction, the insulation need only fill the space from the ceiling to the bottom
edge of the joist of the roof or floor deck.)

3) Where there are small concealed spaces over rooms, provided the space in question
does not exceed 50 square feet (4.6 square meters).

The number of heat and/or smoke detectors required in a given room will depend on the
area and geometry of the room and the limitations of the equipment. All smoke detectors
have similar spacing requirements; heat detectors also all have similar spacing
requirements although these are different to smoke detectors. For general areas the spacing
between any point in a protected area and the detector nearest to that point should not
exceed 7.5 m for a smoke detector and 5.3 m for a heat detector.

xxiv
The above are the maximum areas that can be covered by an individual detector. In order
to ensure that coverage is provided into the corners of rooms and to ensure that there is no
gap at the junction point of multiple detectors, spacing have to be reduced.

To ensure complete coverage for square layouts, spacing between detectors and walls
should be reduced to 5 m for a smoke detector and 3.5 m for a heat detector.

xxv
Figure 2.6 Actual positioning of detectors

2.3.3 Odaudu Ugbede Sunday (2016), Department of Architecture, Kano University of


Science and Technology, Wudil, Nigeria (CARD International Journal of Environmental
Studies and Safety Research (IJESSR)) wrote an investigative article on Analysis of the
Recap of the National Fire Safety Code of Nigeria and the Effects on Public Buildings.
This investigative article was entirely focused on Nigeria as a country and the need to
have independent fire regulations, standards, codes and legislations rather than depend on
other advanced nations.
Odaudu Ugbede Sunday stated that; The Fire Code is a regulation made under the Fire
Protection and Prevention Act, consisting of a set of minimum requirements respecting
fire safety within and around existing buildings and facilities (Ontario Ministry of
Community Safety and Correctional Services, 2016).
The importance of public buildings in Nigeria cannot be over emphasis. For example,
public buildings are major sources of livelihoods for many people. A contextual review of
public buildings in Nigeria is therefore important; in order to appreciate the need for
improved National Fire Safety Code in Nigeria. National Fire Safety Code of Nigeria was
overviewed with the aim of being informed of the need to generate improved National
Fire Safety Code that can efficiently reduce fire outbreaks in public buildings and thereby
reduce the rate of socioeconomic lost as well as mitigating the release of harmful smoke to
the environment. Evaluating the importance of public buildings to people, and the
socioeconomic lost in Nigeria as a result of fire outbreaks in public buildings, as well as
the negative effects of the harmful smoke that are being release to the environment are the
objectives. The findings showed that, the adopted National Fire Safety Code of Nigeria
xxvi
focuses on active fire protection measures without emphasizing on the passive fire
prevention and protection measures. It also showed that, smoke from fire outbreaks in
Nigerian commercial buildings is one of the causes of eye diseases, respiratory diseases,
lung cancer and skin cancer, and it has also contributed to acid rain and global warming. It
is expected that, this study shall reduce the socioeconomic lost in Nigeria as well as
mitigating the release of harmful smoke to the environment and lay a foundation for
further studying of fire outbreaks in public buildings in Nigeria. Thus, it is recommended
that, improved National Fire Safety Code is generated by Nigeria, putting Nigerian
culture, pattern of building designs and immediate circumstances into consideration.
The author argued that; According to International Fire Code, 2006, fire protection
devices are to be maintained in an operable condition at all times. Lives and properties can
be saved by being prepared before fire outbreaks in buildings (Alhaji, 2014 and Seattle
Government, 2016). However, across the length and breadth of Nigeria, frequent fire
outbreaks in public buildings is a problem and it has led to loss of lives, goods and
destruction of valuable properties (Federal Fire Service of Nigeria, 2016). There is no any
month without fire outbreak in commercial building in Nigeria. Using markets for
example, between January, 2015 and March, 2016, fire outbreaks in Nigerian markets
have claimed 600 lives and properties worth 5.30 trillion naira (Federal Fire Service of
Nigeria, 2016). This includes two trillion naira worth of goods and properties lost in the
fire incident on the 26th March, 2016 at Abubakar Rimi Sabon-Gari market, Kano State,
Nigeria (Federal Fire Service of Nigeria, 2016). Air pollution occurs when the air contains
fumes or gases, smoke, dust and odor in harmful amount; smoke contains carbon dioxide
(CO2) and human activities that pumped excessive amount of CO2 into the atmosphere
are the causes of acid rain, and global warming by depleting the ozone layer [UNEP
(United Nations Environment Programme) Collaborating Centre on Energy and
Environment 2006; Jason, 2009; George et al., 2013; British Columbia Government, 2016;
Department of Environmental Protection, 2016; Union of Concerned Scientists, 2016].
Thus, as commercial building materials or components are being burnt when there are fire
outbreaks in Nigerian commercial buildings, chemicals, insecticides, pesticides, fertilizers
and other agricultural materials, paints, scientific and engineering products made of
harmful materials, and divers products for sales in the commercial buildings are equally
burnt. Consequently, damage has been made to atmospheric environment, through the
released of harmful smoke (containing CO2) to atmospheric environment as a result of
these fire outbreaks and these in turn have caused acid rain and global warming. The
smoke being released to the atmospheric environment causes eye diseases by the time it
enter the eye, respiratory diseases and lung cancer by time is inhaled, and it also make
xxvii
ozone layer to be worn out by making ozone holes to allow harmful ultra violet rays to
enter the atmosphere of the earth, which affect human life through diseases, particularly,
skin cancer (Jason, 2009; National Geographic, 2015; Department of Environmental
Protection, 2016; Department of Health, 2016; Michael, 2016; Manitoba Health, Seniors
and Active Living, 2016). Therefore, it can be logically said that, the harmful smoke being
released to the atmospheric environment as a result of frequent fire outbreaks in Nigerian
public buildings is one of the causes of eye diseases, respiratory diseases, lung cancer and
skin cancer.
In the year 2002, Nigeria adopted the 1995 National Fire Safety Code of Canada, issued
by the National Research Council of Canada which is subject to amendment from time to
time by Canada (Nigerian Fire Safety Act, 2002). This implies that, whenever there is
amendment of National Fire Safety Code of Canada due to change of circumstances, in
order to have a suitable National Fire Safety Code in Canada, Nigeria will be following
this amendment regardless of any opposite change of circumstance of Canada in Nigeria.
This adopted National Fire Safety Code of Canada is not suitable for the kind of public
buildings in Nigeria because, Canada and Nigeria do not have the same culture and they
do not have the same pattern of the designs of the public buildings like regional built-up
markets. Therefore, it is important for Nigeria to generate improved National Fire Safety
Code that can efficiently reduce fire outbreaks in public buildings in Nigeria

Figure 2.7 Fire Outbreak at the Singer Market, Kano State, Nigeria on 20th February, 2016
(Source: Kano State Fire Service, 2016: https://www.newsbreak.ng/tag/kano-state-fire-service/).

xxviii
Figure 2.8 Grand Square Mall, Central Business District Area of Abuja, Nigeria on 23th
October, 2015. (Source: The Scoop Nigeria: http://www.thescoopng.com/2015/10/23/fire)

Odaudu Sunday went further to expose the lapses in the Nigerian Fire protection system
by saying that in his findings, the 1995 edition of the National Fire Code of Canada that
was adopted by Nigeria in the year 2002 as the National Fire Safety Code of Nigeria, as
may be amended from time to time by Canada, focuses on the active fire protection
measures and controlling fire outbreaks during construction of buildings, without giving
attention to passive fire prevention and protection measures in buildings and this is a gap
in knowledge that needs to be filled in order to reduce frequent fire outbreaks in public
buildings in Nigeria. The harmful smoke being released to the atmospheric environment as
a result of frequent fire outbreaks in Nigerian public buildings is one of the causes of eye
diseases, respiratory diseases, lung cancer and skin cancer. It has also contributed to acid
rain and global warming.
It was expected that his investigative study would make the government of Nigeria to have
improved National Fire Safety Code. The improved National Fire Safety Code will help in
reducing fire outbreaks in public buildings in Nigeria and thereby reduce the
socioeconomic lost as well as mitigating the release of harmful smoke to the environment.
It is also expected that, this study shall lay a foundation for further studying of fire
outbreaks in public buildings in Nigeria.

2.4 Review of the types of fire alarm

Fire Alarm Systems can be broken down into four main types;
xxix
– Conventional
– Addressable
– Intelligent
– Wireless

2.4.1. Conventional Fire Alarm Systems


In a Conventional Fire Alarm System, physical cabling is used to interconnect several call
points and detectors, the signals from which are wired back to the main control unit.
Call points and detectors are arranged in “Zones” to simplify locating the cause of the
alarm, this is important for both the fire brigade and general building management.
Each zone is indicated at the Fire Alarm Control Panel either with an indicator lamp, a text
display or in some cases both.
It makes sense that the more we can divide a building into zones, the more accurate
locating the alarm trigger will be. The Control Panel is wired to a minimum of two
sounder circuits which could contain bells, electronic sounders or other audible fire alarm
devices. It is these devices which sound the alarm when triggered.

Figure 2.9 Conventional Fire Alarm Systems

These types of systems are inexpensive and work well in small facilities. The main
problem with conventional fire alarm systems is that when a fire alarm component
produces a signal and it appears on the control panel there is no way to know which
component it is in the building. If you foresee this to be a problem you may want to
consider an addressable fire alarm system.

2.4.2. Addressable Fire Alarm Systems

xxx
The detection principle of an Addressable System is the same as a Conventional System
except that each detector is given a set Address (usually by means of a dip-switch) and the
Control Panel can then determine exactly which detector or call point has initiated the
alarm.
The detection circuit is wired as a loop and up to 99 devices may be connected to each
loop.
It is common for the loop to be fitted with Loop Isolation Modules so that the loop is
sectioned in order to ensure that a short circuit or single fault will only cause the loss of a
small part of the system; allowing the rest of the system to function normally.

Figure 2.10 Addressable Fire Alarm System

Large facilities utilize these systems because they can quickly pinpoint where the trouble
signal originated. This saves a lot of time because it eliminates the need to search for the
component that produced the signal.

2.4.3. Intelligent Fire Alarm Systems


In Intelligent Fire Alarm system, each detector effectively incorporates its own computer
which evaluates the environment around it and communicates to the Control Panel
whether there is a fire, fault or the detector head needs cleaning.

xxxi
Figure 2.11 Intelligent Fire Alarm System

Essentially Intelligent Systems are far more complex and incorporate far more facilities
than Conventional or Addressable Systems. Their primary purpose is to help prevent the
occurrence of false alarms. Intelligent Fire Alarm Systems are available in 2, 4, and 8 loop
versions which mean large premises can be monitored from one single panel.

2.4.4. Wireless Fire Alarm Systems


These are an effective alternative to traditional wired fire alarm systems for all
applications. They utilize secure, license-free radio communications to interconnect the
sensors and devices with the controllers. It is a simple concept, which provides many
unique benefits and is a full intelligent fire detection system without the need for cabling.

Figure 2.12 Wireless Fire Alarm System

xxxii
2.5 Review of the Project design

The need for automated systems in the present 21st century cannot be over-emphasized.
With the recent inventions of robotics and artificial intelligence, our world has taken a
different shape and everyone and everything including manufacturing processes are
adjusting to this significant technological shift; otherwise it would be seen as obsolete.
Automation is now been applied to almost every aspect of our daily lives to ease stress
and make work faster, better and timely. This is why the fire safety department has not
been left out; scientists, academia, researchers including students continue to fashion out
ways for improvement of our fire alarm systems.
This project makes use of the addressable type fire alarm system discussed earlier. An
Arduino Uno board has been use as the ‘brain’ (control panel) of the system and other
devices such as the MP3 module, the SIM module, the heat sensor, MQ2 smoke and flame
sensor module, LCD, have all been connected to it through the use of appropriate electric
cable. The Arduino gets its power source either directly from the mains and when the
mains (220/230v) are unavailable; from the charged battery power storage.
The intelligibility of this system is its ability to automatically tell the exact location of the
fire incident or monitored parameter and transmits such to the Arduino which in turn
triggers the voice evacuation message that informs and advices occupants of the necessary
immediate actions to be taken. The Arduino also triggers the SIM module such that it
sends an emergency message to the house owner or the nearest fire station as it has been
programmed to do.
The uniqueness of this project is the intelligibility coupled with its multiple functions
which is uncommon in any existing fire alarm device today. Compliance with regulatory
bodies, codes and standards has also been ensured as the project does not aim to reinvent
the will neither deviate from standards but to create an enhancement in functionality.

2.6 Review of the Fire Alarm System Components

The following components have been used to actualize this intelligent device;

1. Arduino Uno

xxxiii
Figure 2.13 Arduino Uno

The Arduino Uno is an open-source microcontroller board based on the Microchip


ATmega328P microcontroller and developed by Arduino.cc. The board is equipped with
sets of digital and analog input/output (I/O) pins that may be interfaced to various
expansion boards and other circuits. The board has 14 digital I/O pins (six capable of
PWM output), 6 analog I/O pins, and is programmable with the Arduino IDE (Integrated
Development Environment), via a type B USB cable. It can be powered by the USB cable
or by an external 9-volt battery, though it accepts voltages between 7 and 20 volts.
General pin functions Edit
LED: There is a built-in LED driven by digital pin 13. When the pin is high value, the
LED is on, when the pin is low, it is off.
VIN: The input voltage to the Arduino board when it is using an external power source (as
opposed to 5 volts from the USB connection or other regulated power source). You can
supply voltage through this pin, or, if supplying voltage via the power jack, access it
through this pin.
5V: This pin outputs a regulated 5V from the regulator on the board. The board can be
supplied with power either from the DC power jack (7 - 20V), the USB connector (5V), or
the VIN pin of the board (7-20V). Supplying voltage via the 5V or 3.3V pins bypasses the
regulator, and can damage the board.
3V3: A 3.3 volt supply generated by the on-board regulator. Maximum current draw is 50
mA.
GND: Ground pins.
IOREF: This pin on the Arduino board provides the voltage reference with which the
microcontroller operates. A properly configured shield can read the IOREF pin voltage
and select the appropriate power source, or enable voltage translators on the outputs to
work with the 5V or 3.3V.

xxxiv
Reset: Typically used to add a reset button to shields that block the one on the board.
In addition, some pins have specialized functions:
Serial / UART: pins 0 (RX) and 1 (TX). Used to receive (RX) and transmit (TX) TTL
serial data. These pins are connected to the corresponding pins of the ATmega8U2 USB-
to-TTL serial chip.
External interrupts: pins 2 and 3. These pins can be configured to trigger an interrupt on a
low value, a rising or falling edge, or a change in value.
PWM (pulse-width modulation): pins 3, 5, 6, 9, 10, and 11. Can provide 8-bit PWM
output with the analogWrite() function.
SPI (Serial Peripheral Interface): pins 10 (SS), 11 (MOSI), 12 (MISO), and 13 (SCK).
These pins support SPI communication using the SPI library.
TWI (two-wire interface) / I²C: pin SDA (A4) and pin SCL (A5). Support TWI
communication using the Wire library.

Figure 2.14 Atmega328 Pin Layout

The Arduino Uno has a number of facilities for communicating with a computer,
another Arduino board, or other microcontrollers. The ATmega328 provides
UART TTL (5V) serial communication, which is available on digital pins 0 (RX)
and 1 (TX). An ATmega16U2 on the board channels this serial communication
over USB and appears as a virtual com port to software on the computer. The
16U2 firmware uses the standard USB COM drivers, and no external driver is
needed. However, on Windows, an .inf file is required. Arduino Software (IDE)
xxxv
includes a serial monitor which allows simple textual data to be sent to and from
the board. The RX and TX LEDs on the board will flash when data is being
transmitted via the USB-to-serial chip and USB connection to the computer (but
not for serial communication on pins 0 and 1). A Software Serial library allows
serial communication on any of the Uno's digital pins.

2. MQ2 Module

Figure 2.15 MQ-2 gas sensor

MQ-2 gas sensor has high sensitivity to LPG, Smoke, Propane and Hydrogen, also could
be used for Methane and other combustible steam, it is with low cost and suitable for
different application.
MQ-2 sensors are the most used sensors in the series, it is also known as a chemo-resistor
as the detection is based on change of resistance of the sensing material when the gas
comes in contact with the material. Using a simple voltage divider network,
concentrations of gas can be detected. This sensor works on 5VDC and draws around
800mW.
When tin dioxide (semiconductor particles) is heated in air at high temperature, oxygen is
absorbed on the surface. In clean air, donor electrons in tin dioxide are attracted toward
oxygen which is absorbed on the surface of the sensing material. This prevents electric
flow. In the presence of reducing gases, the surface density of absorbed oxygen decreases
as it reacts with the reducing gases. Electrons are then released into the tin dioxide,
allowing current to flow freely through the sensor.
xxxvi
To calibrate the MQ2 sensor module, you have to hold the sensor near smoke or gas you
want to detect and keep turning the potentiometer until the red light on the module starts
glowing (turn the screw clockwise to increase sensitivity and anticlockwise to decrease
sensitivity). The comparator on the module continuously checks if analog pin (A0) has hit
the threshold value set by the potentiometer. When it crosses the threshold, the digital pin
(D0) will go HIGH and signal LED turns on. This setup is useful when you need to trigger
an action when certain threshold is reached.

3. LM35

Figure 2.16 LM35

The LM35 series are precision integrated-circuit temperature devices with an


output voltage linearly-proportional to the Centigrade temperature. The LM35
device has an advantage over linear temperature sensors calibrated in Kelvin, as
the user is not required to subtract a large constant voltage from the output to
obtain convenient Centigrade scaling. The LM35 device does not require any
external calibration or trimming to provide typical accuracies of ±¼°C at room
temperature and ±¾°C over a full −55°C to 150°C temperature range. Lower cost
is assured by trimming and calibration at the wafer level. The low-output
impedance, linear output, Load and precise inherent calibration of the LM35
device makes interfacing to readout or control circuitry especially easy. The device
is used with single power supplies, or with plus and minus supplies as the LM35
device draws only 60 μA from the supply, it has very low self-heating of less than
0.1°C in still air. The LM35 device is rated to operate over a −55°C to 150°C
temperature range.

xxxvii
4. SIM Module

Figure 2.17 SIM800L

For the SIM module, SIM800L was adapted because of its basic nature and simplicity in
usage. Produced by SIMCom, the SIM800L is a quad-band GSM/GPRS module, that
works on frequencies GSM850MHz, EGSM900MHz, DCS1800MHz and PCS1900MHz.
SIM800H&SIM800L features GPRS multi-slot class 12/ class 10 (optional) and supports
the GPRS coding schemes CS-1, CS-2, CS-3 and CS-4. With a tiny configuration of
17.8*15.8*2.4mm, SIM800L can meet almost all the space requirements in customer
applications, such as smart phone, PDA and other mobile devices. SIM800L is designed
with power saving technique so that the current consumption is as low as 1.04mA in sleep
mode. It works with Power supply requirement of 3.4V ~4.4V.

5. Mp3 Module with Loud Speaker

xxxviii
Figure 2.18 Mp3 Module

Mp3 lossless decoding and amplifier board is used for the voice prompt in
conjunction with an 8ohm 25watts loud speaker to provide audible tone and
instruction when triggered.
The mp3 module has onboard 2w mono amplifier (5V, 3W power supply
requirement), and it is directly connected to the speaker. It supports SD card and
accepts several audio formats. It also has key-press functions to enhance usability.

6. LCD

Figure 2.19 LCD

A 16 x 2 liquid crystal display has been used in the project to provide visual aid
when needed and also serve as a monitor for measure parameters.
16x2 LCD means the LCD can display two lines; each line can have sixteen
characters. It has two registers, which is Command and Data. The command
register saves the command instructions provided to the LCD, for example:
initializing the LCD, set the cursor position. The data register saves the info to be
displayed on screen.

7. Flame Sensor Module

xxxix
Figure 2.20 IR Flame sensors

This sensor detects flame otherwise wavelength within the range of 760 nm – 1100 nm
from the light source. It has high photosensitivity response time, very simple to use with
adjustable sensitivity, it is responsive to the flame range. Operating voltage of this sensor
is 3.3V to 5V. The flame detection can be done from a 100cm distance and the detection
angle will be 600. The output of this sensor is an analog signal or digital signal with the
following pins;
 Pin1 (VCC pin): Voltage supply rages from 3.3V to 5.3V
 Pin2 (GND): This is a ground pin
 Pin3 (AOUT): This is an analog output pin (MCU.IO)
 Pin4 (DOUT): This is a digital output pin (MCU.IO)
The problem with this sensor is that it can be easily damaged due to high temperature. So
this sensor can be placed at a certain distance from the flame.

8. Battery

xl
Figure 2.21 Battery

A Panasonic 12V 7.2amp battery has been used in this project to provide backup
power supply to the system when the main is not available.

xli
CHAPTER 3

METHODOLOGY

3.1 System Block Diagram

Block diagrams are used to understand and design complete circuits by breaking them
down into smaller sections or blocks. Each block creates a relationship with another, in a
manner to show the direction of power flow or the system operation.
The power supply which can be battery or the mains, provides voltage and current to the
Uno board which accepts 5V and distributes same 5V power to the other blocks.
The signal/information flow is from the various sensor; smoke, heat and gas to the
Arduino and then to the buzzer, LCD and voice prompt module for interpreted signal
transmission for appropriate actions.
Represented below is the block diagram of the intelligent fire alarm system:

FIRE SERVICE
SMOKE SENSOR
SIM MODULE
ARDUINO
UNO STRUCTURE
BOARD MANAGER

BUZZER/VOICE
HEAT SENSOR PROMPT/MP3
MODULE

ATMega 328
GAS SENSOR LCD

POWER SUPPLY

Figure 3.1 Block Diagram


3.2 System Circuit Diagram

Figure 3.2 SIM 800L Module

Figure 3.3 Arduino-Flame-Sensor-Interface-Circuit-Diagram

ii
Figure 3.4 The system setup

3.2 Circuit Description and System Operation

The simplicity in design of the intelligent multifunction fire alarm system cannot be over-
emphasized; each block is interfaced independently to the Uno board and tested.

iii
Appropriate codes are run on the Arduino to ensure the various blocks and individual
components function as desired.

The MQ2 smoke sensor and the IR flame sensor are interfaced in an analogue manner
with the Arduino board and then calibrated by adjusting the potentiometer to select the
desirable smoke intensity that can trigger the Arduino.

A 12C module has been used with the LCD to reduce the number of pins the LCD
consumes if interfaced directly on the Uno board. With the 12C, the pin required from the
Uno board is just two.

The SIM Module is interfaced to the Uno board with the Tx and Rx pins and then the Vcc
and Gnd. A group of codes are run to ensure that this module interfaces properly. The
power supply circuit was designed so that the system can be powered by electricity or a
stored power.

iv
CHAPTER 4

RESULT AND DISCUSSION

4.1 Result

The various sensors used for the design and construction of this project has been tested
individually and equally interfaced with the Arduino Uno board separately before
specifying the logical pattern of the entire system operation. For some of the components
which gave visual characteristic outputs, they are as shown below;

LM35 Transfer Function


The accuracy specifications of the LM35 are given with respect to a simple linear transfer
function:
Vout = 10 mv/°F × T
Where;
• Vout is the LM35 output voltage
• T is the temperature in °C

Figure 4.1 LM35 interface with Arduino


Figure 4.2 Basic Centigrade Temperature Sensor (2 °C to 150 °C)

For temperature conversion from ℉ to ℃


Formula; ℉ = 9/5(℃) + 32
℃ = 5/9(℉ - 32)
℃ = K - 273

Figure 4.3 Standard room temperatures

Reliable statistics gotten from a website (climatestotravel.com) reveals the average


temperatures of major cities in Nigeria.

Table 4.1 Average Temperatures (1991-2020)


MONTH Min (℃) Max (℃) Mean (℃)
LAGOS ABUJA KANO LAGOS ABUJA KANO LAGOS ABUJA KANO

January 23 20 12 34 35 30 28.3 27.5 21


February 25 26 14 34 37 33 29.3 31.5 23.5
March 26 24 18 34 36 37 29.7 30.5 27.5
April 25 25 22 33 36 39 29.2 30.5 30.5
May 24 20 23 32 33 38 28.1 26.5 30.5
ii
June 24 18 22 30 31 34 26.8 24.5 28
July 23 22 21 29 29 31 26.1 25.5 26
August 23 18 20 29 29 29 26 23.5 24.5
Septembe 23 18 21 29 30 31 26.4 24 26
r
October 23 21 19 31 32 34 27 26.5 26.5
November 24 16 15 33 34 34 28.4 25 24.5
December 24 16 12 34 35 31 28.6 25.5 21.5
YEARLY 23.9 20.3 18.3 31.7 33.1 33.4 27.75 26.65 25.8

As a result of this statistics, it was relatively easy for our temperature/heat sensor to be set
to a threshold of 45℃. The threshold has been chosen in such a way that the slightest of
temperature rise cannot cause the alarm to trigger and the in a way that the heat does not
get beyond control before the trigger.

Figure 4.4 MQ2 interfaced with Arduino

iii
Figure 4.5 LCD & LM35 interfaced with Arduino

Figure 4.6 SIM800L sms and call actions

4.2 Cost Analysis

The estimated cost of the design and construction of this device is ₦50,000 only. This is
relatively low as compared to similar products manufactured abroad which cost as much
as ₦100,000 Nigerian naira averagely.

iv
Table 4.2 Costs of Materials Used
Items Unit price (₦) Quantity
Arduino Uno 7,500 1
Zener diode 50 1
Resistors 100 5
Capacitors 200 4
Piezo Buzzer 100 1
Switch 350 1
Mp3 Module 7,000 1
Package/Housing 15,000 1
Sim Module 8,000 1
LCD 2,000 1
MQ2 sensor module 2,000 1
IR Flame sensor module 1,500 1
LM35 sensor 1,000 1
Jumper wires 500 NA
12C Module 1,000 1
Man-hour/Power 5,000 NA
Miscellaneous 3,000 NA

Total Price 54,300

4.3 Discussion

Fire alarm systems in non-domestic premises are generally designed and installed in
accordance with the guidance given in BS 5839 Part 1. There are many types of fire alarm
systems each suited to different building types and applications. A fire alarm system can
vary dramatically in both price and complexity, from a single panel with a detector and
sounder in a small commercial property to an addressable fire alarm system in a multi-
occupancy building. This fire alarm project however, aims to produce a device with
diversity of usage in different environments with accuracy of result for purpose which it
has been constructed for and in compliance to regulations.
It is stipulated that, to ensure complete coverage, spacing between detectors should be
reduced to 10 m between smoke detectors and 7 m between heat detectors.

While, for corridors less than 2 m wide, only the center line need be considered, therefore
it is not necessary to reduce detector spacing in order to provide complete coverage.
v
Therefore smoke detectors spacing becomes 7.5 m from a wall and 15 m between
detectors. For heat detectors, the spacing becomes 5.3 m to a wall and 10.6 m between
detectors.

The above data is based on flat level ceilings; for pitched ceilings or ceilings with a non-
flat surface, spacing will alter. Where detectors must be mounted onto a pitched ceiling, a
detector should be mounted near to the apex but spacing can be increased by 1% for each
1 degree of slope up to 25%. ‘Near’ is defined as within 600 mm for smoke detectors and
within 150 mm for heat detectors.
For minimum protection, a smoke detector should be installed outside of each separate
sleeping area and on each additional floor of a multi-floor family living unit, including
basements. Note the general guidelines below:
1. Your smoke detector should be positioned in your house ideally on the ceiling, or
on the wall, between 4-6 inches away from the ceiling-wall intersection. Be sure to
place your smoke detector:
 On the ceiling, at least 12 inches away from the wall. A fire can often "trap"
pockets of air where the wall and the ceiling meet -- smoke might never reach the
smoke detector in this "dead air space" 20 feet away from "sources of combustion
particles" (stoves, furnace, and water heater).
 More than one foot away from fluorescent lights.

2. Detectors should not be located near open windows, supply duct outlets, or other
ventilation sources that would interfere with the natural air currents nor near any
obstruction that would prevent smoke or heat from reaching the detector. Drafts
can blow the smoke away from the smoke detector, preventing the smoke detector
from sounding. Placement of detectors near air conditioning or incoming air vents
can also cause excessive accumulation of dust and dirt on the detectors. This dirt
vi
can cause detectors to malfunction and cause unwanted alarms. When air supply
and/or air return ducts are present in a room or space, the detector(s) should be
placed in the path of the air flow toward the return air duct. Smoke detectors must
be at least:
 4 feet from ceiling supply air diffusers
 10 feet from wall supply air diffusers.

3. In some of the specified areas of coverage, such as attics, closets, under open
loading docks or platforms, a heat detector may be more appropriate than a smoke
detector. The installation of smoke detectors in kitchens, attics (finished or
unfinished), or in garages is normally not recommended. A smoke detector too
close to the kitchen might frequently signal false alarms.

4. In general, when only one detector is required in a room or space, the detector
should be placed as close to the center of the ceiling as possible. Central location
of the detector is best for sensing fires in any part of the room. If a center location
is not possible, it may be placed no closer than 4 inches from the wall, or if listed
for wall mounting, it may be mounted on the wall. Wall mounted detectors should
be located approximately 4 to 12 inches (10 to 30 cm) from the ceiling to the top of
the detector, and at least 4 inches (10 cm) from any corner wall junction.

5. For additional protection, the NFPA recommends that you install heat or smoke
detectors in the living room, dining room, bedroom(s), kitchen, hallway(s), attic,
furnace room, utility and storage rooms, basements, and attached garages.

Where Not To Place Detectors


One of the major causes of unwanted alarms is improper placement of detectors. The best
way to avoid unwanted alarms is not to install detectors in environments that can cause
them to malfunction, or to install detectors specially designed for those environments.
Typical examples are:

1. Outdoors - Avoid using detector outdoors, in open storage sheds, or other open
structures affected by dust, air currents, or excessive humidity and temperature extremes.
2. Wet or Excessively Humid Areas - Avoid damp, wet or excessively humid areas, or
next to bathrooms with showers. Water droplets can accumulate inside the sensing
chamber and make the detector overly sensitive.
vii
3. Elevator Lobbies - Do not place over ash trays or where people will smoke while
waiting for the elevator.
4. Extreme Cold or Hot Environments - Avoid very cold or very hot environments or
unheated buildings or rooms where the temperature can fall below or exceed the operating
temperature range of the detector. At temperatures below 0°C
(32°F)*, ice crystals or condensation can appear inside the sensing chamber and make it
overly sensitive or cause a false alarm. At temperatures above the operating range of the
detector (greater than 49°C or 120°F), its internal components may not function properly.
5. Fluorescent Light Fixtures - Avoid placement near fluorescent light fixtures.
Electrical noise generated by fluorescent light fixtures may cause unwanted alarms. Install
detectors at least 1 foot (3 m) away from such light fixtures.

In general, unless specifically designed for the condition, smoke detectors shall not be
installed if: a) temperature is below 32°F or above 100°F, b) Relative humidity is above
93 percent, and c) Air velocity is greater than 300 feet per minute. Also detectors shall not
be installed until after the construction cleanup of all trades is complete and final.
Rooms in which people smoke, smoke detectors should be avoided if possible. It is
recommended to consider photo thermal detector
It is also recommended that the following minimum regular tests and inspections should
be carried out:
Daily - Check to see if the system is indicating fault and that any corrective actions have
taken place.
Weekly - Test the system by operating a manual call point (different one each week).
Periodic Inspection - Subject to risk assessment, should not exceed 6 months between
visits. Check the system log and ensure that corrective actions have taken place.

viii
CHAPTER 5

SUMMARY AND RECOMMENDATION

5.1 Summary

The intelligent multi-function fire alarm system is a system that detects fire at its early
stages. A voice-directed signal is created using an MP3 module which is interfaced with
an Arduino Uno that is powered via the USB connection or with an external power supply.
The power source is selected automatically. The Uno board can operate on an external
supply of 6 to 20 volts. If supplied with less than 7V, however, the 5V pin may supply less
than 5 volts and the board may be unstable. If using more than 12V, the voltage regulator
may overheat and damage the board. The recommended range is 7 to 12 volts.
The Arduino microcontroller and multiple flames, temperature, and cooking gas sensors
are used for environmental conditions monitor. These sensors were connected to an
Arduino board and the MP3 shield allows the activation of the voice message with audible
tones and information regarding the location of hazard and the degree of burning
situations.
The LM35 used as the heat sensor device has a very wide 4-V to 5.5-V power supply
voltage range, which makes it ideal for many applications. In noisy environments, it is
recommended to add a 0.1 μF from V+ to GND to bypass the power supply voltage.
A GSM module was also used with the Arduino to help broadcast the predicted result to
appropriate parties.
The power supply range of SIM800L is from 3.4V to 4.4V.Recommended voltage is
4.0V.The transmitting burst will cause voltage drop and the power supply must be able to
provide sufficient current up to 2A and a bypass capacitor (low ESR) such as a 100 μF is
strongly recommended for the VBAT input.
The system has been tested and found functional; the voice-directing system was able to
guide people with higher efficiency than the traditional fire alarm. The final outcome of
this development also minimized false alarms, thus making this system more reliable.
More study might be needed, considering the importance of early alert with more accurate
information using other sensors.

5.2 Recommendation

In the course of the design and construction of this project, a number of challenges were
encountered and the following recommendations have been made;
1. Fire alarm systems and devices have regulations in every country and region and
these regulations must be followed strictly to maintain the objectives of the
regulatory bodies.
2. Adequate care has to be taken to properly monitor the environmental conditions
around the structure where the alarm is to be installed. This will ensure that the
proper parameters are put into consideration to avoid installation and choice
mistakes.
3. The voltage and current carrying capacity of these components used are very vital
points to note; these components can be easily damaged if more power than
required is passed through it.
4. The cost of connecting the system using cables contributes to the overall cost of
the system especially if it is a very large structure and has several
components/sensors to be connected; therefore it is recommended that further
studies should involve how this system can be interfaced wirelessly.

5.3 References

https://www.cedengineering.com

Mariani, Michael (April 8, 2020). "The Components of a Commercial Fire Alarm


System". Commercial Fire And Communications.

CARD International Journal of Environmental Studies and Safety Research (IJESSR)


Volume 1, Number 3, December 2016

https://www.inspectpoint.com/the-history-of-the-fire-alarm-system/

https://www.epssecurity.com/news/eps-news/a-brief-history-of-fire-alarm-systems/

Chenebert, A.; Breckon, T.P.; Gaszczak, A. (September 2011). "A Non-temporal Texture
Driven Approach to Real-time Fire Detection". Proc. International Conference on Image
Processing (PDF). IEEE. pp. 1781–1784. doi:10.1109/ICIP.2011.6115796. hdl:1826/7588.
ISBN 978-1-4577-1303-3. S2CID 11394788. Retrieved 8 April 2013.

ii
Dunnings, A.; Breckon, T.P. (2018). "Experimentally Defined Convolutional Neural
Network Architecture Variants for Non-temporal Real-time Fire Detection". Proc.
International Conference on Image Processing (PDF). IEEE. Retrieved 9 August 2018.

National Fire Protection Association (February 2001). "Chapter 3 Fundamental Fire


Protection Program and Design Elements". NFPA 805 Performance-Based Standard for
Fire Protection for Light Water Reactor Electric Generating Plants.

National Fire Protection Association. standard: Gaseous Fire Suppression Systems 3.10.7.

National Fire Protection Association (2011). "Chapter 4 Annex A". NFPA 12 Standard on
Carbon Dioxide Extinguishing Systems. National Fire Protection Association. standard:
A.4.5.6.2.2.

Cote, Arthur E. (March 2000). Fire Protection Handbook eighteenth edition. National Fire
Protection Association. pp. 5–8. ISBN 0-87765-377-1.

NFPA 72 – National Fire Alarm and Signaling Code – 2010 Edition. National Fire Alarm
Association, 2009, Page 118, Subsection 24.4.1

"Fire Door Holders - Geofire". Geofire. Retrieved 21 March 2018.

"Fire Industry Association Fact File 0058". the Fire Industry Association ("FIA").
Archived from the original on 2015-02-20. Retrieved 2015-02-20.

Life Safety Consultants (n.d) History of fire alarms.


https://www.lifesafetycom.com/the-history-of-fire-alarms/

National Fire Protection Association (2019) Smoke Alarms in U.S home fires.
https://www.nfpa.org/News-and-Research/Data-research-and-tools/Detection-and-
Signaling/Smoke-Alarms-in-US-Home-Fires

PC Board (n.d). How flame sensor works.


https://www.pcboard.ca/flame-sensor-module

Random nerd tutorials (2017). SIM800 GSM GPRS shieldguide.


iii
https://randomnerdtutorials.com/sim900-gsm-gprs-shield-arduino/

Sparkfun (n.d). What is Arduino. Retrieved 30th April 2019 from


https://learn.sparkfun.com/tutorials/what-is-an-arduino/all

Sparkfun (n.d). Arduino IDE interface. Retrieved 30th April 2019 from
https://learn.sparkfun.com/tutorials/redboard-hookup-guide/uploading-blink

The engineering project (n.d). Introduction to Arduino IDE. Retrieved 30th April 2019

https://www.theengineeringprojects.com/2018/10/introduction-to-arduino-ide.html

iv
CHAPTER 6

CONCLUSION

6.1 Conclusion

After carefully studying and analyzing the fire detection and alarm system standards in
USA and Nigeria, the author found that for the most parts, both countries have similar
standards and regulations about fire alarm systems in general. However, there are some
minor differences that the author has presented in this thesis.
In the practical part, a system was developed with Arduino Uno as the main control unit,
connected with other devices, such as: a smoke/gas sensor, an IR flame sensor, heat
sensor, a buzzer, a 16x2 LCD module and a SIM800L shield. The sensors monitor
physical conditions constantly, the LCD, SIM Module and buzzer acted as alarms. The
Arduino Uno board used as the main control device and could be used to alter the system
parameters as may be desired. After some tests, the system worked successfully.
Also, the system has distinguished advantages and disadvantages. On the one hand, the
advantages are its low cost of construction, easy installation, maintenance, replacement,
and improvement.
On the other hand, the system has some limitations. The most notable is that the system
does not provide immediate fire extinguishing function to serve as first aid before the fire
department arrives the scene. There are also a few drawbacks about Arduino such as the
connection and short lifespan.
Finally, there are some suggestions the author thinks would improve the system, for
example:
- Ability to connect multiple sensors wirelessly
- Creating an app as a wireless control method; this would make the system control
easier.
These improvements would make the system more reliable and give it more applications
for real life situations.
APPENDIX

ARDUINOCODE

#include "GPRS_Shield_Arduino.h"#include <SoftwareSerial.h>namespace K


{//to fix conflict#include<Keypad.h>
};
#define MESSAGE_LENGTH 10#include<Wire.h>
#include<LiquidCrystal_I2C.h>

LiquidCrystal_I2Clcd(0x27,2,1,0,4,5,6,7,3,POSITIVE);

charPhone[5][20] = {}; //insert phone numbers want to


usebytecondition=0,//whichconditionthesystemisin
option=4;//optionsofthefirealarmsystem

charmessage[MESSAGE_LENGTH];chardatetime[24];
bytemessage_index=0;

unsigned long pre_setoff_time= 0;unsignedlongnow_setoff_time=0;

unsigned long now_incCall= 0;unsigned long pre_incCall= 0;unsigned long


now_Ar_call= 0;unsigned long pre_Ar_call= 0;unsigned long now_blink=
0;unsignedlongpre_blink=0;

unsigned long now_check_mess= 0;unsignedlongpre_check_mess=0;

unsigned long lcdON_time= 0;unsigned long wait_time= 10000;booldisplayON=


true;

boolphone_match= false;booltellOwner= false;boolinc_call;

byteflameSen= 13;byte smokeSen= 16;byteled= 15;


bytebuzzer = 14;intsmokeValue= 0;intflameValue= 0;boolfire=false;
boolgasleak=false;

boolalarm_call= true;boolcurrentCall=false;

charinc_phone[20] = {0};byteorder =0;

boolbutton_kpd= true;constintPIN_TX=2;

2
constintPIN_RX=3;constintBAUDRATE=9600;
GPRSgprs(PIN_TX,PIN_RX,BAUDRATE);

//set up the keypadconst byte ROWS = 4;constbyteCOLS=3;


charbuttons[ROWS][COLS]={
{'1','2','3'},
{'4','5','6'},
{'7','8','9'},
{'*','0','#'}
};
byterowPins[ROWS]={4,5,6,7};
bytecolPins[COLS]={10,11,12};
K::Keypad kpd= K::Keypad(makeKeymap(buttons), rowPins, colPins,
ROWS,COLS);

voidsetup(){
gprs.checkPowerUp();//startthesimshield
Serial.begin(9600);while(!gprs.init()){
delay(1000);
}
lcd.begin(16, 2);lcd.noBacklight();pinMode(led, OUTPUT);pinMode(buzzer,
OUTPUT);pinMode(flameSen, INPUT);pinMode(smokeSen,INPUT);

voidloop(){
charkey = kpd.getKey();if(button_kpd){
if(key){//ifakeyispressed
Serial.print(key);

if(key == '*') {//press * to start the lcdcondition=1;


lcd.backlight();lcd.setCursor(0, 0);lcd.print("1:HM12:HM23:AW");
lcd.setCursor(0, 1);lcd.print("4:OFF 5:PH ");displayON= true;

else if (key == '#') { //press # to turn off lcdlcd.clear();


Menu();
displayON= true;lcd.noBacklight();
}
else{
lcdON_time=millis();
if(condition == 1) {//Select mode menuif(key== '1'){//Homemode1

3
lcd.clear();lcd.print("Homemode1");
option=1;
}
else if (key == '2') { //Home mode 2lcd.clear();
lcd.print("Homemode2");
option=2;
}
else if (key == '3') { //Away modelcd.clear();
lcd.print("Away mode");option = 3;
}
else if (key == '4') {//Turn off modelcd.clear();
lcd.print("Turn off");option = 4;
}
else if (key == '5') { //show saved phone numbersdisplayON= true;
condition= 2;showPhoneNo();
}
}
}
}
}
if(millis() - lcdON_time>= wait_time) {//lcd sleep after 10sinactive
lcdON_time= millis();lcd.noBacklight();lcd.clear();
displayON=true;
}

opMode(gasleak, fire);if(fire) {
FireAlarm();
}
else{
now_check_mess=millis();
if(now_check_mess- pre_check_mess>= 3000) {//to check if thereareany
message from owner(s)
pre_check_mess= millis();message_index=gprs.isSMSunread();
}
checkIncMess();
}
}

voidopMode(boolgasRead, boolfireRead) {//options to


choosesmokeValue=analogRead(smokeSen);
flameValue=digitalRead(flameSen);

if((smokeValue>400)&&(flameValue==false))
{
gasRead=true;
}
else
4
{gasRead=false;
}

if(flameValue) {//this flame sensor has reverse value, the authordonot know why
fireRead=false;
}
else{
fireRead=true;
}
switch(option){
case1://option 1: Home mode 1Serial.println(flameValue);if(!gasleak) {
if(gasRead) {gasleak=true;
pre_setoff_time= millis();digitalWrite(led,HIGH);
}
}
else{
now_setoff_time=millis();
if(now_setoff_time- pre_setoff_time>= 7000) {if(gasRead) {
digitalWrite(buzzer,HIGH);
}
else{
digitalWrite(led,LOW);
}
gasleak=false;
}
}
break;

case2://option 2:Home mode 2if(!fire) {


if(fireRead) {fire=true;
}
}
break;

case3://option 3: Away modeif(!fire) {


if(fireRead== true || gasRead== true) {fire= true;
}
}
break;

case4://option 4: turn off the systemturnOFF();


break;

default:option=4;
}
}

voidMenu() { //return to the default statecondition= 0;


5
}
voidshowPhoneNo() {// for displaying the phone numberlcd.clear();
if(condition==2){
intz=0;//display2thingsin1line

for(inti=0;i <4;i++){
if(z + 1 == i / 2) displayON= true;if(displayON== true){
z = i / 2;lcd.setCursor(0, z);displayON=false;
}
lcd.print(i+1);lcd.print(':');
for(inta = 4; a >= 0; a--) { //show saved phone number and itslast5 numbers
lcd.print(Phone[i][strlen(Phone[i])-a-1]);
}
lcd.print("");
}
}

voidFireAlarm(){//alarmwhenafireoragasleakageisdetected
Serial.println(flameValue);if(!phone_match){
if(!tellOwner){
while(alarm_call==true){
if(strcmp(Phone[order], "0") != 0) {gprs.callUp( Phone[order]);currentCall= true;
order++;break;
}
elseorder++;
if(order>2){
if(!currentCall) {alarm_call=false;
}
elseorder=0;
}
}
tellOwner= true;pre_Ar_call= millis();if(alarm_call==true)
{button_kpd= false;}elsebutton_kpd=true;
}
else{
now_Ar_call=millis();
if(now_Ar_call- pre_Ar_call>= 6000) {digitalWrite(led,
HIGH);digitalWrite(buzzer,HIGH);
if(!button_kpd) {delay(2000);gprs.hangup();button_kpd=true;
}
inc_call= gprs.isCallActive(inc_phone);if(inc_call) {
checkIncCall();

6
Serial.println(inc_phone);

}
}
else if (now_Ar_call- pre_Ar_call<6000) {//the led start toblinkfor early
warning
now_blink=millis();
if(now_blink- pre_blink>= 100) {digitalWrite(led, !digitalRead(led));pre_blink=millis();
inc_call= gprs.isCallActive(inc_phone);if(inc_call) {
checkIncCall();
Serial.println(inc_phone);

}
}
}
if(now_Ar_call- pre_Ar_call>= 20000) {tellOwner=false;
now_Ar_call=0;
}
}
}
else{
now_incCall=millis();
if(now_incCall- pre_incCall>= 200) {pre_incCall= millis();
inc_call= gprs.isCallActive(inc_phone);if(inc_call) {
checkIncCall();
Serial.println(inc_phone);

}
}

}
}

voidturnOFF() { //turn off the alarm and return the system to defaultstate
digitalWrite(led, LOW);digitalWrire(buzzer, LOW);gasleak=false;
fire= false;phone_match= false;button_kpd= true;order = 0;currentCall=false;
}

voidcheckIncMess() {//check incoming messages for


commandsif(message_index>0){
charinc_phone[20];charinc_buffer[20];
gprs.readSMS(message_index, message, MESSAGE_LENGTH,
inc_buffer,datetime);
strcpy(inc_phone, inc_buffer);gprs.deleteSMS(message_index);for(inti=0;i <4;i++)
{
if(strcmp(Phone[i], inc_phone) == 0) {phone_match= true;

7
i=5;
}
}
if(phone_match){
if(!strcmp(message,"1")||!strcmp(message,"2")||
!strcmp(message, "3") || !strcmp(message, "4")) { //use message to setoptions
option= message[0] - '0';displayON= true;Serial.println(option);
}
}
phone_match=false;
}
message_index=0;
}

voidcheckIncCall() { //check incoming call for commandsgprs.hangup();


for(inti=0;i <3;i++){
if(strcmp(Phone[i], inc_phone) == 0) {i= 5;
option=4;
Serial.println("Phonematch");
}
phone_match=true;
}
if(option==4){
gprs.sendSMS(inc_phone,"Alarmsstopped");

}
memset(inc_phone,'\0',sizeof(inc_phone));
}

You might also like