LPG gas leak alarm
A kitchen gas sniffer that beeps and flashes the moment LPG levels climb.
Shop by category
Shop all componentsCO2 rises as people breathe in a closed room, and high levels make people sleepy and spread airborne germs. The STCC4 measures true CO2 with Sensirion's thermal conductivity method, in a small I2C package with temperature and humidity. The ESP32 reads it every few seconds and lights one of three LEDs: green below 800 ppm, yellow up to 1,200 ppm and red above.
Tick anything you already have and the total updates.
DFRobot Gravity STCC4 CO2 sensor
Follow the colours: red is power, dark grey is ground, blue is a signal.
5 V USB supply.
co2_light.inoVerify & upload in Electrolark#include <Wire.h>
#include <SensirionI2cStcc4.h>
SensirionI2cStcc4 stcc4;
const int G = 25, Y = 26, R = 27;
void setup() {
Serial.begin(115200);
pinMode(G, OUTPUT); pinMode(Y, OUTPUT); pinMode(R, OUTPUT);
Wire.begin();
stcc4.begin(Wire, STCC4_I2C_ADDR_64);
stcc4.startContinuousMeasurement();
}
void loop() {
delay(5000);
int16_t co2 = 0; float t = 0, rh = 0; uint16_t status = 0;
if (stcc4.readMeasurement(co2, t, rh, status) != 0) return;
Serial.printf("CO2 %d ppm %.1f C %.0f %%\n", co2, t, rh);
digitalWrite(G, co2 < 800);
digitalWrite(Y, co2 >= 800 && co2 < 1200);
digitalWrite(R, co2 >= 1200);
}
Check the I2C wiring and that the library example finds address 0x64.
Let it run for a day; it settles after first use.
It is reading their breath; move it higher.
Outdoor air is about 420 ppm; below 800 indoors is good; above 1,200 means open a window.
MQ sensors react to many gases and cannot give true CO2; the STCC4 measures CO2 itself.
Yes, add an OLED or send the readings to a web page.
7 parts: DFRobot Gravity STCC4 True Carbon Dioxide Sensor (3-in-1 Air Quality Monitoring, 400-5000ppm) – Gravity I2C, ESP32-WROOM-32 38-Pin Development Board, 3 × 5mm LED by Colour (Pack of 10), 3 × Resistor Assortment Kit (30 Values), 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 beginner project and takes about 1-2 hours. The build on this page has 6 steps.
No. This page has the complete, tested code (co2_light.ino).
About ₹3,278 for the parts at the prices on this page. Quantity price breaks lower the cost when you build several.
What CO2 level means for a room; Reading a Sensirion I2C sensor; Threshold displays.
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.