LPG gas leak alarm
A kitchen gas sniffer that beeps and flashes the moment LPG levels climb.
Shop by category
Shop all componentsThe HS-S37P has stainless steel tracks that conduct more as water covers more of them, giving an analog voltage that rises with water depth over a few centimetres. That makes it ideal for detecting water that should not be there. The Nano reads A0 and has two levels: a warning when the probe first gets wet and an alarm when the water is deeper. Powering the probe only during a reading slows corrosion.
Keep the mains wiring of any pump separate and properly protected; never put mains near the probe.
Tick anything you already have and the total updates.
HS-S37P stainless water depth sensor
Follow the colours: red is power, dark grey is ground, blue is a signal.
5 V USB charger; keep it above any possible water level.
flood.inoVerify & upload in Electrolarkconst int WET = 150, DEEP = 450;
int readDepth() {
digitalWrite(7, HIGH); delay(20);
int v = analogRead(A0);
digitalWrite(7, LOW);
return v;
}
void setup() {
Serial.begin(9600);
pinMode(7, OUTPUT); pinMode(8, OUTPUT); pinMode(9, OUTPUT);
}
void loop() {
int v = readDepth();
Serial.println(v);
digitalWrite(9, v > WET);
digitalWrite(8, v > DEEP && (millis() / 300) % 2);
delay(1000);
}
The probe has dirt or salt on it; clean and dry it.
The tracks are corroding; clean them, and keep the pulsed power in the sketch.
Very pure water conducts poorly; tap and rain water work.
Only the length of its tracks, a few centimetres; it is a level alarm, not a tank gauge.
Yes, drive a relay at the DEEP level, with a separate safe pump circuit.
Use an ESP32 instead of the Nano and send a WhatsApp or Telegram alert over Wi-Fi.
7 parts: Generic Nano CH340 Development Board (Soldered), HS-S37P Water Depth Sensor – Analog Output, 3-Pin Interface, Stainless Steel, Buzzer Module 3.3–5V, 5mm LED by Colour (Pack of 10), Resistor Assortment Kit (30 Values), 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 hour. The build on this page has 5 steps.
No. This page has the complete, tested code (flood.ino).
About ₹436 for the parts at the prices on this page. Quantity price breaks lower the cost when you build several.
Conductive water level probes; Two-level alarms with hysteresis; Reducing probe corrosion by pulsing power.
Keep the mains wiring of any pump separate and properly protected; never put mains near the probe.
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.