
Building a Methane Gas Leak Detector
Build a circuit that sniffs out methane — the main component of natural gas — and alarms when it rises. An MQ-4 sensor's reading climbs when combustible gas is present; the Arduino compares it to clean air and triggers a buzzer and red LED. A great combustible-gas sensing project — with two honest notes: methane is flammable, and this is a demonstration, NOT a certified gas-leak detector.
Mga Tagubilin
Wire the sensor, buzzer and LED
Wire the sensor, buzzer and LED
On the breadboard: MQ-4 VCC to Arduino 5V, GND to GND, and its analog output (AOUT) to A0. Active buzzer + to pin 8, - to GND. Red LED anode to pin 7 through a 330 Ω resistor, cathode to GND.
Mga materyales para sa hakbang na ito:
Arduino Uno R31 piraso
Methane CNG Gas Sensor - MQ-41 piraso
Modyul ng aktibong buzzer1 piraso
LED - Basic 5mm1 piraso
Resistor 330 Ohm 1/6 Watt PTH - 20 pack1 pakete
Breadboard1 piraso
Jumper Wires (Male-to-Male)1 paketeConnect and open the IDE
Connect and open the IDE
Plug the Arduino into your computer with the USB cable, open the Arduino IDE, and select Arduino Uno and its serial port.
Mga materyales para sa hakbang na ito:
USB-B Cable1 pirasoMga kailangang kasangkapan:
Kompyuter na May Arduino IDEUpload the detector sketch
Upload the detector sketch
Paste this sketch and upload. It warms the sensor, records a clean-air baseline, then sounds the buzzer and lights the LED whenever the reading rises above that baseline.
Warm up, baseline and test SAFELY
Warm up, baseline and test SAFELY
Power it in fresh air and let the 2-minute warm-up set the baseline (a new MQ-4 also needs a 24–48 h burn-in). Test with only a TINY controlled source in a well-ventilated room — a brief puff of gas from an UNLIT lighter held near the sensor. NEVER test with a real gas leak, a large amount of gas, or anywhere near a flame or spark. Adjust ALARM_MARGIN for sensitivity.
Safety limits
Safety limits
Methane is highly flammable and, in enough concentration, explosive. This circuit is a LEARNING project and at best a supplementary indicator — it is NOT a certified gas-leak detector: the hobby MQ-4 gives a relative reading, not calibrated ppm, drifts, and needs re-baselining. For real protection use a certified natural-gas detector, and if you ever smell gas, do not switch anything on or off — leave and call your gas utility.
Mga Materyales
8- Arduino Uno R3 SMD10% komisyon1 piraso$27.06
- Methane CNG Gas Sensor - MQ-410% komisyon1 piraso$5.01
- 1 pirasoPlaceholder
- LED - Basic 5mm10% komisyon1 piraso$0.77
- Resistor 330 Ohm 1/6 Watt PTH - 20 pack10% komisyon1 pakete$1.19
- Breadboard - Classic10% komisyon1 piraso$9.50
- 1 pakete$5.01
- SparkFun Cerberus USB Cable - 1.8 meter10% komisyon1 piraso$5.69
Mga Kinakailangang Kasangkapan
2- Placeholder
- Breadboard - Classic10% komisyon$9.50
Kaugnay na Blueprint
Ang mga blueprint na ito ay nagbabahagi ng kaalaman — mga teknik, materyales, o prinsipyo
CC0 Pampublikong Domain
Ang blueprint na ito ay inilabas sa ilalim ng CC0. Malaya kang kumopya, magbago, mamahagi, at gumamit nang walang pahintulot.
Suportahan ang Maker sa pamamagitan ng pagbili ng mga produkto sa kanilang Blueprint Komisyon ng Maker itinakda ng mga Vendor, o lumikha ng bagong bersyon ng Blueprint na ito at isama bilang koneksyon sa iyong Blueprint upang ibahagi ang kita.

