Sunteți pe pagina 1din 36

STACK PROJECT REPORT ON SMOKE

DETECTOR & ALARM CIRCUIT


A PROJECT SUBMITTED TO
The National Institute of Engineering,
Mysuru
(Autonomous Institution)

Under the guidance of


Under the guidance of

Mr.N Jayaprakash
Dept. of ECE
NIE,Mysuru

Submitted By:
Santhosh kumar H O
Shoukath ali
Mayank Pratap Singh Gaur
Ramachandra Hegde

Department of Electronics and Communication Engineering


The National Institute of Engineering
(Autonomous Institution)
Mysuru-570008

ACKNOWLEDGEMENT
We would like to take this opportunity to express out
profound gratitude to all those people who were directly
or indirectly involved in the completion of project we
encouraged each and every one who encouraged us in
every possible way
We would like to thank our principal Dr. G. L. Shekar for
letting me to be the part of this institution and letting me
to explore the abilities to the fullest.
We would also like to extend my sincere gratitude to our
HOD Dr. Rohini Nagapadma for being a source of
inspiration and Instilling an enthusiastic spirit in us
through out the process of project making
We would like to express our heartfelt gratitude towards
our stack project guide Mr. N Jayaprakash for his
constant guidance, valuable knowledge and experience
with regards,
Santosh kumar H O
Shoukath Ali
Mayank Pratap singh
Ramachandra Hegde

LITERATURE SURVEY

Contents
1. Introduction
2. Theory behind the project
2.1 smoke sensor module
2.2 Arduino UNO R3
2.3 LCD display
2.4 Buzzer
2.5 Resistors and Connecting
wires
3. Circuit diagram and explanation
3.1 schematic circuit diagram
3.2 Implemented circuit
3.3 Implementation
3.4 Interfacing MQ2 with
Arduino UNO R3

3.5 Interfacing LCD with Arduino


UNO R3
3.6 Programming code
4. Conclusion
5. Applications
6. Future scope

1. INTRODUCTION
Technology is a very important part of our life.
We can use this technology in a very
sophisticated area like safety and security
purpose. Using the smoke detector and alarm
circuit be conducive to save our life as well as
households from fire accidents which have
shown in this project. We design and develop an
Arduino circuit with a smoke detector, LCD
Display and alarm. When the smoke detector
detects smoke (the detect measurement of
smoke can be configured regarding the size and
surroundings of the room), there is a LCD Display
which shows "Fire in room!" and the alarm rings
immediately. So someone can be aware about
the fire accidents even if he/she is in home at
the moment.

2.THEORY BEHIND THE PROJECT


Smoke detection circuit used here
involves the following components which
plays vital importance in building the
circuit and the components are :
1. Smoke sensor module (MQ 2)
2. Arduino UNO R3 module
3. LCD Display
4. Buzzer
5. Resistors
6. Bread board

7. Patch chords

2.1 Smoke sensor module


A smoke sensor is a device that senses smoke,
typically as an indicator of fire. Commercial and
residential security devices issue a signal to a
fire alarm control panel as part of a fire alarm
system, while household detectors, known as
smoke alarms, generally issue a local audible or
visual alarm from the detector itself.
The Analog Smoke/LPG/CO Gas Sensor
(MQ2) module utilizes an MQ-2 as the sensitive
component and has a protection resistor and
an adjustable resistor on board. The MQ-2 gas
sensor is sensitive to LPG, i-butane, propane,
methane, alcohol, Hydrogen and smoke. It
could be used in gas leakage detecting
equipments in family and industry. The
resistance of the sensitive component changes
as the concentration of the target gas changes.

Typical images of the MQ2 smoke


sensor in side view , top view and
bottom view as shown below :

