Table of Contents
- How Water Leak Detection Works
- Components
- Arduino Detection Code
- WhatsApp Notification
- Sensor Placement India
- FAQ
How Water Leak Detection Works
A water leak detector uses two conductive probes close together. In dry conditions, resistance between probes is very high (megaohms). When water bridges the gap, resistance drops dramatically to a few thousand ohms, changing the analog voltage measurably. This principle works with simple copper wire, dedicated water sensor modules, or even a piece of PCB with interleaved copper traces. Build cost for a basic alert system: Rs 300-600 including ESP8266 for Wi-Fi notifications.
Indian context: Water leak detection is critical for overhead tank overflow, washing machine hose failures, bathroom leaks into the flat below, and monsoon basement flooding. Every Indian apartment building has had at least one water-related neighbour dispute – early detection prevents costly damage and disputes.
Components
- Arduino Uno or ESP8266 NodeMCU (for Wi-Fi alerts)
- Water sensor module (Rs 30-60) or two copper probes (bare wire on PCB)
- Buzzer for local alarm
- LED indicator
- Optional relay to shut off water solenoid valve on detection (Rs 20-50 for relay + Rs 800-2,000 for 0.5-inch solenoid valve)
Arduino Detection Code
// Water leak sensor: two exposed copper wires as probes
// When water bridges the gap, resistance drops dramatically
#define WATER_PROBE A0
#define LED 8
#define BUZZER 9
int dryBaseline=0;
void setup(){
dryBaseline=analogRead(WATER_PROBE);
pinMode(LED,OUTPUT); pinMode(BUZZER,OUTPUT);
}
void loop(){
int reading=analogRead(WATER_PROBE);
// Water bridges probes: reading drops from ~1023 to ~200-500
if(reading < dryBaseline*0.5){
digitalWrite(LED,HIGH);
tone(BUZZER,2000,500);
// Also trigger WhatsApp/Telegram notification here
} else {
digitalWrite(LED,LOW); noTone(BUZZER);
}
delay(200);
}
WhatsApp Notification
Use ESP8266/ESP32 with Twilio WhatsApp API (100 free messages/month) or CallMeBot WhatsApp API (completely free, requires one-time phone verification). CallMeBot API call from ESP8266:
// CallMeBot WhatsApp API - free, no server needed
void sendWhatsApp(String phone, String apiKey, String message){
WiFiClientSecure client;
client.setInsecure();
String url = "https://api.callmebot.com/whatsapp.php?phone=" + phone;
url += "&text=" + urlencode(message) + "&apikey=" + apiKey;
client.begin(url);
int code=client.GET();
client.end();
}
Telegram Bot API (free, no monthly limit) is an alternative that requires no phone number verification and delivers more reliably in India on Jio/Airtel 4G data connections. Create a Telegram bot with @BotFather and use the sendMessage API endpoint.
Sensor Placement India
- Overhead tank overflow: Mount at the tank rim with the probe just inside. Use stainless steel or copper probes that resist corrosion in standing water.
- Washing machine: Place on floor behind/under the machine where hose failures drain. Use a flat PCB-type sensor that lies flush with the floor.
- Bathroom/toilet area: Place near the toilet base and under the sink. In Indian bathrooms, regular water splashing must be distinguished from actual leaks – use a time delay filter (alert only if wet for 30+ continuous seconds).
- Basement/parking: During Indian monsoon, place at the lowest point where water accumulates first. An automated pump activation relay can drain water automatically on detection.
Frequently Asked Questions
Will my bathroom water sensor keep false-alarming from splashing?
Add a 30-second sustained detection filter: alert only if the sensor reads wet continuously for 30+ seconds. Normal bathroom splashing dries in 10-15 seconds. A persistent wet reading indicates a real leak or flooding. In Indian bathrooms with wet floor designs, mount sensors slightly elevated (1-2cm off floor) to detect puddle formation rather than individual water drops.
Can I automatically shut off water on leak detection?
Yes – add a 0.5-inch normally-open solenoid valve (Rs 800-2,000 from plumbing suppliers) in the water supply line controlled by a relay. On detection, cut power to the solenoid valve to stop water flow. This is effective for overhead tank overflow prevention and washing machine hose failures. Ensure the solenoid valve is rated for your water pressure (Indian municipal supply: 1-3 bar typically).
How corrosion-resistant are copper wire probes in Indian water?
Indian municipal water (which varies in chlorine content and mineral hardness by city) corrodes bare copper wire probes within 2-4 weeks. Use stainless steel wire probes (from steel wires in a wire brush, or stainless screws) which last 6-12 months. Commercial water sensor PCBs with gold-plated traces last 2-3 years. Clean probes monthly to remove mineral deposits that insulate the surface.
My sensor triggers when I pour a glass of water nearby – why?
Two causes: the probe gap is too small (water spray bridges it from splashing) or the floor slope directs any spilled water toward the probe. Increase probe gap slightly (5-10mm) and elevate the probe slightly above floor level. For kitchen installation, distinguish between a dropped glass (brief wet, quick drain) and appliance leak (sustained wet reading).
Add comment