LPG gas leak alarm
A kitchen gas sniffer that beeps and flashes the moment LPG levels climb.
Shop by category
Shop all componentsHydrogen sulfide (H2S) comes from rotting matter in drains, septic tanks and biogas. At low levels it smells of rotten eggs; at high levels it numbs the sense of smell and is very dangerous. The MQ-136 module senses H2S with a heated tin-oxide element and gives analog and digital outputs. MQ sensors have a heater: give a new sensor 24 hours of first power to burn in, and a few minutes after each power-up. Their readings depend on temperature and humidity, so use them to spot a rise above clean air, not for exact ppm without calibration.
This is a learning project, not a certified gas detector. Use certified alarms where dangerous gases are possible.
Never enter a septic tank, sewer or manhole: H2S there kills quickly.
Tick anything you already have and the total updates.
MQ-136 H2S sensor module, analog and TTL
Follow the colours: red is power, dark grey is ground, blue is a signal.
5 V USB charger in a dry place.
h2s_alarm.inoVerify & upload in Electrolark#include <Adafruit_SSD1306.h>
Adafruit_SSD1306 oled(128, 64, &Wire, -1);
int base;
int readA() { long s = 0; for (int i = 0; i < 20; i++) s += analogRead(A0); return s / 20; }
void setup() {
pinMode(8, OUTPUT);
oled.begin(SSD1306_SWITCHCAPVCC, 0x3C); oled.setTextColor(WHITE);
for (int s = 120; s > 0; s--) { oled.clearDisplay(); oled.setCursor(0, 0); oled.print("Warming up "); oled.print(s); oled.display(); delay(1000); }
base = readA();
}
void loop() {
int a = readA(), rise = a - base;
bool alarm = rise > 80;
oled.clearDisplay(); oled.setTextSize(1); oled.setCursor(0, 0); oled.print("H2S rise over clean air");
oled.setTextSize(3); oled.setCursor(0, 20); oled.print(rise);
oled.setTextSize(1); oled.setCursor(0, 55); oled.print(alarm ? "SMELL! Ventilate" : rise > 30 ? "Slight" : "OK");
oled.display();
digitalWrite(8, alarm && (millis() / 300) % 2);
delay(500);
}
Some H2S is normal near drains; move it a little away or raise the limit.
Humidity changes the reading; take a new baseline on a dry day.
Drain air is corrosive; keep the electronics in a sealed box with a small vent for the sensor.
At low levels it is only unpleasant, but strong H2S can be deadly and stops you smelling it.
No, never enter tanks or manholes on a hobby sensor; that needs trained people and certified gas meters.
Not well; use a methane sensor for biogas leaks.
6 parts: MQ-136 Hydrogen Sulfide (H2S) Gas Sensor Module – Analog & TTL Output, Generic Nano CH340 Development Board (Soldered), 0.96" OLED Display 128x64, Buzzer Module 3.3–5V, Solderless Breadboard and Dupont Jumper Wires (40 pcs). On this page you can tick the parts you already have and add only the rest to your cart.
It is a intermediate project and takes about 1 hour. The build on this page has 5 steps.
No. This page has the complete, tested code (h2s_alarm.ino).
About ₹1,517 for the parts at the prices on this page. Quantity price breaks lower the cost when you build several.
Where H2S comes from and why it is dangerous; Heated metal-oxide gas sensors; Baseline-and-rise alarms.
A kitchen gas sniffer that beeps and flashes the moment LPG levels climb.
See the smoke level live on a crisp screen and get a loud warning when it spikes.
An infrared eye that spots an open flame and raises the alarm.
Walk into the room and it sounds the alarm: the classic first security build.
Lessons are free to read. Maker (₹499/month) and Pro add quizzes, worked problems and certificates, paid with your Geekobot account. See plans
Learning project. Check every circuit and the datasheet of each part before you power it up.