LPG gas leak alarm
A kitchen gas sniffer that beeps and flashes the moment LPG levels climb.
Shop by category
Shop all componentsThe MP503 is a metal-oxide gas sensor that reacts to smoke, alcohol, solvents and many cooking fumes. The Grove module drives its heater and gives an analog voltage that rises when the air gets worse. Because it reacts to many gases, the sketch compares the reading with the clean-air level measured at start-up instead of trying to give ppm.
This is not a certified fire or gas alarm.
Tick anything you already have and the total updates.
Seeed Grove Air Quality Sensor v1.3 (MP503)
Follow the colours: red is power, dark grey is ground, blue is a signal.
A 5 V USB adapter; the heater runs all the time.
kitchen_air.inoVerify & upload in Electrolarkint baseline = 0;
const int RISE = 150; // counts above clean air
void setup() {
pinMode(5, OUTPUT); pinMode(6, OUTPUT);
Serial.begin(9600);
delay(120000); // heater warm-up
long sum = 0; for (int i = 0; i < 50; i++) { sum += analogRead(A0); delay(100); }
baseline = sum / 50;
}
void loop() {
int v = analogRead(A0);
Serial.println(v);
bool bad = v > baseline + RISE;
digitalWrite(6, bad);
if (bad) tone(5, 2500, 200);
if (!bad && v < baseline) baseline = (baseline * 9 + v) / 10; // follow slow drift down
delay(1000);
}
The heater is not warm yet; wait the full two minutes in clean air.
Lower RISE; some modules swing less.
Steam changes the reading; move it away from the cooker's direct plume.
No, it is an air quality alert; use a certified smoke alarm for fire safety.
It reacts somewhat, but use an MQ-6 or a certified LPG alarm for gas leaks.
Several years when powered continuously.
7 parts: Seeed Studio Studio Grove Air Quality Sensor v1.3 – Winsen MP503 Module w/ Grove Cable, Generic Nano CH340 Development Board (Soldered), Buzzer Module 3.3–5V, 5mm LED by Colour (Pack of 10), Resistor Assortment Kit (30 Values), 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.
No. This page has the complete, tested code (kitchen_air.ino).
About ₹1,426 for the parts at the prices on this page. Quantity price breaks lower the cost when you build several.
How metal-oxide gas sensors work; Comparing with a baseline; Why warm-up time matters.
This is not a certified fire or gas alarm.
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.