Original Group 3 Proget Write Up

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 35

COMPUTER SCIENCE DEPARTMENT

WIFI SMOKE DETECTOR USING IOT

2023
ABSTRACTS

This project attempts to integrate a technology of how smoke detector circuitry works to give a positive output. In the
proposed system, a smoke detector upon senses smoke activates its alarm, smoke detectors causing them to emit a tone that
alerts residents that one of the smoke detectors senses smoke. They can be installed by a homeowner just as they would a
normal smoke detector. The proposed design is aiming to have Cost efficient system, Compact design, easily expandable,
Simple to install, Replaceable components. The system was tested indoor and outdoor with d ifferent distance and with the
presence of noise.

Fire can be made useful for various purposes. However, uncontrollable fire may result in property damage and human death.
The major factor in fire deaths is due to excessive smoke inhalation. Therefore, early detection of fire is crucial in fire
detection systems, the conventional fire detection system does not come with a false alarm prevention system. Besides, the
system is unable to tell the exact location of the fire. In this project, an Internet of Things (IoT) – based smoke alarm system
using Wi-Fi communication protocol was developed to overcome these problems. The proposed system consists of three
major parts which are the detector and the processing unit. The detector unit is an integration of ESP8266, MQ-9 sensor, and
buzzer. As the processing unit, NodeMCU is used to run the Arduino application which processes the data and performs
monitoring. This project aims to present a design that can automatically detect leakage and smoke in vulnerable premises. In
particular, a gas/smoke sensor has been used which has high sensitivity. This project was based on smoke and liquefied
petroleum gas. If these gases or smoke exceed the normal level then an alarm from the buzzer is generated immediately. The
advantage of this detection and alerting system over the manual method is that it offers quick response time and accurate
detection of an emergency and in turn leading faster diffusion of the critical situation.
INTRODUCTION

THE SMOKE

Smoke is a visible suspension of carbon or other particles in the air which emitted from a burning substance.

[1]. It is commonly an unwanted by-product of fires and fireplaces but may also be used for pest control, communication as
smoke signals, defense as smoke-screen and inhalation of tobacco or other drugs. Smoke inhalation is the primary cause of
death in victims of indoor fires. Many compounds of smoke from fires are highly toxic and poisoning. The most dangerous is
the carbon monoxide which leading to carbon monoxide poisoning. Those who inhale large amount of smoke quickly lead to
incapacitation and loss of consciousness. Furthermore, a cloud of smoke in contact with atmospheric oxygen has the potential
of being ignited either by another open flame in the area or by its own temperature. This leads to effects like back draft and
flashover.

[2]. In order to detect the presence of the smoke, smoke detection system is created. Every single electronic device in the
building may have possibility to produce ignition whether through short circuit or any other ways. Even the charging mobile
phone might contribute to the flame. Thus, awareness and consciousness of the importance of smoke detection system must
be planted on people mind. In addition, fires are more dangerous at night. For an instance, when the occupants of the house
are asleep, the smoke and deadly gases that produce during burning might kill them silently. Furthermore, it becomes worst
with the fact that the dense smoke reduces visibility. Most of fire victims died because of smoke and gas inhalation rather than
burns. Therefore, smoke detector must be placed at the major area inclusive every rooms. Number of lives can be saved by
placing the smoke detection system at the right place. A smoke detector is a very inexpensive safety tool. So, there is no
reason for not having smoke detection system in the house or office building.

THE WIFI

The discovery of the wireless wave by Hertz [1] has opened the doors for many technological revolutions. Most aspects of our
modern life have been affected by this important discovery. In 1864, Maxwell showed theoretically using mathematics that
electromagnetic waves could propagate in space [2]. The existence of electromagnetic waves was demonstrated in 1887 by
Hertz in an interesting experiment that confirmed Maxwell's equations. He also showed that electromagnetic waves could be
reflected from solid objects. Marconi began to pursue the idea of building a wireless communication system [3]. In 1896, he
gained a patent on his system and started the development of a commercial communication system in the next few years. In
1897, Alexander Popov [4] at the Imperial Russian Navy observed that when a vessel passes between two ships, it causes
interference of the communication between the two ships; he suggested that this phenomenon could be used for detecting
objects. In 1904, Hülsmeyer [5] was able to demonstrate the potential of using the wireless waves to detect the presence of a
metallic object. Eleven years later, Watt used the wireless waves to create an early warning system for airmen. World War I
accelerated the development in this field particularly for military communication applications, and in this period, the first
vacuum tubes were used in radio transmitters and receivers. World War II again accelerated the research in communication,
navigation, and radar. The development of televisions was continued after the war.

During World War II, the British Navy used the LORAN navigation system, which is a ground-based navigation system that
uses wireless signals, the system was developed in the 1940s [6]. The United States Navy launched the first satellite-based
navigation system TRANSIT in 1960, the system is based on a constellation of five satellites. The global positioning system
was launched in 1973 in the United States to overcome the limitations of existing navigation systems. It was opened for
civilian use in the 1980s, and it became fully operational in 1995.

