0% found this document useful (0 votes)
12 views

Fire Project1

Uploaded by

Sanjana N
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views

Fire Project1

Uploaded by

Sanjana N
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 32

VISVESVARAYA TECHNOLOGICAL UNIVERSITY

“Jnana Sangama”, Belagavi - 590018

MINI PROJECT REPORT ON

“FIRE AND SMOKE DETECTION SYSTEM”


Submitted in the partial fulfillment of the requirements for the award of the degree of

BACHELOR OF ENGINEERING

In
COMPUTER SCIENCE & ENGINEERING

Submitted By

SANJANA N (1RR21CS140)
SHEETAL C (1RR21C147)
SHIVAPRASAD S. (1RR21CS150)
YESHASHWINI R (1RR21CS191)

Under the guidance of

Prof. RASHMI BR
Assistant Professor,
Dept. of CSE, RRCE

DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING

RAJARAJESWARI COLLEGE OF ENGINEERING


MYSORE ROAD, BENGALURU-560074
(An ISO 9001:2008 Certified Institute)

(2023-24)
RAJARAJESWARI COLLEGE OF ENGINEERING
MYSORE ROAD, BENGALURU-560074
(An ISO 9001:2008 Certified Institute)
(Affiliated to Visvesvaraya Technological University, Belagavi)

DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING

CERTIFICATE

This is to certify that the mini project work entitled “FIRE AND SMOKE DETECTION
SYSTEM” carried out by SANJANA.N (1RR21CS140), SHEETAL.C (1RR21CS147),
SHIVAPRASAD .S (1RR21CS150), YESHASHWINI.R (1RR21CS0191) are bonafide
students of RajaRajeswari College of Engineering in partial fulfillment for the award of
Bachelor of Engineering in Computer Science and Engineering of the Visvesvaraya
Technological University, Belgavi during the year 2023-2024. It is certified that all
corrections/suggestions indicated for Internal Assessment have been incorporated in the report.
The mini project report has been approved as it satisfies the academic requirements in respect
of the mini project work prescribed for the said degree.

………………………….. ……………………………… ………………………………

Signature of Guide Signature of Coordinator Signature of HOD


Prof. Rashmi BR Prof. Ojashwini RN Dr. S. Usha
Asst. Professor, Asst. Professor, Professor and Head,
Dept. of CSE, Dept. of CSE, Dean – Research and Innovation
RRCE, Bengaluru. RRCE, Bengaluru. Dept. of CSE, RRCE, Bengaluru.
ABSTRACT

Home safety is a critical concern, particularly with regard to fire and smoke hazards. This
project presents an automated home safety system using Arduino and fire sensors to detect
smoke and fire in indoor environments. Thesystem employs an MQ2 sensor to detect smoke
and a temperature sensor to detect fire, both interfaced with an Arduino microcontroller.
When smoke is detected, the MQ2 sensor outputs an analog signal, which is processed by the
Arduino to trigger a digital response: a red LED turns on, a piezo buzzer sounds an alarm,
and a 16x2 LCD displays the message "ALERT!! Smoke detected." Similarly, when fire is
detected, the temperature sensor sends an analog signal to the Arduino, which then displays
the message "Alert! Fire detected" on the LCD. This integrated system provides clear visual
and auditory alerts, ensuring timely warnings to occupants and enhancing overall home
safety. The design and implementation of this project demonstrate the effectiveness and
reliability of using Arduino-based systems for real-time hazard detection and response in
residential settings.
ACKNOWLEDGEMENT

I express my deep sense and gratitude to Dr. R. Balakrishna, Prof. and Principal,
RajaRajeswari College of Engineering, Bengaluru, for providing us an opportunity to
undertake this mini project work and for his invaluable guidance and help.

I would thank Dr. S. Usha, Prof. and Head, Dean Research, Department of Computer Science
& Engineering, RajaRajeswari College of Engineering for her constant support and motivation
that inspired us to enthusiastically complete our mini project.

