LPG gas leak alarm
A kitchen gas sniffer that beeps and flashes the moment LPG levels climb.
Shop by category
Shop all componentsFormaldehyde (HCHO) is released by glues in plywood, particle board and some paints, most strongly in the first months. The Dart WZ-S-K is an electrochemical sensor that sends its reading over serial once a second, in a 9-byte frame with the concentration in ppb (parts per billion). The Nano reads the frame, checks the checksum and shows ppb and mg/m3 on an OLED with a simple level.
This is a guide reading, not a certified indoor air test.
Tick anything you already have and the total updates.
Dart WZ-S-K formaldehyde sensor
Follow the colours: red is power, dark grey is ground, blue is a signal.
USB.
hcho.inoVerify & upload in Electrolark#include <Adafruit_SSD1306.h>
Adafruit_SSD1306 oled(128, 64, &Wire, -1);
#include <SoftwareSerial.h>
SoftwareSerial hs(10, 11);
int readPpb() { // FF 17 04 00 hi lo fullHi fullLo checksum
while (hs.available() >= 9) {
if (hs.read() != 0xFF) continue;
uint8_t f[9]; f[0] = 0xFF;
for (int i = 1; i < 9; i++) f[i] = hs.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];
}
return -1;
}
void setup() {
hs.begin(9600);
oled.begin(SSD1306_SWITCHCAPVCC, 0x3C); oled.setTextColor(WHITE);
}
void loop() {
int ppb = readPpb();
if (ppb < 0) { delay(200); return; }
float mg = ppb * 1.23 / 1000.0; // at about 25 C
oled.clearDisplay();
oled.setTextSize(1); oled.setCursor(0, 0); oled.print("Formaldehyde");
oled.setTextSize(3); oled.setCursor(0, 18); oled.print(ppb); oled.setTextSize(1); oled.print(" ppb");
oled.setCursor(0, 46); oled.print(mg, 3); oled.print(" mg/m3");
oled.setCursor(0, 56); oled.print(mg < 0.1 ? "OK" : "High - air the room");
oled.display();
}
TX is on the wrong pin, or the sensor is in question-answer mode; check its datasheet.
Alcohol from sanitiser or perfume also affects it; measure away from them.
Normal for very low levels; watch the trend over minutes.
WHO's guideline is 0.1 mg/m3 averaged over 30 minutes.
Mostly in the first weeks and months; airing and warm weather speed it up.
Yes, use Serial2 instead of SoftwareSerial and add Wi-Fi logging.
5 parts: Generic Nano CH340 Development Board (Soldered), Dart Sensors WZ-S-K Formaldehyde (HCHO) Sensor Module, Detection Range: 0-2ppm – Digital Output, 0.96" OLED Display 128x64, 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 (hcho.ino).
About ₹2,190 for the parts at the prices on this page. Quantity price breaks lower the cost when you build several.
Electrochemical sensors for low gas levels; Parsing a checksummed serial frame; ppb vs mg/m3.
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.