In 1991, the former prime minister of Finland Harri Holkeri made the world's first global system for mobile communication
call with the mayor of the city of Tampere [7]. One year later, the first short messaging service was sent. Wi-Fi was invented
by a group of Australian scientists [8]; they were working for the Commonwealth Scientific and Industrial Research
Organization. Wi-Fi was first introduced for commercial use in 1997 when the 802.11 Committee was created; this led to the
IEEE802.11 standards, which define the communication standards for the wireless local area networks. In 1999, Wi-Fi was
introduced for home use.

Today, 130 years after Hertz's discovery, there is a wide range of applications of the wireless waves, such as activity
detection, gesture recognition, and elderly people monitoring. Future access points will be also able to recognize gestures and
take commands, analyze and classify different activities of people inside and outside the house, monitor the health conditions
of elderly people by monitoring their breath, fall etc.
SOLUTION DEVELOPMENT FOR THE PROBLEM

The study will focus on developing an IoT-based smoke alarm system. The process of developing the proposed system
involved a combination of hardware and software.

These are discussed as follows:

i. Hardware: NodeMCU ESP8266 Board, MQ-9 Sensor, Buzzer, Transistor, Jumper Wires.
ii. Software: Arduino IDE, Hotspot-Enabled Device

The prototype consists of a processing unit and detector. This system allows the user to monitor the condition of their
building remotely. Besides, the user will be informed through the hotspot enable device connected to the system when any
smoke is detected.

It also explains the software approach of the project as the coding or program used is C programing language. It also tells its
importance in both industrial activities and other applications and then gives a clear step-by-step design approach to
achieving this project.

Currently, the problem we are facing and will make advance improvements later if need be are;

 the proximity of the hotspot-enabled device to the system,


 the user should be able to receive SMS if there is any detection
1.6 SIGNIFICANT STUDY OF THE PROBLEM

The main Importance for designing a gas leakage detection system is the following:

 It is used in any building as a smoke or flammable gas detector

 It is used in houses as liquefied petroleum gas (LPG) detector

 It also detects alcohol so it is used as a liquor tester.

 The sensor has excellent sensitivity combined with a quick response time.

1.7 REPORT OF THE SOLUTION

This thesis contains five chapters. The first chapter is the introduction which includes the background study, the problem
faced currently, and the objectives of this project. Chapter 2 is about the reviewing of related works as well as all the theories
and concepts required for the achievements of this project. Chapter 3, which is the methodology, describes the overview of
the proposed system, detailed circuit design, and flowchart. Besides, the methods or ways used for the development of the
system will be discussed. Then, the results will be discussed in chapter 4 and concluded in chapter 5.
LITERATURE REVIEW

This chapter of the project presents the research and studies related to the project as well as the technologies and methods
applied. Important knowledge and theories necessary for the implementation of this project are also included.

2.1 Type of Smoke Detectors

The two most common smoke detectors used are photoelectric and ionization smoke detectors. Ionization smoke detectors are
good at detecting flaming fires while photoelectric smoke detectors are better at detecting smoldering fires.

2.1.1 Ionization Smoke Detector

Ionization smoke detector mainly consists of a detector chamber and a small amount of radioactive element called
Americium-241 with a half-life of 432 years. Such a radioactive material will emit radiation consisting of alpha particles.
Under normal conditions, electricity cannot flow through the air because air is considered as an insulator. However, when the
alpha particles are produced, they will collide with the air particles inside the ionization chamber. Such a collision causes the
air particles to be ionized thus producing ions and electrons as shown in the diagram below. Ionization is the process of
liberating an electron from a gas atom or molecule to form a positively charged ion. The positive ion will move toward the
negative electrode whilst the negatively charged electron to the positive electrode. Whenever there is the moving of electrons,
there is current flow. As long as the radioactive material continues to emit the alpha particles, there will be a continuous flow
of electric current. However, when the smoke gets inside the chamber, it will interfere with the flow of the alpha particles.
Fewer ions and electrons will be produced and therefore interrupts the current flow. When the current drops to a certain level,
it will trigger an alarm. When the smoke is gone, the number of current flows will return to normal and the alarm will stop
sounding. This type of smoke detector will be able to sense the small, invisible particles and therefore it provides a better
response toward a flaming fire.
Circuit of an Ion Chamber Detector (Lipu et al., 2010)

2.1.2 Photoelectric Smoke Detector

The diagram below shows the photoelectric smoke detector. There is a Light Emitting Diode (LED) and a photo sensor inside
the chamber. The function of the photo sensor is to detect light. The purpose of LED is to generate a beam of light across the
chamber but it is not directed toward the photo sensor. When smoke enters the chamber, it will cause the light beam to be
interrupted and scattered. Under this condition, some of the light might be scattered to the photo sensor unintentionally. When
the sensor detected a certain amount of light, it will trigger the alarm. The photoelectric smoke detector is better at detecting
slow-developing fire which produces more smoke instead of flames.

Photoelectric Smoke Detector (Lipu et al., 2010)


