An Intelligent, low-cost water quality monitoring system with on-device machine learning and cloud integration
Access to safe drinking water remains a global challenge, worsened by pollution and delays in traditional lab analysis. This paper presents a low-cost (under $80), real-time Smart Water Quality Monitoring System utilizing the ESP32 microcontroller. The system measures four crucial parameters, specifically pH, TDS, temperature, and turbidity, and transmits data to a cloud backend for remote visualization on a dynamic web dashboard. A key innovation is the integration of an on-device machine learning model (TinyML) for intelligent, real-time categorization of water impurity events. A neural network, trained on a custom 6,000-point dataset and deployed using the TensorFlow Lite for Microcontrollers framework, distinguishes between ‘Normal’, ‘Rainwater Runoff’, and ‘Chemical’ impurity profiles with 99.28% accuracy. This approach enables independent anomaly detection without reliance on cloud connectivity for decision making. To address hardware constraints, an intelligent fluctuation-based logging algorithm was implemented, demonstrating a 98.2% reduction in SD card write operations during a 24-hour stability test (1,520 writes versus 86,400 in continuous mode). Combined with an automated pump control mechanism, this approach provides an autonomous, resource-efficient solution for decentralized water safety monitoring.
Authors
- Devansh Mishra (ORCID: https://orcid.org/0000-0002-1584-3241)
- Saurabh Sharma (ORCID: https://orcid.org/0000-0001-9790-9170)
- Ayush Yadav (ORCID: https://orcid.org/0009-0006-6994-7552)
- Bibek Gami
- E. S. Madhan
Institutions
- Vellore Institute of Technology University (IN)
Publication Details
- Journal
- Scientific Reports
- Published
- 2026-02-26
- DOI
- https://doi.org/10.1038/s41598-026-37287-3
- Primary Topic
- Water Quality Monitoring Technologies
- Type
- article
- Field-Weighted Citation Impact
- 0.00