Is my house on fire?

Made by Jesse Park

No, this doesn't let you know if you're house is on fire. But it does notify you if your stove is on while you are away to prevent that from happening!

Created: January 28th, 2016


Problem Statement

I designed this system for any concerned roommates who are worried about accidentally burning down their house. One lovely evening, I came home to find the stove turned on. My roommate has forgot to turn off the stove after making his tortillas for lunch. This freaked me out and I wanted to make sure that this would never happen again. I wanted to have the capability to check on my stove remotely.
My "dumb" stove.


My solution was to retrofit my "dumb" stove into a smart stove. I used a hall-effect sensor to monitor whether the stove was on or not. If the stove turned on or off, it would notify me on my smart phone. This would prevent the stove from being on during unattended hours to potentially burn down the house.


Components Used

1 - Hall Effect Sensor (158)

1- LED

1 - Buzzer

1 - 1k Resistor

1 - 10k Resistor

1 - Particle Core

12 - Jumper Wires 

The figure below shows the arrangement of these components

Arrangement of components on the bread board.


Before integrating each components, I tested them individually to make sure I had the code and the hardware right. This assured me that I had the correct set up and I didn't spend much time debugging small parts when testing for an overall system.



The code pushes the notification to my smart phone when the stove is turned on through IFTT (left picture). When the oven is on, the LED light starts to get brighter to indicate the duration of the time. After 10 minutes, the beeper is activated to warn the user that the stove has been on for a long time. At any time when the beeper is activated, the user can press the push button to delay the beeping for another 10 minutes (middle picture). This feature allows the roommate outside the house know that there is a person near the stove. Once the stove is turned off, IFTT sends another notification to my smart phone (right picture).

Photo jan 28  11 48 21 pm.thumb
Code for this project.
// By Jesse Park
// 1/28/16
// This code makes the stove smarter

// Set the variables
int hallpin = A0; // hall effect sensor pin
int ledpin = D0; // led pin
int beeppin = D1; // beeper pin
int buttonpin = D2; // button pin
int hallEffectValue = 0; // value of the hall effect sensor
int ledbrightness = 0; // control the led brightness
int long timer = 0; // control time
int beep = 0; // loudness of the beeper
int duration = 0; // records how long the stove is on
int pushbuttonstate = 0; // shows the state of the push button
int ifttHallEffectValue = 0; // special variable to work with IFTT

// Set up
void setup() {
  Serial.begin(9600); // for easy debugging
  pinMode(ledpin, OUTPUT); // set ledpin as an OUTPUT
  pinMode(buttonpin, INPUT_PULLUP); // set buttonpin as an INPUT_PULLUP
  pinMode(beeppin,OUTPUT); // set beeppin as an OUTPUT

// Set the loop
void loop() {
  hallEffectValue = analogRead(hallpin); // set the hall effect sensor
  pushbuttonstate = digitalRead(buttonpin); // set the value of the pushbuttonstate

  // Activates when the stove is on
  if (hallEffectValue > 100){

    // Used for publishing data to IFTT. Checks if the hall effect value has changed
    if (ifttHallEffectValue == 0){
      ifttHallEffectValue = 1; // set the hall effect value to 1
      Particle.publish("onStatus", "ON"); //sends an event that the stove is on
    ifttHallEffectValue = 1; // set the hall effect value to 1

    // set time function
    if( timer == 0 ){
      timer = millis();

    // Changes the brightness depending on time
    if (ledbrightness < 255){
      ledbrightness = ledbrightness + 1;
    else ledbrightness = 255;
    analogWrite(ledpin,ledbrightness); //record the brightness

    // Checks if 10 min has passed. If so, beeps untill pushbutton is pressed
    if (timer + 600000 < millis() ) {
      analogWrite(beeppin, 1);
      duration = duration + 1;
      if (pushbuttonstate == LOW) {
        timer = 0; //restart time
        analogWrite(beeppin, 0);
        duration = 0;
        Particle.publish("PushButton", "Delay"); //sends an event that the button is pressed
    else duration = duration + 1;

  // If the stove is not on, the stove is off.
  else {

    // Used for publishing data to IFTT. Checks if the hall effect value has changed
    if (ifttHallEffectValue == 1){
      ifttHallEffectValue = 0;
      Particle.publish("offStatus", "OFF"); //sends an event that the stove is off
    ifttHallEffectValue = 0;
    timer = 0;   //restart time
    ledbrightness = 0;
    duration = 0;
    analogWrite(ledpin,ledbrightness); //turn off the led
    analogWrite(beeppin, 0);

  // Used for debugging
  Serial.print( "HallEffect " );
  Serial.println( hallEffectValue);
  Serial.print( "LED " );
  Serial.println( ledbrightness );
  Serial.print( "Timer " );
  Serial.println( timer );
  Serial.print( "Duration " );
  Serial.println( duration );
Click to Expand
Stove IOT Project
Jesse Park -
Creative1 setup 01.thumb
A screenshot of my smartphone of when the stove is on, when the push button is pressed, and when the stove is off.

The prototype has the functionality I have always wanted, but more can be done to give me complete control of the stove. The next step would be to install a motor on the nob to control the stove remotely. I should be able to input an angle on my smart phone that will turn the nob to OFF mode.



If I were to do this over again. I would write the code more efficiently. I did not use functions because this was my first time working with this program. However, I think the program works well and is sufficient for this processing power. One more thing I can improve on is setting up the hardware. Right now, all the components are individually connected to the pins. I wasn't able to find a way to reduce wires to make it look less complex. 
Share this Project


49-713 Designing for the Internet of Things

· 4 members

This course charts the emergence of the now "connected world" to explore the possibilities for future products and connected spaces.

Focused on

No, this doesn't let you know if you're house is on fire. But it does notify you if your stove is on while you are away to prevent that from happening!