2.2 Related Works

In this section, related works are reviewed and discussed according to the types of technology used.

Numerous research studies of Smoke detection system have been carried out by different scholars in the past. R. Norsuraya
(2012), worked on 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.

W. Yingzhuo et al. (2010), worked on intelligent smoke detector controlled by the microcontroller. The difference with [8] is
that there was no RF application involved. Three main parts, the sensor, the microcontroller and the power device system
were applied. The alarm system was powered by AC supply using small transformer to step down the voltage in order to
achieve the most suitable power supply for the alarm system. This alarm system was designed to operate by sensing the
smoke alarm then the microcontroller receives the signal through analog digital input/output and then trigger the alarm. Just
like the previous, 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 does not have an alternative supply source such
as the DC supply.

O. Khalifa, S. Khan, & N. Usman (2008), worked on wireless smoke detection system. Photoelectric smoke detector was used
for the design and the system was designed such that once smoke is detected, the alarm would be actuated and signal sent to
other smoke detector in the vicinity. The individual relays in the other smoke detectors activates on sensing signals and in turn
actuates other alarms. The system was battery operated only. 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 it used
individual relays for each of the detectors thereby adding to the cost of the system and even causing a delay of other detectors
to trigger an alarm because of individual relays.

M. Lipu et al. (2010), worked on wireless security control system and sensor network for smoke and fire detection. The
system was designed for smoke detector to activate alarm signal that would activate relay. The relay was connected to
computer via parallel port that allows reading on alarm signal from smoke detector circuit. Receiving the alarm sends message
to specified mobile station. PIC microcontroller, temperature sensor, smoke sensor, low battery sensor, transmitter and
receiver were the hardware used for the design while the program and code were implemented using PIC microcontroller for
the software component. 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 was designed for smoke detector to
activate alarm signal that would activate relay.

K. Fatimah (2011), worked on wireless smoke detector system involving fabrication and programming process. The work was
divided into two parts, the hardware and software. The hardware part consisted of PIC microcontroller, LED, LCD, air
contaminant sensor and RF module while the software part, MPLAB IDE and PICKit2 were used to create and load the
program. 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.

C. Belo et al. (2014), worked on optical smoke detector. The design was to detect the intensity of smoke and give a warning
to people inside the building. Proteus was used for the design of the circuit and converted into printed circuit board. MPLAB
IDE software was used for the programming and simulation of the microcontroller. The system was design for the smoke
detector to detect smoke then the alarm and LED would be actuated. 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
concept of the system was to detect the intensity of smoke and trigger an alarm
2.3 Overview of IoT Architecture

Diagram below shows the IoT architecture of five layers.

The IoT Architecture (Khan et al., 2012)

2.3.1 Perception Layer

The first layer is the perception layer or objects layer. This layer might consist of various sensors and actuators which obtain
data or information from the environment. Various parameters can be measured such as pressure, temperature, position,
acceleration, light intensity, humidity, motion, and many more. The information obtained from the physical environment will
be converted into digital form for the use of digital devices.

2.3.2 Network Layer

This network layer can also be called as a “Transport Layer” or “Transmission Layer”. The function of this layer is to transfer
the information from the sensor to the service management layer via secure channels. The information can be transported
using wires or wirelessly by using technology such as Radio Frequency Identification (RFID), Third Generation Wireless
Mobile Telecommunications (3G), GSM, Infrared, ZigBee, Bluetooth, etc.

2.3.3 Middleware Layer

The 3rd layer which is the middleware layer is also known as the processing layer. In this layer, all the information from the
perception layer (which includes information from huge amounts of sensors) will be stored, analyzed and processed.
2.3.4 Application layer

The application layer is on the management of the application based on the information or data being processed in the
middleware layer. The purpose is to provide the services which can meet the customer’s needs. For example, the applications
implemented can be smart home, smart city, smart healthcare or industrial automation.

2.3.5 Business Layer

The purpose of having the business layer is to manage the overall IoT system activities and services. A business model,
flowchart, graph, etc. can be built according to the data obtained from the application layer.

2.4 Wireless Network Protocol

There are a few categories of wireless access technologies which are Wireless Metropolitan Area Networks (WMAN),
Wireless Wide Area Networks (WWAN), Wireless Local Area Networks (WLAN), and Wireless Personal Area Networks
(WPAN). The function of WPAN is to convey information over short distances among devices usually about 10 m or less.
Examples of protocols using this kind of technology are Bluetooth, Zigbee, and Ultra-wideband (UWB). WLAN can deliver
information at a speed of about 200 Mbps up to 100 m. Wi-Fi is one example of WLAN. WMAN is a network that provides
communication between buildings or locations which is a few miles from one another within a region. The most popular
wireless metropolitan area network is Worldwide Interoperability for Microwave Access (WiMAX), which can reach a speed
of 70 Mbps over several kilometers. The network which can provide connectivity for a larger area is WWAN. The area can be
between cities or even countries. The technologies that used this kind of network are GSM, General Packet Radio Service
(GPRS), and Universal Mobile Telecommunication System (UMTS).