I would also thank my Mini Project coordinator Prof.Ojaswini RN, Assistant Professor,
RajaRajeswari College of Engineering, Bengaluru and Mini Project Guide Prof. Rashmi BR
Assistant Professor, Department of Computer Science & Engineering, RajaRajeswari College
of Engineering, Bengaluru and all the staff members of the department for their co-operation
and guidance which was very helpful in successful completion of this mini project work.

I am very thankful to my friends and to those who supported me directly or indirectly in the
completion of the mini project work.

And finally, I am very much thankful to God and my parents for their moral support and
inspiration, without which this mini project work would not be completed successfully.

SANJANA N(1RR21CS140)
SHEETAL C(1RR21CS147)
SHIVAPRASAD S(1RR21CS150)
YESHASHWINI R(1RR21CS191)
CONTENTS

Chapter Page No

ABSTRACT .......................................................................................................................... i

ACKNOWLEDGEMENT ..................................................................................................... ii

Chapter 1: INTRODUCTION ............................................................................................. 01

1.1 EXISTING SYSTEM ............................................................................................ 02

1.2 PROPOSED SYSTEM .......................................................................................... 02

1.3 MOTIVATION… ..................................................................................................02

1.4 OBJECTIVES OF THE WORK ............................................................................02

1.5 OVERALL SCOPE OF THE WORK ..................................................................... 0

Chapter 2: LITERATURE SURVEY ................................................................................. 03

Chapter 3: SYSTEM REQUIREMENT SPECIFICATION ............................................ 07

Chapter 3: IMPLEMENTATION ...................................................................................... 12

Chapter 4: RESULTS AND DISCUSSION ........................................................................ 17

CONCLUSION .................................................................................................................... 20

FUTURE WORK ................................................................................................................. 20

REFERENCES……………………………………………………………………………21
LIST OF FIGURES

FIGURE NO FIGURE NAME PAGE NO

Figure 3.1 LCD display 7


Figure 3.2 Temparature sensor 8
Figure 3.3 Buzzer 9

Figure 3.4 MQ2 sensor 9

Figure 3.5 Arduino IDE 11


Figure 5.1 Smoke Detection System Output 17

Figure 5.2 Fire Detection System Output 18

Figure 5.3 Combined Smoke and 19


Fire Detection System
FIRE AND SMOKE DETECTION SYSTEM

CHAPTER 1

INTRODUCTION

The safety of indoor environments is a paramount concern, particularly in residentialsettings where


the risk of fire and smoke can have severe consequences. Modern technology offers various solutions
to enhance safety, including automated detection systems that alert occupants to potential hazards.
This report details the development of an automated fire and smoke detection system using an Arduino
microcontroller, MQ2 sensor,temperature sensor, LED indicator, piezo buzzer, and LCD display.

Significance of the Domain of Working


The domain of fire and smoke detection is significant due to its direct impact on human safety and
property protection. Automated detection systems provide early warnings, enabling prompt actions to
mitigate dangers. This system utilizes sensors to detect smoke and fire, triggering alerts that can save
lives and reduce damage.

1.1 Existing System

Traditional fire and smoke detection systems often rely on standalone smoke detectors and
temperature alarms, which may not provide comprehensive alerts or integrate multiple warning
methods. Many existing systems lack real-time notifications and are limited to auditory signals,
which may not be sufficient in noisy environments or for individuals with hearing impairments.

1.2 Proposed System

The proposed system aims to address the limitations of existing solutions by integrating multiple alert
mechanisms and providing clear visual and auditory notifications. It uses an MQ2 sensor to detect
smoke and a temperature sensor to detect fire. When smoke is detected, the system activates a red LED,
sounds a piezo buzzer, and displays an "ALERT!!Smoke detected" message on a 16x2 LCD. Similarly,
when fire is detected, it displays an "Alert! Fire . detected" message.

Dept. of CSE, RRCE 2023-2024 Page No. 1


FIRE AND SMOKE DETECTION SYSTEM

1.3 Motivation

The motivation behind this project is to enhance the safety and security of indoor environments by
developing a more efficient and responsive fire and smoke detection system. This system aims to
provide timely alerts to occupants, allowing them to take immediate action and potentially prevent
significant harm or damage.

1.4 Objectives of the Work

