This project involved designing and implementing the firmware for an IoT-enabled Smart Flood Monitoring and Warning System built on the ESP32 microcontroller architecture. Deployed as a remote telemetry node near environmental hazards like rivers and reservoirs, the system actively gathers critical data metrics—including water levels, atmospheric patterns, and system health parameters—and securely streams them across a lightweight distributed network.
Scope & Architecture
The system acts as a resilient edge-computing device, interfacing directly with physical hardware sensors while managing active network connections. It leverages real-time clock synchronization, optimized memory utilization for data payloads, and reliable messaging protocols to ensure continuous and accurate environmental monitoring.
Special Features
- Dual-Sensor Acoustic Telemetry: Utilizes two dedicated ultrasonic sensor channels to precisely measure river bank levels and absolute volumetric changes within a localized rain gauge assembly.
- Barometric & Thermal Profiling: Integrates a BMP280 sensor via a customized I2C bus to detect subtle regional temperature and atmospheric pressure variations as precursor indicators of heavy rainfall.
- Intelligent Low-Overhead Data Payload: Utilizes ArduinoJson memory layouts to serialize raw system data into optimized JSON strings, significantly reducing the data footprint prior to radio transmission.
- Reliable Pub/Sub Messaging: Connects securely over TCP to an MQTT broker, publishing structural payloads to dedicated telemetry paths for live visualization dashboards.
- Battery Power Management: Features a built-in tracking module that maps hardware input scaling from a custom voltage divider to evaluate battery cell life and prevent unexpected downtime.
Key Insights
- Time Synchronization in Edge Computing: Discovered the critical importance of real-time tracking in asynchronous sensor networks, moving away from simple delay counters to internal RTC structures synced to world time servers for scientifically valid data entries.