2.4.1 Bluetooth

Even though Bluetooth has been implemented many years ago, it is still widely used in today’s wireless communication. Even
recent smart watch technology also uses Bluetooth technology to communicate with smartphones. One of the reasons is that it
only requires a small amount of power. However, it has a low data rate which is about 1-2 Mbps, and a connectivity range of
10 m or less.
2.4.2 ZigBee

ZigBee is known as a mesh Local Area Network (LAN) protocol operating on 2.4 GHz and it is mainly built for home
automation. Due to this reason, it has been designed in such a way that it consumes very less power. However, the drawback
of low energy consumption is the low data rate which is around 0.25 Mbps. In a mesh network, the connection is spread out
among intermediate devices. Therefore, data can be transmitted over longer distances.

2.4.3 Wi-Fi

Wi-Fi uses Internet Protocol (IP) to communicate between endpoint devices and LAN. In order to establish a Wi-Fi
connection, it is required to have a wireless router that is connected to the network. One of the disadvantages of Wi-Fi is that
it can be easily subjected to interference. It can be affected by microwaves, cordless phones, and much other electronic
equipment.

2.4.4 Wi-Max

Wi-Max is a technology that can provide long-range wireless networking. Usually, it will be used to provide portable mobile
broadband connectivity across cities and countries. It has a longer data-sending rate as well as a longer connectivity range as
compared to Wi-Fi.

2.4.5 GSM

GSM is a digital mobile telephone standard that has been developed by the European Telecommunications Standards Institute
(ETSI). However, today GSM has already become the global standard for mobile communications

2.5 Comparison of Characteristics for Different Wireless Protocols

The table below shows the comparison of characteristics for different wireless protocols which have been discussed in the
previous section
METHODOLOGY
This methodology section of this project shall discuss about the following connections of the devises:

1. The MQ9 (SMOKE DETECTOR SENSOR)


2. The ESP8266 NodeMCU Board
3. The Buzzer
4. The Transistor
5. The 9V Battery
6. The Jumper Wires

 THE MQ9 (SMOKE DETECTOR SENSOR)

MQ-9 Semiconductor Sensor for CO/Combustible Gas Sensitive material of MQ-9 gas sensor is SnO2, which with lower
conductivity in clean air. It make detection by method of cycle high and low temperature, and detect CO when low
temperature (heated by 1.5V). The sensor’s conductivity is more higher along with the gas concentration rising. When high
temperature (heated by 5.0V), it detects Methane, Propane etc. combustible gas and cleans the other gases adsorbed under low
temperature. Please use simple electro-circuit, Convert change of conductivity to correspond output signal of gas
concentration. MQ-9 gas sensor has high sensitivity to Carbon Monoxide, Methane and LPG. The sensor could be used to
detect different gases contains CO and combustible gases; it is with low cost and suitable for different application.

The MQ9 smoke detector sensor was connected vertically on the bread board, the sensor was seen connected on the bread
board vertically to create a bridge for the output separately because connecting it parallel will give a wrong connection which
leads to the sensor damage on power supply.

The four (4) output pins could be seen that projected out of the sensor which the first pair is the analog and digital pins while
the second pair is the power supply pin which brings in the power into the sensor, the first pair pins; the analog and digital
labeled AO and DO pins give the logic processing output result while the other pair pins; Ground (GND) and VCC (Common
Collector Voltage) input in the 3.3v power to start up the sensor.
INPUT PINS

 VCC (Common Collector Voltage): the positive input terminal pin that gives the sensor 3.3v power supply from
the board, as soon the power is being supplied to the sensor the led on.
 Ground (GND): the negative input terminal pin of the sensor which needs to be connected to ground.

OUTPUT PINS

 DO (Digital Output): Digital Output pin give out the digital logic processing on the sensor.
 AO (Analog Output): Analog Output pin give out the analog logic processing on the sensor.

3.1 Overview of the System

The proposed system consists of two major parts, namely the processing unit, and the detector. The detector is built by
integrating the existing ionization smoke detector, NodeMCU ESP8266, MQ-9 sensor, transistor, and buzzer.
NodeMCUESP8266 is responsible for obtaining the sensors’ readings and triggering the buzzer. The details regarding the
communication protocol will be further explained later.

The primary processing unit used in this system is NodeMCU ESP8266 with an Arduino IDE program running on it.
Arduino IDE is mainly a text editor for writing code, a message area, a text console, a toolbar with buttons for common
functions, and a series of menus. It connects to the Hardware to upload programs and communicate with them – a C/C++
program with the ability to track, control, and automate devices. The information collected from the sensors is sent to the
NodeMCU and displayed on the system or hotspot-enabled device in real-time. At the same time, the values will also be
stored in the Arduino Serial Monitor Database when connected. The processing unit will carry out responses according to the
inputs received. The final decision of the system depends on both the sensor’s readings and the user’s response

3.2 Hardware

All the hardware used to develop the system are discussed in the following subsections.