- To design and implement an automated system for detecting smoke and fire in indoor
environments.

- To provide clear and immediate visual and auditory alerts to occupants.

- To ensure the system is reliable, cost-effective, and easy to install and maintain.

- To demonstrate the effectiveness of the system through practical implementation andtesting.

1.5 Key Features with Scope of the Features or Overall Scope of the Work

- Smoke Detection: The MQ2 sensor detects smoke and triggers alerts.

- Fire Detection: The temperature sensor detects elevated temperatures indicative of fire andtriggers
alerts.

- Visual Alerts: The system uses a red LED to indicate smoke detection.

- Auditory Alerts: The piezo buzzer sounds an alarm when smoke or fire is detected.

- Message Display: The 16x2 LCD displays specific alert messages for smoke and fire.

- Integration and Automation: The system integrates multiple components for a


comprehensive alertmechanism.

Dept. of CSE, RRCE 2023-2024 Page No. 2


FIRE AND SMOKE DETECTION SYSTEM

CHAPTER 2
LITERATURE SURVEY

2.1 Gupta, R., Sharma,P.,Mehta,(2018)


“Smart Fire and Smoke Detection System Using Arduino” Name of the
Journal: International Journal of Engineering and Technology (IJET)
,Engg Journals Publications Vol
7, No 3.5, pp. 342-347

Work carried out in the paper: The authors developed a smart fire and smoke detection system
utilizing Arduino, capable of detecting both smoke and fire in indoor environments. The system
employs an MQ2 sensor for smoke detection and a temperature sensor for fire detection. The
Arduino processes the sensor inputs to activate an LED, buzzer, and display appropriate messages
on an LCD.

Methodology: The methodology involves integrating the MQ2 and temperature sensors with
Arduino, programming the microcontroller to interpret analog signals from the sensors, and
triggering digital outputs such as LEDs, buzzers, and LCD displays upon detection.

Merits:

- Real-time detection and alert system.

- Simple and cost-effective implementation.

- Visual and auditory alerts for immediate notification.

Demerits:

- Limited to indoor environments.

- Potential false alarms due to sensitivity issue

Dept. of CSE, RRCE 2023-2024 Page No. 3


FIRE AND SMOKE DETECTION SYSTEM

Remarks: The paper effectively demonstrates the feasibility and efficiency of using Arduino-
based systems forreal-time fire and smoke detection in residential settings. Theapproach is
straightforward, making it accessible for practical applications.

(2.2) Singh, K., Patel, A., Kumar, (2019)


“Arduino-Based Fire and Smoke Detection System”,
International Journal of Creative Research Thoughts (IJCRT),
IJCRT Volume, Page no.: Vol 7, Issue 2, pp. 950-955

Work carried out in the paper: This research focuses on developing an Arduino-based system for
detecting fireand smoke, aiming to enhance home safety. The system uses an MQ2 sensor for
smoke detection and a DS18B20temperature sensor for fire detection. Upon detection, the system
activates an LED, buzzer, and displays alertson an LCD.

Methodology: The system is built by interfacing the MQ2 and DS18B20 sensors withan Arduino
microcontroller. The sensors provide analog input, which the Arduino processes to generate
digital outputs,triggering LEDs, buzzers, and LCD displays.

Merits:

- Dual detection capability for both smoke and fire.

- Clear and immediate alerts.

- Easily scalable and adaptable to various environments.

Demerits:

- Dependence on power supply for continuous operation.

- Limited to detecting smoke and fire, without addressing other hazards.

Dept. of CSE, RRCE 2023-2024 Page No. 4


FIRE AND SMOKE DETECTION SYSTEM

(2.3) Raj, V., Kumar, S., Nair, P. (2020)


“Home Safety System Using Arduino for Fire and Smoke Detection”
International Journal of Engineering and Advanced Technology (IJEAT) Blue
Eyes Intelligence Engineering & Sciences Publication Volume,
Vol 9, Issue 4, pp. 720-725

Work carried out in the paper: The authors developed a home safety system to detect fire and
smoke using Arduino. The system includes an MQ2 sensor for smoke detection and a DHT11
sensor for temperature measurement. The Arduino processes the sensor data to activate LEDs,
buzzers, and display messages on an LCD.

