Automated water dispensing with IoT-based metering, payment integration, remote monitoring over MQTT, and fault detection — bringing smart infrastructure to community water access.
Access to clean, metered water in underserved communities is a logistical and financial challenge. Traditional ATM-style dispensing units are either cost-prohibitive or lack remote monitoring capabilities, making maintenance reactive and inefficient.
This system replaces manual operation with a fully automated, IoT-connected water ATM — users dispense a measured volume of water after payment, the unit logs every transaction in real time, and operators get a live dashboard for remote oversight, fault alerts, and consumption analytics.
The system is split into three layers: edge hardware, communication middleware, and cloud dashboard.
Accurate flow metering: The YF-S201 has non-linearity at low flow rates. Implemented a calibration curve per unit with interrupt-driven pulse counting at 1ms resolution — achieving ±2% accuracy across the operating range.
Payment atomicity: Preventing dispensing without confirmed payment — and refunding on valve failure — required careful state machine design with hardware watchdog recovery. Every transaction is logged to non-volatile flash before the valve opens.
Connectivity resilience: Deployed in areas with unstable Wi-Fi. Implemented local offline queuing with SD card buffering — transactions complete offline and sync when connectivity is restored. Never a lost record.
Power management: Running on a shared 12V supply shared between the valve relay, ESP32, and LCD. Designed proper decoupling and brownout detection to prevent corrupted flash writes during voltage dips.
The system achieved ±2% volume accuracy, zero lost transactions across all test deployments (including simulated connectivity failures), and sub-5-second fault detection via the MQTT monitoring pipeline.