You are on page 1of 44

BDU-BiT, Faculty of Electrical and Computer Engineering 2018

Declaration

We are students of Bahir Dar University in Bahir Dar institute of technology (BiT). Faculty of
Electrical and Computer engineering. The information found in this project is our original work.
And all the source of the materials that will be used for the project work will be fully acknowledged.

Name signature
1.Abrham Kassa ………….
2.Asnakew Abebaw ………….
3.Ayelign Tigabu ………….
4.Mulugeta Tafere ……………
Date of submission
This project proposal has been submitted for examination with our approval as a university advisor.
Project advisor signature date(dd/mm/yy)
Mr. Yimesgen G. …………. ……//…..//……

Page | i
BDU-BiT, Faculty of Electrical and Computer Engineering 2018

Acknowledgement

At the very beginning we would like to express our deepest gratitude to almighty God for giving
us the strength and the composure to complete our project and prepare this document with in
scheduled time. During the period of our project work, we have received generous help from many
persons, that we like to put on record here with deep gratitude and great pleasure.
First and for most we are grateful to our advisor Mr. Yimesgen G. he controlled us to do in a well
manner. Finally, we would like to thank all persons who were involved with this project for their
valuable help and professionalism during this project.

Page | ii
BDU-BiT, Faculty of Electrical and Computer Engineering 2018

Executive Summery

Now a day, fire and gas leakage accidents which causes the loss of most valuable human lives, the
government and public properties are occurring very frequently in vehicles, in homes, industries,
in buildings and NOCs.

This work is to design and simulate a Fire and Gas leakage accident avoider System with GSM
module, relay, exhaust fan and fire extinguisher to avoid the accident. The system makes use of an
Arduino board along with sensing circuit which will detect and prevent gas leakage and fire. The
system will install a GSM module and SMS can be sent to notify the user if there is fire or gas
leakage and if the fire occurs, the fire extinguisher turns on automatically to avoid the effect of the
fire. A Liquid Crystal Display (LCD) displays the status of the system.

Page | iii
BDU-BiT, Faculty of Electrical and Computer Engineering 2018

Table of content
Declaration ................................................................................................................................................. i
Acknowledgement .................................................................................................................................... ii
Executive Summery ................................................................................................................................. iii
List of figures ........................................................................................................................................... vi
List of Table ............................................................................................................................................ vii
List of Acronym ..................................................................................................................................... viii
Chapter One .............................................................................................................................................. 1
Introduction ............................................................................................................................................... 1
1.1 Background of The Project ............................................................................................ 1
1.3 Problem statement ......................................................................................................... 2
1.3 Objective of the project ................................................................................................. 2
1.3.1 General objective .................................................................................................... 2
1.3.2 Specific objective .................................................................................................... 2
1.4 Methodology .................................................................................................................. 3
1.5 Major Assumptions for the Project ................................................................................ 4
1.6 Scope of the project ....................................................................................................... 4
1.7 Significance of the project ............................................................................................. 5
1.8 Organization of the Project ............................................................................................ 5
Chapter Two.............................................................................................................................................. 6
Literature Review...................................................................................................................................... 6
Chapter Three............................................................................................................................................ 8
System Design and Analysis ..................................................................................................................... 8
3.1 System Components ...................................................................................................... 8
3.2 system description and overall operation .................................................................... 13
3.2.1 system description ................................................................................................ 13
3.2.2 Overall Operation ................................................................................................. 22
Chapter Four ........................................................................................................................................... 23
Result and Discussion ............................................................................................................................. 23
4.1 Software Simulation Result and Discussion ................................................................................. 23
Chapter Five ............................................................................................................................................ 30

Page | iv
BDU-BiT, Faculty of Electrical and Computer Engineering 2018

Conclusion and Recommendation for Future work ................................................................................ 30


5.1 Conclusion ................................................................................................................... 30
5.2 Recommendation for Future Work .............................................................................. 30
Reference ................................................................................................................................................ 31
Appendix ................................................................................................................................................. 32

Page | v
BDU-BiT, Faculty of Electrical and Computer Engineering 2018

List of figures

Figure 1. 1 Methodology followed in the project ............................................................................ 3


Figure 3. 1 Full bridge rectifier ........................................................................................................ 8
Figure 3. 2 Potentiometer ............................................................................................................... 9
Figure 3. 3 Transformer circuit symbol ......................................................................................... 11
Figure 3. 4 Block diagram of fire and gas leakage accident avoider system ................................. 13
Figure 3. 5 MQ-2 gas and smoke sensor ....................................................................................... 15
Figure 3. 6 LM35 temperature sensor ............................................................................................ 15
Figure 3. 7 Flame sensor ................................................................................................................ 15
Figure 3. 8 Arduino Board ............................................................................................................. 17
Figure 3. 9 The GSM SIM900A module to communicate with Arduino board ............................ 17
Figure 3. 10 Liquid Crystal Display ............................................................................................. 18
Figure 3. 11 Fire extinguisher ........................................................................................................ 18
Figure 3. 12 Fire and gas accident avoidance system circuit diagram .......................................... 20
Figure 3. 13 Flow chart of fire and gas leakage accident avoider system ..................................... 21
Figure 4. 1 Simulated result of the power supply .......................................................................... 23
Figure 4. 2 simulated result when the environment is at normal condition and no gas leakage ... 24
Figure 4. 3 Simulated result when there is gas leakage ................................................................. 25
Figure 4. 4 simulated result when there is fire.............................................................................. 26
Figure 4. 5 Simulated result when there is over temperature ....................................................... 27
Figure 4. 6 Simulated result when all case detected ...................................................................... 28

Page | vi
BDU-BiT, Faculty of Electrical and Computer Engineering 2018

