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 by about 98 mbar for every metre of depth. The MS5803-14BA measures absolute pressure up to 14 bar with a gel-protected sensing face, so it can sit under water if its board and wires are sealed. The Nano first reads the air pressure at the surface, then subtracts it, so the difference gives only the water above the sensor.
Do not climb into wells or tanks to fit it; lower it from the top.
Keep mains-powered parts away from the water.
Tick anything you already have and the total updates.
GY-MS5803-14BA pressure sensor module
Follow the colours: red is power, dark grey is ground, blue is a signal.
USB or a 5 V adapter at the tank.
depth_gauge.inoVerify & upload in Electrolark#include <Adafruit_SSD1306.h>
Adafruit_SSD1306 oled(128, 64, &Wire, -1);
#include <SparkFun_MS5803_I2C.h>
MS5803 sensor(ADDRESS_HIGH);
double airMbar = 1013.25;
void setup() {
Wire.begin();
Wire.setClock(50000); // slower bus for a longer cable
pinMode(2, INPUT_PULLUP);
oled.begin(SSD1306_SWITCHCAPVCC, 0x3C); oled.setTextColor(WHITE);
sensor.reset(); sensor.begin();
airMbar = sensor.getPressure(ADC_4096);
}
void loop() {
double p = sensor.getPressure(ADC_4096);
if (digitalRead(2) == LOW) airMbar = p;
double depthCm = (p - airMbar) / 0.98067; // 0.98 mbar per cm of fresh water
oled.clearDisplay();
oled.setTextSize(1); oled.setCursor(0, 0); oled.print("Water depth");
oled.setTextSize(3); oled.setCursor(0, 16); oled.print((int)max(0.0, depthCm)); oled.setTextSize(2); oled.print(" cm");
oled.setTextSize(1); oled.setCursor(0, 54); oled.print(sensor.getTemperature(CELSIUS, ADC_512), 1); oled.print(" C");
oled.display();
delay(500);
}
Slow the I2C clock further or move the Nano closer to the sensor.
Air pressure changes with weather; zero again before reading.
Water has got past the seal; dry it and reseal.
The 14BA version reads up to 14 bar, about 130 m of water, far more than any tank.
Yes, about 1 cm after zeroing.
Yes, that is what it is for; only the board and wires must be sealed.
6 parts: Generic GY-MS5803-14BA Red Board Pressure Sensor Module – I2C Interface, 0-14 Bar, Generic Nano CH340 Development Board (Soldered), 0.96" OLED Display 128x64, Tactile Push Button Switch, 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 advanced project and takes about 3 hours. The build on this page has 6 steps.
No. This page has the complete, tested code (depth_gauge.ino).
About ₹3,307 for the parts at the prices on this page. Quantity price breaks lower the cost when you build several.
Hydrostatic pressure and depth; Absolute versus gauge pressure; Sealing electronics for water.
Do not climb into wells or tanks to fit it; lower it from the top. Keep mains-powered parts away from the water.
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.