ArduinoArduino Projects

Arduino Gas/smoke leakage detection and sms alert system programming


Gas/smoke leakage


Gas/smoke leakage –Using the MQ-2 gas smoke leakage sensorArduino  Uno and GSM  sim900A module,  this tutorial is based on the detection of gas smoke leakage or smoke detection. This project is used to detect gassmoke when message is sent to the owner once the gas/smoke leakage is detected. This can be used in kitchens, rooms, etc. to provide the best possible protection The Gsm sim900A and MQ-2 sensor interfacing with Arduino Uno or Mega is very simple.

I’ll show you need to make your own Gas/smoke leakage detection system and SMS alert system in this tutorial.

The message will automatically be sent when the smoke or gas is detected as this is an automatic system.

The Amazon Purchase links are given below:

solenoid valve:
smoke sensor MQ-2:
Arduino Uno:
Mega 2560:
lm7805 Voltage Regulator:
330-ohm resistors pack:
female DC power jack socket:
470uf capacitors:
5×7 cm Vero board:
female headers:
connection wires:
Super Starter kit for Beginners:
Jumper Wires:
Bread Board:
12v Adaptor:
PCB plate:
Variable Supply:
Digital Multimeter:
Vero Board / stripboard:
Soldering iron kit: “best” You guys should definitely purchase this:
Solder wire:
Wire Stripper:
PCB small portable drill machine:


Please Note: these are affiliate links. I may make a commission if you buy the components through these links. I would appreciate your support in this way!

GSM SIM900A Module:

Gas/smoke leakage

already clarified the SIM900A module in my previous tutorials.

Gas/smoke leakage MQ-2 Sensor:

Gas/smoke leakage

The MQ-2 sensor can detect a wide range of gasses including carbon monoxide, ethanol, ammonia, hydrogen, isobutene, propane, and smoke. The MQ-2 sensor module is equipped with 4 male headers to easily interface with the Arduino Uno or Mega using jumper wires from male to female.

Gas/smoke leakage


As you can see The 4 male header pins are labeled with




and Vcc…

The MQ-2’s analog output is pin A0. And A0 pin is connected to the arduino D0’s analog pin, which is the digital output in 5v or GND format. It also has a variable resistor that can be used to change the level of detection.

Connect the GND pin of the MQ-2 Sensor Module to the Arduino Uno or Mega ground.

The MQ-2 sensor module’s vcc pin is connected to the arduino uno 5v pin


These are used in family and business gas leak detection equipment and are suitable for LPG, propane, gasoline, ethanol, hydrogen and fire detection.

Gas/smoke leakage Circuit Diagram:

Gas/smoke leakage

This schematic is designed to be very simple in cadesoft eagle, the MQ-2 Sensor  Module and sim900A  gsm or Arduino Mega interfacing modules Sim900D.

As you know, my friends GSM sim900A module communicates with Arduino using Serial communication, so we need to define pins for the GSM module’s tx and Rx pins. Well, you also know that Arduino has pin number0 and pin number1 serial port.

You know, still say you can’t use the default serial port of Arduino to communicate with other devices, you can identify another serial port on any virtual pins. Now the question is whether we’re not going to use the default serial port of Arduino then how do we connect the gsm module? Well,  no worries at all, we can use the SoftwareSerial library to define multiple serial ports that I will explain in the programming.

As can be seen in the circuit diagram above the sim900A’s tx pin is connected to the Arduino’s pin7, the sim900A’s rx pin is connected to Arduino’s pin8 and GND is connected to Arduino’s GND. Sim900A is connected to power supply and the ideal voltage is 4.7 to 5v The MQ-2 sensor  module  VCC pin is connected to the Arduino  5v, the MQ-2 ground pin connected to the Arduino ground and the Arduino A1 pin is connected to the A0 pin.

Gas/smoke leakage Programming:

Watch Video Tutorial

Related Articles

Leave a Reply

Your email address will not be published. Required fields are marked *

Back to top button