Professional Documents
Culture Documents
Fire Alarm System Using Arduino Uno
Fire Alarm System Using Arduino Uno
BACHELOR OF TECHNOLOGY
IN
Submitted by
Mr.M.RAGHUNATH REDDY
Asst.Professor
i
2016-2020
BONAFIDE CERTIFICATE
This is to certify that the project entitled “FIRE ALARM SYSTEM USING ARDUINO
UNO” is a bonafide work of “D.PRAJWALA(16491A0464) ,K.SIRISHA (16491A0412),
T.SWAPANA(16491A04D9),SK.SHAMINA(16491A04D8)”In the partial fulfillment of the
requirement for the award degree of Bachelor Technology in ELECTRONICS AND
COMMUNICATION ENGINEERING in the Academic year 2019-2020.This work is under
my supervision and guidance.
ii
Signature of External Examiner:
ACKNOWLEDGEMENT
The satisfaction that accompanies the successful completion of any task would be incomplete
without mentioning the people who made it possible and whose encouragement and guidance has
been a source of inspiration throughout the course of the project.
We would like to thank Sri N.Nagaeswara Rao, Secretary & Correspondent of QIS College
of Engineering and Technology for providing the resources and supporting us in our endeavors.
We would like to thank Dr. D. Venkata Rao, PRINCIPAL of QIS College of Engineering and
Technology for supporting us in our endeavors.
We would like to thank Dr.Ch.HimaBindu, Professor and Hod, Head of the Department of
Electronics and Communication Engineering Department in QIS College of Engineering and
Technology for supporting us in our endeavors.
We would also like to express our profound sense of gratitude to our guide
Mr.M.RaghunathReddy Asst.Professor, of Electronics and Communication Engineering
Department in QIS College of Engineering and Technology for inspiring and guiding us
throughout the project. The suggestions and ideas given by our guide were most valuable.
Furthermore, we would like to thank our family and friends for their moral support and
encouragement in successful completion of the project work
Submitted by:
iii
ABSTRACT
This paper presents the detection of fire using flame sensor employing Arduino Uno
board.
This is an Arduino based fire detection that uses a flame sensor to sense the fire occurred
with few distance and a buzzer to give an alarm and also blink a led for identification
purpose. sometimes we can use an LCD to display .flame sensor that we used in the
circuit can sense up to 23-30 cm .The Arduino board consisting of microcontroller as
ATMEGA328 and the language that is used is simple C language in the Arduino IDE
where as we can use python language too.
iv
INDEX
Title Pg.no
Acknowledgment iii
Abstract iv
v
CHAPTER -3 : FLAME SENSOR
REFERNCES 24
vi
LIST OF FIGURES
3.2 Interfacing 20
vii
LIST OF TABLES
viii
CHAPTER-1
INTRODUCTION TO EMBEDDED SYSTEM
An embedded system is one kind of a computer system mainly designed to perform several tasks like to
access, process, store and also control the data in various electronics-based systems. Embedded
systems are a combination of hardware and software where software is usually known as firmware that is
embedded into the hardware. One of its most important characteristics of these systems is, it gives the o/p
within the time limits. Embedded systems support to make the work more perfect and convenient. So, we
frequently use embedded systems in simple and complex devices too. The applications of embedded
systems mainly involve in our real life for several devices like microwave, calculators, TV remote
control, home security and neighborhood traffic control systems.
1
1.2 Embedded System Software
The software of an embedded system is written to execute a particular function. It is normally written in a
high-level setup and then compiled down to offer code that can be stuck within a non-volatile memory in
the hardware. An embedded system software is intended to keep in view of the following three limits
A system which is essential to finish its task and send its service on time, then only it said to be a real
time operating system. RTOS controls the application software and affords a device to allow the
processor run. It is responsible for managing the different hardware resources of a personal computer and
also host applications which run on the PC.
The different kinds of processors used in an embedded system include Digital Signal Processor (DSP),
microprocessor, RISC processor, microcontroller, ASSP processor, ASIP processor, and ARM processor.
The different types of memories of an embedded system are given in the below chart.
2
1.5 Embedded System Characteristics
Generally, an embedded system executes a particular operation and does the similar continually. For
instance: A pager is constantly functioning as a pager.All the computing systems have limitations on
design metrics, but those can be especially tight
1. Design metric is a measure of an execution features like size, power, cost and also performance. It must
perform fast enough and consume less power to increase battery life.
2. Several embedded systems should constantly react to changes in the system and also calculate
particular results in real time without any delay
6. It does not require any secondary memories in the PC.It must need connected peripherals to attach
input & output devices
The applications of an embedded system basics include smart cards, computer networking, satellites,
telecommunications, digital consumer electronics, missiles, etc.
CHAPTER -2
3
COMPONENTS REVIEW
The Arduino Uno SMD is a version of the Arduino Uno, but uses an surface mount version of
the Atmega328P instead of the through-hole version. This version was made in response to a
shortage in supply of the through-hole Atmega328P.
The board is based on the ATmega328 (datasheet). It has 14 digital input/output pins (of which 6
can be used as PWM outputs), 6 analog inputs, a 16 MHz crystal oscillator, a USB connection, a
power jack, an ICSP header, and a reset button. It contains everything needed to support the
microcontroller; simply connect it to a computer with a USB cable or power it with a AC-to-DC
adapter or battery to get started.
"Uno" means one in Italian and is named to mark the upcoming release of Arduino 1.0. The Uno
and version 1.0 will be the reference versions of Arduino, moving forward. The Uno is the latest
in a series of USB Arduino boards, and the reference model for the Arduino platform for a
comparison with previous versions.
The official Arduino language is a simplified derivative of C/C++, so if you have any experience
with that, then you should be good to go. We do recommend using the official Arduino language
if you’re able because it guarantees full coverage of the Arduino API and platform. But other
languages are also available , including C#, Python, and a few visual scripting languages that are
great if you have absolutely no programming experience.
As an overall assessment, while the Arduino ecosystem may or may not give the maximum from
the microcontroller used, it offers high portability and programming convencience at the cost of
the last of performance. In contrast, programming "general microcontrollers" requires a lot more
effort, offers little portability and less "comfort"; doing so unleashes the full performance of the
individual microcontroller.
2.1.1 : SPECIFICATIONS
4
Microcontroller : ATmega328P
Operating Voltage : 5V
Input Voltage (recommended) : 7-12V
Inout Voltage (limit) : 6-20V
Digital I/O Pins : 14 (of which 6 provide PWM output)
PWM Digital I/O Pins : 6
Analog Input Pins : 6
DC Current per I/O Pin : 20 mA
DC current for 3.3V Pin : 50 mA
Flash Memory : 32 KB (ATmega328P)
SRAM : 2 KB (ATmega328P)
EEPROM : 1 KB (ATmega328P)
Clock Speed : 16 MHz
LED_BUILTIN : 13
Length : 68.6 mm
Width : 58.4 mm
Table 2.1 : Arduino Uno Specifications
It is an easy USB interface. This allows interface with USB as this is like a serial device.The chip
on the board plugs straight into your USB port and supports on your computer as a virtual serial
port. The benefit of this setup is that serial communication is an extremely easy protocol which is
time-tested and USB makes connection with modern computers and makes it comfortable.
It is easy-to-find the microcontroller brain which is the ATmega328 chip. It has more number of
hardware features like timers, external and internal interrupts, PWM pins and multiple sleep
modes.
It is an open source design and there is an advantage of being open source is that it has a large
community of people using and troubleshooting it. This makes it easy to help in debugging
projects.
It is a 16 MHz clock which is fast enough for most applications and does not speeds up the
microcontroller.
5
It is very convenient to manage power inside it and it had a feature of built-in voltage regulation.
This can also be powered directly off a USB port without any external power. You can connect an
external power source of upto 12v and this regulates it to both 5v and 3.3v. 13 digital pins and 6
analog pins. This sort of pins allows you to connect hardware to your Arduino Uno board
externally. These pins are used as a key for extending the computing capability of the Arduino
Uno into the real world. Simply plug your electronic devices and sensors into the sockets that
correspond to each of these pins and you are good to go.
This has an ICSP connector for bypassing the USB port and interfacing the Arduino directly as a
serial device. This port is necessary to re-bootload your chip if it corrupts and can no longer used
to your computer.
An on-board LED is attached to digital pin 13 to make fast the debugging of code and to make
the debug process easy.
a. Arduino Uno R3
The Arduino Uno is a microcontroller board based on the ATmega328. It has 20 digital input/output pins
(of which 6 can be used as PWM outputs and 6 can be used as analog inputs)16 MHz resonator, a USB
connection, a power jack, an in-circuit system programming (ICSP) header, and a reset button. It contains
6
everything needed to support the microcontroller; simply connect it to a computer with a USB cable or
power it with a AC-to-DC adapter or battery to get started.
This is the 3rd revision of the Uno (R3), which has a number of changes:
The USB controller chip changed from ATmega8U2 (8K flash) to ATmega16U2 (16K flash). This does
not increase the flash or RAM available to sketches.
Three new pins were added, all of which are duplicates of previous pins. The I2C pins (A4, A5) have
been also been brought out on the side of the board near AREF. There is a IOREF pin next to the reset
pin, which is a duplicate of the 5V pin.
b.Lilypad Arduino
Arduino LilyPad is an Arduino Main Board that is mainly designed for e-textiles and wearables
projects and is based on ATmega168 or ATmega328.LilyPad is nothing but an Arduino-programmed
microcontroller and works similar to other Arduino boards available.
It comes in round shape and houses a same number of functionalities what a regular Arduino Board is
capable of doing with the intention of performing a number of function on a single chip.
However, the ability of this board to be sewn down with the fabric or sensor through conductive thread
puts it ahead and stands out of the boards available in the Arduino community.
There are total 22 wide open pin-holes appear around the edge of the whole rounded shape that are
mainly used for the connection with the fabric and sensor through a conductive thread. Out of these 22
pin holes, one is reserved for +5V, and one for ground.
c. RedBoard Arduino Board.
7
Fig 2.3 : Redboard arduino
The RedBoard also serves as an excellent physical computing learning platform. We've designed the
RedBoard to be as easy-to-use as possible. It can be used to help teach both programming and electronics
concurrently -- two skills that are becoming significantly important in today's high-tech world.
Each Arduino board has its own strengths and weaknesses, but the RedBoard is the only one that
combines the simplicity of the Arduino UNO bootloader, compatibility with the UNO R3 shield and the
versatility of the FTDI chip used on the much-missed Arduino Duemilanove. And lo, the Arduino IDE
programmable SparkFun RedBoard was born! In concrete terms, simply connect it with a mini-B USB
cable to begin programming your microcontroller in the Arduino environment. The Arduino IDE can be
downloaded free of charge from our resources section. The little bonus that will make you even happier?
The board offers the SDA, SCL and IOREF pins found also on the UNO R3, making your RedBoard
compatible with all future shields designed for the R3.
8
Fig 2.4 : arduino mega
The MEGA 2560 is designed for more complex projects. With 54 digital I/O pins, 16 analog
inputs and a larger space for your sketch it is the recommended board for 3D printers and
robotics projects. This gives your projects plenty of room and opportunities.
Each of these Arduinos have a different number of I/O pins. The board with the most pins is the
Mega 2560, which comes in with a whopping 54 Digital I/O pins (were 15 of them have PWM) and
has 16 Input Analog pins. Surprisingly, the Micro has the 2 nd most pins out of the three, having 20
Digital I/O pins (with 7 of them having PWM) and 12 Input Analog pins. Coming in last is the
Uno, which has 14 Digital I/O pins (with 6 of them having PWM) and 6 Input Analog pins.
The following tables shpws the comparions between the Arduino UNO,MEGA
whivh gives us clarity about the performance and all other features.
9
Table 2.2 : Comparsion Between Arduino Uno And Arduino Mega
e. Arduino Leonardo Board
The Microcontroller on the board incorporates a built-in USB communication, setting you free from the
use of a secondary processor. The USB communication helps Leonardo disguise the mouse or keyboard
when it is connected to a computer.
The module supports the crystal oscillator with the frequency up to 16 MHz that is enough to generate
clock pulses with decent pace required for the synchronization of all the internal operations.
10
Arduino Radar (Sonar)
Every 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 (like this) that is
terminated in a barrel jack. In the picture above the USB connection is labeled (1) and the barrel jack is
labeled (2).
The USB connection is also how you will load code onto your Arduino board. More on how to program
with Arduino can be found in our Installing and Programming Arduino tutorial. Pins (5V, 3.3V, GND,
Analog, Digital, PWM, AREF)
The pins on your Arduino are the places where you connect wires to construct a circuit (probably in
conjuction with a breadboard and some wire. They usually have black plastic ‘headers’ that allow you to
11
just plug a wire right into the board. The Arduino has several different kinds of pins, each of which is
labeled on the board and used for different functions.
• GND (3) : Short for ‘Ground’. There are several GND pins on the Arduino, any of which can be used to
ground your circuit.
• 5V (4) & 3.3V (5) : As you might guess, the 5V pin supplies 5 volts of power, and the 3.3V pin
supplies 3.3 volts of power. Most of the simple components used with the Arduino run happily off of 5 or
3.3 volts.
• Analog (6) : The area of pins under the ‘Analog In’ label (A0 through A5 on the UNO) are Analog In
pins. These pins can read the signal from an analog sensor (like a temperature sensor) and convert it into a
digital value that we can read.
• Digital (7) : Across from the analog pins are the digital pins (0 through 13 on the UNO). These pins can
be used for both digital input (like telling if a button is pushed) and digital output (like powering an
LED).
• PWM (8) : You may have noticed the tilde (~) next to some of the digital pins (3, 5, 6, 9, 10, and 11 on
the UNO). These pins act as normal digital pins, but can also be used for something called Pulse-Width
Modulation (PWM). We have a tutorial on PWM, but for now, think of these pins as being able to
simulate analog output (like fading an LED in and out).
• AREF (9) : Stands for Analog Reference. Most of the time you can leave this pin alone. It is sometimes
used to set an external reference voltage (between 0 and 5 Volts) as the upper limit for the analog input
pins
Just like the original Nintendo, the Arduino has a reset button (10). Pushing it will temporarily
connect the reset pin to ground and restart any code that is loaded on the Arduino. This can be very useful
if your code doesn’t repeat, but you want to test it multiple times. Unlike the original Nintendo however,
blowing on the Arduino doesn't usually fix any problems.
12
2.2.3 Power LED Indicator
Just beneath and to the right of the word “UNO” on your circuit board, there’s a tiny LED next to
the word ‘ON’ (11). This LED should light up whenever you plug your Arduino into a power source. If
this light doesn’t turn on, there’s a good chance something is wrong. Time to re-check your circuit!
2.2.4 TX RX LEDs
TX is short for transmit, RX is short for receive. These markings appear quite a bit in electronics
to indicate the pins responsible for serial communication. In our case, there are two places on the Arduino
UNO where TX and RX appear -- once by digital pins 0 and 1, and a second time next to the TX and RX
indicator LEDs (12). These LEDs will give us some nice visual indications whenever our Arduino is
receiving or transmitting data (like when we’re loading a new program onto the board).
Memory : The ATmega328 has 32 KB (with 0.5 KB used for the bootloader). It also has 2 KB of SRAM
and 1 KB of EEPROM (which can be read and written with the EEPROM library).
2.2.5 Main IC
The black thing with all the metal legs is an IC, or Integrated Circuit (13). Think of it as the
brains of our Arduino. The main IC on the Arduino is slightly different from board type to board type, but
is usually from the ATmega line of IC’s from the ATMEL company. This can be important, as you may
need to know the IC type (along with your board type) before loading up a new program from the
Arduino software. This information can usually be found in writing on the top side of the IC. If you want
to know more about the difference between various IC's, reading the datasheets is often a good idea.
13
PIN DIAGRAM
The voltage regulator (14) is not actually something you can (or should) interact with on
the Arduino. But it is potentially useful to know that it is there and what it’s for. The voltage
regulator does exactly what it says -it controls the amount of voltage that is let into the Arduino
14
board. Think of it as a kind of gatekeeper; it will turn away an extra voltage that might harm the
circuit. Of course, it has its limits, so don’t hook up your Arduino to anything greater than 20
volts.
CHAPTER -3
FLAME SENSOR
This Flame Sensor can be used to detect fire source or other light sources of the wave length 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. Sensor can be
a great addition in a fire fighting robot, it can be used as a robot eyes to find the fire source. When the
sensor detects flame the Signal LED will light up and the D0 pin goes LOW
When fire burns it emits a small amount of Infra-red light, this light will be received by the Photodiode
(IR receiver) on the sensor module. Then we use an Op-Amp to check for change in voltage across the IR
Receiver, so that if a fire is detected the output pin (DO) will give 0V(LOW) and if the is no fire the
output pin will be 5V(HIGH).
In this project we are using an IR based flame sensor. It is based on the YG1006 sensor which is a high
speed and high sensitive NPN silicon phototransistor. It can detect infrared light with a wavelength
ranging from 700nm to 1000nm and its detection angle is about 60°. Flame sensor module consists of a
photodiode (IR receiver), resistor, capacitor, potentiometer, and LM393 comparator in an integrated
circuit. The sensitivity can be adjusted by varying the on board potentiometer. Working voltage is
between 3.3v and 5v DC, with a digital output. Logic high on the output indicates presence of flame or
fire. Logic low on output indicates absence of flame or fire.
3.1 FEATURES
15
SIGNAL pin gives a digital output
Adjustable sensitivity
Digital Output
Fixed bolt holes for easy mounting (Small size: 3.2cm x 1.4cm)
Digital/Analog output
There are three subcategories of flame detectors: optical, UV, and IR.
1. Optical detectors: The most commonly used, these feature optical sensors for detecting flames.
2. UV detectors: These work very quickly. They can detect open flames, explosions, and fires within
four milliseconds, due to the UV radiation emitted at the instant of ignition. However, to prevent
accidental triggers, some UV detectors are designed to integrate a three second time delay.
3. IR detectors: Infrared detectors monitor the head radiation that is generated by open flames and fire.
They have a response time of three to five seconds. Accidental triggers can be caused by nearby hot
surfaces and background thermal radiation. False alarms can be decreased with the use of special
programming algorithms, which are designed to recognize the frequency of flame flickering.
Hydrogen stations
16
Oil and gas pipelines
Nuclear facilities
Aircraft hangars
Turbine enclosures
a. PHOTO TRANSISTOR
Characteristics :
17
Available with gains from 100 to over 1500.
ADVANTAGES
Phototransistors are very fast and are capable of providing nearly instantaneous
output.
APPLICATIONS
Punch-card readers.
Security systems
IR detectors photo
electric controls
Computer logic circuitry.
Relays
18
b. VOLTAGE COMPARATOR
It compares these voltage inputs and determines which is the larger value. Based on this, electronic
decisions can be made based on which input is greater and which is smaller. Thus, a comparator is very
useful in circuits where we measure levels and want our circuit to act a certain way based on whether the
level of an input is greater or smaller than a certain threshold
D0 & A0 are the two pins which has to be connected to the ardunio board pins for analog inputs as well
as digital inputs
Circuit diagram
VCC – VCC
GND – GND
A0 – A0(Analog Output)
19
LED +ve pin is connected to 9th pin of arduino
After interfacing flame sensor,led,buzzer to the arduino board we will write a program In the ardunio
IDE which is compiled first for any errors and then uploaded into the arduino uno board .
Before writing the program in the arduino IDE check for the port of the Arduino board port and connect it
as CM04 or CM05 and the Type of Arduino board.
IF any error occurred during uploading the code code to the board we have to check for serial port.
20
CHAPTER -4
After writing the code in the Arduino software we need to the check the code and then compile for any
errors. If errors present they need to be corrected and then upload the code into the arduino board by
connectoing a cable to our pc to Arduino board. Then the code is uploaded into Arduino board and the the
actual process starts by the arduino indicating the power ON by the power indicatior in the Arduino. This
is shown in the figure below :
Now the sensor ,led and buzzer get ready for the flame or fire .If we place the fire or flame infront of the
sensor the sensor senses it and then buzzer gives alarm with glowing led which indicates the occurrence
of the fire along with the buzzer.
21
Fig 4.2 : Final Output
22
REFERENCES
[9] International Journal for Innovative Research in Science & Technology (IJIRST)-
Volume 1-May 2015’
[1] "https://en.m.wikipedia.org/wiki/Flame_detector," .
[4] "183474-da-01-en-Flamesensor_TGS_813".
[5] "www.madehow.com/Volume-2/Flame-Detector.html," .
[6] "www.electroschematics.com,"
23
24