Specifications:
1. Dimension: 32mm x 22mm x 30mm Specification:
2. Operating voltage: 5v
3. Detection Zone: 300 - 10000ppmm
4. Characteristic Gas: 1000ppmm
5. Sensitivity: R in air/ R in typical gas > 5
6. Response Time: <10s
7. Recovery time: <30s
8. Heating Resistance: 31ohm
9. Heating Current: <181mA
10. Heating Power: <900mW
11. Measuring Voltage: <24
12. Ambient Temperature: -20C - 55C
13. Humidity: <95%
14. Oxygen Content: 21%

Pin configuration

The MQ2 smoke sensor which we are using in the project


have the following pins :
1. VCC
2. D0 pin
3. A0 pin
4. GND
The four pins are used to fetch the signals which can be
analog or digital in nature. We connect Vcc to 5V DC and
GND to ground . Using high quality dual panel design, with
a power indicator and TTL signal output instruction ; with the
D0 switch signal (TTL) output , and A0 analog signal output ;
TTL output valid signal is low level.

TTL output signal can be connected


directly to a Arduino UNO R3 I/O port , and also
potentiometers can be used to control the output level
transition threshold. But This MQ2 sensor has built in
potentiometer that allows you to adjust the sensor
sensitivity according to how accurate you want to detect gas.
The voltage that the sensor
outputs changes according to the density of the smoke level
that exist in the atmosphere but in this we are creating the
smoke externally by burning the matchstick or in any other
ways. The sensor outputs a voltage that is proportional to
the concentration of the smoke.

Schematic Diagram :

Working :
The sensitive material of MQ2
smoke sensor is SnO2 which with lower
conductivity in clean air. When the target
combustible gas exists, the sensors conductivity
is more higher along with the gas concentration
rising.
The above is basic test circuit of
the sensor. The sensor need to be put 2 voltage,
heater voltage(VH) and test voltage (VC). VH
used to supply certified working temperature to
the sensor, while VC used to detect voltage (VRL)
on load resistance (RL) whom is in series with

sensor. The sensor has light polarity, Vc need DC


power. VC and VH could use same power circuit
with precondition to assure performance of sensor.
In order to make the sensor with better
performance, suitable RL value is needed: Power of
Sensitivity body(Ps):
Ps=Vc2 Rs/(Rs+RL)2
Smoke sensor composed by micro AL2O3 ceramic
tube, Tin Dioxide (SnO2) sensitive layer, measuring
electrode and heater are fixed into a crust made by
plastic and stainless steel net. The heater provides
necessary work conditions for work of sensitive
components. The enveloped MQ-2 have 6 pin, 4 of
them are used to fetch signals, and other 2 are used
for providing heating current.

2.2 Arduino-UNO R3
Arduino Uno is one of the microcontroller boards
manufactured by the Arduino and based on the
Atmels ATmega328 microcontroller, Uno means
one in Italian and the uno board is the latest in
a series of USB (Universal Serial Bus). Meanwhile,
Arduino board is a reference model for the
Arduino platform. The Arduino Uno board has a
16 MHz ceramic resonator, a USB connection, a
power jack, an ICSP header,
v a reset button, 6
analog inputs and also 14 digital input/output
pins. It uses the Atmega16U2 programmed as a
USB-to-serial converter. The board has 32 KB flash
memory of which 0.5 KB is used by boot-loader, 2
KB of SRAM, 1 KB of EEPROM and 16 MHz clock
speed [32].

Architecture of Arduino-UNO R3 :
There are many varieties of Arduino boards that
can be used for different purposes. The Arduino
UNO components are:

Power -USB / Barrel Jack


Our Arduino board needs a way to be connected
to a power source. The Arduino UNO can be
powered from a USB cable coming from your
computer or a wall power supply that is
terminated in a barrel jack. In the picture above
the USB connection is labeled and the barrel
jack is labeled .The USB connection is also how
you will load code onto your Arduino board.

