Introduction: Receive SmS IF "GaS" Leakage

Picture of Receive SmS IF "GaS" Leakage

Are you worried about your Home Safety??

This might be a perfect Project to get started with :)

This ible will explain how to receive sms when there is "GAS" Leakage at your home.

This project involves few components you don't need to be a nerd to make it.

List of components:

1) MQ-2 Gas Sensor

2)GSM Module

3) Arduino

4) Connecting Wires.

Step 1: Circuit Connection

Picture of Circuit Connection

You don't need to connect the way I did here, It just a explanation about which pin of arduino meets the GSM pin, all you have to do is place the GSM shield in the Arduino.

Connect the MQ-2 Gas sensor's Digital Outpin to the 7th pin of arduino or any other pin you'd like, but don't forget to change in the program (if you change the pin)

Step 2: Arduino Program

int PIN = 7;

int sensor = 0;

void setup() {

pinMode (PIN,INPUT);


delay(5000); }

void loop() {

sensor = digitalRead (PIN);

if (sensor == HIGH){





Serial.println("AT+CMGS=\"+919962*****\""); //CHANGE TO DESTINATION NUMBER


Serial.print("Gas Leakage at HOME (attention required)");


delay(300000); }


You can also download the program from this link:

Step 3: Add-on to the Project

You can also add a Flame sensor and other sensors to this project and modify the code for your Complete safe guard of your Home.

You can also check My other works in my blog:


Njms (author)2016-03-11

Please.. Ans me as soon as you can... I have very short duration:-(

Njms (author)2016-03-11

Please.. Ans me as soon as you can... I have very short duration:-(

Njms (author)2016-03-11

Can you give me the code to use both flame sensor and MQ2 gas sensor with this.

OndraB2 (author)2016-02-09

Hello, does it works with SIM 800L also?? Thank you

Mayoogh_Girish (author)2015-08-24

Do you have code for SIM300

or will the same code works with SIM 300 GSM module?

fred3655 (author)2015-05-12

Does this work with human gas leakage?

seriously??? :(

About This Instructable




Bio: I make hobbyist stuffs and play with electronics follow me to know more
More by Magesh Jayakumar:Quick Start to Nodemcu (ESP8266) on Arduino IDECourse on MIT App Inventor and ArduinoHat for the Party
Add instructable to: