← All Projects
Gas Leak Detection System with MQ-2 Sensor
275 viewsFebruary 20, 2026
ArduinoMQ-2GasSafetyBuzzerLED
A safety-critical gas leak detection system using the MQ-2 smoke and gas sensor. Detects LPG, propane, methane, and smoke. Triggers an audible alarm via buzzer and a visual LED alert when gas concentration exceeds the set threshold.
Components & Supplies
Circuit Connections
Overview
The MQ-2 sensor detects combustible gases and smoke. Its analog output voltage increases proportionally with gas concentration. This project reads the analog value, compares it to a calibrated threshold, and activates both a buzzer and a red LED when dangerous levels are detected.
The serial monitor also logs readings continuously for data analysis. This is a foundational project for home safety and IoT smoke detection systems.
Safety & Calibration
Important safety notes:
- The MQ-2 needs a 24-48 hour burn-in period on first use for accurate readings.
- Allow 2-3 minutes warm-up each time you power on before trusting readings.
- The threshold value (400 in this sketch) should be calibrated based on your environment. Test with a lighter (without flame) to simulate gas.
- This is a hobby project — do NOT rely on it as your sole gas safety device.