Pins (5V, 3.3V, GND, Analog, Digital,


PWM, AREF)
The pins of Arduino are the places where connect
wires to construct a circuit. The Arduino has
several different kinds of pins, each of which is
labeled on the board and used for different
functions.
1. 5V: The 5V pin supplies 5 volts of power. Most
of the simple components used
2.Arduino run happily offv of 5 or 3.3 volts.
3.GND: Full name is Ground. There are several
GND pins on the Arduino, any of which can be
used to ground circuit.
4. Analog: The area of pins under the Analog In
label (A0 through A5 on the UNO) is Analog In
pins. These pins can read the signal from an
analog sensor and convert it into a digital value
that we can read.

5. Digital: Across from the analog pins are the


digital pins (0 through 13 on the UNO). These
pins can be used for both digital input and
digital output (like powering an LED).
6. PWM: The digital pins (3, 5, 6, 9, 10, and 11)
on theTheUNO
are
the
PWM(~)
pins.
These
Analog:
area of
pins
under
the Analog
In label
(A0 pins
through A5
on act
the UNO)
is Analogdigital
In pins. These
read
the be
signal
from an
as normal
pins,pins
butcan
can
also
used
analog sensor and convert it into a digital value that we can read.
for something called Pulse-Width Modulation
(PWM).
Digital:
Across from the analog pins are the digital pins (0 through
13 on the UNO). These pins can be used for both digital input and
digital output (like powering an LED).

7. AREF: Stands for Analog Reference. It is


sometimes
to5,set
PWM:
The digitalused
pins (3,
6, 9,an
10,external
and 11) on reference
the UNO are the
PWM(~)
pins.(between
These pins act
normal
digital as
pins,
butupper
can also be
voltage
0 as
and
5 Volts)
the
used for something called Pulse-Width Modulation (PWM).
limit for the analog input pins.
AREF: Stands for Analog Reference. It is sometimes used to set an
Getting
started
Arduino
Software
external
reference
voltage with
(between
0 and 5 Volts)
as the upper limit
for the analog input pins.

First download and install the Arduino for Mac,


Linux or Windows from arduino.cc. Windows
users also need to install a driver. Connect your
board via USB, launch the Arduino application
and select Arduino-Uno from the tools to board
menu. Open the sketch File.

The Integrated Development Environment


(IDE)
Every microcontroller needs software to be
programmed. The Arduino board is not a case
apart. It has its own integrated development
environment (IDE).It is free and everyone can
download it from its official website using either
the Windows, Mac OS X or Linux platform. That
allows Arduino Board to gain more users and it
also helps it to grow.

IDE Parts
1. Compile: Before program code can be sent
to the board, it needs to be converted into
instructions that the board understands. This
process is called Compiling.
2.Stop: This stops the compilation process.
3.Create new Sketch: This opens a new window
to create news ketch.
4.Open Existing Sketch: This loads a sketch from
a file on our computer.
5.Save Sketch: This saves the changes to the
sketch.

6.Upload to Board: This compiles and then


transmits over the USB cable to our board.
7.Serial Monitor: Until this point when our
programs (sketches) didnt work, we just pulled
out our hair and tried harder
8.Tab Button: This lets you create multiple files
in your sketch. This is for more advanced
programming than we will do in this class.
9.Sketch Editor:
ThistoisBoard:
where
Upload
Thiswrite or edit
sketches compiles and then transmits over
the USB cable to our board.
10.Text Console:
This shows you what the IDE is
Serial Monitor: Until this point
currently doing
is also (sketches)
where error
when and
our programs
didnt work,
we justapulled
out our
messages display
if make
mistake
in typing
hair and tried harder
program.
11.Line Number: This shows what line number
your cursor is on.

2.3 Liquid Crystal Display (LCD)


LCD (Liquid Crystal Display) screen is an electronic
display module and find a wide range of
applications. A 16x2 LCD display is very basic
module and is very commonly used in various
devices and circuits. These modules are preferred
over seven segments and other multi segment
LEDs. The reasons being: LCDs are economical;
easily programmable; have no limitation of
displaying special & even custom characters
(unlike in seven segments), animations and so on.
A 16x2 LCD means it can display 16 characters per
line and there are 2 such lines. In this LCD each
character is displayed in 5x7 pixel matrix. This LCD
has two registers, namely, Command and Data.
The command register stores the command
instructions given to the LCD. A command is an
instruction given to LCD to do a predefined task
like initializing it, clearing its screen, setting the
cursor position, controlling display etc. The data
register stores the data to be displayed on the
LCD. The data is the ASCII value of the character to
be displayed on the LCD

Circuit Design

We use 16 x 2 LCD for making expert for this project.


When we developed this we learn the basic properties of
Arduino board. Here we learned that A Read/ Write (R/W)
pin that selects reading mode or writing mode. The Enable
pin that enables writing to the registers .The 8 data pins
(D0 -D7). The states of these pins (high or low) are the bits
that we writing to a register. There's also a display contrast
pin (Vo), power supply pins (+5V and Ground)and LED
Backlight (Bklt+ and BKlt-) pins that web use to power the
LCD, control the display contrast, and turn on and off the
LED backlight, respectively.

2.4 Buzzer
Here buzzer is used for alarming purpose
whenever the smoke detecting circuit detects the
smoke then the buzzer will start buzzing here the
buzzer used is piezoelectric buzzer. A piezoelectric
element may be driven by oscillating electronic
circuit or other audio signal source, 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.

2.5 Resistors & connecting wires


Here the resistors are used for blocking the high
current. In this project we have four resistors
connected in parallel. Three 220 ohm and one
470 ohm resistors have been used in this project.
Connecting wires are also used to build the
whole circuit.

3. Circuit diagram & explanation


The whole system design is divided into two parts
to design a smart home appliance control system.
One is the design the smart system in the
breadboard and controls the designed system.
Another part is the display part design to send sms
. Finally, the smoke detector system is formed a
complete integrated system. In this project Arduino
is more efficient .

3.1 Schematic Circuit diagram

3.2 Implemented circuit :

3.3 Implementation :
initial steps in implementing the
smoke detector starts with interfacing all the
external components with the microcontroller
Arduino UNO R3 and the components involved in
interfacing are
1. Smoke sensor

2. Liquid crystal display (LCD)

3.4 Interfacing of MQ2 with Arduino:


This has only 4 pins to
interface with the Arduino i:e VCC ,GND, A0 and
D0
1. VCC pin of MQ2 sensor is connected to 5V
pin of arduino board.
2. GND pin of MQ2 sensor is connected to
ground pin of arduino board.
3. A0 is the analog output of MQ2 is connected
to any analog pins (A0-A7) of arduino.
4. D0 is the digital output is kept open since we
are not using digital output for the
implementation of this project

3.5 Interfacing the LCD display with


the Arduino UNO R3 :
We connect the LCD pins with Arduino in
following steps:
1. Pin 1 is connected to Arduino GND
2. Pin 2 is connected to Arduino 5V
3. Pin 3 is connected to wiper (this is the middle
pin of the 10k potentiometer )
4. Pin 4 is connected to Arduino pin 12
5. Pin 5 is connected to Arduino GND
6. Pin 6 is connected to Arduino pin 11
7. Pin 11 is connected to Arduino pin
8. Pin 12 is connected to Arduino pin 4
9. Pin 13 is connected to Arduino pin 3
Pin 14 is connected to Arduino
pin 2 Because we will only be writing, pin 5 will be
dropped to ground to show that there will be no
reading. For we use the backlight, connect LCD pin
16 to GND and LCD pin 15 to +4.2V.Connect one
side of the potentiometer to Arduino GND, the
opposite to Arduino 5v and the center to LCD pin
3. The pin 7, 8,9,10 are not used in the Arduino.

After interfacing all the


