FIRE PREVENTION SYSTEM FOR POT

Objective

To prevent fire from occur at the kitchen due to the people carelessness.


Scope and Limitation

This investigatory project covers the process on how to prevent the fire from happen in the kitchen at home. For this mini project, the study is more focused on the pot. This fire prevention system is actually created for housewives. This is to make the housewives alert with the situation when they are cooking and doing the other works at the same time. For this project, buzzer will buzz when the smoke detector, MQ2 detect the smoke and continued buzzing until no more smoke is detected. Based on my study, MQ2 is actually can detect the smoke in range of 0.5 to 1 meters.


Apparatus
  • Arduino UNO Board
  • 16X2 LCD
  • Smoke Sensor Module (MQ2)
  • LED (1 yellow and 1 red)
  • Buzzer
  • Breadboard
  • Connecting Jumper Wires


Flow Chart



System



Code

#include<LiquidCrystal.h>
LiquidCrystal lcd(7,6,5,4,3,2);

int redLed = 10;
int greenLed = 12;
int buzzer = 8;
int smokeA0 = A0;
//Your threshold value
int sensor Thres = 200;

void setup()
{
    pinMode(redLed,OUTPUT);
    pinMode(buzzer,OUTPUT);
    pinMode(smokeA0,INPUT);
    Serial.begin(9600);
    lcd.begin(16,2);
}

void loop()
{
    int analogSensor = analogRead(smokeA0);

    Serial.print("PinA0:");
    Serial.printIn(analogSensor);
    lcd.print("Smoke Level:");
    lcd.print(analogSensor-50);
    //Checks if it has reached the threshold value
    if (analogSenso-50>sensorThres)
    {
      digitalWrite(redLed,HIGH);
      lcd.setCursor(0,2);
      lcd.print("Alert....!!!!");
      digitalWrite(12,LOW);
      tone(buzzer,1000,200);
    }
    else
    {
      digitalWrite(redLed,LOW);
      digitalWrite(12,HIGH);
      lcd.setCursor(0,2);
      lcd.print(".....Normal.....");
      noTone(buzzer);
   }
   delay(500);
   lcd.clear();
 }


Data Analysis


The LED is lighting and the buzzer is buzzing when smoke detector, MQ2 detect the smoke.