List of Table

Table 4. 1 Table of Voltage Regulator Testing results .................................................................. 23

Page | vii
BDU-BiT, Faculty of Electrical and Computer Engineering 2018

List of Acronym

DC …………………………………………………Direct Current
FGS …………………………………………………. Fire and Gas system
GSM …………………………………………………. Global System of Mobile Communication
IDE …………………………. ………………………Integrated Development and Environment
IP ………………………………………………… Internet Protocol
LCD ………………………………………………… Liquid Crystal Display
MOS …………………………. ……………………...Metal Oxide Semiconductor
NOC ………………………………………………… National Oil Company
PSU …………………………………………………. Power Supply Unit
TCP …………………………………………………. Transport Code Protocol

Page | viii
BDU-BiT, Faculty of Electrical and Computer Engineering 2018

Chapter One

Introduction

1.1 Background of The Project

Fire and Gas systems (FGS) are important tools for safeguarding our residence home and other
facilities that handle flammable and toxic materials. All such facilities have inherent fire risk that
cannot be fully mitigated with instrumented protective function, in some cases these facilities
require the installation of fire and gas systems to mitigate these hazards. Proper design of fire and
gas systems begins with the selection of a performance target for functions employed by the fire and
gas system. Performance of a fire and gas System is primarily characterized by the system’s ability
to detect hazards (detector coverage) and the system’s ability to mitigate hazards. Determination of
the necessary coverage, mitigation effectiveness requirements for a FGS is an exercise in risk
analysis. A well-designed fire and gas system are intended to detect and, in some cases,
automatically mitigate fire, combustible gas and toxic gas hazards. Proper placement of detectors is
critical in the design of a fire and gas system to ensure that coverage is adequate to detect hazards
at their incipient stage, in order to avoid escalation. The gas detection system can detect a leakage
of combustible or toxic gas and take action to mitigate or prevent it from escalating into a fire or
explosion. If a fire should result, systems can be attached to extinguish the fire and protect other
areas from the actions of the fire. The same system, usually with different detectors and principles,
can be used to detect toxic gases, give warning to personnel and provide the possibility of taking
automatic actions. The fires may occur in any form of activities such as, prohibited activities of
carrying explosive materials, in the reaction of gas leakages with oxygen and smoking. [2]

1.2 Motivation to Do the Project

Fire and gas leakage accidents occur frequently all over the world and causes property damage and
a danger risk in human life. In order to prevent and avoid such like problems we are eager to do this
project.

Page | 1
BDU-BiT, Faculty of Electrical and Computer Engineering 2018

1.3 Problem statement

In Ethiopia most of the fire extinguisher and detecting systems are manually controlled. Once the
accident is happened, the authorized person should turn on the fire extinguisher manually. This
may cause severe for human life and property hazards. The manual system generally has the
following drawback:
➢ Tedious monitoring system
➢ Risk full firefighting mechanism
➢ Danger of fire spreading over the unaffected area
➢ Lack of announcing mechanism to the owner
➢ Inexistence of a nearby body during the accident
➢ Impossibility of getting firefighting professionals

1.3 Objective of the project

1.3.1 General objective

The general objective of this project is to prevent and avoid fire and gas accidents automatically.

1.3.2 Specific objective

➢ Detecting gas leakages and taking precaution actions for a fire accident.

➢ Avoiding fire accidents using fire extinguisher.

➢ Preventing the over spreading of fire to unaffected area.

➢ Announcing the occurrence of the accident to the authorized person through SMS using
GSM module.

➢ Interfacing components and coding the microcontroller to do specific tasks using Arduino
IDE.

➢ Simulating the working of the project by using proteus software.

Page | 2
BDU-BiT, Faculty of Electrical and Computer Engineering 2018

1.4 Methodology

For successful operation of this project some steps will be followed to carry out different tasks
Different literature will be revised relating to this project and data will be collected and analyzed to
reach result and discussion. Those data are collected from different international journals, IEEE
organization’s paper and different reference books. The general procedure is as follow in the figure
below.

Problem identification

Literature review

Data collection

Data analysis

Design and simulation

Discussion and result

Conclusion

Figure 1. 1 Methodology followed in the project

Page | 3
BDU-BiT, Faculty of Electrical and Computer Engineering 2018

Our device consists of three main parts:


➢ Detection System
➢ Prevention(controlling) System
➢ Avoiding accident and sending SMS System
Detection system
This part consists of temperature sensor, flame sensor, smoke/gas sensor and LCD these will
continuously detect the status of our system.
Prevention System
This part consists of a special type of Gas valve that we will be designing it will be similar to our
present regular valves but relay will have attached to its control knob to allow automatic control.
We are also connecting an exhaust fan to remove leaked gas. And all these parts will be interfaced
with Arduino Uno which will be controlling the whole device.
Avoiding accident and sending SMS system

It consists of a GSM modem to send a message to the user via SMS and it also consists fire
extinguisher to avoid the fire.

1.5 Major Assumptions for the Project

Some components are not present in the proteus software, so we use their equivalent components
for simulation purpose. The threshold value MQ-2gas sensor we taken has 150ppm and the threshold
value of flame and temperature sensors are 200 and 500c respectively.

1.6 Scope of the project

The scope of this project is up to design and simulation using proteus software. This project will
focus fire and gas accident prevention and avoider system for a specific area. in this project we will
use sensor units to detect the accidents and extinguisher to take an action.

➢ It will be intended for home, NOC, office, industry and different vehicles.
➢ It will also applicable for mining and gas station.

Page | 4
BDU-BiT, Faculty of Electrical and Computer Engineering 2018

1.7 Significance of the project

