• Skip to main content
  • Skip to primary sidebar

Homemade Circuit Projects

Need circuit help? Post them in the comments! I've answered over 50,000!

Blog | Categories | About | Contact | Calculators-online
You are here: Home / Arduino Projects / GSM Fire SMS Alert Project
P 20160913 144946

GSM Fire SMS Alert Project

Last Updated on December 5, 2024 by Swagatam 16 Comments

In this article I will show how to construct a GSM fire alert circuit system using Arduino and DHT11 sensor, which will alert the user via text message (SMS), regarding a fire hazard within the premise where it is installed.

Table of Contents
  • Using DHT11 Sensor
  • How it Works

Using DHT11 Sensor

We are using DHT11 sensor for sensing unusual temperature rise around the local area. We can precisely set the threshold temperature in the program, if the temperature rises above preset threshold, the GSM modem starts sending alert SMS to the recipient.

How it Works

The GSM fire alert circuit setup consists of 3 parts, the sensor, Arduino which is the brain of the project and GSM modem which sends SMS alert.

The wiring of the setup is same as other GSM based projects which was discussed in this website. The only difference is the addition of DHT11 sensor to Arduino.

warning message: electricity is dangerous, proceed with caution

The TX of GSM is connected to pin #9 of Arduino and RX of the GSM is connected to pin #8 of Arduino and ground to ground connection is also connected. The power and data connection of the sensor is optimized for reduced wiring congestion while prototyping.

Please note the connections carefully and insert the sensor from A0 to A2 in correct orientation as illustrated below.

Reversing the orientation of the sensor will give out “NO DATA” on the serial monitor. If reverse orientation is kept for prolonged period it may even damage the sensor. So, be cautious about the sensor connection.

Here is a completed author’s prototype:

Always power the GSM modem with external power supply. A 9V 500mA power adapter will be enough for GSM modem. The serial monitor is not mandatory for this project as it is going to be a standalone project. We need serial monitor only while testing the prototype.

Make a DC UPS system, schematics is available in this website and try to make the power button easily accessible outside the chassis of your project, so that GSM modem can be powered ON after a brief power failure.

The external power button can be made by soldering wires from pins of the power button on the GSM modem. DC UPS will reduce necessity to power ON the GSM modem after every power failure. It gives plug and forget kind of feature. Now let’s see how the whole setup functions.

In case of fire the room temperature rises rapidly in short period, the sensor has the ability to measure form 0 to 50 degree Celsius.

When the temperature rises above the preset threshold value in the program (within 0 to 50) it sends SMS alert saying “Fire alert: 45.00 degree Celsius”. 45 degree Celsius is the temperature of the room during sending SMS; the temperature would reach beyond 100 degree Celsius within minutes after fire accident. Two SMS alert is send for redundancy, in case if the one of the sent message is failed.

If the sensor failed or the sensor gets disconnected from Arduino, the information is send to the user via SMS twice saying “No data from sensor/sensor disconnected“

The program comes to halt for 30 minutes after sending SMS alert for fire or sensor disconnection. It checks again for abnormality in room temperature and sensor wire connection after 30 minutes, if any exist, it sending SMS alert again and waits for another 30 minutes.

When the whole setup is completed and powered ON, the GSM modem sends test SMS saying “This is a test SMS from GSM modem” if you receive this message to the recipient number, it means your project is working fine.

Program:

//--------------Program developed by R.Girish---------------//
#include <dht.h>
#include <SoftwareSerial.h>
SoftwareSerial gsm(9,8);
#define DHTxxPIN A1
dht DHT;
int p = A0;
int n = A2;
int ack;
int msgsend=0;
int th=45; //set threshold temperature
unsigned long A = 1000L;
unsigned long B = A * 60;
unsigned long C = B * 30 ;
void setup()
{
Serial.begin(9600);
gsm.begin(9600);
pinMode(p,OUTPUT);
pinMode(n,OUTPUT);
digitalWrite(p,1);
digitalWrite(n,0);
gsm.println("AT+CMGF=1");
delay(1000);
gsm.println("AT+CMGS=\"+91xxxxxxxxxx\"\r"); // Replace x with mobile number
delay(1000);
gsm.println("This is a test SMS from GSM modem");// The SMS text you want to send
delay(100);
gsm.println((char)26); // ASCII code of CTRL+Z
delay(1000);
}
void loop()
{
top:
msgsend=0;
ack=0;
int chk = DHT.read11(DHTxxPIN);
switch (chk)
{
case DHTLIB_ERROR_CONNECT:
ack=1;
break;
}
if(ack==0)
{
Serial.print("Temperature(°C) = ");
Serial.println(DHT.temperature);
Serial.print("Humidity(%) = ");
Serial.println(DHT.humidity);
Serial.println("\n");
delay(2000);
}
if(ack==1)
{
goagain:
msgsend=msgsend+1;
Serial.print("NO DATA");
Serial.print("\n\n");
Serial.println("Sending SMS......\n");
delay(500);
gsm.println("AT+CMGF=1");
delay(1000);
gsm.println("AT+CMGS=\"+91xxxxxxxxxx\"\r"); // Replace x with mobile number
delay(1000);
gsm.println("No data from sensor/Sensor disconnected");// The SMS text you want to send
delay(100);
gsm.println((char)26); // ASCII code of CTRL+Z
delay(1000);
Serial.println("Message is sent\n");
if(msgsend==2)
{
delay(C);
goto top;
}
else
{
delay(10000);
goto goagain;
}
}
if(DHT.temperature>=th)
{
doagain:
msgsend=msgsend+1;
Serial.println("Sending SMS......\n");
gsm.println("AT+CMGF=1");
delay(1000);
gsm.println("AT+CMGS=\"+91xxxxxxxxx\"\r"); // Replace x with mobile number
delay(1000);
gsm.println("Fire Alert:");// The SMS text you want to send
gsm.print(DHT.temperature);
gsm.print(" degree celsius");
delay(100);
gsm.println((char)26); // ASCII code of CTRL+Z
delay(1000);
Serial.println("Message is sent\n");
if(msgsend==2)
{
delay(C);
goto top;
}
else
{
delay(10000);
goto doagain;
}
}
}
//--------------Program developed by R.Girish---------------//

