Automated Home with Safety System and Fire Sensor

0 10054 Medium

Prototype home safety system, fully Automated with the help of Arduino Uno. 3 main features : Fire System, Card Reader and Motion Sensor

projectImage

Things used in this project

Hardware components

HARDWARE LIST
1 DFRobot I2C 16x2 Arduino LCD Display Module
1 DFRobot Gravity: Analog Flame Sensor For Arduino
1 Arduino UNO
1 Breadboard (generic)
1 RFID reader (generic)
1 RFID Module (Generic)
1 PIR Motion Sensor (generic)
1 Buzzer, Piezo
1 Relay Subbase, DC Type
1 LED (generic)
1 Male/Female Jumper Wires
1 Jumper wires (generic)

Software apps and online services

Arduino IDE

 

Hand tools and fabrication machines

Soldering iron (generic)

 

Story

 

We were supposed to form a project comprising an Arduino Uno with a minimum of 3 sensors and 3 actuators. Hence I brainstormed and came up with the idea of an Automated Home which ensures the safety and security of the user.

 

It uses the the following sensors :

 

* PIR Motion Sensor * RFID Card Reader *Fire Sensor

 

It uses the following actuators :

 

*Piezo Buzzer *DC Relay *LCD display

 

The DC relay is used to implement a sprinkler system in case a fire breaks out in the premises.

Custom parts and enclosures

EAGLE schematic

This is the EAGLE schematic for the circuit which shows h=all the proper connections of each component to the Arduino Uno

projectImage

Schematics

Flowchart

This is the flowchart for the project and gives a general idea on what the Home Safety System should do and how it performs

projectImage

Pseudo Code

This is the Pseudo code for the project which shows how the project is supposed to be implemented. It is gives the user a step by step idea on how the project works.

projectImage

Code

Code for the Flame Sensor

Arduino

CODE
#include <Wire.h> 
#include <LiquidCrystal_I2C.h>

// Set the LCD address to 0x27 for a 16 chars and 2 line display
LiquidCrystal_I2C lcd(0x27, 16, 2);

int flameSensorPin = 0; // input pin for flame sensor
int fR; // reading of the flame sensor
int buzzerPin=8; // pin assigned to buzzer
int tt=1023;
void setup(void) 
{  
  Serial.begin(9600); // starting the serial monitor
  pinMode(buzzerPin,OUTPUT); // output for the buzzer
   pinMode(7, OUTPUT); // output for the DC relay
} 
void loop(void) 
{ 
  fR = analogRead(flameSensorPin);  // reads the flamesensor pin

  
  if(fR<1023) //if loop for flame detected
           {
            
            digitalWrite(7, HIGH); //DC relay turned on
            digitalWrite(buzzerPin,HIGH); //buzzer turned on
            delay(1000); 
            digitalWrite(7, LOW); //DC relay turned on

            // initialize the LCD
  lcd.begin();

  // Turn on the blacklight and print a message.
  lcd.backlight();
  lcd.print("LCD is Working");
              
                         }
else                           // incase no fire detected
          {
           digitalWrite(buzzerPin,LOW);
           digitalWrite(7, LOW);   
           delay(1000);
                        }

 Serial.print("Analog reading = "); 
 Serial.println(fR); // the raw analog reading delay(1000); 
 delay(500);
}

The article was first published in hackster, May 11, 2021

cr: https://www.hackster.io/jwander/automated-home-with-safety-system-and-fire-sensor-717608

author: jwander

License
All Rights
Reserved
licensBg
0