➢ Assist country economy


➢ Monitoring the accident immediately
➢ No need of manual work
➢ Saving human life and property
➢ Preventing fires from spread

1.8 Organization of the Project

This project is organized in to five chapters. The first chapter contains background of the project,
motivation of the project, statement of the problem, objective of the project, methodology,
assumptions of the project, scope and significances of the project.

Chapter two contains literature review and related works. Chapter three includes system design and
analysis. Under system design and analysis hardware and software components are discussed.
Chapter four includes the result and discussion sections of our project. Finally, the last chapter
contains the conclusion and recommendation sections of our project.

Page | 5
BDU-BiT, Faculty of Electrical and Computer Engineering 2018

Chapter Two

Literature Review

Intelligent Residential Security Alarm and Remote-Control System Based on Single Chip
Computer: LIU zhen-ya et al, (2014) the paper focuses on, Intelligent residential burglar alarm,
emergency alarm, fire alarm, toxic gas leakage remote automatic sound alarm and remote-control
system, which is based on 89c51 single chip computer. The system can perform an automatic alarm,
which calls the police hotline number automatically. It can also be a voice alarm and shows alarm
occurred address. This intelligent security system can be used control the electrical power remotely
through telephone [1].

A New Approach of Automatic Localization System Using GPS and GSM/GPRS Transmission:
Lita et al, 2006 this paper focuses on, a low-cost automotive localization system using GPS and
GSM-SMS services, which provides the position of the vehicle on the driver’s or owner’s mobile
phone as a short message (SMS) on his request. The system can be interconnected with the car alarm
system which alerts the owner, on his mobile phone, about the events that occurs with his car when
it is parked. The system is composed by a GPS receiver, a microcontroller and a GSM phone. In
additional the system can be settled for acquiring and transmitting the information, whenever
requested about automobile status and alerts the user about the vehicle started engine. The system
can be used as a low-cost solution for automobile position localizing as well as in car tracking system
application [2].
Investigation of gas sensors for vehicle cabin air quality monitoring: Galatsis et al, (2002) this paper
focuses on, car cabin air quality monitoring can be effectively analyzed using Metal Oxide
Semiconducting (MOS) gas sensors. In this paper, commercially available gas sensors are compared
with Fabricated Moo3 based sensors possessed comparable gas sensing properties. The sensor has
response 74% higher relative to the host commercial sensor tested [3].
Design of an Arduino based home fire alarm system with GSM module Chun-yuan, No. Iceoe,
pp.393-396,2011 This paper describes the design of a home fire alarm with Arduino-based system
by means of GSM Module. The project purposely is for house safety where the main point is to
avoid the fire accidents occurred to the residents and the properties inside the house as well. It

Page | 6
BDU-BiT, Faculty of Electrical and Computer Engineering 2018

utilizes Arduino Uno board in conjunction with ATmega328 chip. The main controller used is
certainly the ATmega328 which controls the home fire alert subjected to the temperature sensor. An
LM35 temperature sensor is used to detect the heat from the fire. An alert message will be sent to
the user via short message service (SMS) via GSM module. When the system detects the
temperature of 400C or more, it will immediately display an alert notification on LCD display and
simultaneously sending an SMS alert to the users upon the high raise temperature in the house.
Results from the test are documented and discussed. Through this system, it can help users to
improve their safety standards by having immediate response in preventing accidents. This will
eventually allow the users to protect their lives and the properties as well from the disaster. Those
literatures only detect accidents through alarm [4].
Intelligent photoelectric smoke detector. The concept of the work was on smoke alarm,
using photoelectric sensor and UHF RF module for both transmitter and receiver part without any
programming. It was fully hardware implemented with the output as LED to represent an alarm.
The system was design to trigger an alarm once the smoke sensor senses smoke then the transmitter
of RF module will be able to send the signal to another detector that will receive the signal. The
system was to be controlled manually since there was no microcontroller. The system did not apply
the concept of detecting smoldering fire as a means of detecting smoke faster and using a single
relay to trigger all the buzzers in the system beside the system is not automatically controlled system
since there is no microcontroller [6].
Wireless smoke detector system involving fabrication and programming process. The system used
air contaminant sensor to detect smoke and transmit RF signal to the receiver part thereby triggering
the buzzer while the LED and LCD displays the condition of the detected smoke. The system did
not apply the concept of detecting smoldering fire as a means of detecting smoke faster and using a
single relay to trigger all the buzzers in the system rather the system used air contaminant sensor to
detect smoke and transmit RF signal to the receiver part to trigger buzzer [7].
All the above literatures have been comprised detection and announcing mechanisms, but they did
not take any actions. Our project addresses detection, prevention, announcing mechanisms and
taking actions.

Page | 7
BDU-BiT, Faculty of Electrical and Computer Engineering 2018

Chapter Three

System Design and Analysis

3.1 System Components

Our system contains hardware and software components.


A. Hardware Requirement and Description
This indicates the hardware required to design fire and gas leakage avoidance system with
compatible electrical value ranges or ratings. Therefore, components required for fire and gas
leakage avoidance system have listed as follows:
A. Full bridge rectifier
B. Capacitor
C. Potentiometer
D. LED
E. Transistor
F. Transformer
A. Full bridge rectifier
A bridge rectifier is an alternating Current (AC) to Direct Current (DC) converter that rectifies mains
AC input to DC output. Bridge Rectifiers are widely used in power supplies that provide necessary
DC voltage for the electronic components or devices. They can be constructed with four diodes with
less ripple value as compared to half bridge rectifier.

Figure 3. 1Full bridge rectifier

Page | 8
BDU-BiT, Faculty of Electrical and Computer Engineering 2018

Bridge rectifier operation