Note: You have to place the recipient number in 3 places in program which is described in the program as

("AT+CMGS=\"+91xxxxxxxxx\"\r"); // Replace x with mobile number

• Set the threshold temperature

int th=45; //set threshold temperature

The threshold temperature must be set high, greater than usual temperature fluctuation of the room .For example: DHT11 has maximum measuring capacity of 50 degree Celsius, so threshold temperature can be set from 45 to 47. High threshold value is set so that it won’t send false triggered SMS alert for small changes in room temperature.

If you have further doubts or quesries regarding the discussed GSM fire SMS alert circuit system, please do not hesitate to put them forth through your valuable comments.

You'll also like:

  • 1.  Simple Car Burglar Alarm Circuit
  • 2.  ATmega32, Pinouts Explained
  • 3.  Arduino Musical Tune Generator Circuit
  • 4.  Touch Operated Code Lock Switch Circuit
  • 5.  2 Simple Earth Leakage Circuit Breaker (ELCB) Explained
  • 6.  Car Reverse Parking Sensor Circuit with Alarm

Filed Under: Arduino Projects, Security and Alarm Tagged With: Alert, Fire, GSM, Project, SMS

About Swagatam

I am an electronics engineer and doing practical hands-on work from more than 15 years now. Building real circuits, testing them and also making PCB layouts by myself. I really love doing all these things like inventing something new, designing electronics and also helping other people like hobby guys who want to make their own cool circuits at home.

And that is the main reason why I started this website homemade-circuits.com, to share different types of circuit ideas..

If you are having any kind of doubt or question related to circuits then just write down your question in the comment box below, I am like always checking, so I guarantee I will reply you for sure!

Previous Post: « How to Design an Induction Heater Circuit
Next Post: 6 Best IC 555 Inverter Circuits Explored »
Subscribe
Notify of
guest
guest
16 Comments
Inline Feedbacks
View all comments

Primary Sidebar

circuit simulator image

Subscribe to get New Circuits in your Email

Categories

  • Arduino Projects (90)
  • Audio and Amplifier Projects (132)
  • Automation Projects (17)
  • Automobile Electronics (101)
  • Battery Charger Circuits (84)
  • Datasheets and Components (105)
  • Electronics Theory (140)
  • Free Energy (37)
  • Games and Sports Projects (11)
  • Grid and 3-Phase (19)
  • Health related Projects (25)
  • Home Electrical Circuits (12)
  • Indicator Circuits (15)
  • Inverter Circuits (89)
  • Lamps and Lights (142)
  • Meters and Testers (71)
  • Mini Projects (46)
  • Motor Controller (64)
  • Oscillator Circuits (28)
  • Pets and Pests (15)
  • Power Supply Circuits (89)
  • Remote Control Circuits (50)
  • Security and Alarm (64)
  • Sensors and Detectors (103)
  • SMPS and Converters (29)
  • Solar Controller Circuits (60)
  • Temperature Controllers (42)
  • Timer and Delay Relay (49)
  • Transmitter Circuits (29)
  • Voltage Control and Protection (38)
  • Water Controller (36)

Other Links

  • Privacy Policy
  • Cookie Policy
  • Disclaimer
  • Copyright
  • Videos
  • Sitemap

People also Search

555 Circuits | 741 Circuits | LM324 Circuits | LM338 Circuits | 4017 Circuits | Ultrasonic Projects | SMPS Projects | Christmas Projects | MOSFETs | Radio Circuits | Laser Circuits | PIR Projects |

Social Profiles

  • Twitter
  • YouTube
  • Instagram
  • Pinterest
  • My Facebook-Page
  • Quora
  • Stack Exchange
  • Linkedin
  • Recent Comments

    • Swagatam on How to Convert a Low Power Inverter to a High Power Inverter
    • Swagatam on Simple Buck Converter Circuits using Transistors
    • NGANG on How to Convert a Low Power Inverter to a High Power Inverter
    • Swagatam on Make this 7 Segment Digital Clock with Beep Alert Circuit
    • Swagatam on Make this 7 Segment Digital Clock with Beep Alert Circuit

    © 2025 · Swagatam Innovations