Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Report On Smoke Detector

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 26

SCHOOL OF ELECTRONICS AND COMMUNICATION ENGINEERING

A COURSE BASED REPORT (IOT and Applications)


ON
“SMOKE DETECTOR”
Submitted in fulfillment of the requirements for the award of the Degree of

BACHELOR OF TECHNOLOGY
IN
ELECTRONICS AND COMPUTER ENGINEERING

Submitted by

ROSHAN ZAMEER (R23EPOO)


NIHITHA P MOOD (R23EP031)
GAGANA K (R23EP013)

Under the guidance of


Dr. VEENA K.N
Prof., School of ECE
REVA University

January 2024
Rukmini Knowledge Park, Kattigenahalli, Yelahanka, Bengaluru-560064
www.reva.edu.in

1
DECLARATION

We, ROSHAN ZAMEER , NIHITHA P MOOD , GAGANA K students of B.Tech, belongs to


School of electronics and communication Engineering, REVA University, declare that this IOT
Report “Smoke detector” is the result of work done by us under the supervision of Dr.Veena
KN, Professor School of ECE REVA University, Bengaluru.

We are submitting this Report in partial fulfillment of the requirements for the completion of
Course in IOT and Applications in I-Semester of Bachelor of Technology in Electronics and
Computer Engineering by the REVA University, Bengaluru during the academic year 2023-
2024.

(Signature of the Students)

January 2024

Certified that this work submitted by Mr.Roshan zameer , Nihitha P Mood,Gagana.K has been
carried out under our guidance and the declaration made by the candidates is true to the best of
our knowledge.

Signature of Faculty Signature of Director


Date: 12 January 2024 Date: 12 January
2024
Official Seal of the School

Name of the Examiner with affiliation Signature with Date

1.

2.

2
3
Contents

SL LIST OF CONTENTS PG NO
NO

1 INTRODUCTION 4

2 THEORY BEHIND THE PROJECT 5 -16

2.1 SMOKE SENSOR MODULE

2.2 AEDUINO UNO R3

2.3 LCD DISPLAY

2.4 BUZZER

2.5 RESISTORS AND CONNECTING WIRES

3 CIRCUIT DIAGRAM AND EXPLINATION 17 – 24

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 25

5 APPLICATION 25

6 FUTURE SCOPE 25

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

5
2.THEORY BEHIND THE PROJECT
Smoke detection circuit used hereinvolves the following components
whichplays vital importance in building thecircuit 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

6
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
equipment in family and industry. The resistance of the sensitive
component change as the concentration of the target gas changes.

7
Typical image of the MQ2 smoke sensor in side view, top
view and bottom view as shown below:

8
Specifications:

1. Dimension: 32mm x 22mm x 30mm Specification:2. Operating voltage: 5v3.


Detection Zone: 300 - 10000ppmm4. Characteristic Gas: 1000ppmm5. Sensitivity:
R in air/ R in typical gas > 5

6. Response Time: <10s

7. Recovery time: <30s8. Heating Resistance: 31ohm9. Heating Current:


<181mA10. Heating Power: <900mW11. Measuring Voltage: <24

12. Ambient Temperature: -20C - 55C

13. Humidity: <95%14. Oxygen Content: 21%

Pin configuration

9
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 theD0
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


ports, 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 change 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.

10
Schematic Diagram:

Working:

The sensitive material of MQ2smoke sensor is SnO2 which with lower


conductivity in clean air. When the target combustible gas exists, the sensor’s
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)2Smoke 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 pins, 4 of them are used to fetch signals,
and other 2 are used for providing heating current sensor.

11
2.2 Arduino-UNO R3

Arduino Uno is one of the microcontroller boards manufactured by the Arduino


and based on the Atmel’s ATmega328 microcontrolle ,“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 a16 MHz ceramic resonator, a USB connection, a power
jack, an ICSP header, a reset button, 6analog 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, 2KB 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:

12
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 off 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.
13
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 the UNO are the PWM (~)
pins. These pins act as normal digital pins, but can also be used for something
called Pulse-Width Modulation (PWM).

7.AREF: Stands for Analog Reference. It is sometimes used to set an external


reference voltage (between 0 and 5 Volts) as the upper limit for the analog input
pins.

Getting started with Arduino Software

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

14
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) didn’t 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: This is where write or edit sketches

10.Text Console: This shows you what the IDE is currently doing and is also
where error messages display if make a mistake in typing program.

11.Line Number: This shows what line number your cursor is on.

2.3

15
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
16
(R/W) pin that selects reading mode or writing mode. The Enable pin that enables
writing to the register . 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 piezo electric 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 one470 ohm resistors have
been used in this project. Connecting wires are also used to build the whole circuit.

17
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

18
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 inter facing are
1. Smoke sensor
2. Liquid crystals display (LSD)

19
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 5Vpin 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

20
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 GND2. Pin 2 is connected to Arduino 5V3. Pin 3
is connected to wiper (this is the middle pin of the 10k potentiometer )4.
Pin 4 is connected to Arduino pin 125. Pin 5 is connected to Arduino
GND6. Pin 6 is connected to Arduino pin 117. Pin 11 is connected to
Arduino pin8. Pin 12 is connected to Arduino pin 49. Pin 13 is
connected to Arduino pin 3Pin 14 is connected to Arduino pin 2 Because
we will only be writing, pin 5 will bedropped to ground to show that
there will be no reading. For we use the backlight, connect LCD pin16 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 pin3.
The pin 7, 8,9,10 are not used in the Arduino.

21
22
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 connect2 LED to breadboard to
indicate presence or absence of the smoke/gas. Now when mq2detects
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 whenmq2 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 the library code:

#include <LiquidCrystal.h> //library for LCD

// initialize the library with the numbers of the interface pins

LiquidCrystal lcd(13, 12, 11, 10, 9, 8);

// defines pins numbers

const int SensorPin = 2;

const int LEDPin = 6;

const int BuzzerPin = 7;

void setup() {

pinMode(SensorPin, INPUT); // Sets the Pin as an Input

pinMode(LEDPin, OUTPUT); // Sets the Pin as an OUTPUT

pinMode(BuzzerPin, OUTPUT); // Sets the Pin as an OUTPUT

lcd.begin(20, 4); // set up the LCD's number of columns and rows:

lcd.setCursor(0,0); // set the cursor position:

lcd.print(" THE BRIGHT LIGHT ");

23
lcd.setCursor(0,1);

lcd.print(" LPG GAS DETECTOR");

void loop() {

if(digitalRead(SensorPin) == HIGH)

digitalWrite(LEDPin,HIGH);

digitalWrite(BuzzerPin,HIGH);

// Prints Message on the LCD

lcd.setCursor(0,3);

lcd.print(" Gas Detected ");

delay(70);

lcd.setCursor(0,3);

lcd.print(" Gas Detected. ");

delay(70);

lcd.setCursor(0,3);

lcd.print(" Gas Detected.. ");

delay(70);

lcd.setCursor(0,3);

lcd.print(" Gas Detected... ");

delay(70);

else{

digitalWrite(LEDPin,LOW);

digitalWrite(BuzzerPin,LOW);
24
// Prints Message on the LCD

lcd.setCursor(0,3);

lcd.print(" No Gas ");

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.

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.

25
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 are some demo applications that are absolutely possible with its future
development. Initially for the 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 using16x2 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.

26

You might also like