components externally to the arduino ,then
connect the smoke sensor to the breadboard
and the resistors are also connected in parallel
so that it will block the flow of high current into
the externals components. And we also connect
2 LED to breadboard to indicate presence or
absence of the smoke/gas. Now when mq2
detects smoke according to the written code
The configured LED will start blinking. We also
connect a buzzer as a alarm circuit to
breadboard so that it will start buzzing when
mq2 detects smoke.
After implementing the circuit
as steps mentioned above then we will connect
arduino to the computer via power jack then we
will check whether arduino is working properly.
Now code is written using arduino IDE software
and then code is compiled for errors and code is
dumped on aurduino.

3.6 Programming code :

#include<LiquidCrystal.h>

LiquidCrystal lcd(12, 11, 5, 4, 3, 2);


int
redLed=8,greenLed=7,buzzer=6,sensorValue=0
,Sensor=A4;
void setup()
{
pinMode(Sensor,INPUT);
pinMode(redLed,OUTPUT);
pinMode(greenLed,OUTPUT);
pinMode(buzzer, OUTPUT);
Serial.begin(9600);
lcd.begin(16,2);
}
void loop()
{
sensorValue=analogRead(Sensor);
Serial.println(sensorValue);
lcd.setCursor(0,0);
lcd.print("Fire Scan - ON");

if (sensorValue>=200)
{
lcd.setCursor(0,1);
lcd.print("Fire Alert");
digitalWrite(redLed,HIGH);
digitalWrite(greenLed, LOW);
tone(buzzer, 1000, 200);
delay(500);
}
else
{
digitalWrite(redLed, LOW);
digitalWrite(greenLed, HIGH);
noTone(buzzer);
lcd.setCursor(0,1);
lcd.print("SAFE NOW!!");
delay(500);
}
}

According to the code


given WE have configured The threshold value For
smoke is 200 and here Green LED is configured to
detect no smoke and RED LED is configured to
detect smoke
After dumping the code
to the Arduino UNO R3 we have two conditions
1. No smoke detected
2. Smoke detected

No smoke detected condition :


In this case there will be no
smoke near smoke sensor so analog output value
will less than the given threshold value so as
configured in code GREEN LED will be glowing and
BUZZER will be silent mode and LCD display will
be showing the message as below

SAFE NOW!!
The following imaged attached will indicate the no
smoke detected condition

smoke detected condition :


In this case smoke is
created by burning some small piece of paper or
we can create it by any other method and place
it near smoke sensor so there will be smoke
near smoke sensor so analog output value will
more than the given threshold value so as
configured in code RED LED will be glowing and
BUZZER will start beeping and LCD display will
be showing the message as below

Fire Alert
Indicating the smoke detected condition
following images
attached below will prove the smoke detected
condition

4. Conclusion:
The Smoke detector alarm system using
Arduino UNO R3 has been designed and
developed . We use 5V from Arduino board.
Finally, we have designed and developed and
tested using Smoke detector. We fix all the
problems encountered during the design and
testing of the system. Finally, we successfully
achieved in getting the correct output. So, our
Smoke detector alarm system using Arduino
UNO R3 is suitable.

5. Application
Smoke detectors found the general use as they
give the highest level of protection. They must
be used in escape routes to provide sufficient
early warning to allow the evacuation of
occupants.
In this project we made use of
ionization smoke detecting sensor which finds
following applications as given below:

1. High sensitivity to fast burning, flaming fires


that produce small smoke particles
2. Widely used for applications such as printing
workshop, paper mills and paint stores
3. Good for general purpose

6. Future Work Scope:


This project gives us an opportunity to do a big
project in future. The applications stated above
High sensitivity to fast burning, flaming fires that produce small
are some demo applications that are absolutely
smoke particles
possible
Widely
use with its future development. Initially for
Good
general purpose
the for
limitation
of time and required fund we were
able to develop just a Smoke detector alarm
system. The system will also work using GSM
communication. It will more efficient by using
16x2 LCD display. So, we have a big work scope in
this sector. We hope that, we will be able to
complete all the features needed for its ultimate
applications.

S-ar putea să vă placă și