LPG gas leak alarm
A kitchen gas sniffer that beeps and flashes the moment LPG levels climb.
Shop by category
Shop all componentsWater pressure rises about 9.8 kPa per metre of depth. Push a rigid tube open-end-down to the bottom of a tank and the trapped air is compressed by the water above it; a silicone tube carries that pressure to a GZP6847 gauge sensor on the wall. The GZP6847A040KPP50K reads 0-40 kPa (about 0-4 m of water) as 0.5-4.5 V on a 5 V supply, which the Nano's ADC reads directly.
Tick anything you already have and the total updates.
Sencoch GZP6847A 0-40 kPa gauge pressure sensor, 5 V
Follow the colours: red is power, dark grey is ground, blue is a signal.
5 V USB supply; the sensor output is ratiometric to its supply.
tank_air_tube.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();
}
const float FULL_M = 1.2; // depth of a full tank
float readKpa() {
long sum = 0;
for (int i = 0; i < 32; i++) sum += analogRead(A0);
float v = sum / 32.0 * 5.0 / 1023.0;
return constrain((v - 0.5) / 4.0 * 40.0, 0, 40); // 0.5-4.5 V = 0-40 kPa
}
void setup() { oled.begin(SSD1306_SWITCHCAPVCC, 0x3C); }
void loop() {
float depth = readKpa() / 9.81; // metres of water
big("Tank level", constrain(100 * depth / FULL_M, 0, 100), 0, "%");
oled.setTextSize(1); oled.setCursor(0, 56); oled.print(depth, 2); oled.print(" m"); oled.display();
delay(1000);
}
Air dissolves or leaks; check fittings, or pump a little air in now and then.
Sensor tolerances; subtract your measured zero in the code.
Water in the tube; route it so it rises steadily from tank to sensor.
This sensor is not waterproof; the air tube keeps it dry.
0-40 kPa is about 4 m of water.
Yes, but diesel is lighter than water; divide by 0.84 × 9.81 instead.
6 parts: Sencoch GZP6847A040KPP50K Gauge Pressure Sensor, 0-40 kPa Range, 5V Supply, 1.8 mA, DIP-6 Package, Generic Nano CH340 Development Board (Soldered), 0.96" OLED Display 128x64, Ceramic Disc Capacitor, 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 3 hours. The build on this page has 6 steps.
No. This page has the complete, tested code (tank_air_tube.ino).
About ₹817 for the parts at the prices on this page. Quantity price breaks lower the cost when you build several.
Hydrostatic pressure and water depth; Ratiometric analog pressure sensors; Why an air column keeps electronics dry.
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.