an innovative IoT Edge AI application that monitors drainage systems and waterways in Lagos, Nigeria, detecting blockages and predicting flood occurrences in real-time. The system operates 24/7 on edge hardware.
# DrainSentinel 2.0: Edge AI Flood Prevention System
**An AI-powered drainage monitoring system that detects blockages and predicts floods before they happen.**
Built for Lagos, Nigeria β where flooding is a real problem that affects millions.
---
## π― What This Does
DrainSentinel uses a camera + ultrasonic sensor + AI to:
1. **See blockages** β Camera detects debris, trash, blockages in drains
2. **Measure water levels** β Ultrasonic sensor tracks how high water is rising
3. **Predict floods** β AI combines both to warn BEFORE flooding happens
4. **Alert people** β Sends notifications to residents and authorities
5. **Trigger responses** β Can activate pumps, sirens, or barriers via relay
**The magic:** All AI runs locally on the Metis AI Accelerator. No cloud. No internet required for core functions. Works 24/7.
---
## π§ Hardware Stack
This is what we're using β **no substitutions**:
| Component | Role | Notes |
|-----------|------|-------|
| **Metis AI Accelerator** | Edge AI brain | Runs vision models locally |
| **USB Camera (1080p)** | Visual detection | ONE camera for drain monitoring |
| **Arduino Uno Rev 4** | Sensor hub | Connects ultrasonic sensor |
| **HC-SR04 Ultrasonic Sensor** | Water level measurement | Connected to Arduino |
| **Sonoff Pro R3 Relay** | Physical responses | Trigger pumps/sirens/barriers |
| **Wi-Fi Dongle** | Connectivity | Remote monitoring & alerts |
| **MicroSD Card** | Storage | Logs, images, models |
### What We're NOT Using
- β ~~Echo Dot~~ β Removed from project
- β ~~Second camera~~ β Using ONE camera only
- β ~~Raspberry Pi~~ β Using Metis AI Accelerator instead
---
## π Quick Start (For Beginners)
**New to this?** Don't worry β this guide assumes you're starting from scratch.
### Step 1: Flash the Metis AI Accelerator
The Metis doesn't have an OS yet. Let's fix that.
**What you need:**
- A computer (Windows, Mac, or Linux)
- MicroSD card (32GB minimum, Class 10 or faster)
- MicroSD card reader
- The M β¦