3.2.1 NodeMCU ESP8266

As mentioned before, NodeMCU ESP8266 is used as the primary processing unit for the system. It is known as a powerful
single-board computer that can be used for various applications. The component of NodeMCU is shown in the diagram
below.

Specification:

 Microcontroller: Tensilica 32-bit RISC CPU Xtensa LX106


 Operating Voltage: 3.3V
 Input Voltage: 7-12V
 Digital I/O Pins (DIO): 16
 Analog Input Pins (ADC): 1
 UARTs: 1
 SPIs: 1
 I2Cs: 1
 Flash Memory: 4 MB
 SRAM: 64 KB
 Clock Speed: 80 MHz
 USB-TTL based on CP2102 is included onboard, Enabling Plug n Play
 PCB Antenna
NodeMCU ESP8266

Pin Category Name Description

Power Micro-USB, 3.3V, Micro-USB: NodeMCU can be powered through the USB port
GND, Vin
3.3V: Regulated 3.3V can be supplied to this pin to power the board

GND: Ground pins

Vin: External Power Supply

Control Pins EN, RST The pin and the button reset the microcontroller

Analog Pin A0 Used to measure analog voltage in the range of 0-3.3V

GPIO Pins GPIO1 to GPIO16 NodeMCU has 16 general purpose input-output pins on its board

SPI Pins SD1, CMD, SD0, NodeMCU has four pins available for SPI communication.
CLK
UART Pins TXD0, RXD0, NodeMCU has two UART interfaces, UART0 (RXD0 & TXD0) and UART1 (RXD1 & TXD1).
TXD2, RXD2 UART1 is used to upload the firmware/program.

I2C Pins NodeMCU has I2C functionality support but due to the internal functionality of these pins, you have
to find which pin is I2C.

3.2.2 MQ-9 Sensor

MQ9 Gas Sensor is a Metal Oxide Semiconductor (MOS) type Gas Sensor of the MQ Gas Sensors family involving MQ
2, MQ 4, MQ-3, MQ 135, etc. It is mainly used to detect gases like Carbon Monoxide, Methane, and Propane, etc.
This MQ9 Smoke Sensor contains a sensing element, mainly aluminum-oxide-based ceramic, coated with Tin dioxide
(SnO2), enclosed in a stainless-steel mesh. Whenever gas comes into contact with the sensing element, the resistivity of the
element changes. The change is then measured to get the concentration of the gases present. It has a small heating element
present which is needed to preheat the sensor to get it in the working window. It can detect LPG, Propene, Hydrogen, Carbon
Monoxide, and Methane Gas concentrations. It finds uses in detecting gas leakage in pipelines, Alarm applications in case of
a gas leak at home as CO is a very harmful gas and can kill a person if present over 300PPM.

There are four pins on the MQ-9 Sensor:

Pin Name Description


VCC Connect to power supply 3.3 V
DOUT Digital output
AOUT Analog output
GND To be connected to the ground

Specification

The operating Voltage is +5V


Can be used to measure or detect LPG, Propane, CO, and Methane
Analog output voltage: 0V to 5V
Digital Output Voltage: 0V or 5V
Long life and Low Cost
Heater consumption ≤350mW
The Sensitivity of the Digital Output pin can be varied using the potentiometer

3.2.3 Breadboard

A breadboard, solderless breadboard, or protoboard is a construction base used to build semi-


permanent prototypes of electronic circuits. Unlike a perfboard or stripboard, breadboards do not require soldering or
destruction of tracks and are hence reusable. For this reason, breadboards are also popular with students and in technological
education.
A variety of electronic systems may be prototyped by using breadboards, from small analog and digital circuits to
complete central processing units (CPUs).
Compared to more permanent circuit connection methods, modern breadboards have high parasitic capacitance, relatively
high resistance, and less reliable connections, which are subject to jostle and physical degradation. Signaling is limited to
about 10 MHz, and not everything works properly even well below that frequency.
Breadboards have many tiny sockets (called 'holes') arranged on a 0.1" grid. The leads of most components can be pushed
straight into the holes. ICs are inserted across the central gap with their notch or dot to the left. Wire links can be made with
single-core plastic-coated wire of 0.6mm diameter (the standard size), this is known as 1/0.6mm wire.

The top and bottom rows are linked horizontally all the way across as shown by the red and black lines on the diagram. The
power supply is connected to these rows, + at the top and 0V (zero volts) at the bottom.
The other holes are linked vertically in blocks of 5 with no link across the center as shown by the blue lines on the diagram.
Notice how there are separate blocks of connections to each pin of ICs.
Larger Breadboards
On larger breadboards, there may be a break halfway along the top and bottom power supply rows. It is a good idea to link
across the gap before you start to build a circuit, otherwise, you may forget and part of your circuit will have no power!

3.2.4 Buzzer

