LPG gas leak alarm
A kitchen gas sniffer that beeps and flashes the moment LPG levels climb.
Shop by category
Shop all componentsElectrochemical CO sensors are far more selective than MQ-7 heated sensors and need no warm-up heating cycle. The Winsen ZE07-CO module is calibrated at the factory and, in its default active mode, sends a 9-byte frame every second at 9600 baud: 0xFF, gas type, unit, decimals, concentration high and low bytes, full range and a checksum. Concentration is in 0.1 ppm steps.
This is a learning project, not a certified CO alarm. Fit a certified CO alarm wherever you burn fuel, and never run generators or engines in closed rooms.
Tick anything you already have and the total updates.
Winsen ZE07-CO electrochemical CO module
Follow the colours: red is power, dark grey is ground, blue is a signal.
USB charger.
ze07_co.inoVerify & upload in Electrolark#include <Adafruit_SSD1306.h>
Adafruit_SSD1306 oled(128, 64, &Wire, -1);
void big(const char* top, float value, int dp, const char* unit) {
oled.clearDisplay(); oled.setTextColor(WHITE);
oled.setTextSize(1); oled.setCursor(0, 0); oled.print(top);
oled.setTextSize(3); oled.setCursor(0, 20); oled.print(value, dp);
oled.setTextSize(1); oled.print(" "); oled.print(unit);
oled.display();
}
#include <SoftwareSerial.h>
SoftwareSerial gas(10, 11);
// Winsen active upload frame: FF, gas, unit, decimals, conc H, conc L, range H, range L, checksum
float readPpm() {
static uint8_t f[9];
while (gas.available() >= 9) {
if (gas.read() != 0xFF) continue;
f[0] = 0xFF;
for (int i = 1; i < 9; i++) f[i] = gas.read();
uint8_t sum = 0;
for (int i = 1; i < 8; i++) sum += f[i];
if ((uint8_t)(~sum + 1) != f[8]) return -1;
return (f[4] * 256 + f[5]) * 0.1; // ZE07/ME2 CO modules report 0.1 ppm steps
}
return -1;
}
void setup() { gas.begin(9600); oled.begin(SSD1306_SWITCHCAPVCC, 0x3C); }
void loop() {
float ppm = readPpm();
if (ppm < 0) return;
big(ppm > 50 ? "CO HIGH - ventilate" : "Carbon monoxide", ppm, 1, "ppm");
if (ppm > 50) tone(8, 3000, 500);
delay(500);
}
Use the module's TXD pin and 9600 baud; it may be in Q&A mode, see the datasheet.
SoftwareSerial is fine at 9600; check the ground wire.
The sensor was exposed to very high gas; give it fresh air for a while.
Many alarm standards act around 50 ppm over hours and faster at higher levels.
Electrochemical CO cells typically last several years.
No, it is selective to CO; use an LPG sensor for gas leaks.
6 parts: Winsen ZE07-CO Electrochemical Carbon Monoxide Sensor Module – UART/Analog Voltage 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.
No. This page has the complete, tested code (ze07_co.ino).
About ₹1,547 for the parts at the prices on this page. Quantity price breaks lower the cost when you build several.
How electrochemical gas sensors work; Parsing Winsen's UART frame and checksum; Sensible CO alarm levels.
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.