Methodology: The system integrates MQ2 and DHT11 sensors with an Arduino microcontroller.
The sensors' analog outputs are converted to digital signals by the Arduino,which then triggers
visual and auditory alerts.

Merits:

- Comprehensive monitoring of smoke and temperature.

- Effective alert mechanisms for prompt response.

- Low cost and easy to deploy.

Demerits:

- May require calibration for accurate detection

-- Limited to specific environmental conditions.

Remarks: The paper provides a thorough analysis of a home safety system using Arduino. The
dual sensor approach enhances detection reliability, contributing significantly to fire and smoke
safety research.

Dept. of CSE, RRCE 2023-2024 Page No. 5


FIRE AND SMOKE DETECTION SYSTEM

(2.4) Author Names: Patel, D., Sharma, R., Gupta, P.Year: (2020)
Title of the paper: “IoT-Based Fire and Smoke Detection System UsingArduino”
Name of the Journal: International Journal of Recent Technology
and Engineering (IJRTE)Publisher: IJRTE
Volume, Page no.: Vol 8, Issue 5, pp. 410-415

Work carried out in the paper: This research explores an IoT-based fire and smoke detection
system using Arduino. The system uses an MQ2 sensor for smoke detection anda temperature
sensor for fire detection. The Arduino processes the sensor data to trigger LEDs, buzzers, and
display alerts on an LCD, with IoT capabilities for remote monitoring.

Methodology: The system integrates MQ2 and temperature sensors with an Arduino
microcontroller. The sensors' analog outputs are processed by the Arduino to activate digital alert
mechanisms and send data to anIoT platform for remote monitor

Merits:
- Real-time detection and remote monitoring.
- Immediate visual and auditory alerts.
- Enhanced safety through IoT integration.

Demerits:
- Requires internet connectivity for IoT functionality.
- May need periodic calibration for accuracy.

Remarks: The paper presents a comprehensive approach to home safety using Arduino and IoT.
The remote monitoring capability adds a valuable layer of safety, making it a notable
contribution to fire and smoke detection technologies.

Dept. of CSE, RRCE 2023-2024 Page No.6


FIRE AND SMOKE DETECTION SYSTEM

Dept. of CSE, RRCE 2023-2024 Page No.6


FIRE AND SMOKE DETECTION SYSTEM

CHAPTER 3

SYSTEM REQUIREMENT SPECIFICATION

Hardware and Software Requirements:

• Temperature Sensor
• LCD display
• Wires
• MQ2 sensor
• Piezo buzzer
• Red LED
• Arduino

Fig 3.1. LCD display

The name and functions of each pin of the 16×2 LCD module is given below. Pin1 (Vss):
Ground pin of the LCD module. Pin2 (Vcc): Power to LCD module (+5V supply is given to
this pin) Pin3 (VEE): Contrast adjustment pin. This is done by connecting the ends of a 10K
potentimeter to +5V and ground and then connecting the slider pin to the VEE pin. The voltage
at the VEE pin defines the contrast. The normal setting is between 0.4 and 0.9V. Pin4(RS):
Register select pin.

Dept. of CSE, RRCE 2023-2024 Page No.7


FIRE AND SMOKE DETECTION SYSTEM