A buzzer or beeper is an audio signaling device, which may be mechanical, electromechanical, or piezoelectric (piezo for
short). Typical uses of buzzers and beepers include alarm devices, timers, training, and confirmation of user input such as a
mouse click or keystroke.
Types
1. Electromechanical
Early devices were based on an electromechanical system identical to an electric bell without the metal gong. Similarly,
a relay may be connected to interrupt its own actuating current, causing the contacts to buzz (the contacts buzz at line
frequency if powered by alternating current) Often these units were anchored to a wall or ceiling to use as a sounding board.
The word "buzzer" comes from the rasping noise that electromechanical buzzers made.
2. Mechanical
A joy buzzer is an example of a purely mechanical buzzer and they require drivers. Other examples of them are doorbells.
3. Piezoelectric
A piezoelectric element may be driven by an oscillating electronic circuit or other audio signal sources, driven with
a piezoelectric audio amplifier. Sounds commonly used to indicate that a button has been pressed are a click, a ring, or a beep.
A piezoelectric buzzer/beeper also depends on acoustic cavity resonance or Helmholtz resonance to produce an audible beep
3.2.5 Transistor

A transistor is a miniature semiconductor that regulates or controls current or voltage flow in addition amplifying and
generating these electrical signals and acting as a switch/gate for them. Typically, transistors consist of three layers, or
terminals, of a semiconductor material, each of which can carry a current.
Transistors are one of the key components in most of the electronic devices that are present today. Developed in the year 1947
by three American physicists John Bardeen, Walter Brattain and William Shockley, the transistor is considered as one of the
most important inventions in the history of science. There are three terminals for a transistor. They are:

Base: This is used to activate the transistor.

Collector: It is the positive lead of the transistor.

Emitter: It is the negative lead of the transistor.


3.2.6 Jumper Wire

Jumper wires are simply wires that have connector pins at each end, allowing them to be used to connect two points to each
other without soldering. Jumper wires are typically used with breadboards and other prototyping tools in order to make it easy
to change a circuit as needed. Though jumper wires come in a variety of colors, the colors don’t actually mean anything. This
means that a red jumper wire is technically the same as a black one. But the colors can be used to your advantage in order to
differentiate between types of connections, such as ground or power.
Jumper wires typically come in three versions: male-to-male, male-to-female and female-to-female. The difference between
each is in the end point of the wire. Male ends have a pin protruding and can plug into things, while female ends do not and
are used to plug things into. Male-to-male jumper wires are the most common and what you likely will use most often. When
connecting two ports on a breadboard, a male-to-male wire is what you’ll need.

Image of a Jumper Wire

3.2.7 9V Battery

The nine-volt battery, or 9-volt battery, is an electric battery that supplies a nominal voltage of 9 volts. Actual voltage
measures 7.2 to 9.6 volts, depending on battery chemistry. Batteries of various sizes and capacities are manufactured; a very
common size is known as PP3, introduced for early transistor radios. The PP3 has a rectangular prism shape with rounded
edges and two polarized snap connectors on the top. This type is commonly used for many applications including household
uses such as smoke and gas detectors, clocks, and toys.

The nine-volt PP3-size battery is commonly available in primary zinc-carbon and alkaline chemistry, in primary lithium iron
disulfide and lithium manganese dioxide (sometimes designated CRV9), and in rechargeable form in nickel-cadmium (Ni–
Cd), nickel-metal hydride (Ni–MH) and lithium-ion. Mercury batteries of this format, once common, have been banned in
many countries due to their toxicity.
The 9v battery will be use to power the buzzer.

Image of a 9V Battery

3.2.8 Micro-USB Cable

The micro-USB cable I use to connect the NodeMCU ESP-8266 board to a power supply

Image of a Micro-USB Cable

3.3 Software

3.3.1 Arduino IDE

Arduino Integrated Development Environment (IDE) is a free platform application that is written using a simplified version of
C/C++. It is mainly used to write and upload programs into the Arduino board. This IDE needed for writing and uploading
codes to the NodeMCU ESP8266.
Image of Arduino IDE

3.4 Connection

Connection of NodeMCU ESP8266 to MQ-9 Sensor

• Firstly, the MQ-9 sensor will be pinned down on the breadboard

• For connecting the NodeMCU ESP8266 to MQ-9 sensor we will be using the male-female jumper wire

• We will connect a jumper wire from the VCC of the MQ-9 sensor to the 3v pin on the NodeMCU ESP8266 board

• After that we will connect a jumper wire from the GND of the MQ-9 sensor to the G pin on the NodeMCU
ESP8266 board

• After that we will connect a jumper wire from the A0 of the MQ-9 sensor to the A0 pin on the NodeMCU ESP8266
board

Connection of Buzzer

• First, we connect the positive pole of the buzzer to the positive pole of the 9v battery

• After that we will pin in our transistor on the breadboard

• The negative pole of the buzzer was connected to the base of the transistor on the breadboard
• We connected a jumper wire from the D0 pin of the NodeMCU ESP8266 board to the emitter of the transistor on the
breadboard

Connection of 9V Battery

• The positive pole of the battery has been connected to the positive pole of the buzzer in the previous step

• The negative pole of the battery was connected to the collector of the transistor on the breadboard

