The problem
Floods kill and displace more people each year than almost any other natural disaster, and the worst losses often come not from the water but from the absence of warning. A river or urban drain rises over hours, yet residents downstream get no signal until water is at their doorstep. Municipal gauge stations are sparse, their data rarely reaches the public in real time, and official alerts propagate too slowly for low-lying streets. What is needed is a local, always-on level measurement that turns a rising river into a direct phone alert — with watch, warning and danger tiers instead of a single panic threshold. Off-the-shelf gauges are expensive, mains-powered and built for hydrologists, not communities. The gap is a cheap battery-backed node that measures level continuously, publishes the trace to a readable dashboard, and sends an SMS the moment a danger threshold is crossed.
Mounted at a fixed height, measuring distance to the water surface via echo time-of-flight.
Follow the working sequence
How it works
- The HC-SR04 ultrasonic sensor is mounted at a fixed height above the water (on the demo tank rim, or a bridge/pole in a real deployment) and measures the distance to the water surface via echo time-of-flight.
- The ESP32 converts distance to water level using the known sensor mounting height, then applies a median filter over several samples to reject ripple and debris noise.
- The filtered level is compared against three calibrated thresholds: below Warning is Normal; between Warning and Danger triggers app alerts; above Danger triggers SMS alerts to all registered numbers plus the local buzzer.
- Every sample is published over WiFi to the cloud dashboard, which plots the level trace with threshold lines and logs each alert with a timestamp.
- When the level falls back below the thresholds (with hysteresis), the system auto-clears and logs the all-clear event.
Project features
- Non-contact ultrasonic water-level sensing — no probe in the water, no fouling or corrosion
- Three-tier alert thresholds: Normal, Warning and Danger, each with its own SMS and app behavior
- GSM SMS alerts to registered numbers — works even where there is no WiFi at the riverbank
- Cloud dashboard with live level graphs, threshold markers and complete alert history
- Local buzzer plus LED strobe for on-site audible warning near the sensor node
- Median-filtered readings reject ripples, rain splashes and floating debris spikes
- Battery-backed operation with deep-sleep between samples for multi-day runtime
- Demo tank included — raise the water level by hand to trigger every alert tier live
What is included
- Assembled flood-monitor node with demo tank, sensor arm and mounting bracket
- Complete source code (Arduino IDE, well-commented)
- Circuit diagram and wiring schematic
- Threshold calibration procedure (mounting-height and tier setup)
- Project report PDF (synopsis, design, results, conclusion)
- PPT presentation for final review
- Viva Q&A preparation document
- Dashboard and GSM/SIM setup guide
FAQs
- Why ultrasonic instead of a float switch or contact probe? Non-contact sensing keeps nothing in dirty, debris-filled water — no corrosion, no fouling, no moving parts to jam. The HC-SR04 gives continuous centimetre-level readings where a float switch only gives on/off, so you get Warning and Danger tiers instead of a single trip point.
- Why include GSM when the ESP32 already has WiFi? Flood-prone riverbanks and drains often have no WiFi. GSM SMS reaches phones directly without internet on either end, which is what an early-warning system must guarantee. Dual-channel alerting (SMS plus app) is a solid review talking point.
- How accurate is the water-level reading? The HC-SR04 sensor resolves about 3 mm (datasheet value); the report documents the calibration and level-tracking test procedure for the demo tank, including the calibration table.
- How do I demo flood alerts in a classroom? Pour water into the demo tank (or slide the sensor arm lower) to walk the level through Normal → Warning → Danger. The dashboard graphs it live, the phone receives the SMS, and the buzzer sounds — a complete end-to-end demo in under two minutes.
- What happens when the level drops again? Hysteresis bands on each threshold prevent alert flapping; when the level falls clear, the system logs an all-clear event so the alert history shows the full flood cycle.
- What are sensible extensions? Rain-gauge correlation, LoRa multi-node river coverage, solar powering, ML-based flood prediction from level trends, and integration with municipal alert APIs. The report lists them as future scope.
Advantages
- Non-contact ultrasonic water-level sensing — no probe in the water, so no fouling or corrosion.
- Three-tier alert thresholds — Normal, Warning and Danger — each with its own SMS and app behavior; crossing Danger fires the alerts.
- GSM SMS alerts to registered numbers work even where there is no WiFi at the riverbank, backed by a local buzzer and LED strobe for on-site warning.
- Median-filtered readings reject ripples, rain splashes and floating-debris spikes before thresholds are compared.
- Cloud dashboard with live level graphs, threshold markers and a complete alert history; battery-backed operation with deep-sleep between samples for multi-day runtime, and a demo tank included so all three alert tiers can be triggered live.
Disadvantages
- The HC-SR04 is rated for indoor/sheltered use; exposed monsoon deployment needs the optional weatherproof sensor variant.
- Ultrasonic readings can be disturbed by heavy surface foam or wind-blown spray — the median filter handles normal ripples, not extreme conditions.
- SMS alerting needs an active SIM with balance and GSM network coverage at the deployment site.
- The demo tank models a river cross-section at bench scale; real deployment needs site-specific mounting and threshold calibration.
Limitations & prerequisites
- The HC-SR04 is rated for indoor/sheltered use; exposed monsoon deployment needs the optional weatherproof sensor variant.
- Ultrasonic readings can be disturbed by heavy surface foam or wind-blown spray — the median filter handles normal ripples, not extreme conditions.
- SMS alerting needs an active SIM with balance and GSM network coverage at the deployment site.
- The demo tank models a river cross-section at bench scale; real deployment needs site-specific mounting and threshold calibration.
Components & software requirements
- ESP32 DevKit (WiFi, dual-core 240 MHz)
- HC-SR04 ultrasonic sensor (2 cm–4 m range)
- SIM800L GSM module with antenna
- Active buzzer + LED strobe (local alarm)
- 16x2 I2C LCD (on-node display)
- Cloud dashboard (live graphs, alert log)
- 18650 battery pack + TP4056 charger
- Demo water tank with sensor arm
Specifications
| Parameter | Value |
|---|---|
| Microcontroller | ESP32 (240 MHz dual-core, WiFi 802.11 b/g/n) |
| Level sensor | HC-SR04 ultrasonic, 2 cm–4 m range, ~3 mm resolution |
| Measurement | Echo time-of-flight; distance → level via mounting height |
| Sampling | Every 10 s (configurable), 7-sample median filter |
| Alert tiers | Normal / Warning / Danger (user-calibrated cm thresholds) |
| SMS channel | SIM800L quad-band GSM, up to 5 registered numbers |
| App channel | WiFi → cloud dashboard, push alerts + live graphs |
| Local alarm | 85 dB buzzer + LED strobe, Danger tier only |
| Power | 5 V adapter; 18650 backup ≈ 48 h in deep-sleep sampling mode |
| Mounting | Sensor arm clamps to demo tank rim; pole/bridge mountable |
Download free synopsis (PDF)
Enter your name and WhatsApp number — the synopsis PDF downloads immediately. We may send occasional project updates on WhatsApp; no spam.