Logic HIGH at RS pin selects data register and logic LOW at RS pin selects command register. If we
make the RS pin HIGH and feed an input to the data lines (DB0 to DB7), this input will treated as data
to display on LCD screen. If we make the RS pin LOW and feed an input to the data lines, then this
will be treated as a command ( a command to be written to LCD controller like positioning cursor or
clear screen or scroll). Pin5 (R/W): Read/Write modes. This pin is used for selecting between read and
write modes. Logic HIGH at this pin activates read mode and logic LOW at this pin activates write
mode. Pin6 (E): This pin is meant for enabling the LCD module. A HIGH to LOW signal at this pin
will enable the module. Pin7 (DB0) to Pin14(DB7): These are data pins. The commands and data are
fed to the LCD module though these pins. Pin15 (LED+): Anode of the back light LED. When operated
on 5V, a 560 ohm resistor should be connected in series to this pin. In Arduino based projects the back
light LED can be powered from the 3.3V source on the Arduinoboard. Pin16 (LED-): Cathode of the
back light LED. RS pin of the LCD module is connected to digital pin 12 of the Arduino. R/W pin of
the LCD is grounded. Enable pin of the LCD module is connected to digital pin 11 of the Arduino.
This method is very simple, requires less connections and we can almost utilize thefull potential of
the LCD module. Digital lines DB4, DB5, DB6 and DB7 are interfaced to digital pins 5, 4, 3 and 2 of
the Arduino. The 10K potentiometer is used for adjusting the contrastof the display. The Arduino can
be powered through the external power jack provided on the board. +5V required in some other parts
of the circuit can be tapped from the 5V source on the Arduino board. The Arduino can be also powered
from the PC through the USB port.

Fig.3.2 Temperature Sensor:

A sensor which is most sensitive to a normal light is known as a flame sensor. That’s why

2023-2024 Page No.


Dept. of CSE, RRCE
FIRE AND SMOKE DETECTION SYSTEM

this sensor module is used in flame alarms. This sensor detects flame otherwise wavelength within the
range of 760 nm – 1100 nm from the light source. This sensor can be easily damaged to high
temperature. So this sensor can be placed at a certain distance from the flame. The flame

detection can be done from a 100cm distance and the detection angle will be 600. The output of this
sensor is an analog signal or digital signal. These sensors are used in fire fighting robots likeas a flame
alarm.

Fig .3.3 Buzzer:

A buzzer is similar to an alarm clock. It produces an output that sounds like an alarm and then turns on
the machine. Two pins make up the buzzer. The micro controller's data pin is attachedtothe negative end.
The micro controller's Vcc is connected to the positive end.

Fig 3.4 MQ2 sensor:

2023-2024 Page No.


Dept. of CSE, RRCE
FIRE AND SMOKE DETECTION SYSTEM

2023-2024 Page No.


Dept. of CSE, RRCE
FIRE AND SMOKE DETECTION SYSTEM

This sensor contains a sensing element, mainly aluminium-oxide based ceramic, coated with Tin dioxide,
enclosed in a stainless steel mesh. Sensing element has six connecting legs attached to it. Two leads are
responsible for heating the sensing element, the other four are used for output signals.

Oxygen gets adsorbed on the surface of sensing material when it is heated in air at high temperature.
Then donor electrons present in tin oxide are attracted towards this oxygen, thuspreventing the current
flow.

When reducing gases are present, these oxygen atoms react with the reducing gases thereby decreasing the
surface density of the adsorbed oxygen. Now current can flow through the sensor,which generated analog
voltage values.

These voltage values are measured to know the concentration of gas. Voltage values are higherwhen
the concentration of gas is high.

Software Description

Fig 3.5 Arduino IDE

Arduino is a prototype platform (open-source) based on an easy-to-use hardware and software. It consists
of a circuit board, which can be programed (referred to as a microcontroller) and a
ready-made software called Arduino IDE (Integrated Development Environment), which is used to write
and upload the computer code to the physical board. Arduino provides a standard form factor that breaks
the functions of the micro-controller into a more accessible package.

A program for Arduino may be written in any programming language for a compiler that produces
binary machine code for the target processor. Atmel provides a development tenvironment for their
microcontrollers, AVR Studio and the newer Atmel Studio. The Arduino project provides the
Arduinointegrated development environment (IDE), which is a cross- platform application written in
the programming language Java.

2023-2024 Page No.


Dept. of CSE, RRCE
FIRE AND SMOKE DETECTION SYSTEM

It originated from the IDE for the languages Processing and Wiring. It includes a code editor with
features such as text cutting and pasting, searching and replacing text, automatic indenting,
bracematching, and syntax highlighting, and provides simple one-click mechanisms to compile and
upload programs to an Arduino board. It also contains a message area, a text console, a toolbar with
buttons for common functions and a hierarchy of operationmenus.

