Arduino Gas Leakage Detector Circuit with MQ-2

Arduino Gas Leakage Detector Circuit with MQ-2

Intro

A gas leak is dangerous because it is hard to notice early. This beginner Arduino project watches the air with an MQ-2 gas sensor and raises a loud alarm as soon as the gas level rises above a level you set. It is a useful learning build and a handy early-warning aid for a kitchen or workshop.


How It Works

The MQ-2 sensor changes its resistance when combustible gas or smoke is present. The Arduino reads that change on an analog pin, compares it with a threshold set after calibration in clean air, and shows the level on an LCD. Below the threshold the display stays calm; above it the buzzer sounds and the red LED lights until the air clears.


Components Required

Arduino Uno board; MQ-2 gas sensor module; active buzzer; red LED with a resistor; 16x2 LCD display with I2C adapter; 5V USB power supply; jumper wires and a breadboard.


Circuit Connections

MQ-2 VCC to 5V, GND to GND, analog output A0 to Arduino A0. Buzzer positive to digital pin 8, negative to GND. Red LED anode to digital pin 9 through a resistor, cathode to GND. LCD I2C SDA to A4, SCL to A5 on the Uno. Power the whole circuit from USB 5V for this small build.


Build Steps

1. Wire the sensor and LCD first and confirm the display shows a steady reading in clean air. 2. Let the sensor warm up for a few minutes, then note its clean-air reading as your baseline. 3. Set the alarm threshold a sensible margin above that baseline in the program. 4. Add the buzzer and LED, then test the alarm by bringing a safe test source near the sensor only as the module instructions allow — never by creating a real gas leak. 5. Mount the sensor low near the floor for LPG, since LPG is heavier than air, and keep it away from steam and cooking fumes.


Troubleshooting

Reading stuck high: let the sensor warm up fully and check for fumes, steam or alcohol vapour nearby. Alarm never triggers: lower the threshold step by step and check the A0 wiring. LCD blank: check the I2C address and that SDA and SCL are not swapped. Buzzer weak: check its polarity and that it is an active buzzer, not a passive one.


Safety Note

This is a DIY learning project, not a certified safety device. Never rely on it alone for gas safety, never test it with a real gas leak, and if you ever smell gas in real life, ventilate the room, do not switch electrical devices on or off, leave the area, and call your local gas emergency service. Keep the sensor away from open flames.


Going Further

Try adding a second LED for a warning zone before the full alarm, logging readings over serial, or sending an alert with a Wi-Fi board. The same sensor idea can be adapted to smoke detection practice, with the same safety limits.

0 comments:

Post a Comment