Gas leak detector alarm system with arduino nano

In this tutorial we will see how to assemble a gas leak detector alarm system with arduino nano. We will see a list of the electronic components to be used, the assembly of the circuit, the source code, and finally we will test the operation of the system. This project is ideal for use in sources near our home, where there is gas, such as a kitchen, stove or thermotanque.

Maybe you can be interested in projects in arduino, pic, robotics, telecommunications, subscribe to lots of videos with complete source code and diagrams


Electronic components

mq2 gas sensor

Pin-Out sensor de gas Mq-2


Datasheet sensor MQ-2

Download–> MQ-2

Gas sensor (MQ2) is useful for gas leak detection (in home and industry). It can detect LPG, i-butane, methane, alcohol, hydrogen, smoke, etc. Based on its fast response time. measures can be taken as soon as possible. In addition, the sensitivity can be adjusted using a potentiometer (digital pin).


Operating Voltage: 5V DC
response and high sensitivity Detection range: 300 to 10000
Characteristic gas: 1000ppm, Isobutane Sensing resistance:
1KΩ 50ppm Toluene at 20KΩ in Response Time: ≤ 10s
Recovery time: ≤ 30s
Working temperature: -20°C~+55°C
Humidity: ≤ 95% RH
Ambient oxygen content: 21%
Consumes less than 150mA at 5V.


Leak Detector Industrial Gas Detector

Arduino nano

The Arduino Nano is a small, complete and compatible board based on the ATmega328 (Arduino Nano 3.x). It has more or less the same functionality as the Arduino Duemilanove, but in a different package. It only lacks a DC power connector and works with a Mini-B USB cable instead of a standard one.

Microcontroller ATmega328
Architecture AVR
Operating voltage 5 V
Flash memory 32 KB of which 2 KB uses the bootloader
Clock speed 16 MHz
Analog IN pins 8
DC current by I/O pins 40 mA (I/O pins)
Input voltage 7-12 V
Digital I/O pins 22 (6 of which are PWM)
PWM output 6
Energy consumption 19 mA
PCB Size 18 x 45 mm
Weight 7 g

Pin diagram

Six 5 mm LED diodes of different colors

Six resistors of 1 Kohm

A 5-volt buzeer

Female pins (4 pins in total)

Male pins (In total 2)

Socket for the arduino nano


Download gerber file –> Gerber_MEDIDOR_DE_GAS_MQ-2


Source code


Deja una respuesta