Mini Project Report
Mini Project Report
CONTENTS
ACKNOWLEDGEMENT.......................................................................................... i
ABSTRACT............................................................................................................... ii
CHAPTER 1: INTRODUCTION........................................................................... 3
CHAPTER 2: LITERATURE SURVEY............................................................... 6
CHAPTER 3: PROPOSED SYSTEM.................................................................... 7
3.1 DESCRIPTION OF HARDWARE.............................................................. 8
3.1.1 NODE MCU……………………………………………………..….... 8
3.1.2 DHT11………………………………………………………………...10
3.1.3 FLAME SENSOR…………………………………………………..…11
3.1.4 MQ2 SENSOR……………………………………………………..… 12
3.1.5 BUZZER………………………………………………………..……. 13
LIST OF FIGURES
FIGURE NUMBER PAGE NUMBER
CHAPTER-1
INTRODUCTION
In this present scenario the life of people is something that cannot be taken for granted
.Fire when considered can be taken as threat to people’s life. Alerting people minutes before
occurrence of disaster is very much essential to save human life and reduce property loss.A
key aspect of fire detection is to identify a developing fire emergency in a timely manner, and
to alert the building's occupants . This is the role of fire alerting systems. Depending on the
anticipated fire scenario the system can provide several main functions. First they provide a
means to identify a developing fire through the sensors and second, they alert building
occupants to a fire condition and the need to evacuate through the transmission of an alarm
notification signal .
Fire is very deadly and it leads to loss of human life and property. Fire detection
systems are necessary to reduce the destruction of personal belongings and caused by fire
both man made and induced. The National Crime Records Bureau indicates that there have
been a total of 113961 fatalities due to fire accidents during the years 2010 to 2014. Fire
accidents claim roughly 65 victims every day. A total of 1.21 lakh fire accidents occurred
between the years 2010 and 2014. Thankfully by the usage of more smart fire detecting
systems the number of fire accidents have been reducing steadily. One of the most destructive
properties of fire is that it spreads exponentially and with the right medium can spread
uncontrollably. This is why timely detection of fire is necessary for avoiding a fire hazard.
The Internet of Things is a collection of sensor, actuators, software, electronics embedded
with home appliances, physical devices and vehicles which connect with each other to
connect and exchange date which helps in increasing the efficiency of everyday appliances
using computer based systems. Not only does it help in improving the efficiency of a device\
but also has economic benefits. Iot is just another way to make everyday life easier for
humans by developing smart devices. IoT devices have increased 31% per and wasat 8.4
billion in the year 2017. The total count is set to reach 30 billion devices by the year
2020.The market value for IoT devices is also set to increase to $7.1 million by the year
2020. Iot involves connecting objects beyond the range of standard devices which are used
for everyday purposes. In this paper we have developed an IoT based fire alarm with
additional safety and verification methods. The devices uses a wide variety of sensors- PIR
sensor, to detect the exact location of the origin of fire. Gas sensor, it detects the presence of
any flammable gas like CO2. Temperature sensor, detects of there is any unusual change in
the room temperature.
NODEMCU:
The Node MCU is an open source firmware and development kit that helps you to
prototype your IoT product with Arduino IDE or in few Lau script lines. It includes firmware
which runs on the ESP8266 Wi-Fi SoC and hardware which is based on the ESP-12 module.
In this tutorial we explain how to use Node MCU with Arduino IDE.
DHT11:
This DHT11 Temperature and Humidity Sensor features a calibrated digital signal
output with the temperature and humidity sensor capability. It is integrated with a high-
performance 8-bit microcontroller. Its technology ensures the high reliability and excellent
long-term stability. This sensor includes a resistive element and a sensor for wet NTC
temperature measuring devices. It has excellent quality, fast response, anti-interference
ability and high performance.
FLAME-SENSOR:
It is one kind of detector which is mainly designed for detecting as well as responding
to the occurrence of a fire or flame. The flame detection response can depend on its fitting. It
includes an alarm system, a natural gas line, propane & a fire suppression system. This sensor
is used in industrial boilers. The main function of this is to give authentication whether the
boiler is properly working or not. The response of these sensors is faster as well as more
accurate compare with a heat/smoke detector because of its mechanism while detecting the
flame.
MQ2:
The MQ-2 is a flammable gas and smoke sensor detects the concentrations of
combustible gas in the air and outputs its reading as an analog voltage.The sensor can
measure concentrations of flammable gas of 300 to 10,000 ppm.The MQ-2 gas sensor is
sensitive to LPG, i-butane, propane, methane, alcohol, Hydrogen and smoke.They are used in
gas leakage detecting equipments in family and industry and in portable gas detector.
BUZZER:
A buzzer is a small yet efficient component to add sound features to our
project/system. It is very small and compact 2-pin structure hence can be easily used
on breadboard, Perf Board and even on PCBs which makes this a widely used component in
most electronic applications.
There are two types are buzzers that are commonly available. The one shown here is a
simple buzzer which when powered will make a Continuous sound, the other type is called a
readymade buzzer which will look bulkier than this and will produce a Beep. Beep. Beep.
Sound due to the internal oscillating circuit present inside it. But, the one shown here is most
widely used because it can be customised with help of other circuits to fit easily in our
application.
ARDUINO:
Arduino was born at the Ivrea Interaction Design Institute as an easy tool for fast
prototyping, aimed at students without a background in electronics and programming. As
soon as it reached a wider community, the Arduino board started changing to adapt to new
needs and challenges, differentiating its offer from simple 8-bit boards to products
for IoT applications, wearable, 3D printing, and embedded environments. All Arduino boards
are completely open-source, empowering users to build them independently and eventually
adapt them to their particular needs. The software, too, is open-source, and it is growing
through the contributions of users worldwide.
BLYNK:
Blynk is a Platform with IOS and Android apps to control Arduino, Raspberry Pi and
the likes over the Internet. It’s a digital dashboard where you can build a graphic interface for
your project by simply dragging and dropping widgets.
CHAPTER-2
LITERATURE SURVEY:
Smoke is primarily a visible suspension of carbon particles in air normally caused by
burning of substances. Smoke detector senses smoke only and must be connected to a fire
alarm system control panel. Smoke detectors are a detection device only – not an alarm.
Smoke alarm detects smoke and sounds an alarm. Smoke detectors are used in large buildings
and commercial areas where as smoke alarms are found in private residences. Early
developments in design of smoke alarm began in 1922 with observations by Greinacher and
later by Walter Jaeger in 1930.Smoke alarms use basically two types of sensors to detect
smoke either through ionization or through photoelectric methods. Smoke alarms may
contain either or both methods.
Ionization smoke alarms were introduced in U.S in the mid 1950’s. These early
models used 240 volts of AC to operation. Smoke alarms using photoelectric technology
were introduced in the early 1960’s. Early smoke detectors require high voltage, continuous
research of smoke alarms lead to the development of battery powered easily portable smoke
alarms. These made an increase in the use of smoke alarms and easily installable in housing
premises too. The most recent developments have made smoke detectors even smarter. These
smarter smoke detectors can be easily monitored and are accessible from any place.
Smoke alarms helped to save thousands of lives in the United States since their
introduction and extensive use during the past two decades (Istre, 2000). There is good news
to know that there is at least one smoke alarm in the 90% of homes in the United States.
Universal fire-related damages result in more than 300,000 demises (Cooper, 2011). The U.S.
Fire Administration reports stated that two thirds of the people who die annually in fires
where smoke alarms are either not present or not working (Taylor, 2014).
CHAPTER-3
PROPOSED SYSTEM
Fires are the one of the most widespread cause of deaths by accident. Instant alerting
to the fire department is necessary to ensure immediate action. Every minute can save many
lives in such situations. So here we propose an IOT based automatic fire department alerting
system that instantly and automatically alerts the management/people in that building so that
people can act immediately without waiting for fire department.
The system uses Flame sensor to detect temperature and alerts over IOT. Here we use
NODEMCU (a WIFI module attached to it) which can work using WIFI connectivity. Using
NODEMCU we can monitor whether sensor is triggered. The system uses WIFI connection
to access IOT server and transmit data about this incident over internet.
We are going to use Blink platform to develop web based IOT interface. As soon as
Blink system receives the sensor data it checks the device ID from which the data was sent
and displays device ID. The system now displays fire incident with alarm buzzer over
internet so that the respective management personnel are alerted about the incident and take
required action to reduce debris.
In this case you need some additional hardware. To connect Arduino to Ethernet, you
need Arduino compatible Ethernet Shield. If WiFi is the option, then you need Arduino
compatible WiFi shield.
But let’s forget about all these Shields. Also forget about Arduino as well. Now we
have NodeMCU which is an Internet of Things Development board for a cheap price but with
more capabilities. NodeMCU is an open source IoT platform. Basically the NodeMCU uses
Lua scripting language to program. But don't worry. Your familiar Arduino IDE also can be
used to Program NodeMCU. NodeMCU runs an ESP8266 WiFi SoC from Espress if
systems. NodeMCU has a built in WiFi module. That means you can easily connect it to
WiFi with few lines of codes.
PINS:
NODEMCU provides access to the GPIO (General Purpose Input/Output).
0 [*] GPIO16
1 GPIO5
2 GPIO4
3 GPIO0
4 GPIO2
5 GPIO14
6 GPIO12
7 GPIO13
8 GPIO15
9 GPIO3
10 GPIO1
11 GPIO9
12 GPIO10
RANGE:
Temperature Range : 0 C TO 50 C
SPECIFICATIONS:
Operating Voltage : 3.5 V to 5 V
Resolution : 16 bit
3.1.3.FLAME SENSOR
A flame sensor is designed to detect and respond to the presence of a flame or fire.
Responses to a detected flame depend on the installation, but can include sounding an alarm,
deactivating a fuel line (such as a propane or a natural gas line), and activating
a fire suppression system. Flame Sensor can be used to detect fire source or other light
sources of the wavelength in the range of 760nm - 1100 nm. It is based on the YG1006
sensor which is a high speed and high sensitive NPN silicon phototransistor. Due to its black
epoxy, the sensor is sensitive to infrared radiation. In fire fighting robot game, the sensor
plays a very important role, it can be used as a robot eyes to find the fire source.
SPECIFICATIONS:
Detection Angle: 0 to 60 degrees
3.1.4.MQ2 SENSOR
MQ2 gas sensor can be used to detect the presence of LPG, Propane and Hydrogen,
also could be used to detect Methane and other combustible steam, it is low cost and suitable
for different application. Sensor is sensitive to flammable gas and smoke. Smoke sensor is
given 5 volt to power it. Smoke sensor indicate smoke by the voltage that it outputs .More
smoke more output. A potentiometer is provided to adjust the sensitivity. Sn02 is the sensor
used which is of low conductivity when the air is clean. But when smoke exist sensor
provides an analog resistive output based on concentration of smoke. The circuit has a heater.
Power is given to heater by VCC and GND from power supply. The circuit has a variable
resistor. The resistance across the pin depends on the smoke in air in the sensor. The
resistance will be lowered if the content is more. And voltage is increased between the sensor
and load resistor.
SPECIFICATIONS:
• Power Supply: 4.5V to 5V DC
• High sensitivity to Propane, Smoke, LPG and Butane
• Wide range high sensitivity to Combustible gases
• Long life and low cost
• Analog and digital output avaliable
• Onboard visual indicator (LED) for indicating alarm
• Compact design and easily mountable
• Simple 4 PIN header interface
• Drive circuit is simple.
• Sensor Type : Semiconductor
• Concentration : 300-10000ppm ( Combustible gas)
• Supply voltage =5v
3.1.5.BUZZER:
The buzzer is a simple trinket which when passed with a certain level of frequency
emits sound. A buzzer is a small yet efficient component to add sound features to our
project/system. It is very small and compact 2-pin structure hence can be easily used
on breadboard, Perf Board and even on PCBs which makes this a widely used component in
most electronic applications.
There are two types are buzzers that are commonly available. The one shown here is a
simple buzzer which when powered will make a Continuous Beeeeeeppp.... sound, the other
type is called a readymade buzzer which will look bulkier than this and will produce a Beep.
Beep. Beep. Sound due to the internal oscillating circuit present inside it. But, the one shown
here is most widely used because it can be customised with help of other circuits to fit easily
in our application.
This buzzer can be used by simply powering it using a DC power supply ranging from
4V to 9V. A simple 9V battery can also be used, but it is recommended to use a regulated
+5V or +6V DC supply. The buzzer is normally associated with a switching circuit to turn
ON or turn OFF the buzzer at required time and require interval.
SPECIFICATIONS:
• Rated Voltage: 6V DC
• Operating Voltage: 4-8V DC
• Rated current: <30mA
• Sound Type: Continuous Beep
• Resonant Frequency: ~2300 Hz
• Small and neat sealed package
• Breadboard and Perf board friendly
The Arduino IDE employs the program avrdude to convert the executable code into a
text file in hexadecimal encoding that is loaded into the Arduino board by a loader program
in the board's firmware.Arduino is an open-source electronics platform based on easy-to-use
hardware and software. Arduino boards are able to read inputs - light on a sensor, a finger on
a button, or a Twitter message - and turn it into an output - activating a motor, turning on an
LED, publishing something online. You can tell your board what to do by sending a set of
instructions to the microcontroller on the board. To do so you use the Arduino programming
language (based on Wiring), and the Arduino Software (IDE), based on Processing.
Over the years Arduino has been the brain of thousands of projects, from everyday
objects to complex scientific instruments. A worldwide community of makers - students,
hobbyists, artists, programmers, and professionals - has gathered around this open-source
platform, their contributions have added up to an incredible amount of accessible
knowledge that can be of great help to novices and experts alike.
Arduino was born at the Ivrea Interaction Design Institute as an easy tool for fast
prototyping, aimed at students without a background in electronics and programming. As
soon as it reached a wider community, the Arduino board started changing to adapt to new
needs and challenges, differentiating its offer from simple 8-bit boards to products
for IoT applications, wearable, 3D printing, and embedded environments. All Arduino boards
are completely open-source, empowering users to build them independently and eventually
adapt them to their particular needs. The software, too, is open-source, and it is growing
through the contributions of users worldwide.
The Arduino software is easy-to-use for beginners, yet flexible enough for advanced
users. It runs on Mac, Windows, and Linux. Teachers and students use it to build low cost
scientific instruments, to prove chemistry and physics principles, or to get started with
programming and robotics. Designers and architects build interactive prototypes, musicians
and artists use it for installations and to experiment with new musical instruments. Makers, of
course, use it to build many of the projects exhibited at the Maker Faire, for example.
Arduino is a key tool to learn new things. Anyone - children, hobbyists, artists, programmers
- can start tinkering just following the step by step instructions of a kit, or sharing ideas
online with other members of the Arduino community.
There are many other microcontrollers and microcontroller platforms available for
physical computing. Parallax Basic Stamp, Netmedia's BX-24, Phidgets, MIT's Handyboard,
and many others offer similar functionality. All of these tools take the messy details of
microcontroller programming and wrap it up in an easy-to-use package. Arduino also
simplifies the process of working with microcontrollers, but it offers some advantage for
teachers, students, and interested amateurs over other systems:
3.2.2 BLYNK:
Blynk is a Platform with IOS and Android apps to control Arduino, Raspberry Pi and the
likes over the Internet. It's a digital dashboard where you can build a graphic interface for
your project by simply dragging and dropping widgets.
Blynk was designed for the Internet of Things. It can control hardware remotely, it can
display sensor data, it can store data, vizualize it and do many other cool things.
• Blynk App - allows to you create amazing interfaces for your projects using various
widgets we provide.
• Blynk Server - responsible for all the communications between the smartphone and
hardware. You can use the Blynk Cloud or run your private blynk server locally.
It’s open-source, could easily handle thousands of devices and can even be
launched on a Raspberry Pi.
• Blynk Libraries - for all the popular hardware platforms - enable communication
with the server and process all the incoming and outcoming commands.
3.4. CONSTRUCTION
IOT based fire alerting system mainly uses two sensors, namely, flame sensor and
temperature sensor . We also used MQ2 sensor to detect the level of gases in a
room.NodeMCU is the board used to communicate between sensors and server.
• Battery connections are made through VCC and ground pin of NodeMCU.
• NodeMCU board is also connected to buzzer through D0 digital pin , Flame sensor
readings are received through D3 digital pin.
• Temperature sensor DHT11 is connected D5 digital pin of node MCU board.
• MQ2 gas sensor is connected to D2 digital pin of nodeMCU board.
• Sensors receive power from 3V3 voltage pins of Node MCU board.
3.5. WORKING
• This system recognizes flames(if any) in the premises of IR based flame sensor, more
the flames more the detecting range of IR based flame sensor. Flame sensor
continuously sends sensed data to server through internet using node MCU board.
• DHT 11 sensor senses the temperature in a room in degree celcuis and humidity range
from 20 %– 80% it gives one reading for every one second. For every one second it
communicates this details to blynk server.
• Gas sensor (MQ2) which detects the presence of gases like LPG, Propane and
Hydrogen in the atmosphere. Based on the concentration of the gas the sensor
produces a corresponding potential difference by changing the material inside the
sensor, which can be measured as output voltage. Range of this measured data is in
between 200-10000ppm(parts per million).
CHAPTER-4
RESULT AND DISCUSSIONS
4.1 RESULT OBTAINED
When Flame sensor detects fire it gives output low which automatically
enables buzzer and gives mobile notification through blynk application.
CHAPTER-5
CONCLUSION
A fire alarm is a device that detect the presence of fire and atmospheric changes
relating to smoke. Fire alarm operates to alert people to evacuate a location in which a fire
and smoke accumulation is present. We have designed an IOT based fire alerting system
using temperature and flame sensor which could not only senses the fire in a particular
premises but also send related information through IOT .This system can be used for schools,
homes, and businesses, and function as the catalyst to saving lives. This system alerts
management through alarm notifications in order to react quickly.
REFERENCES
https://nevonprojects.com/iot-based-fire-department-alerting-system/
http://www.cfm.va.gov/TIL/spec/283100.doc
http://www.wikipedia.com/iotbasedfirealertingsystem
http://www.instructables.com/firealertingsystem
National Fire Protection Association (February 2001). "Chapter Fundamental Fire Protection
Program and Design Elements". NFPA 805 Performance-Based Standard for Fire Protection
for Light Water Reactor Electric Generating Plants. National Fire Protection Association.
standard: Gaseous Fire Suppression Systems 3.10.7.
APPENDIX
PROGRAMMING DETAILS
#define BLYNK_PRINT Serial
#include <BlynkSimpleEsp8266.h>
#include <ESP8266WiFi.h>
#include <DHT.h>
char auth[] = "032-5eKvw6xQt237XJSvzpBSI9VKheuf";
const char* ssid = "iPhone";
const char* password = "abhishek123";
WiFiClient client;
#define DHTPIN 14
#define DHTTYPE DHT11
#define MQ2pin (4)
DHT dht(DHTPIN,DHTTYPE);
BlynkTimer timer;
int RPin = 0;
int led_ind = 16;
int RValue;
float sensorValue;
int sensorThres=400;
WidgetLED led(V0);
boolean btnState = false;
void buttonLedWidget()
{
// Read button
boolean isPressed = (digitalRead(RPin) == LOW);
if (isPressed != btnState) {
if (isPressed) {
led.on();
delay(500);
} else {
led.off();
}
btnState = isPressed;
}
}
WidgetLED led1(V1);
boolean btnState1 = false;
void buttonLedWidget1()
{
boolean isPressed = (digitalRead(led_ind) == HIGH);
void sendSensor()
{
float h=dht.readHumidity();
float t=dht.readTemperature();
if(isnan(h) || isnan(t))
{
Serial.println("Failed to read from DHT sensor!");
return;
}
Blynk.virtualWrite(V5,h);
Blynk.virtualWrite(V6,t);
}
void setup()
{
Serial.begin(115200);
Blynk.begin(auth, ssid, password);
dht.begin();
pinMode(RPin, INPUT);
pinMode(led_ind, OUTPUT);
digitalWrite(led_ind, LOW);
Serial.println("Gas sensor warming up!");
delay(20000);
timer.setInterval(500L, buttonLedWidget);
timer.setInterval(500L, buttonLedWidget1);
timer.setInterval(1000L, sendSensor);
void RSensor()
{
RValue = digitalRead(RPin);
}
void loop()
{
Blynk.run();
sensorValue = analogRead(MQ2pin);
Serial.print("Sensor Value: ");
Serial.print(sensorValue);
if(sensorValue > 100)
{
Serial.print(" | Smoke detected!");
}
Serial.println("");
delay(2000);
RSensor();
Serial.println(RValue);
if (RValue == LOW)
{
Blynk.notify("alert!fire");
digitalWrite(led_ind, HIGH);
delay(500);
Serial.println("alert!fire");
}
else
{
digitalWrite(led_ind, LOW);
delay(500);
Serial.println("no fire...chill bro");
}
timer.run();
}