You know that 90% fire damage occur due to the lack of early detection but now we are going to solve these problem. With the help of these technology we can reduce this problem. So in this system we can use a GSM module in which when fire occurred then the sms send to the users mobile no or you can replace the sms with your own string.
Components:-
- Arduino Uno
- LCD 16X2
- LM35 Temp Sensor
- GSM MODULE
- 5v Power Supply for Arduino
- 12v Power supply for GSM MODULE
- 10k Potential Meter
Demo on Proteus:-
In this system we can set the threshold value in the code if (temp>45).when the temp reaches the 45 C then SMS send to the user mobile no. When fire occurred you can replace this value by your own but we know that very well that the room temp is 25 C. So when we are going to set the value we know that what the room temp. So we can change our value according to the room temp..
You can change the mobile no of a person with the cell phone no. to receive the fire alert SMS. Download the Code:-
In this system coding is very simple you can easily know about that. You cannot face any problem to make this project.
#include <SoftwareSerial.h>
#include<LiquidCrystal.h>
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);
SoftwareSerial mySerial(9, 10);
int sensor=A1;
float temp_read,Temp_alert_val,Temp_shut_val;
int sms_count=0,Fire_Set;
void setup()
{
pinMode(sensor,INPUT);
mySerial.begin(9600);
Serial.begin(9600);
lcd.begin(16,2);
delay(500);
}
void loop()
{
CheckFire();
CheckShutDown();
}
void CheckFire()
{
lcd.setCursor(0,0);
lcd.print("Fire Scan - ON");
Temp_alert_val=CheckTemp();
if(Temp_alert_val>45)
{
Fire_Set=1;
lcd.setCursor(0,1);
lcd.print("Fire Alert! SMS Sent!");
while(sms_count<3) //Number of SMS Alerts to be sent
{
SendTextMessage(); // Function to send AT Commands to GSM module
}
}
}
float CheckTemp()
{
temp_read=analogRead(sensor); // reads the sensor output (Vout of LM35)
temp_read=temp_read*5; // converts the sensor reading to temperature
temp_read=temp_read/10; // adds the decimal point
return temp_read; // returns temperature value in degree celsius
}
void CheckShutDown()
{
if(Fire_Set==1)
{
Temp_shut_val=CheckTemp();
if(Temp_shut_val<28)
{
lcd.setCursor(0,1);
lcd.print("Fire Shut! SAFE NOW");
sms_count=0;
Fire_Set=0;
}}}
void SendTextMessage()
{
mySerial.println("AT+CMGF=1"); //To send SMS in Text Mode
delay(2000);
mySerial.println("AT+CMGS=\"+929542xxxxxx\"\r"); // change to the phone number you using
delay(2000);
mySerial.println("Fire in NEW ROOM!");//the content of the message
delay(200);
mySerial.println((char)26);//the stopping character
delay(5000);
mySerial.println("AT+CMGS=\"+929847xxxxxx\"\r"); // change to the phone number you using
delay(2000);
mySerial.println("Fire in NEW ROOM!");//the content of the message
delay(200);
mySerial.println((char)26);//the message stopping character
delay(5000);
sms_count++;
}
So this was all, assemble your own alarm, test it and if you like the project, reflect it in the comments section below!!
how to connect gsm to arduino on proteus
ReplyDelete