Flame Sensor Report
Flame Sensor Report
Institute of Technology
Department: Applied Engineering
THE JURY:
DrMECHRI Med laid University of Ouargla Examiner
I
DEDICATION
To myself,
To my dear parents,
To my brother and my sisters,
To my friends and colleagues,
To anyone who helped me during
the difficult time on this work,
And last but not least to my
soulmate,
I dedicate this humble work.
II
TABLE OF CONTENTS
ACKNOWLEDGMENT ................................................................................................................. I
DEDICATION............................................................................................................................ II
TABLE OF CONTENTS ............................................................................................................... IV
LIST OF FIGURES ...................................................................................................................... V
LIST OF TABLES: ...................................................................................................................... VI
GENERAL INTRODUCTION....................................................................................................... VII
Chapiter 01. FIRE ALARM SYSTEMM ....................................................................... 1
1.1 INTRODUCTION: .................................................................... 1
1.2 FIRE ALARM SYSTEM(FAS): ...................................................... 1
1.3 HISTORY OF FIRE ALARM SYSTEMS:.......................................... 2
1.4 THE FIRE PROTECTION ASSOCIATIONS: ..................................... 3
1.5 FIRE ALARM SYSTEM COMPONENTS: ....................................... 4
1.5.1 FIRE ALARM CONTROL UNIT: .......................................................... 4
1.5.1.1.1 Programmable logic controller (PLC): ... 5
1.5.1.1.2 ARDUINO: .............................................................................. 6
1.5.2 FIRE ALAR INITIATING DEVICES: ...................................................... 6
1.5.3 FIRE ALARM NOTIFICATION DEVICES: .............................................. 7
1.5.4 POWER SUPPLY: ............................................................................ 8
1.5.4.1.1 The primary power supply: ............................... 8
1.5.4.1.2 Backup Power Supply: ............................................. 8
1.6 CHARACTERISTICS OF ALARM:................................................. 8
1.7 TYPES OF FIRE ALARM SYSTEM: ..............................................10
1.7.1.1 MANUAL & AUTOMATIC: ...........................................10
1.7.1.2 WIRED& WIRELESS: ..................................................11
1.7.1.3 MONITORED AND UNMONITORED: ..................11
1.7.2 NEED IT TO KNOW ABOUT THE RIGHT ALARM SYSTEM:....................12
1.7.2.1 Installation:..............................................................12
1.7.2.2 Total Cost of Ownership (TCO): ...................................12
1.7.2.3 System Features: ......................................................13
1.7.3 MAINTAINING A FIRE ALARM SYSTEM: ...........................................14
1.7.4 FIRE ALARM SYSTEM ADVANTAGES AND DISADVANTAGES: ...............14
1.8 CONCLUSION: ......................................................................15
IV
Chapiter 02. ARDUINO BOARD .....................................................................................17
2.1 INTRODUCTION: ...................................................................18
2.2 ARDUINO MICROCONTROLLER: ..............................................19
2.2.1 WHAT IS AN ARDUINO? ................................................................19
2.3 WHAT DOSE IT DO?...............................................................20
1.1 WHERE TO BUY:........................................................20
2.4 APPLICATIONS: .....................................................................21
2.5 GOOD REASONS TO CHOOSE ARDUINO: ..................................21
2.6 ELEMENTS OF ARDUINO BOARDS: ..........................................22
2.6.1 ARDUINO HARDWARE: ................................................................22
2.6.1.1 THR DIFFERENT VARIETIES OF ARDUINO BOARDS: ........23
2.6.1.2 ARDUINO CLONES:....................................................25
2.6.1.3 THE EXTENDED FAMILY: .............................................26
SENSORS: ................................................................................................................26
SHIELDS:…………………………………………….. ..........................................................................27
2.6.2 ARDUINO SOFTWARE (IDE) ...........................................................28
2.7 THE ADVANTAGES AND THE LIMITS OF ARDUINO: ....................32
2.7.1 ADVANTAGES OF ARDUINO: ..........................................................32
2.7.2 LIMITATIONS OF ARDUINO: ...........................................................33
2.8 CONCLUSION: ......................................................................34
Chapiter 03. CONTROLLING FIRE ALARM SYSTEM USING
ARDUINO 35
3.1 INTRODECTION ....................................................................36
3.2 THE COMPONENTS REQUIRED TO THE FIRE ALARM SYSTEM: .....36
3.2.1 ARDUINO MEGA: .........................................................................36
3.2.2 FLAME SENSOR: ..........................................................................38
3.2.2.1 APPLICATION:...........................................................39
3.2.2.2 FLAME SENSOR SPECIFICATIONS:................................39
3.2.2.3 HOW TO CALIBRATE THE FLAME SENSOR:....................39
3.2.3 MQ 2 GAS SENSOR:......................................................................41
3.2.3.1 APPLICATION:...........................................................42
3.2.3.2 MQ 2 GAS SENSOR SPECIFICATIONS: ...........................42
3.2.3.3 HOW TO CALIBRATE THE MQ-2 GAS SENSOR: ..............43
3.2.4 OLED DISPLAY: .............................................................................44
3.2.4.1 OLED DISPLAY SPECIFICATIONS: ..................................44
3.2.5 BUZZER: .....................................................................................44
V
3.3 ARDUINO FIRE ALARM SCHEMATICS: ......................................45
3.4 THE CODE THAT USES IT:........................................................46
3.5 RESULT: ...............................................................................51
3.6 UNCERTAINTY OF THE SYSTEM: ..............................................52
3.7 CONCLUSION: ......................................................................53
GENERAL CONLUSION: ............................................................................................................55
REFERENCE: ...........................................................................................................................56
ABSTRACT: ............................................................................................................................. III
VI
LIST OF FIGURES
Figure 1-1: fire alarm system ..................................................................................................... 2
Figure 12-development of fire alarm ......................................................................................... 3
Figure 1-3:THE FIRE ALARM CONTROL UNIT COMMUNICATION .................................................... 5
Figure 1-4:control unit exemple: (A) ARDUINO (B) PROGRAMMABLE LOGIC CONTROLLER. ............ 6
Figure 1-5:CHARACTERISTICS OF ALARM .................................................................................... 9
Figure 16-:(B) Automatic initiating devices, (A)Manual initiating devices .......................................10
Figure 17-:(A) WIRELESS FIRE ALARM SYSTEM, (B)WIRED FIRE ALARM SYSTEM .............................11
Figure 18-:(A)unprofessional monitoring, (B)professional monitoring. ..........................................12
Figure 2-1: the most populer types of Arduino boards ................................................................19
Figure 2-2Robots using Arduino................................................................................................20
Figure 2-3:(C)official boards canbemounted ina chassis,(A) holes,( B) Arduino designed for mounting
on a breadboard .....................................................................................................................23
Figure 2-4 :Sensor compatible with Arduino ..............................................................................26
Figure 2-5: some of the populerArduino shields .........................................................................27
Figure 2-6: types of Arduino shieldes ........................................................................................28
Figure 2-7: board is working .....................................................................................................32
Figure 3-1: Arduino Mega. ......................................................................................................37
Figure 3-2: FLAME SENSOR ......................................................................................................39
Figure 3-3:MQ-2 GAS SENSOR ..................................................................................................42
Figure 3-4: OLED DISPLAY CONNECTED WITH ARDUINO ..............................................................44
Figure 3-5:Buzzer ....................................................................................................................45
Figure 3-6: fire alarm system using Arduino ...............................................................................51
Figure 3-7: sensors values ........................................................................................................52
V
LIST OF TABLES:
Table 1-1:types of initiation devices ........................................................................................... 7
Table 12-:some types of notification devices .............................................................................. 8
Table 3:technical specifications of Arduino Mega 2560................................................................38
VI
General Introduction
GENERAL INTRODUCTION
In recent years, Algeria has witnessed an alarming rise in fire incidents,
posing significant risks to public safety, property, and the environment. Fires
can cause devastating consequences, resulting in loss of life, destruction of
infrastructure, and economic setbacks. Addressing this pressing issue requires
proactive measures, innovative technologies, and comprehensive fire
prevention strategies.
This work aims to introduce an Arduino-based fire alarm system as a
promising solution to enhance fire safety and response in Algeria. By leveraging
the power of Arduino microcontrollers, this system offers an efficient and cost-
effective approach to detect and respond to fire incidents promptly, potentially
minimizing their impact.
The Arduino platform provides a versatile and accessible framework for
developing and deploying customized fire alarm systems. With its open-source
nature and an extensive ecosystem of sensors, actuators, and communication
modules, Arduino enables the integration of various detection mechanisms,
real-time monitoring, and alerting mechanisms.
The proposed fire alarm system incorporates advanced sensors, such as
temperature and smoke detectors and temperature sensor, to identify fire
hazards in their early stages. By constantly monitoring environmental
conditions, these sensors can quickly detect abnormal changes and trigger an
immediate response. When a potential fire is detected, the system activates a
series of predefined actions, including sounding alarms, and sending
notifications to relevant authorities and individuals.
This work considers the affordability and accessibility of the proposed
system. By utilizing Arduino, which is known for its cost-effectiveness and ease
of use, the fire alarm system becomes a viable option for various settings,
including residential buildings, commercial complexes, and public facilities. Its
low-cost nature can potentially encourage widespread implementation, thus
increasing the overall fire safety standards in Algeria.
VII
Chapiter 01. FIRE ALARM SYSTEMM
CHAPTER 1: FIRE ALARM SYSTEM
1.1 INTRODUCTION:
The fire alarm system is a security system, and it is a unit made of several
devices, designed for the fire protection of given objects it helps in notifying the
presence of fire in their vicinity. When a fire detector detects a fire through the central
electrical fire alarm system, it can perform signaling, whether audial or visual., and
automatically contact the Fire and Rescue Service operation center. and can also
perform object control, for example, starting sprinklers, opening fire doors, opening
windows, activating safety gates, and so on. Fire alarms are usually set in fire alarm
systems to provide zonal coverage for residences and commercial buildings[3].
1
CHAPTER 1: FIRE ALARM SYSTEM
Fire alarm history is long and storied, and reflecting upon past progress allows
homeowners, business owners, and fire alarm security providers to better protect against
fire threats. and the future of modern alarm systems has gone through many stages.
The first fire alarm system was invented in 1852, before humanity harnessed the
power of electricity, by Dr. William F. Channing and Moses Farmer. The system includes
two fire alarm boxes that have a telegraphic key and a handle each. If a fire was found in a
home or business, somebody would need to reach inside one of the boxes and wrench the
handle so that it could send an alert to a nearby alarm station. An operator at the station
would then take the message and notify the fire department so that they could send help[4].
The first electric fire alarm system was invented in 1890 by Francis Robbin Upton, an
accomplice of Thomas Edison. He perceived that, most of the time, people wouldn’t have
time to remain around and wrench a handle in the case of fire. Therefore, his electric system
disposed of the requirement for this progress. Surprisingly, the plan for his system was not
that popular when it was first presented, but after some time, people started to understand
the need for a more developed fire alarm system like this one[5].
Since then, with technology advancing, fire alarm systems have been growing. Being
one of the most important systems in modern life, the field of fire alarm systems has always
2
CHAPTER 1: FIRE ALARM SYSTEM
been developing (as shown in Figure 12-). In the future, it may be one of the main focuses of
smart home technology.
3
CHAPTER 1: FIRE ALARM SYSTEM
The Fire Protection Association of Southern Africa (FPASA) was established in 1973 to
provide a specialized fire safety management technical and training service to industry,
commerce and society at large.
Over the years, the Association has developed a range of membership options and
technical, training and fire safety management services that are recognized for their quality,
professionalism and value.
Today the role of the FPASA covers Education, Information, Advice, Consultancy and
Training (Fire College)[8].
The modern detection structures vary in complexity from the ones which can be
simple to people who include advanced detection and signaling gadgets. Such systems are
generally designed and installed by using qualified people as decided with the aid of the
AHJ. The layout, installation, and approval of a fire detection and alarm machine might also
require popularity trying out by regulatory businesses before new homes are occupied, or
the device is positioned in provider.
The layout and set up of the fire detection and alarm gadget have to conform to
applicable provisions of NFPA® 70, national electric Code®, and NFPA® seventy-two,
countrywide hearth Alarm and Signaling Code, and domestically followed codes and
ordinances. Other standards additionally apply to the set-up of these structures. Each of the
subsequent sections highlights a fundamental element of a fire detection and alarm
machine.
The fire alarm control unit (FACU), previously called the fire alarm control panel
(FACP) figure (2.a), The FACU fundamentally serves as the brain for the alarm system, it
contains the electronics that supervise and monitor the integrity of the fire alarm system
and its components (Figure 1-3).
The FACU receives signals from alarm-initiating devices, then processes the signals,
and produces output signals that activate audio and visual alarm devices. The FACU also
transmits signals to an off-site monitoring station when provided. Power and fire alarm
circuits are connected directly into this panel. In addition, the remote auxiliary fire control
4
CHAPTER 1: FIRE ALARM SYSTEM
units and notification appliances panels are considered to be part of the fire alarm
system and are connected and controlled.
Controls for the system are located in the FACU (Figure 1-3). The FACU can also
perform other functions, such as:
• Providing two-way firefighter communication
• Providing remote annunciator integration
• Controlling elevators, HVAC, fire doors, dampers, locks, or other fire protection
features
The FACU can also give public address messages and mass notification.
5
CHAPTER 1: FIRE ALARM SYSTEM
1.5.1.1.2 ARDUINO:
6
CHAPTER 1: FIRE ALARM SYSTEM
In the table below, are types of initiation devices, both manual and automatic:
Notification devices notify building occupants that a fire or emergency has been
detected[11]. They can be programmed to deliver visual and audible messages relevant
to different emergencies. Once an alarm-initiating device is activated, it sends a signal
to the FACU, which then processes the signal and initiates actions.
Notification appliances fall under the following categories:
• Approved sounding devices "Audible", such as horns, bells, or speakers, that
indicate a fire or emergency condition.
• Approved lighting devices" Visual", such as strobes or flashing lights, that
indicate a fire or emergency condition.
• Visual text or symbols indicating a fire or emergency condition "Textual".
In the table below, are some types of notification devices:
7
CHAPTER 1: FIRE ALARM SYSTEM
The majority of fire alarm systems need a primary and backup power supply.
The primary power supply usually comes from a 120- or 240- Volt AC power source
that your property’s power company supplies[11]. The FACU must supervise the primary
power supply and signal an alarm if the power supply is interrupted.
As mentioned above, all fire alarm systems must have a secondary power supply just
in case the primary power fails or is shut off. to ensure your fire alarm system continues to
run when the primary power is out. Secondary power sources can consist of batteries with
chargers, engine-driven generators with a storage battery, or multiple engine-driven
generators, of which one must be set for automatic starting.
8
CHAPTER 1: FIRE ALARM SYSTEM
Prioritization: each alarm should be prioritized in such a way that the operator can
clearly ascertain the criticality level of the alarm and respond accordingly.
Timeliness: each alarm needs to appear on time; designing an alarm that appears too
early or too late may have adverse consequences on the process operation and the
operator response.
9
CHAPTER 1: FIRE ALARM SYSTEM
Fire alarm systems keep buildings and building occupants safe from fires. Fire alarm
systems are intricate networks of interconnected devices and components that work in
unison to detect and alert the presence of a fire. They are divided into multiple categories
based on various features. These some examples:
There are two types of fire alarm initiating devices: manual and automatic.
Manual initiating devices are manual pull-down stations that can only be activated by
hand. You are probably familiar with these devices. Most commercial buildings,
including retail stores, event centers, sports arenas, and offices, have them. Manual
pull-down stations are required by state and local law. NFPA 72, the fire alarm
standard, even has codes pertaining to where in the building these levers must be
located.
Automatic initiating devices trigger automatically in the presence of fire. These
devices include smoke detectors, fire sprinklers, and heat detectors. There are two
distinct operating types among automatic devices: spot and linear.
10
CHAPTER 1: FIRE ALARM SYSTEM
Wired systems are connected to the building's electrical system, while wireless
systems use radio frequency signals to communicate with the control panel.
Figure 1-7:(A) WIRELESS FIRE ALARM SYSTEM, (B)WIRED FIRE ALARM SYSTEM
11
CHAPTER 1: FIRE ALARM SYSTEM
Choosing the right alarm system for any building (home, company, e.g.) or for any
place (forest, e.g.) is difficult. There are many different types of alarms With so many
options available, it can be difficult to decide which type of system will be the best for user.
Here are five important factors that you should consider it to determine which one is
best suited to your needs and budget:
1.7.2.1 Installation:
Wired systems require professional installation [8]while wireless systems can usually
be installed by the user. and also, the development of cell phone or your computer, which
can both provide and maintain voice support, is also available
12
CHAPTER 1: FIRE ALARM SYSTEM
more sophisticated fire alarms, depending on what kind of hazards there are. Those
cost closer to $65 per device[8]
Monitoring:
it can be monitored by a professional monitoring service or can be self-monitored
with the use of a smartphone app.
Video Monitoring: Video surveillance cameras provide live surveillance of your
home or business at all times. While this is an ideal feature, many homeowners do not
require this type of monitoring and are more interested in being notified when
something unusual happens at their property.
Ionization
Ionization fire alarms are best for detecting flaming fires. Inside of the alarm is a
tiny bit of radioactive material (don’t be alarmed – pun intended) that sits between
two electronically charged plates. This causes a constant current of ionized air between
the two plates. When smoke enters between the ionized current, it interrupts the
current and sets the alarm off. These alarm systems are better for detecting fast,
flaming fires.
Photoelectric
These types of alarms are better for detecting smoldering fires. The smoke that is
produced by a slow flaming, smoldering fire is much different than a raging flame fire.
A photoelectric fire alarm uses a beam of light that is sent into a chamber away from a
light sensor. When smoke enters the chamber, it reflects the light towards the sensor,
and triggers the alarm to sound.
Combination
Combination alarms feature both ionization and photoelectric fire detecting
technologies. There are arguments for having combination alarms in your home, or
13
CHAPTER 1: FIRE ALARM SYSTEM
having both ionization, and photoelectric alarms in your home to maximize your home
protection, as combination alarms aren’t as great as one detection method or the other,
compared to the single units.
Here are some procedures you’ll want to adapt for maintaining your alarm system:
Check daily to ensure the system is working correctly. Record faults and failures, and
fix then them.
Test at least one detector call point weekly, as well as smoke and flame detectors.
Make sure to calibrate alarm sensors.
With systems that have numerous zones (more than 13), test more than one zone
weekly.
Check the automatic release of fire doors weekly. Also, on a weekly basis, check for
disconnections of alarm sounder or transmission signals.
Make a weekly report of defects, and alert the appropriate person to fix any problems.
Examine batteries and connections quarterly, and replace as needed.
Check alarm functions of indicating and control equipment quarterly. Also, test the
alarm sounders quarterly, as well as links to independent monitoring companies.
Every four months, make sure there are no obstructions around detectors.
Ensure that a competent individual review your system on an annual basis, even if
quarterly procedures have been carried out. This includes checking detectors for
correct operation.
Arrange for an annual inspection of cable fittings and equipment, confirming they’re
secure and protected, not damaged.
Obtain a certificate of testing after it’s determined that all of the above inspections
and corrections have been made[8].
Fire alarms are an essential safety measure that helps notify occupants of a building
when there is a fire emergency. There are a number of advantages However, there are some
disadvantages to fire alarm systems. We enumerate some of them in the following table:
14
CHAPTER 1: FIRE ALARM SYSTEM
ADVANTAGES DISADVANTAGES
1.8 CONCLUSION:
15
CHAPTER 1: FIRE ALARM SYSTEM
16
Chapiter 02. ARDUINO BOARD
17
2.1 INTRODUCTION:
18
2.2 ARDUINO MICROCONTROLLER:
2.2.1 WHAT IS AN ARDUINO?
19
2.3 WHAT DOSE IT DO?
The Arduino hardware and software was designed for artists, designers,
hobbyists, hackers, newbies, and anyone interested in creating interactive objects or
environments. Arduino can interact with buttons, LEDs, motors, speakers, GPS
units, cameras, the internet, and even smart-phone or TV! This flexibility combined
with the fact that the Arduino software is free, the hardware boards are pretty cheap,
and both the software and hardware are easy to learn has led to a large community of
users who have contributed code and released instructions for a huge variety of
Arduino-based projects[15].
For everything from robots and a heating pad hand warming blanket to honest fortune-
telling machines, and even a Dungeons and Dragons dice-throwing gauntlet, the Arduino can
Due to the popularity of the Arduino platform, many vendors sell Arduino and
Arduino clone boards, shields, and accessories. The Arduino.cc website [16] also has
a page devoted to approved distributors. If none of the resources listed here are
available to you, you may want to check this page for a retailer near you[17].
Also, there are a growing number of online retailers where you can buy Arduino
boards and accessories. The following lists a few of the more popular sites:
• SparkFun:
From discrete components to the company’s own branded Arduino clones and
shields, SparkFun has just about anything you could possibly want for the Arduino
platform[8].
• Adafruit:
20
Carries a growing array of components, gadgets, and more. It has a
growing number of products for the electronics hobbyist, including a full line of
Arduino products. Adafruit also has an outstanding documentation library and
wiki to support all the products it sells [18].
You can also visit the manufacturers of some of the clone boards. Seeed
Studio is the leading clone manufacturer[19].
2.4 APPLICATIONS:
The price: inexpensive hardware, Arduino platform is free to use from the
official website and the only thing users pay is for Arduino hardware[8].
Compatibility: The software, just like the card, is compatible with the most
common platforms (Windows, Linux and Mac), unlike other tools.
The community: The Arduino community is impressive and the number of
resources about it is constantly evolving on the internet[23]. In addition,
there are references to the Arduino language as well as a full page of tutorials
on the arduino.cc (in English) and arduino.cc (in French) sites.
21
Liberation: it's a big word, but it defines the spirit of the Arduino quite
concisely. It constitutes in itself two things: The software: free and open
source, developed in Java, whose ease of use depends on knowing how to
click on the mouse. Equipment: electronic cards whose diagrams are in free
circulation on the internet. This freedom has one condition: the name
"Arduino" should only be used for "official" cards. In short, you cannot make
your own board on the Arduino model and assign it the name "Arduino".
Unofficial cards can be found and purchased on the Internet and are almost
all compatible with official Arduino cards. Since the Arduino is open source,
anyone can build and even sell Arduino compatible boards (often called an
Arduino clone)[17].
Now, let's get closer to "using" the Arduino and see what it looks like. It consists
of two main things, namely: hardware and software.
With these two tools together, we will be able to achieve any achievement.
There is a growing number of Arduino boards and each one has different
specifications and capabilities. Some are configured for special applications, while
others are designed with different processors and memory configurations.
The Arduino is an electronic card based on a microcontroller from the
manufactures, and consists of at least one USB connection, a power connector, a
reset switch, LEDs for power and serial communication, and a standard spaced set of
headers for attaching the extended family like sensors & shields (boards that can be
mounted adding hardware capabilities in a modular fashion)[17].
22
The official boards sport a distinctive blue-colored PCB with white
lettering except one model, all the official boards can be mounted in a chassis
(Figure 2-3) (they have holes in the PCB for mounting screws (Figure 2-3). The
exception is an Arduino designed for mounting on a breadboard (Figure 2-3).
In this part, we show some of the most popular Arduino brand boards and
the extended family.
UNO(R3)
23
MKR Details and a full datasheet are available
at[25].
Series
Boards
24
2.6.1.2 ARDUINO CLONES:
25
Espressif Details and a full datasheet can
Boards be found at [35]
:ESP8266
module
(courtesy of
Adafruit.com)
While your Arduino board sure is pretty, it can't do a whole lot on its own --
you've got to hook it up to something. There are lots of tutorials here on learn as well
as the links back in the 'What does it do' section, but rarely do we talk about the
general kinds of things you can easily hook into. In this section we'll introduce
basic sensors as well as Arduino shields, two of the handiest tools to use in bringing
your projects to life.
SENSORS:
With some simple code, the Arduino can control and interact with a wide
variety of sensors –things that can measure light, temperature, degree of
flex, pressure, proximity, acceleration, carbon
monoxide, radioactivity, humidity, barometric pressure, you name it, you can sense it
This a few of the sensors that are easily compatible with Arduino:
26
There are these things called shields. basically they are pre-built circuit
boards that fit on top of your Arduino and provide additional capabilities --
controlling motors, connecting to the internet, providing cellular or other
wireless communication, controlling an LCD screen, and much more [9].
Some of the popular Arduino Shields:
•Arduino Ethernet shield: This shield allows an Arduino board to connect
to the internet by Ethernet library and to read and write an SD card using the
SD library[36] Figure 2-1(A).
•Arduino Wireless shield: this shield allows the Arduino board to
27
Figure 2-6: types of Arduino shieldes
The program will allow us to program the Arduino board. It offers us many
features. In order to write and compile the code to the Arduino boards, Arduino
Integrated Development Environment (IDE) is used. Arduino IDE is an open source
and official Arduino software, which make programming code easier, even for people
who have no prior knowledge. It is available in operating systems such as MAC,
Windows, Linux. The IDE generally consists of two basic parts: Editor and Compiler.
The former is used for writing the code and the latter is used for compiling and
uploading the code into the Arduino boards, in this case, it is the Arduino Uno. The
IDE supports both C and C++ language[5].
When we start the IDE, a window like figure 9 will appear. The figure marks
with information about Arduino IDE for more understanding. The detailed
explanations are given below:
- 1: Verify - compiles and verify the code in the sketch.
- 2: Upload - upload the code to Arduino module.
- 3: New Tab - opens a new sketch window.
- 4: Open - open any existing sketch.
28
- 5: Save - save current sketch.
- 6: Serial Monitor - opens a window to send and receive information from
Arduino module.
- 7: An area for writing the code
- 8: Console - show details of errors and warnings, useful for debugging.
- 9: Board & Serial Port Selections - show which kind of the Arduino board
and what serial port are ran. In this case, the Arduino Uno and port COM3 was
used.
Furthermore, the Menu bar is on the top of the interface, which has five
different options as follows:
- File: Create a new window for writing the code or open an existing one.
- Edit: Has font modification for the code, as well as copy and paste
function.
- Sketch: For compiling and programming, include the new libraries for
Arduino if needed.
- Tools: Used for testing projects, shows which Arduino boards and port
are in used.
- Help: Have getting started and troubleshooting part to help with the
software.
In short take this guide summary:
29
1.Download and install Arduino IDE[37] .
2. Plug in your Arduino Board
3. Select the proper board in the IDE (Tools>Boards>Arduino Uno )
30
5. Open the “Blink” sketch (File>Examples>Basics>01.Blink)
31
7. Confirm that your board is working as expected by observing LED.
Ease of Use: Arduino boards and the associated software make it relatively
easy for beginners to get started with electronics and programming. The
Arduino programming language is based on a simplified version of C++,
making it more approachable for newcomers.
Open-Source Platform: Arduino's open-source nature encourages
collaboration and community-driven development. This means that there is
a vast array of resources, tutorials, libraries, and example projects available
online, making it easier for users to find support and inspiration.
Cost-Effective: Arduino boards are generally inexpensive compared to other
microcontroller platforms. This affordability allows for experimentation and
prototyping without breaking the bank. Additionally, Arduino-compatible
32
clones and derivatives are available, further expanding the options for
budget-conscious users.
Versatility: Arduino boards can be used to create a wide range of projects,
from simple LED blinking to complex robotics and home automation
systems. The platform supports a variety of sensors, actuators, and
communication protocols, allowing users to interface with the physical
world effectively.
Extensibility: Arduino boards are designed with expansion in mind. They
feature standardized connectors called "shields" that allow for easy
attachment of additional modules, such as displays, motor drivers, or
wireless communication modules. This modularity makes it simple to
customize and enhance Arduino projects.
Cross-Platform Compatibility: Arduino software is available for Windows,
macOS, and Linux, making it accessible regardless of the user's operating
system. The IDE (Integrated Development Environment) provides a user-
friendly interface for writing, compiling, and uploading code to Arduino
boards.
33
Limited I/O Pins: Arduino boards have a finite number of input/output
(I/O) pins, which can become a limitation for projects requiring numerous
sensors, actuators, or complex interfaces. Expanding the I/O capabilities
often requires the use of additional hardware or multiplexing techniques.
Power Consumption: Arduino boards are not optimized for low power
consumption. If your project needs to run on battery power for extended
periods, you may need to consider alternative microcontrollers that provide
better power management features.
Lack of Advanced Features: Arduino boards are designed for simplicity and
accessibility, which means they may lack advanced features found in more
specialized microcontrollers. If your project requires advanced signal
processing, cryptographic operations, or complex communication protocols,
you may need to explore alternative platforms.
Despite these limitations, Arduino remains an excellent choice for hobbyists,
educators, and prototyping applications. It provides an ideal balance between ease of
use, affordability, and versatility, enabling users to bring their creative ideas to life.
2.8 CONCLUSION:
34
Chapiter 03. CONTROLLING FIRE
ALARM SYSTEM USING ARDUINO
35
CHAPTER 3: FIRE ALARM SYSTEM USING ARDUINO.
3.1 INTRODECTION
36
CHAPTER 3: FIRE ALARM SYSTEM USING ARDUINO.
37
CHAPTER 3: FIRE ALARM SYSTEM USING ARDUINO.
The flame sensor module is a small electronic module capable of detecting a fire
source or other light sources. This sensor basically detects light wave IR
(Infrared) from a light source or from a fire flame between 760 nm – 1100 nm. The
flame sensor has a high-speed and sensitive YG1006 photo-transistor sensor. The
detecting range is 100 cm. The Flame sensor can output either a digital or analog
signal. There are two types of IR Infrared Flame Sensor Modules on the market: one
with three pins (D0, Gnd, Vcc) and one with four pins (A0, D0, Gnd, Vcc), both of
them can be used with Arduino and other microcontroller boards.
This sensor has a potentiometer, a 10k preset. Adjust the sensitivity of the flame
sensor by rotating the preset knob. The Flame Sensor sensitivity will increase if the
preset knob rotates clockwise. The sensitivity of the Flame sensor will decrease if it
rotates counter-clockwise.
38
CHAPTER 3: FIRE ALARM SYSTEM USING ARDUINO.
3.2.2.1 APPLICATION:
Fire detection
Use in Fire fighting robot
Fire alarm
39
CHAPTER 3: FIRE ALARM SYSTEM USING ARDUINO.
Gather the necessary equipment: You'll need the flame sensor, a safe and
controlled source of flames (such as a butane lighter), a multimeter (if available),
and a screwdriver (if the sensor has sensitivity adjustment).
Ensure safety: Perform the calibration in a well-ventilated area and ensure there
are no flammable materials nearby. Keep a fire extinguisher or other safety
equipment within reach.
Understand the flame sensor: Familiarize yourself with the specific model of
flame sensor you are using. Read the manufacturer's instructions or datasheet to
understand its operating principles, sensitivity adjustment (if applicable), and
recommended voltage levels.
Connect the flame sensor: Connect the flame sensor to the appropriate power
source or microcontroller, following the manufacturer's guidelines.
Set initial sensitivity: If your flame sensor has a sensitivity adjustment, locate the
sensitivity potentiometer (usually a small screw on the sensor) and set it to a mid-
range position initially. This will allow you to make fine adjustments later.
Warm-up period: Give the flame sensor some time to warm up. This is typically a
few seconds to stabilize its readings.
Activate the flame source: Use a butane lighter or another controlled source of
flames to create a small, steady flame within the detection range of the sensor.
Position the flame at a reasonable distance from the sensor, considering its
specifications.
Observe sensor output: Monitor the output of the flame sensor. It can be a digital
signal (ON/OFF) or an analog signal (voltage level). Note the initial readings and
record any changes you make during calibration.
Adjust sensitivity: If the sensor output does not respond to the flame or if it
triggers false positives, you may need to adjust the sensitivity. If your sensor has a
sensitivity adjustment screw, turn it slightly in one direction (clockwise or
counterclockwise) and observe the sensor's response. Gradually adjust the
sensitivity until the sensor accurately detects the flame while minimizing false
positives.
Fine-tuning: Make small adjustments to the sensitivity until you achieve the
desired balance between flame detection and false positives. Take note of the
sensitivity setting that works best for your specific requirements.
40
CHAPTER 3: FIRE ALARM SYSTEM USING ARDUINO.
Verification: Test the sensor's response to different flame intensities, angles, and
distances to ensure reliable performance in various scenarios.
Finalize calibration: Once you are satisfied with the sensor's performance, secure
any sensitivity adjustment screws or settings to prevent accidental changes. Make
a record of the calibration parameters for future reference.
It's important to note that the specific calibration process may vary
depending on the manufacturer and model of the flame sensor you are using.
Always refer to the manufacturer's documentation for detailed instructions
tailored to your sensor.
MQ-2 sensitive gas sensor material is SnO2, which has a lower clean air
conductivity. The conductivity of the sensor increases with the increase of the
gas concentration when the target inflammable gas is present. Users can
convert the change of conductivity by a single circuit to the corresponding gas
concentration output signal.
The MQ-2 gas sensor is highly propane-smoke-sensitive and can well detect gas
and other flammable steam. It’s cheap and suitable for various The MQ-2 gas
sensor is highly propane-smoke-sensitive and can well detect gas and other
flammable steam. It’s cheap and suitable for various applications of flammable
gas detection.
Wide range good sensitivity to Combustible gases
High sensitivity to LPG, Propane and Hydrogen
Long life and low cost
Simple drive circuit.
41
CHAPTER 3: FIRE ALARM SYSTEM USING ARDUINO.
3.2.3.1 APPLICATION:
42
CHAPTER 3: FIRE ALARM SYSTEM USING ARDUINO.
43
CHAPTER 3: FIRE ALARM SYSTEM USING ARDUINO.
calibration curve in your software or system to make use of the calibrated sensor
data.
Note: The specific steps and requirements for calibrating an MQ-2 gas sensor
may vary depending on the manufacturer's instructions and the sensor's design.
Always refer to the sensor's datasheet and follow the provided guidelines for the most
accurate calibration process.
3.2.5 BUZZER:
44
CHAPTER 3: FIRE ALARM SYSTEM USING ARDUINO.
Figure 3-5:Buzzer
situation, an alarm light and a high voltage alarm can be used with relay
module.
45
CHAPTER 3: FIRE ALARM SYSTEM USING ARDUINO.
BUZZER CONNECTION:
The code provided is a fire alarm system that uses various sensors to detect fire.
It displays the sensor values on an OLED display and triggers an alarm.
/*
BARHOUM INAS
SPICIAL: MESURE, METROLOGY, CONTROL OF QUALITY
FIRE ALARM SYSTEM USING ARDUINO
*/
#include <Wire.h>
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>
46
CHAPTER 3: FIRE ALARM SYSTEM USING ARDUINO.
// Pin definitions
#define FLAME_SENSOR_PIN A5
#define GAS_SENSOR_PIN A1
#define THERMISTOR_1_PIN A2
#define THERMISTOR_2_PIN A3
#define THERMISTOR_3_PIN A4
#define BUZZER_PIN 10
void setup()
{
Serial.begin(9600);
// Initialize buzzer
pinMode(BUZZER_PIN, OUTPUT);
}
void loop()
{
// Read sensor values
int flameValue = analogRead(FLAME_SENSOR_PIN);
int gasValue = analogRead(GAS_SENSOR_PIN);
47
CHAPTER 3: FIRE ALARM SYSTEM USING ARDUINO.
48
CHAPTER 3: FIRE ALARM SYSTEM USING ARDUINO.
}
else if (flameValue > FLAME_THRESHOLD && gasValue > GAS_THRESHOLD && temp1 <
TEMP_THRESHOLD && temp2 < TEMP_THRESHOLD && temp3 > TEMP_THRESHOLD)
{
display.setFont();
display.clearDisplay();
display.setTextSize(1);
display.setTextColor(WHITE);
display.setCursor(0,0);
display.println("fire detected pos3");
display.display();
display.drawRect(0, 0, 127, 63, WHITE);
display.drawCircle(20, 22, 6, WHITE);
display.drawCircle(60, 22, 6, WHITE);
display.fillCircle(100, 22, 6, WHITE);
display.println(" pos1: pos2: pos3: ");
display.display();
tone(BUZZER_PIN, 2000); // Start the buzzer
}
else if (flameValue > FLAME_THRESHOLD && gasValue > GAS_THRESHOLD && temp1 >
TEMP_THRESHOLD && temp2 > TEMP_THRESHOLD && temp3 > TEMP_THRESHOLD)
{
display.setFont();
display.clearDisplay();
display.setTextSize(1);
display.setTextColor(WHITE);
display.setCursor(0,0);
display.println("fire detected in all");
display.display();
display.drawRect(0, 0, 127, 63, WHITE);
display.fillCircle(20, 22, 6, WHITE);
display.fillCircle(60, 22, 6, WHITE);
display.fillCircle(100, 21, 6, WHITE);
display.println(" pos1: pos2: pos3: ");
display.display();
}
else
{
display.setFont();
display.clearDisplay();
display.setTextSize(1);
display.setTextColor(WHITE);
display.setCursor(0,0);
display.println(" no fire detected");
display.display();
display.drawRect(0, 0, 127, 63, WHITE);
display.drawCircle(20, 22, 6, WHITE);
49
CHAPTER 3: FIRE ALARM SYSTEM USING ARDUINO.
50
CHAPTER 3: FIRE ALARM SYSTEM USING ARDUINO.
3.5 RESULT:
You should see the system checks for fire conditions by comparing sensor
values with predefined thresholds.
51
CHAPTER 3: FIRE ALARM SYSTEM USING ARDUINO.
To measure the uncertainty of the system described in the code, you can
consider the following aspects:
Sensor Accuracy: The uncertainty of the sensor readings can contribute
to the overall uncertainty of the system. Different sensors may have
different accuracies, and their datasheets usually provide information
about their precision and accuracy specifications.
Threshold Adjustments: The code includes threshold values for the
flame, gas, and temperature sensors. The uncertainty of these
thresholds can affect the reliability of the system. You may need to
perform calibration or validation experiments to determine appropriate
threshold values and estimate their uncertainties.
Temperature Conversion: The function convert To Temperature converts
the analog readings from the thermistors to temperature values. The
accuracy of this conversion process can introduce uncertainty. It
depends on the accuracy of the thermistors and the correctness of the
conversion equation used in the code.
Buzzer Operation: The code triggers a buzzer to sound an alarm. The
uncertainty of the buzzer's operation can be considered, including
52
CHAPTER 3: FIRE ALARM SYSTEM USING ARDUINO.
factors such as the reliability of the hardware and the timing accuracy of
the tone generation.
OLED Display: The uncertainty of the OLED display can also be taken
into account. This includes aspects like the accuracy of the displayed
information and the reliability of the display itself.
To quantify the uncertainty, you can perform various types of analysis,
such as:
1. Sensor Calibration: Calibrate the sensors against known references and
determine the uncertainties associated with their readings.
2. Threshold Sensitivity Analysis: Evaluate the impact of small changes in
the threshold values on the system's behavior and determine the
resulting uncertainty.
3. Temperature Conversion Analysis: Assess the accuracy of the
temperature conversion equation by comparing the converted values
with a reference measurement device and quantify the associated
uncertainty.
4. Buzzer and Display Evaluation: Analyze the datasheets and technical
specifications of the buzzer and OLED display to understand their
performance characteristics and associated uncertainties.
By considering these factors and performing the necessary analysis, you
can estimate the overall uncertainty of the system and make informed decisions
about its reliability and performance.
3.7 CONCLUSION:
53
CHAPTER 3: FIRE ALARM SYSTEM USING ARDUINO.
54
General Conclusion.
GENERAL CONLUSION:
In conclusion, this work aimed to address the problem of fire incidents in
Algeria over the past year by proposing the implementation of a fire alarm system
using Arduino. By analyzing the current scenario and considering the limitations and
requirements of the Algerian context, the Arduino-based fire alarm system offers
several advantages.
Firstly, the system incorporates various sensors to detect fire, smoke, and
increased temperature levels, providing a comprehensive approach to fire detection.
These sensors ensure a swift response to fire incidents, minimizing the risk of
property damage and human casualties.
Secondly, the utilization of Arduino technology allows for cost-effective and
accessible implementation. Arduino's boards are affordable and widely available,
making it easier to deploy the fire alarm system across different locations in Algeria.
Furthermore, the Arduino platform offers a user-friendly environment for
programming and customization, enabling individuals with varying technical
expertise to adapt and enhance the system to meet specific requirements.
Another significant advantage of the proposed system is its ability to provide
real-time notifications and alerts. When a fire is detected, the system can
immediately send alerts to designated authorities, fire departments, and building
occupants, enabling them to take prompt action and evacuate the premises
efficiently. This feature is particularly crucial in preventing fire incidents from
escalating and improving overall response times.
55
REFERENCE:
1. Caproni, A. and B. Jeram, ACS Alarm System. 2006.
2. Goel, P., A. Datta, and M.S. Mannan, Industrial alarm systems: Challenges and opportunities.
Journal of Loss Prevention in the Process Industries, 2017. 50: p. 23-36.
3. Malatinsky, A. and M. Hromada, PREVENTIVE AND REPRESSIVE MEASURES FOR FIRE SAFETY.
Annals of DAAAM & Proceedings, 2022. 33.
4. Greer, W., A history of alarm security1991: National Burglar & Fire Alarm Association
Bethesda, MD.
5. Luong, T., Fire detection and alarm system. 2019.
6. Nacereddine, B., K. Mohammed Islam, and E. Saleh, Developing a smart embedded data
collection system using microcontroller, UNIVERSITY OF KASDI MERBAH OUARGLA.
7. Busari Sherif, A., F. Dunmoye Abibat, and F. Akingbade Kayode, Development of Arduino-
based Data Acquisition System for Environmental Monitoring using Zigbee Communication
Protocol. 2016.
8. ; Available from: www.sparkfun.com/.
9. Ahmed, A.A., Fire alarm system using smoke and heat detectors with PLC, 2016, Sudan
University of Science and Technology.
10. Cameron, N. and Pao, Arduino Applied2019: Springer.
11. Ibrahim, A.N.N., Automatic Fire Fighting System, 2022, University of Science and Technology.
12. Salaria, A., A. Singh, and K.K. Sharma. A Unified Approach Towards Effective Forest Fire
Monitoring Systems Using Wireless Sensor Networks and Satellite Imagery. in Artificial
Intelligence and Machine Learning in Satellite Data Processing and Services: Proceedings of
the International Conference on Small Satellites, ICSS 2022. 2023. Springer.
13. Siddig, F.H., Designing and Implementing a Model for a Microcontroller Controlled Pick and
Place, 2014, Sudan University of Science and Technology.
14. Kondaveeti, H.K., et al., A systematic literature review on prototyping with Arduino:
Applications, challenges, advantages, and limitations. Computer Science Review, 2021. 40: p.
100364.
15. Arduino, S.A., Arduino. Arduino LLC, 2015. 372.
16. store.arduino.; Available from: https://store.arduino.cc/usa.
17. Bell, C., Introducing the Arduino. Beginning IoT Projects: Breadboard-less Electronic Projects,
2021: p. 31-70.
18. adafruit. Available from: www.adafruit.com/.
19. seeedstudio. Available from: www.seeedstudio.com/.
20. García-Tudela, P.A. and J.-A. Marín-Marín, Use of Arduino in Primary Education: A Systematic
Review. Education Sciences, 2023. 13(2): p. 134.
21. Jayapradha, S. and P.D.R. Vincent. An IOT based Human healthcare system using Arduino Uno
board. in 2017 International Conference on Intelligent Computing, Instrumentation and
Control Technologies (ICICICT). 2017. IEEE.
22. NETTARI, A. and A. ZIGHMI, Etude et réalisation d’un chargeur de batterie au Lithium-ion,
Université KASDI-MERBAH Ouargla.
23. Arduino community Available from: https://www.hackster.io/arduino.
24. data sheet. Available from: https://store.arduino.cc/usa/arduino-uno-rev3.
25. datasheet. Available from: https://store.arduino.cc/usa/arduino-mkr1000.
26. datasheet due. Available from: https://store.arduino.cc/usa/due.
27. datasheet lilypad-arduino-main-board
Available from: https://docs.arduino.cc/retired/boards/lilypad-arduino-main-board.
28. datasheet arduino-mega-2560-rev3 Available from: https://store-
usa.arduino.cc/products/arduino-mega-2560-rev3.
29. dadasheet of arduino nano. Available from: https://store.arduino.cc/usa/arduino-nano.
30. datasheet micro. Available from: https://store.arduino.cc/usa/arduino-micro.
31. data sheet arduino leonardo. Available from: https://store.arduino.cc/usa/leonardo.
32. sparkfun products. Available from: www.sparkfun.com/products/11520.
33. Seeeduino. Available from: www.seeedstudio.com/Seeeduino-V4-2-p-2517.html.
34. Metro from Adafruit. Available from: www.adafruit.com/category/834.
35. Espressif Boards :ESP8266 module (courtesy of Adafruit.com). Available from:
www.espressif.com/en/products/devkits.
36. Ismailov, A.S. and Z.B. Jo‘Rayev, Study of arduino microcontroller board. Science and
Education, 2022. 3(3): p. 172-179.
37. ARDUINO IDE. Available from: https://www.arduino.cc/en/Main/Software
ABSTRACT:
This work presents the design and implementation of a fire alarm system using
Arduino microcontroller board, along with flame sensor, MQ-2 gas sensor, NTC
thermistor sensor, buzzer, and OLED display. The objective is to develop a cost-
effective and efficient solution for detecting fire hazards and alerting individuals in
residential, commercial, or industrial settings.
The flame sensor detects the presence of fire by sensing infrared light emitted
from flames, enabling rapid fire detection. The MQ-2 gas sensor is employed to
detect hazardous gases, such as smoke, LPG, and carbon monoxide, which are
common byproducts of fires. The NTC thermistor sensor measures the ambient
temperature to further aid in fire detection.
The Arduino board serves as the central processing unit, collecting data from
the sensors and analyzing it in real-time. When a fire hazard is detected, the system
triggers the buzzer to generate an audible alarm, alerting nearby individuals to
evacuate the premises. Additionally, an OLED display provides visual feedback by
showing relevant information, such as sensor readings and system status.
ْ مل ّخ
:ص
جنبًا إلى جنب مع مستشعر، Arduino يقدم هذا العمل تصميم وتنفيذ نظام إنذار الحريق باستخدام لوحة متحكم
الهدف هو تطوير حل.OLED وشاشة، والجرس، NTC ومستشعر الثرمستور، MQ-2 ومستشعر الغاز، اللهب
.فعال من حيث التكلفة وفعال للكشف عن مخاطر الحريق وتنبيه األفراد في البيئات السكنية أو التجارية أو الصناعية
مما يتيح، يكتشف مستشعر اللهب وجود حريق عن طريق استشعار ضوء األشعة تحت الحمراء المنبعث من اللهب
مثل الدخان وغاز، للكشف عن الغازات الخطرةMQ-2 يتم استخدام مستشعر الغاز.الكشف السريع عن الحرائق
درجةNTC يقيس مستشعر الثرمستور. وهي منتجات ثانوية شائعة للحرائق، البترول المسال وأول أكسيد الكربون
.الحرارة المحيطة للمساعدة في اكتشاف الحرائق
حيث تقوم بجمع البيانات من المستشعرات وتحليلها في الوقت، كوحدة معالجة مركزيةArduino تعمل لوحة
لتنبيه األفراد القريبين، يقوم النظام بتشغيل الجرس لتوليد إنذار مسموع، عندما يتم الكشف عن خطر الحريق.الفعلي
مثل، مالحظات مرئية من خالل إظهار المعلومات ذات الصلةOLED توفر شاشة، باإلضافة إلى ذلك.إلخالء المبنى
قراءات أجهزة االستشعار وحالة النظام