Apartment Fire Monitor

Made by Ran Tao

Found in Home Hack

The most inclusive and direct interpretation of “electrical fire” is a fire involving some type of electrical failure or malfunction. Any equipment powered by electricity can have such a failure. The Apartment Fire Monitor is an IoT device that the user can put it near the cluster of wires. When a fire is detected, it will alert user until the dangerous situation is over and the user reset it.

0

Problem Statement

An electrical fire is a fire involving some type of electrical failure or malfunction. In 2007-2011, home electrical fires represented 13% of total home structure fires, 18% of associated civilian deaths, 11% of associated civilian injuries, and 20% of associated direct property damage. Therefore, this device is designed for monitoring and preventing the electrical fire in apartments. It would be especially useful for users who are often not at home. With the IoT technology, this Apartment Fire Monitor can alert the user and even the local fire department remotely. 

0

Goal

The device will have the ability to detect flame so that it can distinguish if a fire is happening. It should be connected to the Internet as an IoT device so that it can alert the user and the fire department remotely when it detects a fire. With a buzzer, it can also prevent the fire that happens at night. 

0

Process

This device is built upon the Particle Photon microcontroller. To start with, it is important to know what the flame sensor outputs. I then composed a simple circuit to test the flame sensor.

0

Then I found out that the output of the flame sensor is a number - normally it is over 300 but drops to less than 190 when it detects a fire nearby. 

After getting clear of how the flame sensor works, it is time to add a buzzer so that the device can notify people nearby that a fire is happening.

0

Since I hope the buzzer can wake people up and let them check if everything is okay, I need to add a push button to reset the buzzer once everything is checked. Therefore, once triggered, the buzzer will keep alarming until the reset button is pressed.

0

The last component to add is a LED which indicates the running status of the device. It will pulse lightly when the device is monitoring but blink when the alarm is on.

Based on the designed functions, it should include:

  • A Particle Photon microcontroller
  • A breadboard to hold the components
  • A LED to indicate the running status
  • A flame sensor to detect fire
  • A buzzer to notify user
  • A small push button for user to check the situation and reset the device
  • A 1kΩ resistor to stabilize the LED light

Besides, to notify the user remotely, IFTTT is used so that user can get a text message when the device detects a fire.

0

Outcome

The following is the completed final code.

0
int sensor = A4;
int ledPin = D2;
int interrupt = D1;
int buzzer = D0;
int flame;

unsigned long button_time = 0;
unsigned long last_button_time = 0;

void setup() {
  pinMode(sensor, INPUT);
  pinMode(ledPin, OUTPUT);
  pinMode(buzzer, OUTPUT);
  Particle.variable("flame", &flame, INT);//cloud variable for IFTTT
  attachInterrupt(interrupt, restart, FALLING);
}

void loop() {
  flame = analogRead(sensor);//<190 when fire
  if (flame <= 190){
    digitalWrite(buzzer, HIGH);
    digitalWrite(ledPin, HIGH);
    delay(100);
    digitalWrite(ledPin, LOW);
    delay(100);
  }else{
    for(int fadeValue = 0; fadeValue <= 50; fadeValue +=2) {
      analogWrite(ledPin, fadeValue);
      delay(100);
    }
    for(int fadeValue = 50; fadeValue >= 0; fadeValue -=2) {
      analogWrite(ledPin, fadeValue);
      delay(100);
    }
  }
}

void restart(){
  button_time = millis();
  if (button_time - last_button_time > 1000){
    digitalWrite(buzzer, LOW);
    last_button_time = button_time;
  }
}
Click to Expand
0

The final circuit diagram is as the following.

0

The parts cost around $29.00 including:

  • A Particle Photon - $19.00
  • A breadboard - $4.95
  • A flame Sensor - $1.99
  • A buzzer - $1.95
  • A push button - $0.50
  • A LED - $0.50
  • A 1kΩ resistor - $0.04
The final result is shown in the video below.
0
Apartment Fire Monitor
Olewaaa TaoRan - https://youtu.be/WOpwB4JNHzY
0

Reflection

This project is a great chance to learn how to design and build an IoT device from the ground up. To prevent messing up with the different functions and components, I designed and built this device iteratively. I learned how to develop a device from simple to complex. This iterative process helps me finally get what I expected and designed.

x
Share this Project

Found In
Courses

49-713 Designing for the Internet of Things

· 26 members

A hands-on introductory course exploring the Internet of Things and connected product experiences.


Focused on
Skills
Tools
About

The most inclusive and direct interpretation of “electrical fire” is a fire involving some type of electrical failure or malfunction. Any equipment powered by electricity can have such a failure. The Apartment Fire Monitor is an IoT device that the user can put it near the cluster of wires. When a fire is detected, it will alert user until the dangerous situation is over and the user reset it.

Created

January 26th, 2017