During the Positive half cycle of the input AC waveform diodes D1 and D2 are forward biased and
D3 and D4 are reverse biased. When the voltage, more than the threshold level of the diodes D1 and
D2, starts conducting – the load current starts flowing through it.
During the negative half cycle of the input AC waveform, the diodes D3 and D4 are forward biased,
and D1 and D2 are reverse biased. Load current starts flowing through the D3 and D4 diodes.
We can observe that in both the cases, the load current direction is same and unidirectional, which
means DC current. Thus, by the usage of a bridge rectifier, the input AC current is converted into a
DC current. The output at the load with this bridge wave rectifier is pulsating in nature, but for
producing a pure DC requires additional filter like capacitor.
B. Capacitor
Type: passive and its value is 2200uf.
Electronic symbol:
A capacitor or condenser is a passive electronic component consisting of a pair of conductors
separated by a dielectric. Capacitors are widely used in electronic circuits to block the flow of direct
current while allowing alternating current to pass, to filter out interference, to smooth the output of
power supplies, and for many other purposes. They are used in resonant circuits in radiofrequency
equipment to select particular frequencies from a signal with many frequencies.
C.Potentiometer
Type: passive

Electronic symbol:
Potentiometers, more commonly known simply as "pots," are a type of electrical component called
a variable resistor. They usually function in conjunction with a knob; the user turns the knob, and
this rotational motion is translated into a change in resistance in the electrical circuit.

Figure 3. 2 Potentiometer

Page | 9
BDU-BiT, Faculty of Electrical and Computer Engineering 2018

This change in resistance is then used to adjust some aspect of the sensor values, such as smoke and
flame sensor. Pots are employed in all manner of consumer electronics, as well as larger mechanical
and electrical equipment. Fortunately, if you have a bit of experience working with electrical
components, learning how to wire a potentiometer is a straightforward process.

D.LED

Circuit symbol
Specification of LED:
➢ The forward voltage is 2.2v
➢ The full drive current is 10 mill Ampere
➢ The breakdown voltage is 4v
LEDs are based on the semiconductor diode. When the diode is forward biased (switched on),
electrons are able to recombine with holes and energy is released in the form of light. This effect is
called electroluminescence and the color of the light is determined by the energy gap of the
semiconductor. The LED is usually small in area (less than 1mm) with integrated optical
components to shape its radiation pattern and assist in reflection.

E. Transistor

Symbol:

A transistor is a semiconductor device commonly used to amplify or switch electronic signals. A


transistor is made of a solid piece of a semiconductor material, with at least three terminals for
connection to an external circuit. A voltage or current applied to one pair of the transistor's terminals
changes the current owing through another pair of terminals. Because the controlled (output) power
can be much more than the controlling (input) power, the transistor provides amplification of a
signal. Some transistors are packaged individually but most are found in integrated circuits. The

Page | 10
BDU-BiT, Faculty of Electrical and Computer Engineering 2018

transistor is the fundamental building block of modern electronic devices, and its presence is
ubiquitous in modern electronic systems. Basically, the design and development of this project are
divided into two main parts which are hardware architecture and software details. In the hardware
architecture, the design of the circuit will be constructed and the prototype of the project will build.
While in the software development, the whole complete prototype will be operated via programming
codes.
F. Transformer (TRAN2p2s)
Used as an ac power supply. Consists of two coils, the primary and secondary that are linked together
through an iron core. There is no physical connection between the two coils. The principle of mutual
inductance is used to obtain power. Abbreviated as ‘T’

Figure 3. 3 Transformer circuit symbol

specifications:
➢ Primary inductance is 1H
➢ Secondary inductance is 1H
➢ Primary DC resistance is 1mill ohm
➢ Secondary DC resistance is 1mill ohm
➢ Coupling factor is 1
B. Software requirement
It is important to simulate the designed project. Therefore, Software required for this project
includes the Proteus and Arduino integrated development environment for simulation. Those soft
wares are open source software and every one can access it.

Arduino Integrated Development Environment software (IDE)


Software programs, called sketches (Arduino program code), are created on a computer using the
Arduino integrated development environment (IDE). The IDE enables us to write and edit code and
convert this code into instructions that Arduino hardware understands. The IDE also transfers those

Page | 11
BDU-BiT, Faculty of Electrical and Computer Engineering 2018

instructions to the Arduino board (a process called uploading). To develop a code for our project
we choose Arduino program code based on the following practical consideration
Simple, clear programming environment. The Arduino programming environment is easy-to-use
and flexible.
➢ Open source and extensible software
➢ C code directly into our Arduino programs
➢ Cross-platform
Arduino Build Process
The Arduino environment performs some small transformations to make sure that the
code is correct C or C++ (two common programming languages). It then gets passed to a compiler
(avr-gcc), which turns the human readable code into machine readable instructions (or object files).
Then, our code gets combined, the standard Arduino libraries that provide basic functions like
analogRead (), digitalWrite () or Serial.print(). The result is a single Intel hex file, which contains
the specific bytes that need to be written to the program memory of the chip on the Arduino board.
This file is then uploaded to the board: transmitted over the USB or serial connection via the
bootloader already on the chip or with external programming hardware. Every microcontroller needs
software to be programmed. The Arduino board is not a case apart. It has its own integrated
development environment (IDE). It is free and everyone can download it from its official website
using either the Windows, Mac OS X or Linux platform. That allows Arduino Board to gain more
users and it also helps it to grow.
IDE Parts
➢ Compile: Before program “code” can be sent to the board, it needs to be converted into
instructions that the board understands. This process is called Compiling.
➢ Stop: This stops the compilation process.
➢ Create new Sketch: This opens a new window to create news ketch
➢ Open Existing Sketch: This loads a sketch from a file on our computer.
➢ Save Sketch: This saves the changes to the sketch.
➢ Upload to Board: This compile and then transmits over the USB cable to our
board.

