LPG gas leak alarm
A kitchen gas sniffer that beeps and flashes the moment LPG levels climb.
Shop by category
Shop all componentsRunning engines in a closed garage builds up carbon monoxide (CO) and nitrogen dioxide (NO2). The MiCS-4514 has two metal-oxide elements, one reducing (CO, alcohol) and one oxidising (NO2). The DFRobot Gravity board handles the heater and converts both readings over I2C; its library returns estimated gas levels in ppm after a warm-up. The ESP32 shows them and drives a relay for an exhaust fan.
Never run a vehicle engine in a closed space; this does not make it safe.
Mains fan wiring must be done by an electrician.
Tick anything you already have and the total updates.
DFRobot Gravity MiCS-4514 gas sensor (I2C)
Follow the colours: red is power, dark grey is ground, blue is a signal.
5 V USB supply for the electronics; the fan's own mains wiring is separate.
garage_watch.inoVerify & upload in Electrolark#include <Adafruit_SSD1306.h>
Adafruit_SSD1306 oled(128, 64, &Wire, -1);
#include <DFRobot_MICS.h>
DFRobot_MICS_I2C mics(&Wire, 0x75);
const float CO_ON = 35, CO_OFF = 15; // ppm
bool fan = false;
void setup() {
Serial.begin(115200);
pinMode(26, OUTPUT);
oled.begin(SSD1306_SWITCHCAPVCC, 0x3C); oled.setTextColor(WHITE);
while (!mics.begin()) { Serial.println("No sensor"); delay(1000); }
if (mics.getPowerState() == SLEEP_MODE) mics.wakeUpMode();
while (!mics.warmUpTime(CALIBRATION_TIME)) delay(1000); // about 3 minutes
}
void loop() {
float co = mics.getGasData(CO);
float no2 = mics.getGasData(NO2);
if (co > CO_ON) fan = true;
if (co < CO_OFF) fan = false;
digitalWrite(26, fan);
oled.clearDisplay(); oled.setTextSize(1);
oled.setCursor(0, 0); oled.print("CO "); oled.print(co, 0); oled.print(" ppm");
oled.setCursor(0, 20); oled.print("NO2 "); oled.print(no2, 1); oled.print(" ppm");
oled.setCursor(0, 44); oled.print(fan ? "FAN ON" : "fan off");
oled.display();
delay(2000);
}
The board is asleep or at a different address; check the DIP switch and the library example.
Metal-oxide sensors settle over the first 24-48 hours of use.
Widen the gap between CO_ON and CO_OFF.
They are estimates from the library's curves, good for trends, not for certified measurement.
No, use a certified CO alarm where people sleep; this is a fan helper.
The reducing element reacts to many fuel vapours too.
7 parts: DFRobot Gravity MEMS Gas Sensor (CO, Alcohol, NO2 & NH3) – I2C – MiCS-4514, ESP32-WROOM-32 38-Pin Development Board, 0.96" OLED Display 128x64, 5V Relay Module with Optocoupler, Official Raspberry Pi 4 USB-C Power Supply – 15.3W, 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 2 hours. The build on this page has 6 steps.
No. This page has the complete, tested code (garage_watch.ino).
About ₹6,827 for the parts at the prices on this page. Quantity price breaks lower the cost when you build several.
Reducing versus oxidising gas sensors; Warm-up and calibration time; Controlling a fan with hysteresis.
Never run a vehicle engine in a closed space; this does not make it safe. Mains fan wiring must be done by an electrician.
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.