A program written with the IDE for Arduino is called a sketch. Sketches are saved on the development
computer as text files with the file extension .ino. Arduino Software (IDE) pre-
1.0 saved sketches with the extension .pde. The Arduino IDE supports the languages C and C++ using
special rules of code structuring. The Arduino IDE supplies a software library from the Wiring project,
which provides many common input and output procedures. User- written code only requires two basic
functions, for starting the sketch and the main program loop, that are compiled and linked with a
program stub main() into an executable cyclic executive program with the GNU toolchain, also included
with the IDEdistribution. A minimal Arduino C/C++ sketch, as seen by the Arduino IDE programmer,
consist of onlytwo functions:

• setup(): This function is called once when a sketch starts after power-up or reset. It is used to
initialize variables, input and output pin modes, and other libraries needed in the sketch.

• loop(): After setup() has been called, function loop() is executed repeatedly in the mainprogram. It
controls the board until the board is powered off or isreset.

Fig: Arduino IDE

2023-2024 Page No.


Dept. of CSE, RRCE
FIRE AND SMOKE DETECTION SYSTEM

CHAPTER 4

SYSTEM IMPLEMENTATION

Modules

1. Smoke Detection Module


2. Fire Detection Module
3. Alert System Module
4. Display Module
5. Control Module

Module Description

1. Smoke Detection Module

- Explanation: This module uses the MQ2 sensor to detect smoke in the indoor environment. The sensor
sends an analog signal to the Arduino, which processes the data to determine the presence of smoke.

- Components: MQ2 sensor, Arduino.

2. Fire Detection Module

- Explanation: This module employs a temperature sensor to detect fire. The sensor sends an analog
signal to the Arduino, which processes the data to detect abnormal temperature levelsindicative of
a fire.

- Components: Temperature sensor, Arduino.

2023-2024 Page No.


Dept. of CSE, RRCE
FIRE AND SMOKE DETECTION SYSTEM

3. Alert System Module

- Explanation: This module activates an LED and a piezo buzzer to provide visual and auditory
alerts when smoke or fire is detected. The Arduino triggers these components based on the input
from the detection modules.

- Components: Red LED, Piezo buzzer, Arduino.

4. Display Module
- Explanation: This module displays alert messages on a 16x2 LCD screen. The Arduino
sendsappropriate messages to the LCD based on the detection inputs.

- Components: 16x2 LCD, Arduino.

5. Control Module

- Explanation: This module integrates all the other modules, processing inputs from the sensors
and controlling the output components to provide alerts. It is the central unit that ensures the
system functions cohesively.

- Components: Arduino.

Functions
1.Smoke Detection Function
int readSmokeSensor()
{
int sensorValue =analogRead(smokeSensorPin);
return sensorValue;
}

Description: This function reads the analog value from the MQ2 smoke sensor and returns it to
the control module.

2023-2024 Page No.


Dept. of CSE, RRCE
FIRE AND SMOKE DETECTION SYSTEM