Page | 12
BDU-BiT, Faculty of Electrical and Computer Engineering 2018

➢ Serial Monitor: Until this point when our programs (sketches) didn’t work, we just pulled
out our hair and tried harder.
➢ Tab Button: This lets you create multiple files in your sketch. This is for more advanced
programming than we will do in this class.
➢ Sketch Editor: This is where write or edit sketches
➢ Text Console: This shows you what the IDE is currently doing and is also where error
messages display if make a mistake in typing program.
➢ Line Number: This shows what line number your cursor is on.
Proteus software
It is used for component interconnection and simulations.

3.2 system description and overall operation

3.2.1 system description

A. Block Diagram Description


The operation of fire and gas accident avoider system is represented in the block diagram below. It
consists of power supply, Arduino Uno board, GSM module, adapter, exhaust fan, sensor unit,
sprinkler, LCD display, Relay and gas supply.

GSM
Power supply unit module adapter

Arduino
Relay
Uno board
Exhaust Gas supply
fan
LCD
Sensor display
unit
extinguisher
Figure 3. 4 Block diagram of fire and gas leakage accident avoider system

A. Power supply unit (psu)

Page | 13
BDU-BiT, Faculty of Electrical and Computer Engineering 2018

The power supply unit is necessary for the provision of regulated (step-down rectified) Dc power
supply from AC mains to circuit components i.e. microcontroller, GSM Module, sensors and
exhaust fan. The power supply unit consists of a step-down transformer (240/24v), the diode
Rectifier, voltage regulator and capacitors for filtering.
B. Sensors Unit
The sensor unit consists of the various sensors used in the sensing of the presence of gas or flame
which may lead to fire outbreak in an environment. The sensors used in this system are the flame
or IR sensor, MQ-2 and LM35 for fire, gas and temperature detection of the environment
respectively.
Gas and Smoke Sensor (MQ-2)
The sensor is used to detect when there is a gas leakage or smoke and the amount of the gas
concentration by giving out a voltage output depending on the gas leakage concentration. They are
sensitive for a range of gasses and are used indoors at room temperature. The output is an analog
signal and can be read with an analog input of an Arduino microcontroller. The MQ-2 Gas Sensor
module is useful for gas leakage detecting in home and industry. It is highly sensitive in the detection
of the presence gas leakage, butane, propane, methane, alcohol, hydrogen and smoke.
Some modules have a built-in variable resistor to adjust the sensitivity of the sensor. It will be used
for the detection of gas leakage. A smoke detector is a device that senses smoke, typically as an
indicator of fire. The MQ series of gas sensors use a small heater inside with an electrochemical
sensor.
Features
➢ Wide detecting range: 100 - 10,000 PPM
➢ High sensitivity :>5
➢ fast response: <10s
➢ Long life and stable
➢ Simple drive circuit
Due to its fast response time and high sensitivity, measurements can be taken as soon as possible.
The sensor sensitivity can be adjusted by using the potentiometer. A potentiometer is used to
simulate the analog voltage from the sensor. The sensor and its configuration is shown in the fig
below.

Page | 14
BDU-BiT, Faculty of Electrical and Computer Engineering 2018

Figure 3. 5 MQ-2 gas and smoke sensor

Temperature sensor (LM35)


Temperature sensor LM35 is chosen, it will use to sense the temperature of the environment and
when the temperature goes above a certain level let say our assumption 50ºc a certain voltage
corresponding to the said degree will be read by the microcontroller indicating the occurrence of
maximum temperature. The sensor and its configuration is shown in the figure below.

Figure 3. 6 LM35 temperature sensor


Flame Detection Module
To detect fire flame sensor module will be used in this project. This module is sensitive to the fire
and basically flames spectrum. The way it works it just detects the light wave length between the
range of 760nm-1100 nm which is actually the range of typical infrared light. However, its detection
range is almost 3 feet which is not very large to monitor a single room. But it is very low cost sensor,
light weight only 8 grams, response time is very fast and easy to use, which makes it a right choice
to work with, for prototyping and experiment. There are digital and analog pin output with the
module and a potentiometer to change the flame sensitivity. If temperature reaches very high, then
output high and low threshold needs to be adjusted accordingly.

Figure 3. 7 Flame sensor

Page | 15
BDU-BiT, Faculty of Electrical and Computer Engineering 2018

C.Arduino
Arduino is an open supply electronic device prototyping platform, dependent on variable electronics
as well as applications. This Arduino is usually an easy yet advanced unit which is founded on At-
mel’s ATmega microcontrollers [5]. The components of Arduino are listed below:
Power -USB (Barrel Jack)
Our Arduino board needs a way to be connected to a power source. The Arduino UNO can be
powered from a USB cable coming from your computer or a wall power supply that is terminated
in a barrel jack. In the picture below the USB connection is labeled and the barrel jack is labeled.
The USB connection is also how you will load code onto your Arduino board.
Pins (5V, 3.3V, GND, Analog, Digital, PWM, AREF)
The pins of Arduino are the places where connect wires to construct a circuit. The Arduino has
several different kinds of pins, each of which is labeled on the board and used for different functions.
➢ 5V: Most of the simple components uses this power supply. Arduino run happily off of 5
or 3.3 volts.
➢ GND: Full name is Ground. There are several GND pins on the Arduino, any of which can
be used to ground circuit.
➢ Analog: The area of pins under the ‘Analog in’ label (A0 through A5 on the UNO) are
Analog pins. These pins can read the signal from an analog sensor and convert it into a
digital value that we can read.
➢ Digital (0 through 13 on the UNO): These pins can be used for both digital input and
digital output (like powering an LED).
➢ PWM: The digital pins (3, 5, 6, 9, 10, and 11) on the UNO are the PWM (~) pins. These
pins act as normal digital pins, but can also be used for something called Pulse-Width
Modulation (PWM).
➢ AREF: Stands for Analog Reference. It is sometimes used to set an external reference
voltage (between 0 and 5 Volts) as the upper limit for the analog input pins.

