Build a simple and effective gas leakage detector using Arduino with MQ-5 sensor for LPG leak detection. This beginner-friendly project provides instant alerts with buzzer and LED indicators when gas is detected.
- Real-time LPG gas detection using MQ-5 sensor
- Dual alert system - buzzer and LED warnings
- Digital threshold detection with adjustable sensitivity
- Budget-friendly - under $20 total cost
- Beginner-friendly Arduino project
Component | Qty | Purpose |
---|---|---|
Arduino Uno | 1 | Main controller |
MQ-5 Gas Sensor | 1 | Detects LPG/propane |
Buzzer | 1 | Audio alert |
LED | 1 | Visual indicator |
220Ω Resistor | 1 | LED protection |
Breadboard & Wires | - | Connections |
Component | Arduino Pin |
---|---|
MQ-5 Digital Out | A2 |
LED | A1 (via 220Ω) |
Buzzer | A0 |
MQ-5 VCC | 5V |
All GND | GND |
- Wire the circuit following the diagram above
- Upload the code from
Arduino_Code/gas_detector.ino
- Tune the sensor using the onboard potentiometer
- Test with gas (lighter) to verify detection
The MQ-5 gas sensor requires proper tuning:
- Turn potentiometer clockwise in clean air until LED turns OFF
- Bring gas source near sensor - LED should turn ON
- Adjust sensitivity as needed for your environment
├── Arduino_Code/
│ └── gas_detector.ino # Main Arduino sketch
├── Circuit_Diagrams/
│ └── schematic.png # Wiring diagram
├── Images/
│ └── assembled_project.jpg # Build photos
└── README.md
- MQ-5 sensor continuously monitors air for LPG/propane
- When gas detected, sensor digital output goes LOW
- Arduino activates buzzer and LED alerts instantly
- System resets automatically when gas clears
- Home kitchens near gas stoves and cylinders
- Small restaurants and food service areas
- RV and camping portable gas detection
- Educational projects for learning Arduino
- Workshop safety backup gas monitoring
// Pin definitions
const int gasSensorPin = A2;
const int ledPin = A1;
const int buzzerPin = A0;
// Main detection logic
if (digitalRead(gasSensorPin) == LOW) {
digitalWrite(ledPin, HIGH); // Turn on LED
digitalWrite(buzzerPin, HIGH); // Sound alarm
}
No sensor response?
- Check 5V power to MQ-5
- Verify pin connections match diagram
- Allow 24+ hours sensor warm-up time
False alarms?
- Adjust potentiometer sensitivity
- Ensure stable power supply
- Check for air currents
For detailed step-by-step instructions, visit: Gas Leakage Detector Using Arduino - Complete Guide
- Arduino Air Quality Monitor
- MQ-135 CO2 Sensor Tutorial
- Arduino Gas Sensors Guide
- Arduino Programming Basics
This DIY gas detector is for educational and supplementary monitoring only. Always use certified commercial gas detectors for critical safety applications.
- Fork this repository
- Create feature branch (
git checkout -b feature/improvement
) - Commit changes (
git commit -m 'Add enhancement'
) - Push to branch (
git push origin feature/improvement
) - Open Pull Request
- Tutorial: CircuitDigest.com
- Issues: Use GitHub Issues for bugs
- Arduino Help: Arduino IDE Tutorial
- Gas Sensors: MQ Sensor Guide
MIT License - Free for educational and personal use
⭐ Star this repo if it helped you build your gas detector project!