Smoke Alarm System
This project is a demonstration of an Emergency Smoke Detection System developed my Fezan Butt with Arduino. All the required components are listed in the supplies.
The project uses components such as gas sensor and temperature sensor to take the inputs and use conditional codes to trigger output components such as LEDs and piezo buzzer. The project also includes a manual smoke ventilator switch.
Downloads
Supplies
x1 Arduino UNO R3, $27/- https://amzn.to/3Aee7II
x1 Breadboard, $17.99/- https://amzn.to/3KsnQQw
x1 Piezo Buzzer, $18.14/- https://amzn.to/3tHt4C0
x1 Temperature Sensor, $19.99/- https://amzn.to/3FCkEy4
x1 DC Motor, $15.98/- https://amzn.to/3tHhDdm
x1 LCD Display, $13.99/ https://amzn.to/33PTnL8
x1 Gas Sensor, $15.99/- https://amzn.to/3IaU80q
x1 LED (Green) & x1 LED (Red), $8.99/- https://amzn.to/3tHGw8T
x3 1k ohm resistors & x2 220 ohm resistors, $27.39/- https://amzn.to/3rAoYc2
x2 slide switches, $13.49/- https://amzn.to/3Ijr6vt
x1 9V battery, $12.97/- https://amzn.to/3nFxy8k
x1 9V battery connector, $4.99/- https://amzn.to/3GFaFt4
Connect Components to Arduino UNO R3
Connect the components specified above to arduino as shown in image and project file.
Downloads
Write Code
#include <LiquidCrystal.h>
//LCD Library
float temp; //temperature
float avengers; //temperature process
float marvel; //temperature output
int LED = 13; //LED (Red)
int awesomeSensor; //temperature Sensor
int annoyingBuzzer = 7; //Piezo Buzzer
LiquidCrystal lcd(12, 11, 6, 5, 4, 2); //LED Display
void setup()
{
lcd.begin(16, 2);
pinMode(A0,INPUT); //Gas Sensor Analog Input
pinMode(A1, INPUT); //Temperature sensor analog Input
pinMode(LED,OUTPUT);
pinMode(annoyingBuzzer,OUTPUT);
Serial.begin(9600);
}
void loop()
{
avengers=analogRead(A1);
marvel=(avengers/1023)*5000; //Marvel is the reduced version of avengers
temp=(marvel-500)/10; //temp is reduced and final version of Avengers analog data
awesomeSensor=analogRead(A0); //Temperature Input
if (temp>=80) //Minimum Temperature to trigger the process
{
digitalWrite(LED, HIGH);
delay(250); //Blink Loop
digitalWrite(LED, LOW);
delay(50);
}
else
{
digitalWrite(LED,LOW);
}
if (awesomeSensor>=100) //Minimum Analog value of gas sensor to trigger the alarming process
{
digitalWrite(annoyingBuzzer,HIGH); //Piezo Buzzer: Start
digitalWrite(LED, HIGH); //Conditional Blink
delay(250);
digitalWrite(LED, LOW);
delay(50);
}
else
{
digitalWrite(annoyingBuzzer,LOW);//Piezo Buzzer: Stop
digitalWrite(LED,LOW);
}
lcd.setCursor(1,0); //LED Display
lcd.print("Temp.(C)= ");
lcd.print(temp); //Temperature Outpu in Degree Celsius
lcd.setCursor(0,1);
if(awesomeSensor>=100) {
lcd.print("Smoke Detected");
}
else{
lcd.print("No Smoke Found");
}
Serial.print("in DegreeC= "); //Serial Print
Serial.print(" ");
Serial.print(temp);
Serial.print("\t");
Serial.print("awesomeSensor= ");
Serial.print(awesomeSensor);
Serial.println();
delay(1000); //Serial Print Data Refresh Rate
}
Downloads
Demonstration
The temperature sensor sends the float data to the board, which triggers the LED in a condition of at least 80 degrees Celsius.
Gas sensor detects smoke in the atmosphere in a short range, when the analogue input passes through a certain range of 100, it triggers the piezo buzzer and LEDs.
The manual fan switch enables the 9v battery to deliver power to the DC motor connected to a fan.