28
MINI PROJECT GSM BASED SMS ALERT FIRE ALARM SYSTEM USING ARDUINO

GSM Based SMS fire alert system

Embed Size (px)

Citation preview

Page 1: GSM Based SMS fire alert system

MINI PROJECT

GSM BASED SMS ALERT FIRE ALARM SYSTEM USING ARDUINO

Page 2: GSM Based SMS fire alert system

Overview So what is this project? What does it do?

Basically this is a fire monitoring system, which detects if there is a fire by measuring the surrounding temperature. If it goes beyond a certain critical point, it alerts the user by sending a text alert to the phone number of the user so that he or she may be able to prevent any serious damage.

Page 3: GSM Based SMS fire alert system

Before we start with the project itself, let’s see what led us to take up this challenge to make this fire alarm system. • Smoke alarms provide a critical early warning of fire, allowing

additional time to escape. National estimates of reported fires derived from the National Fire Incident Reporting System (NFIRS) and the National Fire Protection Association’s (NFPA’s) fire department survey show that in 2009-2013, fires in homes with no smoke alarms caused an average of 940 deaths per year (38% of home fire deaths). An additional 510 people per year (21% of home fire deaths) were fatally injured in fires in which smoke alarms were present but failed to operate.

• Hardwired smoke alarms were more likely to operate than those powered solely by batteries. 

• The death rate per 100 reported fires was more than twice as high in homes with no or no working smoke alarms (1.18 deaths per 100 fires) as it was in fires with working smoke alarms (0.53 deaths per 100 fires). The lowest fire death rates were seen in homes with hardwired smoke alarms and sprinklers.

Page 4: GSM Based SMS fire alert system

So, we see that fire alarm systems are very much in need even in this technologically advanced era. Speaking of technological advancements, what comes to the mind first?Smartphones! So, why not integrate a fire alarm system with our smartphones? That way the system can warn us anytime there is a fire regardless of wherever we are at the moment. We do not have to be physically present at the site of the fire to prevent it! That is worderful! Now let’s get to the project itself.

Page 5: GSM Based SMS fire alert system

Equipments used

• Arduino Uno• GSM Module• 16x2 LCD Display• LM 35• Vero Board• 10k potentiometer• 12V AC Adapter• Resistors• Wires and jumper cords

Page 6: GSM Based SMS fire alert system

Circuit Diagram

Page 7: GSM Based SMS fire alert system

The main elements of the circuit

• The Arduino• LM 35• The GSM Module• The LCD display

Page 8: GSM Based SMS fire alert system

The Arduino It is an open-source microcontroller based kit for building digital

devices and interactive objects that can sense and control objects in the physical world. It is based on microcontroller board designs, manufactured by several vendors, using various microcontrollers. These systems provide sets of digital and analog I/O pins that can be interfaced to various expansion boards ("shields") and other circuits. The boards feature serial communications interfaces, including USB on some models, for loading programs from personal computers. For programming the microcontrollers, the Arduino has a specific software associated with it which provides an integrated development environment (IDE) based on the Processing project, which includes support for the C and C++ programming languages. In this project this is the main workhorse. This controls the entire circuit and makes all the decisions.

Page 9: GSM Based SMS fire alert system

The Arduino

Page 10: GSM Based SMS fire alert system

LM 35• The LM35 is an integrated circuit sensor that can be used

to measure temperature with an electrical output proportional to the temperature (in oC)

• Why Use LM35s To Measure Temperature?» We can measure temperature more accurately than a using a

thermistor.» The sensor circuitry is sealed and not subject to oxidation, etc.» The LM35 generates a higher output voltage than

thermocouples and may not require that the output voltage be amplified.

Page 11: GSM Based SMS fire alert system

What Does An LM35 Look Like?Here it is.

Page 12: GSM Based SMS fire alert system

• What Does an LM35 Do? How does it work?» It has an output voltage that is proportional to the Celsius

temperature.» The scale factor is .01V/oC» The LM35 does not require any external calibration or trimming

and maintains an accuracy of +/-0.4 oC at room temperature and +/- 0.8 oC over a range of 0 oC to +100 oC.

» Another important characteristic of the LM35 is that it draws only 60 micro amps from its supply and possesses a low self-heating capability. The sensor self-heating causes less than 0.1 oC temperature rise in still air.

