Status: Prototype (Tested on Magicbit Neo)
Built after: Cyclone Ditwah (2025)
Flood-Watch is a low-cost flood monitoring device designed for riverbank and flood-prone communities in Sri Lanka.
Instead of relying on cloud servers, this system performs edge computing to detect flood risks locally and trigger alerts instantly — even when internet connectivity fails.
Traditional flood warning systems often fail due to:
- Internet outages
- Central server delays
- Late emergency alerts
Flood-Watch solves this by providing real-time, local flood alerts directly to the community.
| Color | Meaning | Alert |
|---|---|---|
| 🟢 Green | Safe | No sound |
| 🟡 Yellow | Warning | Slow beeps |
| 🔴 Red | Danger / Evacuate | Continuous siren |
- Measures how fast the water level rises
- Uses a 5-second moving average to reduce noise
- Triggers a FLASH FLOOD alert if:
- No cloud dependency
- Alerts continue during network failures
- Onboard OLED screen
- Displays:
- Water depth
- Alert status
- Water level graph
| Component | Purpose |
|---|---|
| Magicbit Neo | ESP32-based controller |
| HC-SR04 | Ultrasonic water level sensor |
| OLED Display | Visual alert output |
| Piezo Buzzer | Audio alarm |
| Power Bank | 5V power supply |
| Jumper Wires | Wiring connections |
| Sensor Pin | Board Pin |
|---|---|
| VCC | 5V |
| GND | GND |
| TRIG | D32 |
| ECHO | D33 |
Notes:
- Buzzer is connected to Pin 25
- OLED uses built-in I2C pins
- Arduino IDE (Version 2.0 or higher)
- Open Boards Manager
- Install Magicbit or ESP32
- NewPing
- Adafruit GFX Library
- Adafruit SSD1306
- Open
FloodWatch_Main.ino - Select Magicbit Neo as the board
- Select the correct COM port
- Click Upload
Sensor height is fixed at 25 cm.
| Depth | Status |
|---|---|
| < 12 cm | Safe |
| 12 – 18 cm | Warning |
| > 18 cm | Evacuate |
- Measures water level every second
- Groups readings into 5-second blocks
- Calculates rise speed using:
If velocity exceeds 2 cm/s, the system:
- Overrides depth rules
- Triggers a Rapid Surge Alert
- Waterproof ultrasonic sensor (JSN-SR04T)
- LoRaWAN connectivity for long-range alerts
- Solar-powered operation
To build a simple, affordable, and reliable flood early warning system that protects lives when centralized systems fail.