Page | 16
BDU-BiT, Faculty of Electrical and Computer Engineering 2018

Figure 3. 8 Arduino Board


D.GSM module
For GSM module, GSM SIM900A type is selected to carry the task in communication part. It can
operate on Dual-Band 900-1800 MHz and designed solely for outside Europe and USA usage. It
has an established performance, industrial grade interface standard plus embedded TCP/IP protocol
which makes it to be presentable and suitable for the electronics project. Since it consumes small of
power in its operation, thus it is said able to communicate with any low power consumption
microcontroller. It can be interfaced by using many interfaces which some are I2C, SPI interface,
PWM, antenna pad, two serial interface and so forth. The figure below shows the GSM SIM900A
device before connecting to the Arduino board [6]. we will use virtual terminal for our simulation.

Figure 3. 9 The GSM SIM900A module to communicate with Arduino board


E. Liquid crystal display unit
LCD (Liquid Crystal Display) screen is an electronic display module and find a wide range of
applications. A 20x4 LCD display is very basic module and is very commonly used in various
devices and circuits. These modules are preferred over seven segments and other multi segment
LEDs. The reasons being: LCDs are economical; easily programmable; have no limitation of
displaying special & even custom characters (unlike in seven segments), animations and so on. A
20x4 LCD means it can display 20 characters per line and there are 4 such lines. In this LCD
each character is displayed in 5x7 pixel matrix. This LCD has two registers, namely, Command and
Data. The command register stores the command instructions given to the LCD. A command is an

Page | 17
BDU-BiT, Faculty of Electrical and Computer Engineering 2018

instruction given to LCD to do a predefined task like initializing it, clearing its screen, setting the
cursor position, controlling display etc. The data register stores the data to be displayed on the
LCD. The data is the ASCII value of the character to be displayed on the LCD. The LCD displays
the status of the system when gas detected or when a flame is detected through the various sensors
installed in to the system.
Features of LCD
➢ Built-in controller
➢ + 5V power supply (Also available for + 3V)
➢ 1/16 duty cycle
➢ B/L to be driven by pin 1, pin 2 or pin 15, pin 16 or A.K (LED)
➢ N.V. optional for + 5V power supply. this is shown in fig below.

Figure 3. 10 Liquid Crystal Display


F. Fire Extinguisher
The main function of the fire extinguisher is for avoiding the fire accident. In this system when the
sensors get activated it produces power to the relay and the water droplets, dry chemical, carbon
dioxide and wet chemicals is released through the extinguisher. Some of the models of the fire
extinguisher as shown in the figure below.

Figure 3. 11 Fire extinguisher

Page | 18
BDU-BiT, Faculty of Electrical and Computer Engineering 2018

G. Relay
A relay is an electrically operated or electromechanical switch composed of an electromagnet, an
armature, a spring and a set of electrical contacts. The electromagnetic switch is operated by a small
electric current that turns a larger current on or off by either releasing or retracting the armature
contact, thereby cutting or completing the circuit. Relays are necessary when there must be electrical
isolation between controlled and control circuits, or when multiple circuits need to be controlled by
a single signal.

Figure relay symbol

Page | 19
BDU-BiT, Faculty of Electrical and Computer Engineering 2018

Figure 3. 12 Fire and gas accident avoidance system circuit diagram

B. Flow Chart
The system software will be programmed to read the sensors (flame, mq-2 and lm35) and produce
an output when the preset value and sensor analog signal is matched. System design flow chart is
as shown the figure below.

Page | 20
BDU-BiT, Faculty of Electrical and Computer Engineering 2018

Start

Check for sensor reading

No No

Is fire Is gas leakage


detected?
detect?

Yes Yes

Relay is energized

Exhaust fan on and


gas supply knob off

Enable fire Status display Send SMS


on LCD through GSM
extinguisher

End
Figure 3. 13 Flow chart of fire and gas leakage accident avoider system

Page | 21
BDU-BiT, Faculty of Electrical and Computer Engineering 2018

3.2.2 Overall Operation

The work has been done to design and simulate a Fire and Gas accident avoider System with GSM
module, relay, exhaust fan and fire extinguisher to avoid the accident. The system makes use of an
Arduino board along with sensing circuit which will detect and prevent gas leakage and fire. The
system will install a GSM module to send SMS notification to the user if there is fire or gas leakage
and if the fire occurs, the fire extinguisher turns on to avoid the effect of the fire. If the gas leakage
is detected by the MQ-2 gas sensor, the relay will be energized and turn off the gas supply knob and
the exhaust fan suck out the leaked gas in order to prevent the fire from happening as well as
spreading. Temperature sensor announces the environmental conditions of the system to the
concerned body. A Liquid Crystal Display (LCD) displays the status of the system.

Page | 22
BDU-BiT, Faculty of Electrical and Computer Engineering 2018

Chapter Four

Result and Discussion

4.1 Software Simulation Result and Discussion

The result was simulated on proteus using Arduino code. Simulation results were obtained using the
simulated circuit using proteus by running the simulation. The potentiometer simulating the sensor
was adjusted from 0% to 100%. At 100% the potentiometer output voltage is 5V. The potentiometer
is connected to 5V. The value of the gas/smoke concentration, flame concentration and temperature
value were read on the LCD.

