Guides › Water-leak alarm
💧 Water-leak alarm under the sink
“How do I get warned before a leak under the sink floods the kitchen?”
Water conducts a little electricity. Two metal contacts a few millimetres apart on the cupboard floor, a small board that checks them, a loud buzzer and a phone alert. The test is dramatic: pour a glass of water and it screams.
Watch the video
Finding the right parts: from an idea to a short shopping listIn Persian, with English subtitles · YouTube
What to buy
| Part | Why this one | Rough cost |
|---|---|---|
| ESP32-C3 board | Small, cheap, WiFi built in. | $4–7 |
| Leak probe: two wires or two screws, a few mm apart | Or a cheap “rain sensor” board with a comparator, which gives a simple wet/dry signal. | $0–2 |
| Active buzzer | Beeps by itself when powered, so no tone code is needed. It still warns you when your phone is off. | $1 |
| A 100 kΩ resistor | For reading the probe (see step 1). | $0.10 |
| USB power (there's often a socket under the sink) or batteries | — |
Prices are rough ranges, not quotes. Check the current price and stock before you order.
What to install
ESPHome or a short Arduino sketch: check the probe, sound the buzzer when it's wet, and send a phone alert through ntfy or Home Assistant. Repeat the alert every few minutes until it's dry; a leak is urgent.
Build it in three steps
- Test with a glass of water. Connect one probe to ground. Connect the other to an analog pin, and through the 100 kΩ resistor to a second pin that you switch on only while measuring. Print the reading dry, and with the probe in water: wet should read clearly lower.
- Add the buzzer and the alert. Drive the buzzer from a pin (through a small transistor if it needs more current than a pin can give). Alert once when it turns wet, then every few minutes.
- Place it. Probes flat on the lowest point of the cupboard floor; board and buzzer higher up, where they stay dry.
What catches people out
- Probes corrode if they're powered all the time. Constant current through wet metal eats it away. Power the probe only for the moment you measure, which is why the resistor goes to a pin, not straight to 3.3V.
- Damp isn't a leak. Set the alert point from your own test, well away from the dry reading.
- Battery version: wake every 30–60 seconds, check, sleep. A leak takes minutes to do damage, so that's fast enough.
- Low voltage only. USB or batteries; never run mains wiring near the water.
Your version is different?
Ask IotMentor with your own details: distance, power, budget, experience. It asks a few questions back, then gives you a plan like this one, free.
Ask IotMentorStarts with: “How do I get warned before a leak under the sink floods the kitchen?” Add your own details before you send it.