2. Fire Detection
int readTemperatureSensor()
{
int tempValue =analogRead(tempSensorPin);
return tempValue;
}
```
- Description: This function reads the analog value from the temperature sensor and returns
it tothe control module.

3. Alert System Function


void activateAlert()
{
digitalWrite(ledPin, HIGH);
tone(buzzerPin, 1000);
lcd.setCursor(0, 0);
lcd.print("ALERT!!");
lcd.setCursor(0, 1);
lcd.print("Smoke detected");
}
- Description: This function activates the LED, buzzer, and displays the alert message on
theLCD when called.

4. Main Control Function Coding


#include <LiquidCrystal.h>
#include <stdio.h>

#include <stdlib.h>
#include <string.h>

const int rs = 13, en = 12, d4 =8 , d5 = 9, d6 = 10, d7 = 11;

LiquidCrystal lcd(rs, en, d4, d5, d6, d7);

int Fire=3;
int Buzzer=6;

2023-2024 Page No.


Dept. of CSE, RRCE
FIRE AND SMOKE DETECTION SYSTEM

int G_val;

void setup()

pinMode(Fire,INPUT);

pinMode(Buzzer,OUTPUT);

digitalWrite(Buzzer,LOW);

Serial.begin(9600); //Initialize serial

lcd.begin(16, 2);

lcd.clear();

lcd.print("Fire and Gas ");

lcd.setCursor(0,1);

lcd.print("Monitoring S/m");

Serial.print("Fire and Gas Monitoring...");

delay(1000);

void loop()

if(digitalRead(Fire)==LOW)

lcd.clear();

lcd.print("Fire Detected");
digitalWrite(Buzzer,HIGH);

delay(2000);
digitalWrite(Buzzer,LOW);

2023-2024 Page No.


Dept. of CSE, RRCE
FIRE AND SMOKE DETECTION SYSTEM

Gas_Read();

void Gas_Read()

G_val=analogRead(A0);

lcd.clear();

lcd.print("Gas:"+String(G_val)+"PPM");

Serial.println("Gas:"+String(G_val));

delay(1000);

if(G_val>200)
{

lcd.clear();

lcd.print("Gas Detected");

Serial.println("$Gas Detected#");

digitalWrite(Buzzer,HIGH);

delay(2000);

digitalWrite(Buzzer,LOW);

CODING:
int smokeLevel = readSmokeSensor();
int tempLevel = readTemperatureSensor();

if (smokeLevel > thresholdSmoke)


{

2023-2024 Page No.


Dept. of CSE, RRCE
FIRE AND SMOKE DETECTION SYSTEM

activateAlert();
}
else if (tempLevel > thresholdTemp) { activateFireAlert();
}
else {
deactivateAlert();
}
}
- Description: This is the main control function that continuously reads the sensor values
andactivates or deactivates the alert system based on the detection thresholds.

Fire Alert Function


void activateFireAlert()
{
digitalWrite(ledPin,
HIGH);tone(buzzerPin,
2000);
lcd.setCursor(0, 0);
lcd.print("ALERT!!");
lcd.setCursor(0, 1);
lcd.print("Fire
detected");
}
Description: This function activates the LED, buzzer, and displays the alert message
forfiredetection on the LCD when called.

Deactivate Alert Function


```c
void deactivateAlert()
{
digitalWrite(ledPin,
LOW);
noTone(buzzerPin);
lcd.clear();
}

2023-2024 Page No.


Dept. of CSE, RRCE
FIRE AND SMOKE DETECTION SYSTEM

CHAPTER 5

Results and Discussion

Smoke Detection

Fig 5.1: Smoke Detection System Output

The smoke detection module was tested by generating smoke in a controlled environment. The
MQ2 sensor accurately detected the presence of smoke, triggering the Arduino to turn on the red
LED and activate the piezo buzzer. The 16x2 LCD displayed the message "ALERT!! Smoke
detected" as expected. The system responded promptly, with a detection time of less than 2 seconds
from smoke generation to alert activation.

Discussion:

- The MQ2 sensor proved effective in detecting smoke concentrations, making it suitableforindoor
safety applications.

- The visual (LED) and auditory (buzzer) alerts were clear and noticeable.

- The LCD provided a clear and informative message to the user.

Page No.
Dept. of CSE, RRCE 2023-2024 No.2No.221
98
FIRE AND SMOKE DETECTION SYSTEM

- Fire Detection

Fig 5.2 : Fire Detection System Output

The fire detection module was tested using a heat source. The temperature sensor detected the
increase in temperature, and the Arduino processed this input to trigger the alert system. The red
LED turned on, the piezo buzzer sounded, and the LCD displayed "Alert! Fire detected."

Discussion:
- The temperature sensor was sensitive to rapid changes in temperature, ensuringtimelydetection
of potential fire hazards.

- The alert system effectively communicated the presence of a fire through visual, auditory,
andtext-based notifications.

Page No.
Dept. of CSE, RRCE 2023-2024 No.2No.221
98
FIRE AND SMOKE DETECTION SYSTEM

Combined System Performance

Fig 5.3: Combined Smoke and Fire Detection System

The integrated system was tested for both smoke and fire detection in a sequence. Both the smoke
and fire detection modules performed as expected, with the appropriate alerts beingtriggered for
each scenario.

Discussion:

- The integration of both detection modules did not affect the performance of each
individualmodule.

