Professional Documents
Culture Documents
In modern society, it is impossible to imagine house or building without a fire accident detector.
Modern houses require a continuous installation of fire detector. Not only industry, but also in
the household. Take the case of a duplex that experience a fire accident without a detector that
means everything in that building will get burnt even human beings. But in a case whereby fire
alarm is installed that means everyone in that building will be alerted and also fire security
bodies will also be informed for quick security action. The same thing can also happen to our
offices and industries. In order to notify residence of any building in the presence of fire
accident, a fire alarm system is used. An automatic fire alarm system is designed to detect the
general, a fire alarm system is classified as either automatically actuated, manually actuated, or
both. Automatic fire alarm systems are intended to notify the building occupants to evacuate in
the event of a fire or other emergency, report the event to an off-premises location in order to
summon emergency services, and to prepare the structure and associated systems to control the
Fire starts as a result of a process call ignition, this is when right and sufficient quantities of fuel
and oxygen mixture is expose heat or ambient temperature above the flash point of the mix. The
use and control of fire by humans can be traced back to about one million years ago. A control
fire is very important to humans as it allows us to cook, keep warm, and use as light in the night.
Uncontrolled fire is hazardous to human and can lead to destruction of lives and properties.
1
Technological advancement, industrialization natural disasters and mankind dependence on
energy has exposed us uncontrolled fire also known as fire disaster. Fire disaster can occur
naturally in the case of lightening and volcanos or manmade through gas explosion, electric fault,
etc. This can occur in homes, farms, forest, industries and so on. The first step to control and
communication is a good practice for remote sensing and automation in industrial and residential
locations. Nigeria, like any developing country, is witnessing an era of rapid economic and social
development. This development brings with it, new technologies, new materials, power sources
and telecommunication equipment. Modern industries are springing up housing volatile materials
and highly sophisticated equipment that increase the menace of fire. Concern for safety of lives
and properties calls for an efficient and dependable fire protection system. This has enhanced the
application of new technologies in the fire field. Sensors are able to consider certain dynamic and
static variables such as humidity, the type of fuel, slope of the land, the direction and the speed
The reports of most of the panel of enquiries on fire accidents in Nigeria, oral interview of some
fire experts and personal experience confirmed the fact that electrical fault is a major source of
fire accident. Hence, realization that a fire protection system capable of automatically switching
off electrical power supply to the affected area in addition to the traditional role of raising an
alarm and triggering a sprinkler or other automatic fire lighting system is going to be more
efficient than the existing systems which leaves that important role unaddressed. Now a day’s
automatic fire detection and control is becoming very essential to reduce the fire in the building
and industry. Automatic fire alarm system provides real-time surveillance, monitoring and
2
automatic alarm. A key aspect of fire protection is to identify a developing fire emergency in a
timely manner, and to alert the building's occupants and fire emergency organizations. This is the
role of fire detection and alarm systems. Generally, fire detectors are designed to respond at an
early stage to one more of the four major characteristics of combustion, heat, smoke, flame or
gas. No single type of detector is suitable for all types of premises or fires. Heat detectors
respond to the temperature rise associated with a fire and smoke detector respond to the smoke or
Thus, proposed in this project is the design and implementation of a fire alarm system with SMS
notification, this idea is economically efficient as well because the system proposed is intelligent
and reduces human intervention and labor extensively and execution can be gotten at a very low
The Nigerian environment is considered to be hazards prone brought about by man-made and
natural disasters due to its geographic circumstance which is exposed to catastrophic, floods
droughts and fires. Based on the reports; devastations of these natural hazards and disasters
including fires have increased in recent years. Our lifestyle of negligence and adapting to
emerging technological solutions puts us at the risk of loss to fire and related occurrences as seen
in markets, homes and other public places. The risk of fire occurrence is high especially during
the dry season, Christmas and New Year celebration due to firecrackers. In the case where house
fires are prevalent, it has effect to derail the economic growth, destroy social and physical capital
operations to fatalities and inhabitants and reconstruction efforts which diverts funds to social
3
services. Fires are considered natural and manmade hazards. In fire prevention and fire
suppression; it requires the adoption of uniform fire safety standards, the incorporation of fire
safety, construction and provision of protective and safety devices in buildings and structures.
The objective of the study is to design and construct an efficient and cost-effective system that
helps in minimizing the effect of fire disaster by sensing and detecting potential fire disaster in
real time and sending an alert via SMS for necessary emergency action to avoid or minimize loss
Fire emergencies occur anytime and anywhere, in many instances when the owners of the house
or location are not on site. The system alerts the owners of the house to take remote action that
1. Design a system that will detect presence of fire at the slightest exposure using highly
2. Interface the microcontroller with a GSM module and SIM card (subscriber identification
3. Blow or make an audible alarm to attract the attention of people in proximity with the fire
incident.
4
1. This system only sends an SMS and sounds an alarm, it does not activate an automatic
Chapter 1: This covers the introduction, background of study, problem statement and other
Chapter 2: This chapter includes the theory behind the study as well as literature review of past
similar research.
Chapter 3: Chapter 3 has to do with methodology of the research, design calculations and data
Chapter 4: This covers the methods adopted in testing the system, test result, casing and
packaging information.
5
Chapter Two: Literature Review
2.0 Introduction
Fire accident as an unplanned and undesirable event that brings damages to social wealth and
human life needs to be prevented at all cost. In order to prevent losses accrued from fire
accidents, various alarm systems have been developed such as smoke detectors, temperature
sensor-based systems etc. With the advancement of technology more automated fire gadgets are
now available among which is this design. The availability of GSM technology is now
incorporated into the fire alarm system in order to combat and prevent the menace that could be
caused by fire accident. This project presents the design and implementation of a cost-effective
and reliable automated GSM based fire alarm system. The device will be able to monitor the
temperature of the environment, the smoke level, send SMS alert to an inbuilt GSM number
when necessary.
6
GSM (Global System for Mobile Communications, originally Group especial Mobile), is a standard
developed by the European Telecommunications Standards Institute (ETSI). It was created to describe
the protocols for second-generation (2G) digital cellular networks used by mobile phones and is now
the default global standard for mobile communications – with over 90% market share, operating in
over 219 countries and territories. GSM system was developed as a digital system using time division
multiple access (TDMA) technique for communication purpose. A GSM digitizes and reduces the
data, then sends it down through a channel with two different streams of client data, each in its own
particular time slot. The digital system has an ability to carry 64 kbps to 120 Mbps of data rates.
A Mobile Station: It is the mobile phone which consists of the transceiver, the display
and the processor and is controlled by a SIM card operating over the network.
Base Station Subsystem: It acts as an interface between the mobile station and the
network subsystem. It consists of the Base Transceiver Station which contains the radio
transceivers and handles the protocols for communication with mobiles. It also consists
of the Base Station Controller which controls the Base Transceiver station and acts as a
Network Subsystem: It provides the basic network connection to the mobile stations.
The basic part of the Network Subsystem is the Mobile Service Switching Centre which
provides access to different networks like ISDN, PSTN etc. It also consists of the Home
Location Register and the Visitor Location Register which provides the call routing and
roaming capabilities of GSM. It also contains the Equipment Identity Register which
7
maintains an account of all the mobile equipment wherein each mobile is identified by
its own IMEI number. IMEI stands for International Mobile Equipment Identity.
GSM is the world’s most popular standard for mobile telephony systems. GSM is used by over 3
billion people all over the world. GSM also pioneered the low-cost implementation of the Short
Message Service (SMS) which allows parties to exchange delay tolerant short text messages. The
popularity and coverage of cellular networks allows the use of SMS service.
According to the analysis of real data taken from a real GSM network in India, SMS delivery success
rate is found to be 94.3%. Of these successfully delivered messages, 73.3 arrived to their destination
within 10 seconds. About 5% of them required more than 1 hour to reach the destination.
Using SMS for AMR will certainly increase the flow of messages tremendously. GSM uses several
cryptographic algorithms for security. The development of UMTS introduces an optional Universal
Subscriber Identity Module (USIM), which uses a longer authentication key to give greater security, as
8
Fig. 2.2 GSM Network Structure
Fire is a self-sustaining, chemical chain reaction with varying degrees of light and heat.
Temperature and smoke sensing alert system is motivated to sense the temperature and smoke
and send the alert in an intelligent fashion in case of emergency situation due to fire blow. In
every country in the world the fire alarming system is considered to be essential for lots of
Fuel
Oxygen
9
Heat
By removing one of these four components the fire will go out. Fire extinguishers are designed
to do just that.
A fire alarm system is used primarily to evacuate the premises in the event of occurrence of a fire
condition and then secondarily to report the fire to the proper authorities. The fire alarm system
recognizes four different states or conditions: normal, alarm, trouble and supervisory.
Simplistically speaking, a basic system consists of a fire alarm control panel (FACP) to which
are connected initiating (input) devices, notification (output) appliances, and a source of
operating power, and a source of standby power in the event the operating power should fail. As
seen in the figure below. The function of a fire alarm control panel is basically threefold:
10
1) Accept an alarm or supervisory input from an initiating device.
3) Monitor the integrity of the panel itself and also the wiring to the above devices.
Fire alarm systems have changed dramatically over the past few years, primarily due to the
advent of the low-priced microprocessor. Basically, there are two different approaches used for
1. A locked fire alarm control panel listed for the purpose by a Nationally Recognized
Testing Laboratory, (NRTL) as recognized by OSHA. The standard governing fire alarm
control panels is ANSI/UL Standard 864, currently entering its ninth edition. OSHA
11
currently recognizes Underwriters Laboratories, Factory Mutual Approvals and ETL-
3. A secondary or standby power supply. This is most often a rechargeable storage battery,
4. At least one initiating device circuit to which is wired at least one manual station,
automatic heat or smoke detectors, water-flow switch activated by a sprinkler system, etc.
These devices are located in one area, or zone, so an alarm condition in this zone can
direct fire-fighting personnel to the source of the alarm. Typically, a zone usually consists
of a floor of a small building, or wing of a larger building, etc. with area limitations
5. At least one (output) notification appliance circuit to which is wired at least one horn,
12
2.4 Classes of Fire
There is a universal system to describe different types of fires. This system incorporates the use
of letters, colors and symbols to help users select an extinguisher suitable for the type of material
1. Class A: Ordinary combustibles, such as wood, cloth, paper, rubber, many plastics, and
2. Class B: Flammable liquids. Includes gasoline, oil, grease, tar, oil-based paint, lacquer,
13
3. Class C: Electrical equipment, such as wiring, fuse boxes, circuit breakers, machinery
and appliances.
The dominant part of flames took care of by safeguard administrations are caused in non-private
structures, with a significant number of these being recorded as working environment episodes.
There are numerous components that can improve the probability of a fire being caused.
Notwithstanding you can take measures to stay away from flame in home and guarantee the
wellbeing of your family. The following are the absolute most normal reasons for house flames,
Cooking Equipment
Heating
Smoking in bedrooms
Electrical Equipment.
14
Candles
Curious Children
Faulty Wiring
Barbeques
Flammable Liquids
Lighting.
Labeling on the fire extinguisher identifies which class of fire it is appropriate for; Class A, B,
Dry Chemical: Dry Chemical is the most widely used type of fire extinguisher and is also
the chemical chain reaction. Also, on a class A fire it creates a barrier between the fuel
Carbon Dioxide: Works by separating oxygen and heat. Usually ineffective against class
A fires.
Water/Foam: Works by cooling the fire and coating the fuel. Foam extinguishers create a
foam barrier preventing the fuel from coming in contact with oxygen, can cause shock
hazard on class C fires, can cause liquids in class B fires to spread and effective on class
A fires.
Dry Powder: Works by separating fuel from oxygen and/or removing heat. Effectiveness
15
Wet Chemical: Works by forming a soapy foam blanket over the burning material and
cooling it below its ignition temperature. Designed for restaurant type kitchens.
A number of efforts have been put recently into designing systems that can detect and control
fire outbreaks.
Burchan et al. (2019), examines the potential use of fire extinguishing balls as part of a proposed
system, where drone and remote-sensing technologies are utilized cooperatively as a supplement
to traditional fire fighting methods. The system consists of courting unmanned aircraft system
(UAS) to detect spot fires and monitor the risk of wildfire approaching a building via remote
sensing, communication UAS to establish and extend the communication channel between
16
scouting UAS and fire-fighting UAS, and a fire-fighting UAS. One has to be very skilful in
controlling drones and also the system is very complex which makes the system unreliable.
Qin et al. (2018). Designed an intelligent smoke alarm system with wireless sensor network
using ZigBee. The system consists of a smoke detection module, a wireless communication
module, and intelligent identification and data visualization module. The disadvantage of his
Izang et al. (2018). Designed an SMS Based Fire Alarm and Detection System. The system
works when fire or gas is detected by the sensors, the Arduino will trigger the GSM module to
send SMS, sound the alarm system and trigger the servo motor. The disadvantage of this system
is that the servo motor works at an angle of 170 degrees and hence cannot reduce fire outbreak as
Jinan (2018) Designed and Implemented a Factory Security System that consist of a smoke
sensor, a GSM (Global System for Mobile communication) module and a sound module. When
the gas leakage is detected, an SMS will be sent to a number. The disadvantage of the system is
that there is no device that can stop the gas leakage and hence, when there is fire outbreak the
necessary device to extinguish the fire is not included in the system which may cost loss of
properties.
Poonam et al. (2014). Designed an Intelligent Fire Extinguisher System. the features are
intelligent fire detection and suppression, locate the position of fire origin, effective power
control of electricity, reporting through an SMS or email and effective usage of water supply,
among the sensors used is a gas sensor which detect any type of smoke, this can send a false
17
Fire, being an important process that affects ecological systems across the globe has both
positive and negative effects. However, soil erosion, atmospheric pollution and hazard to life and
property are majorly the negative effects. Fire accident creates serious health and safety hazard
in developing countries, which also resulted into catastrophic situation. This huge loss is
inestimably enormous; hence this study proposes the development of a GSM -based fire detector
system. A cost-effective system that detects fire or smoke and sends alert information to a mobile
phone for quick and immediate action thereby, avoiding unnecessary and costly industrial and
domestic breakdown. The fire alert design was built around techniques for digitalizing analogue
signals obtained from transducers used to monitor temperature of the room and the light intensity
of the room. The room temperature to be monitored, being analogue, is measured through the use
of a thermistor, while the light intensity of the room is detected using Light Dependent Resistor
(LDR). The LDR's resistance increases with reduced light intensity causing the voltage input into
the inverting input of the comparator used to be higher than the reference voltage set at the non-
inverting input of the comparator which makes the comparator to output a LOW. The thermistor
resistance decreases with increase in temperature and this would cause a decrease in the voltage
input to the non-inverting input of the comparator thereby causing the voltage reference set at the
inverting input to be greater. In this state the comparator outputs a LOW, to indicate high
temperature (i.e., fire). The two LOW outputs were ORed and coupled to the astable stage of the
circuitry.
The system developed has come to light through the way of inspiration to develop a compact
system, based on the fundamental ideas of safety, security and control. Once this system is
installed to operation specifying temperature and smoke threshold, in case of any emergency
situation due to increasing temperature and/or smoke at place surpassing the threshold, the
18
system immediately sends automatic alert-notifications to the users, concerned with the
situations. The user gets total control over the system through mobile SMS, even from the distant
location, that to change the threshold, turn on/off the feature of sending ‘alert notification’ and
also to reset the system after the emergency situation is overcome. Before executing any
command (through SMS) from the user, the system asks for the preset password to verify an
authorized user. The security issues have been considered with utter attention in this system to
ensure its applicability in industries and business organizations, where security is an important
concern. Hence, the fundamental ideas of safety, security and control have been entirely ensured
through the system, which have definitely worked as the gear moving factor to look for a new
dimension of an ‘Intelligent Fire Alert System’. Multiple temperature and smoke sensors are
incorporated in the system to cover a wide range of area, which are connected to Atmega32
microcontroller interfaced with a GSM module. The alert notification can be sent to multiple
users and the corresponding mobile numbers can be set/reset by the user in the server mobile
In chapter five, the design has been developed since the social and economic cost of natural
disasters which has increased in recent years due to population growth, change in land use
patterns, migration and unplanned urbanization, environmental degradation and global climate
change. Catastrophic disasters include fires, earthquakes, volcanic eruptions, tropical cyclones,
floods, and droughts. Fire considered being natural or manmade, thus the management shall
provide safety of the building occupant. The design consists of five major circuits to compensate
the system operation. It includes Detection and Initiating Devices (DEADS), Notification
Devices (NODES), Central Station Monitor (CSM), Annunciation Devices (ANODES) and the
Suppression Circuitry. The DEADS is composed of a smoke detector and smoke ionization
19
sensors which transmit initiated signal to CSM. The NODES are active devices like smoke
alarms, and speakers attached to every room designed to give alarms to the room occupants. The
Central Station Monitor designed with Arduino Uno as the Microcontroller served as the brain of
the system interfaced with PHP & MySQL. The ANODES works once fire cannot be suppressed
by the system itself, thereby when the fire department and other incident team needs to be
contacted. The suppressor composed of robotic-arm connected to the water supply, fire hydrants,
and sprinkler heads. The methodologies described in this paper heavily rely on integration of
web science to an embedded system. Compared with traditional or conventional fire alarm
system, this design reduces energy consumption, reduction of maintenance and service operation
costs, improved security services, and increase the satisfaction of building occupants.
Today fire accident is most often occurring every day. A remedy to reduce the death loss
occurring due to fire accidents in everyday situation is presented. When these accidents are
occurring in remote areas or during night times the loss or damage being caused is at higher
rates. The damage is heavier due to improper reach of service at right time due to improper
communication. This time delay is causing heavier damage. Thus, eliminating the time between
when an accident occurs and when first responders are dispatched to the scene decreases the
damage. This project helps in notifying the properties owners and emergency services. The
project consists of a microcontroller which is interfaced with the GPS module, GSM modem and
fire sensors. Once the sensors attached in the compartments of property senses the smoke
detection, it assumes a fire accident. The controller assumes it as an emergency and starts the
buzzer, LCD display and GSM modem in the engine sending the latitude and longitude
information to the specified mobile number and emergency services, by fetching the information
20
CHAPTER THREE
3.0 Methodology
The method used in the execution of this project comprises the combination of serial
communication protocol, signal processing, programming logics with embedded system. In other
to establish the aim of the project these method were combined from the design stage to the
construction and performance results of the system. Using carefully selected materials and
software implementation to drive the complete system as seen in the final construction.
This chapter entails the design procedure of the system detailing the theoretical analysis, choice
of components and values and construction and packaging materials. Indicating calculations,
The circuit is divided into 5 segments: the regulated power, communication unit, microcontroller
unit, display and smoke detector unit. The block diagram of the system is presented in the figure
21
POWER SUPPLY
SMOKE
DETECTOR LED INDICATORS
MODULE
PROCESSOR
GSM MODULE
The power supply of the fire alarm unit is designed to suit the specification of the component
units of the system. A power transformer, rectification and regulation method is applied to derive
the appropriate voltage levels of the unit as seen in the circuit below.
22
3.1.2 The transformer
The transformer gets power from AC mains supply of 220V. However most electronic circuitries
are powered with DC supply which brings about the stepping down of an AC supply of 220V to
transformer, device that transfers electric energy from one alternating-current circuit to one or
more other circuits, either increasing (stepping up) or reducing (stepping down) the voltage.
Transformers change voltage through electromagnetic induction; i.e., as the magnetic lines of
force (flux lines) build up and collapse with the changes in current passing through the
primary coil, current is induced in another coil, called the secondary. The secondary voltage is
calculated by multiplying the primary voltage by the ratio of the number of turns in the
secondary coil to the number of turns in the primary coil, a quantity called the turns ratio.
The rectifier circuit is used to convert the AC (Alternating Current) into DC (Direct Current).
Rectifiers are mainly classified into three types namely half-wave, full-wave, and bridge
rectifier. The main function of all these rectifiers is the same as the conversion of current but
they not efficiently convert the current from AC to DC. The center tapped full wave rectifier as
well as bridge rectifier converts efficiently. A bridge rectifier circuit is a common part of the
electronic power supplies. Many electronic circuits require a rectified DC power supply for
powering the various electronic basic components from available AC mains supply. We can find
this rectifier in a wide variety of electronic AC power devices like home appliances, motor
controllers, modulation process, welding applications, etc. This project makes use of a bridge
23
Fig 3.3 Bridge rectifier Circuit
In a power supply, a capacitor is used to filter the pulsating DC output after rectification so that
an almost stable DC voltage can be supplied to the load. The raw DC supplied by a diode
rectifier on its own would consist of a series of half sine waves with the voltage varying between
zero and √2 times the RMS voltage (ignoring any diode and other losses).
A waveform of this nature would not be of any use for powering circuits because any analogue
circuits would have the huge level of ripple superimposed on the output, and any digital circuits
would not function because the power would be removed every half cycle. To smooth the output
of the rectifier a reservoir capacitor is used - placed across the output of the reciter and in parallel
with the load. The smoothing works because the capacitor charges up when the voltage from the
rectifier rises above that of the capacitor and then as the rectifier voltage falls, the capacitor
In this way the capacitor is able to provide charge when it is not available from the rectifier, and
accordingly the voltage varies considerably less than if the capacitor were not present. The
capacitor smoothing will not provide total voltage stability; there will always be some variation
in the voltage. In fact the higher the value of the capacitor, the greater the smoothing, and also
24
Fig 3.4 Filtering capacitor
supplying more than 1.5A over an output-voltage range of 1.25 V to 37 V. It requires only two
external resistors to set the output voltage. The device features a typical line regulation of 0.01%
and typical load regulation of 0.1%. It includes current limiting, thermal overload protection, and
safe operating area protection. Overload protection remains functional even if the ADJUST
terminal is disconnected. The output voltage of the LM317T is determined by ratio of the two
feedback resistors R1 and R2 which form a potential divider network across the output terminal
as shown below.
25
The voltage across the feedback resistor R1 is a constant 1.25V reference voltage, V ref produced
between the “output” and “adjustment” terminal. The adjustment terminal current is a constant
current of 100uA. Since the reference voltage across resistor R1 is constant, a constant
current i will flow through the other resistor R2, resulting in an output voltage of:
V OUT = 1.25 1+
( )
R2
R1
Then whatever current flows through resistor R1 also flows through resistor R2 (ignoring the
very small adjustment terminal current), with the sum of the voltage drops
across R1 and R2 being equal to the output voltage, V out .Obviously the input voltage, Vin must
be at least 2.5 volts greater than the required output voltage to power the regulator.
The microcontroller is the heart of the project; it controls all the activities of the entire system.
Meet the computation needs of task at hand efficiently and cost effectively
For these reason the ATmega 328P microcontroller is chosen. It is further discussed below.
26
Fig. 3.6 ATmega 328P pin configuration
ATmega328P is one of the high performances AVR technology microcontrollers with a large
number of pins and features. It is designed by 8-bit CMOS technology and RSIC CPU which
enhance its performance and its power efficiency get improved by auto sleeps and internal
temperature sensor. This ATmega328P IC comes with internal protections and multiple
programming methods which helps the engineers to priorities this controller for different
situations. The IC allows multiple modern era communications methods for other modules and
microcontrollers itself, which is why the microcontroller ATmega328P usage has been
This microcontroller has three digital ports (B, C, and D) such as PORTB, PORTC, and PORTD.
All these pins can be used as digital input/output. On top of that, each port can be used for other
purposes. To use them as output/input or for any other function it should be defined first
27
otherwise there won’t be any default function by all I/O pins. Digital I/O pins of the controller
are:
PB0 – GPIO14
PB1 – GPIO15
PB2 – GPIO16
PB3 – GPIO17
PB4 – GPIO18
PB5 – GPIO19
PB6 – GPIO9
PB7 – GPIO10
PC0 – GPIO23
PC1 – GPIO24
PC2 – GPIO25
PC3 – GPIO26
PC4 – GPIO27
PC5 – GPIO28
PC6 – GPIO1
PD0 – GPIO2
PD1 – GPIO3
PD2 – GPIO4
PD3 – GPIO5
PD4 – GPIO6
PD5 – GPIO11
28
PD6 – GPIO12
PD7 – GPIO13
Interrupt pins
Most of the electrical functions required an interrupt system to operate like AC dimmer, etc.
ATmega328P gives the support of 2 interrupts within the controller which can be used to get the
attention of the CPU at any instant. Interrupt pins of ATmega328P are given below:
IN0 – GPIO4
IN1 – GPIO5
Although there are multiple kinds of communication systems within the devices and modules but
the most common one is USART. It is one of the simplest and easiest method for implement and
understanding by most of the developers and systems. In this method, two wires used to send and
RX – GPIO2
TX – GPIO3
The data can be sent by specified the sending rate within the controllers but it can also use the
XCK – GPIO6
In ATmega328P there are 6 ADC channels that can be used to convert the analog signal to
digital. The analog converter needs to be activated first by its power pin (AVCC). The ADC
29
channels use power supply voltage as a reference to differentiate the different levels of the
ADC0 – GPIO23
ADC1 – GPIO24
ADC2 – GPIO25
ADC3 – GPIO26
ADC4 – GPIO27
ADC5 – GPIO28
AVCC – Pin20
AREF Pins
Sometimes the analog signal voltages are fluctuating but it kept measuring by the controller
according to the power input of the controller. To measure it by any other power input or by the
power of analog signal generating device, an analog voltage reference AREF will be used. This
pin will detect the maximum value of the analog signal and then it will be able to give the proper
AREF – GPIO21
Reset
In ATmega328 there is some reset to restart the microcontroller in some conditions. In all of
these resets there is an external reset to reset the device using an external signal:
RESET – GPIO1
Power
Every controller needs the power to operate and it always has a power input pin. In
ATmega328P the power pins are three in number. One pin is for voltage and the remaining two
30
are for common ground. Both of these ground pins are connected internally, it doesn’t matter
VCC – Pin7
Oscillator
The controller comes with 8MHz changeable oscillator. However, it can also use the external
oscillator up to 40MHz. To use the external oscillator, oscillation pins will be required for input
XTAL1 – GPIO9
XTAL2 – GPIO10
31
3.3 Interfacing the SIM800L GSM modem with microcontroller
Modems are devices that let computers transmit information over ordinary telephone lines.
information into series of tones (modulation) at one end of the telephone line, and translate the
tones back into serial stream at the other end of the connection (demodulation). Most modems
are bidirectional, so a data transfer can take place in both directions simultaneously.
A GSM modem could also be a standard GSM mobile phone with the appropriate cable and
software driver to connect to a serial port on your computer. Phones such as the Nokia 7110 with
a DLR-3 cable, or various Ericsson phones, are often used for this purpose.
The SIM800L is a complete Quad-band GSM/GPRS solution in a SMT module which can be
32
SMT type suit for customer application
The GSM modem is configured via COM PORTS of a computer using the RS232 cable. The
GSM modem understands a set of instructions called the AT (Attention) commands. This is used
to send queries and receive response from the GSM modem. The table below describes the basic
AT commands. [12]
Read command AT+<X>? The command returns the currently set value
of the parameters.
parameters values.
33
3.4 Flame detector Module
A Flame Sensor is a device that can be used to detect presence of a fire source or any other bright
light sources. There are several ways to implement a Flame Sensor but the module used in this
project is an Infrared Radiation Sensitive Sensor. This particular flame sensor is based on
YG1006 NPN Photo Transistor. The black object at the front of the module is this Photo
Transistor.
The YG1006 Photo Transistor looks like a black LED but it is a three terminal NPN Transistor,
where the long lead is the Emitter and the shorter one is the collector (there is no base terminal as
the light it detects will enable the flow of current). This photo transistor is coated with black
epoxy, making it sensitive to Infrared radiations and this particular Photo Transistor (YG1006) is
sensitive to Infrared Radiation in the wavelength range of 760nm to 1100nm. Using this
particular type of Flame Sensor, you can detect Infrared Light up to a distance of 100cm within
There are two types of implementations of Flame Sensors using YG1006 Photo Transistor: one is
with both Analog Output and Digital Output while the other is with only the Digital Output. Both
these implementations require same components but the difference is that one module (the one
with the Analog Output) provides the Sensor output as Analog Output. The Flame Sensor used in
34
Fig. 3.9 Flame sensor module
35
3.5 Circuit diagram of the system
+5V
PD2
PD3
PD4
+5V
U2
7805
TR1 D1 D4
1 3
VI VO
GND
DIODE DIODE
RX TX VCC GND RST
D2 D3
2
C4 C5
1000u 10u
DIODE
Fig. 3.10 The power supply section Fig. 3.11 SIM800L connection
U1
PD2 2
PD0/RXD/PCINT16 PB0/ICP1/CLKO/PCINT0
14 MOSI
3 15
4
PD1/TXD/PCINT17 PB1/OC1A/PCINT1
16 MISO
MISO +5V
PD2/INT0/PCINT18 PB2/SS/OC1B/PCINT2
PD3 5
PD3/INT1/OC2B/PCINT19 PB3/MOSI/OC2A/PCINT3
17 SCK
6 18 C1
PD4/T0/XCK/PCINT20 PB4/MISO/PCINT4
11 19
PD5/T1/OC0B/PCINT21 PB5/SCK/PCINT5
PD4 12
PD6/AIN0/OC0A/PCINT22 PB6/TOSC1/XTAL1/PCINT6
9
13 10 22p
PD7/AIN1/PCINT23 PB7/TOSC2/XTAL2/PCINT7
PD5 C2
+5V 21 23 100p SCK MOSI
20
AREF PC0/ADC0/PCINT8
24 C3
AVCC PC1/ADC1/PCINT9
PC2/ADC2/PCINT10
25 16MHz
7 PC3/ADC3/PCINT11
26
27 22p
PC4/ADC4/SDA/PCINT12
8 PC5/ADC5/SCL/PCINT13
28
PC6/RESET/PCINT14
1
Reset
ATMEGA328P
RST
ICSP HEADER
+5V
PD5
Flame Sensor
36
3.6 Selection of materials
In the construction of this project, the materials used were carefully selected to suit every part of
the design as well as perform at the required operational standards. Below are a few criteria for
Electrical characteristics
Power consumption
Portability
Durability
Current
When selecting a capacitor the important parameters are; the capacitance, working voltage and
Meet the computation needs of task at hand efficiently and cost effectively.
37
Before the construction of the system, it was first designed and test on a breadboard and
simulated using proteus 8 circuit designs and simulation software, this was done to see the
behavior of the system in real time situations when fully completed. On performing the desired
aim the construction process began by carefully soldering each component on a veroboard as
shown in the circuit diagram. During the soldering care was taken to ensure there is no bridge
between any leg of the IC’s and also ensure that the interconnection of the work is done as it is in
38
4.1 Installation of the completed design
This project helps to give information whenever there is a fire outbreak in an environment that
can cause hazard to life and property by sending an SMS which will enable the owner of the
property to call the attention of fire service to quench the fire and in all ways reduce the damage
fire outbreak can cause to the society because the early information will help to take action so
The system has a flame sensor to sense the presence of a fire source or any other bright light
sources which then give an output which is connected as the input to the PD5 (Pin 12) of
microcontroller ATmega 328, and the microcontroller process the whole information based on
the code burn in it and push in a certain message as an output to be delivered by the system to
give the state of the environment. The message can be read using LCD 16 x 2 display but
because of the project advancement, SIM800L module is used which a GSM/GPRS module to
transfer information to the internet and it is done with the use of a SIM card to allow the
information to be delivered successfully to any number that was stored in the program memory
of the chip.
i. Components needed to achieve the aim of the project was carefully selected
ii. Ratings of each of the component used were properly checked to see if it can serve the
39
iii. Drafting out a schematic diagram or how to arrange the materials / components.
iv. Testing the completed system to see if the design works and
After the whole procedure of component selection for the project, it was first of test by
interconnecting it on a breadboard to see its behavior after then was transfer to a Vero board for
soldering.
The casing of this project was done by putting some of the component inside the box and some
are arrange outside the box, some of the component outside the box are connectors and switch.
The system was tested by powering ON the circuit and fire was brought near the flame sensor
and immediately the microcontroller activated the SIM800l module and a message was received
by two numbers programmed in the program memory of the ATmega328P. And when the fire
was removed from the flame sensor the system stop responding to the activity of alerting or
All engineering work has its own challenges that come with it which make research to keep
going for stability of all invention. The main problem encounter in this project was the
programming aspect of it because it has to do with writing codes which are set of instruction that
will enable the project to perform has expected. This in turn brings a lot of troubleshooting in
40
locating where some command are not properly declared which cause the system not to work has
expected.
41
Plate 4.2 Inside view with flame sensor
42
Chapter Five: Conclusion and Recommendation
5.1 Conclusion
In conclusion, this project has demonstrated the easy way of preventing fire hazard in the society
by using IOT method in responding quickly to any such event in which it can serve has a safety
measure to life and property of people in the our society especially for businesses and companies
which can loss asset or goods worth billions of naira in the event of wire outbreak. Since fire
outbreak cannot be predicted when it will happen it is very important to be at alert by using the
fire detector system in the building to help easily raise alarm for quick response to any stop the
incident.
5.2 Recommendation
This project is recommended to help reduce the rate at which fire destroy properties in the
community. Industries, Production companies and Goods stock owner are advice to get this type
of system near their investment to help monitor the present of fire hazard in the environment.
This project is essential in our modern world and it can be improved to perform more function by
raising sound alarm in the premises where there is fire outbreak and also by sending messages to
fire service station to directly inform them of fire outbreak incident and also including the
43
Reference
1. The ABC’s of Fire Alarm System I, By Anthony J. Shalna, 2009, Principal IMSA
2. Fire Service Features of Buildings and Fire Protection systems Occupational Safety and
3. Development of A GSM – Based Fire Detector System: Oke A.O, Falohun A.S and
Adetunji A.B. Proceedings of the World Congress on Engineering 2015 Vol I WCE
5. Design and in Prototype Implementation of Fire Detection and Intelligent Alarm System:
Daniel D. Dasig, Jr, Proceedings of the Intl. Conf. on Advances in Computing, Control
and Networking – ACCN 2015. Institute of Research Engineers and Doctors, USA.
6. Fire Detection and Notification System in Trains: Kuncham Viswa Teja, Suresh Angadi,
Innovative Research in Science, Engineering and Technology. Vol. 2, Issue 4, April 2013
modems
www.fairchildsemi.com
44
9. SIM800L GSM Module application notes GSM/GPRS Modems Working Operations
https://lastminuteengineers.com/sim800l-gsm-module-arduino-tutorial/
working-and-its-applications/
45