Project tutorial
DIY Arduino Fire Alarm System At Home

DIY Arduino Fire Alarm System At Home © GPL3+

Build your Fire Alarm System at home with Arduino UNO. In this tutorial, you will learn all steps to DIY  Arduino fire alert system.

  • 18,879 views
  • 1 comment
  • 20 respects

Components and supplies

Apps and online services

About this project

Build your Fire Alarm System at home with Arduino UNO. In this tutorial, you will learn all steps to DIY  Arduino fire alert system by yourself. In this project, we need IR based flame sensor to detect firelight, and it gives a signal to Arduino where buzzer connected to provide us with the output as fire alert.

There is two type of flame sensors available one is Analog and other Digital. Some sensor has both feature you can use easily just need little bit changes on the sketch, not an issue at all. We will use both sensors and here will be both source code available in the relevant section.

Arduino Fire Alarm System:

Build fire alarm or fireplace detector the use of Flame sensor and Arduino board. The sensor mainly detects IR (Infra purple) light wavelength between 760 nm – 1100 nm (nanometer) that emitted from fire flame. Most of the fire sensors got here with the YG1006 sensor which is an excessive velocity and excessive sensitive NPN silicon photograph transistor. It’s miles included with black epoxy, for the reason that sensor is touchy to infrared radiation. Through using this concept assignment you can recognize the way to screen and alert approximately hearth flame, it is maximum appropriate for fireplace combating robotic, fire alarm and so forth.

What you will need:

  • Arduino UNO ( Any)
  • Flame Sensor.
  • Buzzer.
  • Jumper wires.
  • 9V supply.

The cost is around about ten bucks for this fire alarm system. You can but all the stuff from any online site like Amazon, eBay, Aliexpress…

Flame Sensor circuit diagram:

Now you need to wiring all the components with each other correctly. See below for both type of sensors.

If you have Digital sensor connect as per shown in the image.

In case you have A0 (Analog sensor) then wiring will be as in the picture.

Source code for Flame sensor:

Code for Digital flame sensor. (D0)

// http://www.mrmodder.com visits for more Arduino Projects //
int Buzzer = 13; // Use buzzer for alert 
int FlamePin = 2; // This is for input pin
int Flame = HIGH; // HIGH when FLAME Exposed
 
void setup() {
 pinMode(Buzzer, OUTPUT);
 pinMode(FlamePin, INPUT);
 Serial.begin(9600);
}
 
void loop() {
 Flame = digitalRead(FlamePin);
 if (Flame== HIGH)
 {
 Serial.println("HIGH FLAME");
 digitalWrite(Buzzer, HIGH);
 }
 else
 {
 Serial.println("No flame");
 digitalWrite(Buzzer, LOW);
 }
}

Source Code for A0 Analog flam sensor.

//        http://www.mrmodder.com   visits for more Arduino Projects //
const int analogPin = A0;    // Flame Sensor (A0) to Arduino analog input pin A0
const int BuzzerPin = 13;       // Buzzer output pin
const int threshold = 400;   // Flame level threshold (You can vary the value depends on your need)
 
void setup() {
  
  pinMode(BuzzerPin, OUTPUT);
  // initialize serial communications:
  <b>Serial</b>.begin(9600);
}
 
void loop() {
  // read the value of the Flame Sensor:
  int analogValue = analogRead(analogPin);
   <b>Serial</b>.println(analogValue); //serial print the FLAME sensor value
  
  if (analogValue &gt; threshold) {
    digitalWrite(BuzzerPin, HIGH);
    <b>Serial</b>.print("High FLAME");
  } 
  else if (analogValue = threshold){
    <b>Serial</b>.print("Low FLAME");
    digitalWrite(BuzzerPin, HIGH);
    delay(400);
    digitalWrite(BuzzerPin, LOW);
  }
  else {
    digitalWrite(BuzzerPin, LOW);
    <b>Serial</b>.print("No flame");
  }
 
  delay(1);       
}

Upload the relevant code to Arduino Board test flame sensor it can detect fire from according to my testing maximum 3 feet. However, it depends on sensor quality it may be different on your sensor.

The users also Read:

For more project Surf on Mr-Modder Dot COM. If you like must share it with others. In case you stuck on any step just comment below I will soon solve your issue.

Code

Code for Digital flame sensorC/C++
This is the main code for digital flame sensor D0. Just upload it to Arduino.
// http://www.mrmodder.com visits for more Arduino Projects //
int Buzzer = 13; // Use buzzer for alert 
int FlamePin = 2; // This is for input pin
int Flame = HIGH; // HIGH when FLAME Exposed
 
void setup() {
 pinMode(Buzzer, OUTPUT);
 pinMode(FlamePin, INPUT);
 Serial.begin(9600);
 
}
 
void loop() {
 Flame = digitalRead(FlamePin);
 if (Flame== HIGH)
 {
 Serial.println("HIGH FLAME");
 digitalWrite(Buzzer, HIGH);
 }
 else
 {
 Serial.println("No flame");
 digitalWrite(Buzzer, LOW);
 }
}
Source Code for A0 Analog flam sensor.C/C++
Upload this code to Arduino board if you are using Analog sensor A0
//        http://www.mrmodder.com   visits for more Arduino Projects //
const int analogPin = A0;    // Flame Sensor (A0) to Arduino analog input pin A0
const int BuzzerPin = 13;       // Buzzer output pin
const int threshold = 400;   // Flame level threshold (You can vary the value depends on your need)
 
void setup() {
  
  pinMode(BuzzerPin, OUTPUT);
  // initialize serial communications:
  <b>Serial</b>.begin(9600);
}
 
void loop() {
  // read the value of the Flame Sensor:
  int analogValue = analogRead(analogPin);
   <b>Serial</b>.println(analogValue); //serial print the FLAME sensor value
  
  if (analogValue &gt; threshold) {
    digitalWrite(BuzzerPin, HIGH);
    <b>Serial</b>.print("High FLAME");
  } 
  else if (analogValue = threshold){
    <b>Serial</b>.print("Low FLAME");
    digitalWrite(BuzzerPin, HIGH);
    delay(400);
    digitalWrite(BuzzerPin, LOW);
  }
  else {
    digitalWrite(BuzzerPin, LOW);
    <b>Serial</b>.print("No flame");
  }
 
  delay(1);       
}

Custom parts and enclosures

1x Flame sensor any type.
1x Buzzer.
1x Arduino board.
some jumper wires
Tsbk7l7oy4u78qxhroti

Schematics

analog diagram
Oii67hqonkqaddo7wpna
Digital Diagram
Txvwx8n3ehub2zmniluh

Comments

Similar projects you might like

DIY Temperature & Humidity & Smoke Detector Alarm System

Project tutorial by ICStation Team

  • 7,930 views
  • 0 comments
  • 5 respects

Plant watering alarm system with arduino

Project tutorial by Giannis Arvanitakis

  • 3,393 views
  • 1 comment
  • 5 respects

Buzzer Alarm System With Help Of Arduino

by Team ONYX

  • 37,977 views
  • 5 comments
  • 21 respects

Distance Alarm System

Project tutorial by Darwin Dela Cruz

  • 2,973 views
  • 3 comments
  • 14 respects

Alarm System Security Put to the Test

Project tutorial by danionescu

  • 12,764 views
  • 4 comments
  • 23 respects

SERENA: Alarm Control Panel

Project tutorial by Michael Marinis

  • 6,895 views
  • 0 comments
  • 13 respects
Add projectSign up / Login