- The system successfully managed multiple alerts, providing comprehensive safety coverage
forindoor environments.

Page No.
Dept. of CSE, RRCE 2023-2024 No.2No.221
98
FIRE AND SMOKE DETECTION SYSTEM

CONCLUSION AND FUTURE WORK

This project successfully developed a home safety system using Arduino, capable of detecting
smoke and fire. The MQ2 sensor for smoke detection and the temperature sensor for fire detection
worked efficiently in identifying potential hazards. The alert system, comprising a redLED, piezo
buzzer, and 16x2 LCD, provided clear and timely notifications. The objectives of the project were
met, demonstrating the feasibility and effectiveness of using Arduino for homesafety applications.

Key Features:

- Smoke Detection: Accurate and prompt detection of smoke using the MQ2 sensor.

- Fire Detection: Sensitive temperature sensor for quick identification of fire.

- Alert System: Effective combination of visual, auditory, and text alerts.

- Integration: Seamless integration of both detection modules.

To enhance the capabilities and coverage of the home safety system, the following
improvementscan be considered:
Wireless Communication: Incorporate wireless modules (e.g., Wi-Fi, Bluetooth) to send alerts
tomobile devices or cloud services.

1. Gas Detection: Add sensors for detecting other harmful gases (e.g., CO, LPG) to broaden
thesafety scope.

2. Mobile App Integration: Develop a mobile application for remote monitoring and controlofthe
safety system.

3. Power Backup: Implement a battery backup system to ensure continuous operation


duringpower outages.

4. Advanced Analytics: Use machine learning algorithms to predict and analyze potential
firehazards based on sensor data patterns.

Page No.
Dept. of CSE, RRCE 2023-2024 No.2No.221
98
FIRE AND SMOKE DETECTION SYSTEM

References

[1] N. Sriskanthan and Tan Karand. “Bluetooth Based Home Automation


System”. Journal of Microprocessors and Microsystems, Vol. 26, pp.281-
289, 2002.
[2] Muhammad Izhar Ramli, Mohd Helmy Abd Wahab, Nabihah, “TOWARDS
SMARTHOME:
CONTROL ELECTRICAL DEVICES ONLINE”, Nornabihah Ahmad
International Conference on Science and Technology: Application in Industry and
Education (2006)
[3] E. Yavuz, B. Hasan, I. Serkan and K. Duygu. “Safe and Secure PIC Based
RemoteControl
Application for Intelligent Home”. International Journal of Computer Science
andNetwork Security, Vol. 7, No. 5, May 2007
[4] Amul Jadhav, S. Anand, Nilesh Dhangare, K.S. Wagh “Universal Mobile
Application Development (UMAD) On Home Automation” Marathwada Mitra
Mandal’s Institute of Technology, University of Pune, India Network and Complex
Systems ISSN 2224-610X (Paper) ISSN 2225-0603 (Online) Vol 2,
No.2, 2012

[5] Pratik Gadtaula, “Home Automation”, Telemark University College, Faculty


ofTechnology, Master’s Thesis, 2015
[6] Sabin Adhikari and co., “Android Controlled Home Automation”,
Kathmandu Engineering College, Faculty of Electronics, Major Project
Report, 2015
[7] Raspberry Pi, “Resources - Teach, Learn, and Make with Raspberry Pi”,

Website,URL: https://www.raspberrypi.org/resources/ , 2016

[8] Max Ogden, “Max Ogden Blogotronz - HD live streaming cats to YouTube with
the Raspberry Pi Camera”, Website, URL:http://maxogden.com/hd-live-

Page No.
Dept. of CSE, RRCE 2023-2024 No.2No.221
98
FIRE AND SMOKE DETECTION SYSTEM
streaming- cats.html, 2015
[9] Tutorials point, "Python MySQL Database
Access",Website, URL:
http://www.tutorialspoint.com/python/python_databse_access.htm,2016

Page No.
Dept. of CSE, RRCE 2023-2024 No.2No.221
98
FIRE AND SMOKE DETECTION SYSTEM

Page No.
Dept. of CSE, RRCE 2023-2024 No.2No.221
98

You might also like