LPG gas leak alarm
A kitchen gas sniffer that beeps and flashes the moment LPG levels climb.
Shop by category
Shop all componentsThe ENS160 is a metal-oxide gas sensor that reports an air quality index from 1 (excellent) to 5 (unhealthy), total volatile organic compounds and an estimated CO2. The CO2 figure is an estimate calculated from VOCs, not a true CO2 measurement. The sensor needs a warm-up period after power-up, so early readings may be wrong. This is a ventilation reminder, not a safety alarm for dangerous gases.
This is a ventilation reminder only. It does not replace a certified smoke, gas or carbon monoxide alarm.
Tick anything you already have and the total updates.
ENS160 air quality sensor
Follow the colours: red is power, dark grey is ground, blue is a signal.
USB phone charger. Leave it powered so the sensor stays warmed up.
ens160_alert.inoVerify & upload in Electrolark#include <Wire.h>
#include "ScioSense_ENS160.h"
ScioSense_ENS160 ens160(ENS160_I2CADDR_1); // 0x53; use ENS160_I2CADDR_0 for 0x52
const int BUZZER = 25;
void setup() {
Serial.begin(115200);
pinMode(BUZZER, OUTPUT);
Wire.begin(21, 22);
if (!ens160.begin()) { Serial.println("ENS160 not found"); while (true) delay(1000); }
ens160.setMode(ENS160_OPMODE_STD);
}
void loop() {
if (ens160.available()) {
ens160.measure(true);
int aqi = ens160.getAQI();
Serial.printf("AQI %d TVOC %d ppb eCO2 %d ppm\n", aqi, ens160.getTVOC(), ens160.geteCO2());
if (aqi >= 4) { digitalWrite(BUZZER, HIGH); delay(200); digitalWrite(BUZZER, LOW); }
}
delay(2000);
}
Try the other I2C address, and check the wiring.
The sensor needs a warm-up period. Wait several minutes.
Lower the threshold to aqi >= 3 to test.
No, it is an estimate from VOCs. Use an NDIR sensor for true CO2.
No. Use a proper certified gas alarm for gas leaks and carbon monoxide.
It self-adjusts to its environment over time.
5 parts: ESP32-WROOM-32 38-Pin Development Board, ENS160+AHT21 Air Quality, Temperature & Humidity Sensor Module – I2C Interface, 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.
It is a intermediate project and takes about 1.5 hours. The build on this page has 6 steps.
No. This page has the complete, tested code (ens160_alert.ino).
About ₹1,262 for the parts at the prices on this page. Quantity price breaks lower the cost when you build several.
Reading AQI, TVOC and eCO2 from an ENS160; Handling the warm-up period; Adding a threshold alert.
Ideas that reuse this build: ESP32 indoor air quality station. They are listed under Take it further on this page.
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.
Learning project. Check every circuit and the datasheet of each part before you power it up.