• The LM35 comes in many different packages, including the following.» TO-92 plastic transistor-like package,» T0-46 metal can transistor-like package» 8-lead surface mount SO-8 small outline package» TO-202 package. (Shown in the previous slide)

Page 13: GSM Based SMS fire alert system

The GSM Module This module is responsible for the communication part of the

circuit. It takes information from the Arduino where to send information and what information is to be sent. It uses a GSM SIM card for communication purposes. It is basically just a MODEM which uses serial communication to interface with and need Hayes compatible AT commands for communication with the Arduino. The alert message and the phone number of the recipient is given by the user through the Arduino code. As soon as fire is detected an SMS will be sent to the recipient’s phone number from the SIM card inserted into the module.

Page 14: GSM Based SMS fire alert system

SIM Card slot

AntennaThis is what it looks like

Page 15: GSM Based SMS fire alert system

The LCD Display

This is used for displaying the current status of the circuit and the actions taken by the circuit.

Page 16: GSM Based SMS fire alert system

Now let’s get to the working…

Page 17: GSM Based SMS fire alert system

• The LM 35 continuously monitors the temperature and sends that information to the Arduino. The temperature data is sent in the form of voltage. The scale factor of the LM 35 is 0.01V/ºC.

• If a fire takes place, the temperature of the surrounding starts increasing. As soon as the temperature crosses a threshold value, the Arduino sends a signal to the GSM Module to do its job.

Page 18: GSM Based SMS fire alert system

• The GSM Module sends a text message to the user’s phone number from the SIM Card that is inserted into the module. The code run on the Arduino determines which number to send the message to, how many times the message needs to be sent, and some other details.

• Now that the user has been alerted, the job of the system is over. It is now up to the user to take preventive measures.

Page 19: GSM Based SMS fire alert system

Setbacks and Modifications• No project is a success without setbacks. In this

project, the GSM Module proved to be a major problem as during the testing, due to unregulated current fluctuations, the chip burned out and stopped working.

• So, we had to modify the project a little bit, due to time constraints, we ultimately ended up making just a simple fire alarm with an alert speaker. To do this, we had to modify the Arduino code for the circuit to function without the GSM Module.

Page 20: GSM Based SMS fire alert system

The modifications to the code are as follows:• We created an extra function Alert() which is

called as soon as “fire” is detected, which tells the speaker to sound the alarm.

• As soon as the surrounding temperature restores back to normal, the condition in the code to check whether fire has occurred or not, becomes false and the noTone() function is called to stop the speaker.

Page 21: GSM Based SMS fire alert system

The modified Arduino Code#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 Fire_Set;void setup(){ pinMode(sensor,INPUT); mySerial.begin(9600); Serial.begin(9600); lcd.begin(16,2); delay(500);}void loop(){CheckFire();CheckShutDown();}

Page 22: GSM Based SMS fire alert system

void CheckFire(){lcd.setCursor(0,0);lcd.print("Fire Scan-ON");Temp_alert_val=CheckTemp();if(Temp_alert_val>45){ Alert(); lcd.setCursor(0,1); lcd.print("Fire Alert!"); Fire_Set = 1;}}

float CheckTemp(){temp_read=analogRead(sensor); // reads the sensor output (Vout of LM35)temp_read=temp_read*5; // converts the sensor reading to temperaturetemp_read=temp_read/10; // adds the decimal pointreturn temp_read; // returns temperature value in degree celsius}

Page 23: GSM Based SMS fire alert system

void Alert(){ tone(8,2637);}void CheckShutDown(){if(Fire_Set==1){

Temp_shut_val=CheckTemp(); if(Temp_shut_val<28) { noTone(8); lcd.setCursor(0,1); lcd.print("Fire Shut!"); Fire_Set=0; }}}

Page 24: GSM Based SMS fire alert system

The Realised Project

Page 25: GSM Based SMS fire alert system

The Modified Realised Project

Page 26: GSM Based SMS fire alert system

Here is an animation showing the working of the project…

Page 27: GSM Based SMS fire alert system

The GSM Module receives info from the Arduino and sends the text alert to the user’s phone number

The Arduino now tells the display to its job!

LM 35

In case of a fire,The LM 35 senses a temperature rise…

The LM 35 now passes the info on to the Arduino

The Arduino then Processes the info and tells the other components to do their respective jobs!

Fire Detected!

SMS Sent!

Page 28: GSM Based SMS fire alert system

END OF PROJECT