• After that a jumper wire was connected from the collector of transistor on the breadboard to the ground of MQ-9
sensor on the breadboard

• After that our connection is done.

3.5 Circuit Design


3.6 Code

#include <ESP8266WiFi.h>

const char *ssid = "project"; // Enter your WiFi Name

const char *pass = "123456789"; // Enter your WiFi Password

WiFiServer server(80);

int buzzer = D0;

void setup() {

Serial.begin(115200);

Serial.println("Connecting to ");

pinMode(buzzer, OUTPUT);

Serial.println(ssid);

WiFi.begin(ssid, pass);

while (WiFi.status() != WL_CONNECTED)

delay(550);

Serial.print(".");

Serial.println("");

Serial.println("WiFi connected");

Serial.print("IP Address: ");

Serial.println(WiFi.localIP());

server.begin();

void loop() {

delay(500);
int air_quality = ((analogRead(A0)/1024.0)*100.0);

Serial.println(air_quality);

if(air_quality >=60){

digitalWrite(buzzer, HIGH);

}else {

digitalWrite(buzzer, LOW);

WiFiClient client = server.available();

if ( client.connected()) { // loop while the client's connected

// HTTP headers always start with a response code (e.g. HTTP/1.1 200 OK)

client.println("HTTP/1.1 200 OK");

client.println("Content-type:text/html");

client.println("Connection: close");

client.println("Refresh: 1"); // update the page after 1 Sec.

client.println();

// Display the HTML web page

client.println("<!DOCTYPE html><html>");

client.println("<head><meta name=\"viewport\" content=\"width=device-width, initial-


scale=1\">");

client.println("<link rel=\"icon\" href=\"data:,\">");

// Web Page Heading

client.println("<body><h1 style=\"color:orange;\"> Smoke Measurement </h1>");

client.println("<body><p style=\"color:blue;\"> Smoke Level (in percentage) = " +


String(air_quality) +" %"+ " </p>");

if(air_quality <= 20.0 ){

client.println("<body><p style=\"color:green;\"> Normal </p>");


} else if (air_quality > 20.0 && air_quality < 60.0){

client.println("<body><p style=\"color:purple;\"> Medium </p>");

} else {

client.println("<body><p style=\"font-size:200%; color:red\"> Danger!!! </p>");

client.println("</body></html>");

delay(1000);

3.7 Flow Chart

Based on the flowchart in the diagram below, when the ionization smoke detector is triggered or the carbon monoxide (CO)
concentration is above or equal to the set value, a danger will be displayed on the device connected to the system and the
buzzer will start its sound
Gottuk et al. (2002) found that with only a photoelectric detector, false alarm will trigger more often. Therefore, ionization
smoke detector is used in the proposed system as it has been tested to reduce false alarm. Furthermore, the combination of
ionization detector and CO sensor is able to speed up the fire detection rate.

The threshold value of the concentration of CO are chosen based on the research paper by Goldstein (2008) as shown in
Figure 3.30. Low threshold values are chosen so that the victim or user can have more time to response.
IMPLEMENTATION

SYSTEM IMPLEMENTATION

The system consists of several stages. In this section a brief description for each stage will be presented. Figure 1 shows the
block diagram of wireless smoke detection system.

Figure 1: Block Diagram of Wireless Smoke Detection System

A. Smoke Detector Smoke Detector is a sensitive device against the smoke. Whether using ionization or photoelectric
7. technique, the presence of the smoke is detected. The components used in this project are a The MQ9 (SMOKE
DETECTOR SENSOR), The ESP8266 NodeMCU Board, The Buzzer, The Transistor, The 9V Battery, The Jumper
Wires. When the smoke is detected, the buzzer gives alarm and a reading on the monitor. Apart from that, number
of smoke detector is one of the important things in placing them in the building. In fact, the smallest building needs
more than one smoke detection system. The exact number depends on two things which are the number of levels in
the building and the number of rooms. As an example for new home, the standard requires a smoke alarm in each
bedroom, one outside the bedroom area that is close enough to be heard through closed doors and a minimum of one
on each level of the home. The objective of having a smoke alarm outside the bedroom area is to alert sleeping
occupants of a fire
CONCLUSION

Smoke detectors are great because they save lives. You should place a smoke detector a certain inches far from a wall.
Smoke detectors must always be associate exceedingly house or an housing. There are totally different shapes of
smoke detectors, however those that area unit a circle form are those who are in most homes. There also are smoke
detectors formed as noses, to smell for smoke. There should be a minimum of two or three smoke detectors in your
home. You should install a smoke detector on each floor of a house. Always have a smoke detector and fire alarm
system in your home for your own safety the primary purpose of this project is to develop an Internet of Things (IoT) based
Smoke Alarm System. The proposed system was able to provide solutions to the problem related to the conventional system.
To reduce false alarm a MQ-9 sensor was used. Besides, user will be able to monitor the condition of the surrounding through
their device.
When it comes to fire protection, it's satisfactory to have a smoke detector in every bedroom and corridor way, in addition to
on each floor in our domestic. With such a lot of smoke detector, we will rest assured our home is blanketed from the
unthinkable. Smoke detector is one of the easiest and coffee expensive. Most of industries use it, as it works fatly to protect
and handiest. This machine can be of fantastic in domestic as well as business settings to detect smoke and alert humans on an
approaching fire on the grounds that smoke is a precursor for hearth, instead of counting on heat/temperature sensors which
sounds alarm while the hearth has already commenced.

Experiments were also conducted to prove the functionality of the system. The system can be applied in residential and
commercial buildings.
REFERENCES

Proceedings of the International Conference on Computer and Communication Engineering 2008 May 13-15, 2008 Kuala
Lumpur, Malaysia

Khalili, Abdullah; Soliman, Abdel-Hamid; Asaduzzaman, Mtd; Griffiths, Alison (March 2020). Wi-Fi Sensing.

1. 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.

2. V. Pati, S. Joshi, R. Sowmianarayanan, M. Vedavahi, & R. Rana, “Simulation of Intelligent Fire Detection and Alarm
System for a Warship”. Institute of Armament Technology. Vol. 39, pp. 79-94, 1989.

3. G. Heskestad, “Escape Potentials from Apartments Protected by Fire Detectors in High-Rise Building”, Department of
Housing and Urban Development, Factory Mutual Research Corp., Norwood, Massachusetts. Final Technical Report, 1984.

4. A. Lerardi, & J. Barnett, “A Methodology for Predicting Smoke Detector Response”. WPI Center for Fire Safety Studies,
Worcester, 2000. Retrieved from: ierardi@wpi.edu, on 2nd April, 2017.

5. M. Wieder, & C. Smith, “Fire Inspection and Code Enforcement”, (6th Edition.), Oklahoma City, Fire Protection
Publication, Oklahoma State University, 1998

6. E. Omorogiuwa and P. Elechi “GSM Based Intelligent Home Security System for Intrusion Detection”, International
Journal of Engineering and Technology, Vol. 4 No. 10, pp. 596-605, 2014.

7. R. Norsuraya, “Wireless Smoke Alarm Detector”, Bachelor Degree Project Work, Department of Electrical Engineering,
Faculty of Engineering, University Technology, Malaysia, 2012.

8. W. Yingzhuo, Z. Shaowu, & L. Yanwei, “Smoke Detection Based on Multi-Spectral Images. Spectroscopy and Spectral
Analysis, vol. 30, no. 4, pp. 1061-1064, 2010.

9. O. Khalifa, S. Khan, & N. Usman, “Wireless Smoke Detection System”, Proceedings of the International Conference on
Computer and Communication Engineering. International Islamic University Malaysia, pp. 13-15, 2008.
10. M. Lipu, T. Karim, L. Rahman, & F. Sultana, “Wireless Security Control System and Sensor Network for Smoke and
Fire Detection”, Advanced Management Science, Proceedings of IEEE International Conference, vol. 3, no. 153, pp. 9-11,
2010.

11. K. Fatimah, “Wireless Smoke Detector System”. Bachelor Degree Project Work, Department of Electrical Engineering,
Faculty of Engineering, University Technology Malaysia, 2011.

12. Asif, O., Hossain, M. B., Hasan, M., Rahman, M. T. & Chowdhury, M. E. 2014. FireDetectors Review and design of an
automated, quick responsive fire-alarm system based on SMS. International Journal of Communications, Network and System
Sciences, 7, 386.

13. Chakkor, S., Cheikh, E. A., Baghouri, M. & Hajraoui, A. 2014. Comparative performance analysis of wireless
communication protocols for intelligent sensors and their applications. arXiv preprint arXiv:1409.6884.

14. Chen, T.-H., Yin, Y.-H., Huang, S.-F. & Ye, Y.-T. The smoke detection for early firealarming system base on video
processing. Intelligent Information Hiding and Multimedia Signal Processing, 2006. IIH-MSP'06. International Conference
on, 2006. IEEE, 427-430

15. Gaikwad, K., Quadri, A., Akshada, S. & Reshma, Z. 2016. Fire Monitoring and Control System. Proceedings of
International Research Journal of Engineering and Technology (IRJET).

16. Goldstein, M. 2008. Carbon monoxide poisoning. Journal of Emergency Nursing, 34, 538-542.

17. Khan, R., Khan, S. U., Zaheer, R. & Khan, S. Future internet: the internet of things architecture, possible applications and
key challenges. Frontiers of Information Technology (FIT), 2012 10th International Conference on, 2012. IEEE, 257-260.

18. Kong, S. G., Jin, D., Li, S. & Kim, H. 2016. Fast fire flame detection in surveillance video using logistic regression and
temporal smoothing. Fire Safety Journal, 79, 37- 43.

19. Kwon, O.-H., Cho, S.-M. & Hwang, S.-M. Design and implementation of fire detection system. Advanced Software
Engineering and Its Applications, 2008. ASEA 2008, 2008. IEEE, 233-236.

You might also like