A. Power supply unit

Figure 4. 1 Simulated result of the power supply


Table 4. 1 Table of Voltage Regulator Testing results

Voltage regulator Voltage (dc)

7812 9.30

Page | 23
BDU-BiT, Faculty of Electrical and Computer Engineering 2018

The table shows the dc voltage that was gotten from the power supply after the power supply unit
was transferred to the board.
B. System simulation result of the controller unit is shown and explained as follows.

Figure 4. 2 simulated result when the environment is at normal condition and no gas leakage
From this we observed that noting is happened and the status displayed on LCD have normal
condition.

Page | 24
BDU-BiT, Faculty of Electrical and Computer Engineering 2018

Figure 4. 3 Simulated result when there is gas leakage


from this simulated result we observed that there is a gas leakage or smoke. When the gas or smoke
concentration is greater than its threshold value, the relay automatically shut off the gas supply
(green LED show this status) and turn on the exhaust fan to sack out the leaked gases. And also the
status displayed on LCD and the blue LED blinks.

Page | 25
BDU-BiT, Faculty of Electrical and Computer Engineering 2018

Figure 4. 4 simulated result when there is fire


From this simulated result we observed that there is a fire. When the flame concentration is greater
than its threshold value, the fire extinguisher automatically extinguishes the fire. In addition, the
status displayed on LCD and the red LED blinks indicating that the fire extinguisher is on. The

Page | 26
BDU-BiT, Faculty of Electrical and Computer Engineering 2018

GSM sends the SMS “hello an operator there is fire” to the firefighting professionals or any
authorized person.

Figure 4. 5 Simulated result when there is over temperature


From this simulated result we observed that when the temperature value is greater than its threshold
value, the status displayed on LCD and the yellow LED blinks indicating that the environment
heating condition is over temperature. This helps the authorized person to check the cause of this
over temperature and take his own measurement. Over temperature may occur due to fire problems
or it may be due to the environmental air condition.

Page | 27
BDU-BiT, Faculty of Electrical and Computer Engineering 2018

Figure 4. 6 Simulated result when all case detected


From this simulated result we observed that;

➢ there is a gas leakage or smoke


➢ fire is detected
➢ over temperature is detected

Page | 28
BDU-BiT, Faculty of Electrical and Computer Engineering 2018

The gas or smoke concentration is greater than its threshold value and leads to the relay
automatically shut off the gas supply (green LED show this status) and turn on the exhaust fan to
suck out the leaked gases. And also, the status displayed on LCD and the blue LED blinks.
Flame concentration is greater than its threshold value and the fire extinguisher automatically
extinguishes the fire. In addition, the status displayed on LCD and the red LED blinks indicating
that the fire extinguisher is on. The temperature value is greater than its threshold value, the status
displayed on LCD and the yellow LED blinks indicating that the environment heating condition is
over temperature. The GSM sends the SMS:
➢ “Hello an operator there is fire”
➢ “Hello an operator there is gas leakage or smoke is detected”
➢ “Hello an operator there is over temperature” to the firefighting professionals or any
authorized person.

Page | 29
BDU-BiT, Faculty of Electrical and Computer Engineering 2018

Chapter Five

Conclusion and Recommendation for Future work

5.1 Conclusion

In this project we have successfully designed and simulated fire and gas leakage avoider system by
using fire extinguisher for home safety, NOC, mining and industrial applications. This system
detects the leakage of the flammable gases or smoke and take preventive action by turning off the
Gas supply valve, at same time an exhaust fan removes the leaked gas from the area to prevent a
fire occurrence as well as notify the authorized person about the leaked gas or smoke by sending
SMS through GSM module. In case the fire occurs, the fire extinguisher turns on to avoid the
accident. This project is simulated using the Arduino UNO based ATmega 328 processor. This
system can be used for industrial purpose especially in the industries where there is emulsion of
harmful and flammable gases. The cost involved in developing the system is significantly low and
it can be easily made available to the people and the usefulness of this device is immense. The
proposed system provides high and fast response than the manual operation during the critical
situations.

5.2 Recommendation for Future Work

This project gives us an opportunity to do a big project in future. The applications stated above are
some demo applications that are absolutely possible with its future development.
The project we have done works in a short range so, to get a good performance the following future
works should be included. System will require multiple sensor capability. In order to increase the
sensors capability, there must be a signal boosting mechanism like operational amplifiers to cover
large detection range. The installation of this system requires further studies and should use a
number of sensors at different locations to make the system broad. The system performance will be
better when it uses a robotic mechanism. We hope that, we will be able to complete all the features
needed for its ultimate applications.

Page | 30
BDU-BiT, Faculty of Electrical and Computer Engineering 2018

Reference

[1]. Intelligent Residential Security Alarm and Remote-Control System Based on Single Chip
Computer: LIU zhen-ya et al, 2014.
[2]. A New Approach of Automatic Localization System Using GPS and GSM/GPRS
Transmission: Lita et al, 2006.
[3]. Investigation of gas sensors for vehicle cabin air quality monitoring: Galatsis et al, 2002
[4]. Design of an Arduino based home fire alarm system with GSM module Chun-yuan, No. Iceoe,
pp.393-396,2011.
[5]. Apeh S. T et al, (2015) “Design and Development of Kitchen Gas Leakage Detection and
Automatic Gas Shut off System”, Journal of Emerging Trends in Engineering and Applied Sciences
(JETEAS). Scholarlink Research Institute Journals, pp. 222-228
[6]. R. Norsuraya, “Wireless Smoke Alarm Detector”, Bachelor Degree Project Work, Department
of Electrical Engineering, Faculty of Engineering, University Technology, Malaysia, 2012.
[7]. K. Fatimah, “Wireless Smoke Detector System”. Bachelor Degree Project Work, Department
of Electrical Engineering, Faculty of Engineering, University Technology Malaysia, 2011.
[8]. P. Meenakshi Vidya, S. Abinaya, G. Geetha Rajeswari, N. Guna,” Automatic LPG detection
and hazard controlling “published in April 2014.
[9]. H Mori, “Configuration-Free Propagation System for Early Fire Alerts,” 2016.
[10]. H Elbehiery, “Developed Intelligent Fire alarm system,” Journal Am. Sci., vol. 2, no. August,
pp.1016–1025, 2012.
[11]. Shin-Juh Chen, Chris Hovde et al, (2014) “Fire detection using smoke and gas sensors”.
Department of Fire Protection Engineering, University of Maryland, College Park, MD 207423031,
USA.
[12]. M. Kironji, “Evaluation of Fire Protection Systems in Commercial Buildings for Fire Safety
Optimization”, International Journal of Scientific and Research Publication, vol. 5, No. 10, pp. 2250-
3153, 2015.

Page | 31
BDU-BiT, Faculty of Electrical and Computer Engineering 2018

Appendix

Programming Code for Whole System:


#include<LiquidCrystal.h> //to use LCD library
//const int numRows = 4;
//const int numCols = 20;
LiquidCrystal lcd(12,11,5,4,3,2);
char phone_no[]="+251942321192";
int temp;
int smoke;
int flame;
int state = 0;
int state1 = 0;
int state2 = 0;
int smokepin=A0;
int flamepin=A1;
int temppin=A2;
int relaypin=7;
int fanpin=10;
int YELLOW=9;
int BLUE=6;
int RED=8;
void setup() {
Serial.begin(9600); //open the serial connection in band rate
delay(0.01);
lcd.begin(20,4);
lcd.clear();
pinMode(smokepin,INPUT);
pinMode(flamepin,INPUT);
pinMode(temppin,INPUT);

Page | 32
BDU-BiT, Faculty of Electrical and Computer Engineering 2018

pinMode(relaypin,OUTPUT);
pinMode(fanpin,OUTPUT);
pinMode(BLUE,OUTPUT);
pinMode(RED,OUTPUT);
pinMode(YELLOW,OUTPUT);
lcd.setCursor(0,0);
lcd.write("SMOKE:");
lcd.setCursor(0,1);
lcd.print("FLAME:");
lcd.setCursor(0,2);
lcd.print("Temp:");
digitalWrite(relaypin,LOW);
Serial.print("AT+CMGF=1"); //SET GSM TO TEXT MODE
Serial.println("\"");
delay(0.01);
Serial.print("AT+CMGS=\"");
Serial.print(phone_no);
Serial.println("\"");
}
void loop() {
smoke=map(smoke,0,1023,0,255);
lcd.setCursor(9,0);
lcd.print(smoke);
if(smoke>150 && state != 1){
digitalWrite(BLUE,HIGH);
digitalWrite(relaypin,HIGH);
lcd.setCursor(12,0);
lcd.print("L DETECTED");
digitalWrite(fanpin,HIGH);
Serial.print("HELLO AN OPRATEOR THERE IS GAS LEAKAGE OR SMOKE");
Serial.write(0x1A);

Page | 33
BDU-BiT, Faculty of Electrical and Computer Engineering 2018

Serial.write(0x0d);
Serial.write(0x0a);
delay(0.01);
}
else{
digitalWrite(BLUE,LOW);
lcd.setCursor(12,0);
lcd.print("NORMAL");
digitalWrite(fanpin,LOW);
Serial.print("HELLO AN OPRATEOR THERE IS NO GAS LEAKAGE OR SMOKE");
Serial.write(0x1A);
Serial.write(0x0d);
Serial.write(0x0a);
state = 1;
delay(0.01);

lcd.setCursor(9,1);
lcd.print(flame);
if(flame>195 && state1 !=1){
digitalWrite(RED,HIGH);
lcd.setCursor(12,1);
lcd.print("FIRE");
Serial.print("HELLO AN OPRATEOR THERE IS FIRE");
Serial.write(0x1A);
Serial.write(0x0d);
Serial.write(0x0a);

Page | 34
BDU-BiT, Faculty of Electrical and Computer Engineering 2018

delay(0.01);

}
else{
digitalWrite(RED,LOW);
lcd.setCursor(12,1);
lcd.print("A NORMAL");
Serial.print("HELLO AN OPRATEOR THERE IS NO FIRE");
Serial.write(0x1A);
Serial.write(0x0d);
Serial.write(0x0a);
state1 = 1;
delay(0.01);

}}
{
lcd.setCursor(6,2);
lcd.print(temp);
if(temp>50&&state2 !=1){
digitalWrite(YELLOW,HIGH);
lcd.setCursor(9,2);
lcd.print("C OVER");
Serial.print("HELLO AN OPRATEOR THERE IS OVER TEMPRATURE");
Serial.write(0x1A);
Serial.write(0x0d);
Serial.write(0x0a);
delay(0.01);
}
else {
digitalWrite(YELLOW,LOW);

Page | 35
BDU-BiT, Faculty of Electrical and Computer Engineering 2018

lcd.setCursor(9,2);
lcd.print("C NORMAL");
Serial.print("HELLO AN OPRATEOR THERE IS NORMAL TEMPRATURE");
Serial.write(0x1A);
Serial.write(0x0d);
Serial.write(0x0a);
state2 = 1;
delay(0.01);
}
}

delay(70000);
}

Page | 36

You might also like