Smart Hydroponic System Using IoT and Machine Learning for Water Quality Monitoring
Keywords:
Hydroponics, IoT, Machine Learning, Rasp berry Pi, Water Quality Monitoring, Smart Agriculture, XG Boost.Abstract
Hydroponics has gained prominence as a sustainable and resource-efficient alternative to traditional soil-based agricul ture. However, maintaining optimal water quality in hydroponic systems requires constant monitoring of critical parameters such as pH, electrical conductivity (EC), and temperature. This paper presents a smart hydroponic monitoring system that integrates IoT-enabled sensors with machine learning algorithms to provide real-time data acquisition and water quality classification. The proposed hydroponic system, built on an Ebb and Flow configu ration, uses a Raspberry Pi 5 as the central controller to process data from pH, EC, and temperature sensors. A comprehensive dataset was collected and labeled based on established water quality thresholds to train and evaluate several classification models, including Logistic Regression, Random Forest, Support Vector Machine (SVM), and XGBoost. The XGBoost model achieved perfect performance (100% accuracy, precision, recall, and F1-score) in classifying water conditions as ’Safe’ or ’Unsafe’. The resulting model was serialized for deployment, enabling real time inference on the edge device. The work demonstrates a scalable and cost-effective framework for enhancing automation in hydroponic farming, aiming to improve plant health, optimize nutrient management, and minimize human intervention through intelligent, data-driven decision-making.
References
G. Rajaseger, “Hydroponics: Current trends in sustainable crop production,” Frontiers in Plant Science, 2023. [Online]. Available: https://pmc.ncbi.nlm.nih.gov/articles/PMC10625363/
S. Rajendran, “Review article hydroponics: Exploring innovative advances and sustainable solutions,” ScienceDirect, 2024 [Online]. Available: https://www.sciencedirect.com /science/article/pii/S2405844024028548
BYJU’S, “Types of hydroponic systems,” 2022. [Online]. Available: https://byjus.com/neet/hydroponic-system/
NoSoilSolutions, “7 different types of hydroponic systems (pros, cons & best use cases),” 2025. [Online]. Available: https://nosoilsolutions. com/6-different types-hydroponic-systems/
AgriFarming, “Ebb and flow hydroponics, advantages, disad- vantages,” 2024. [Online]. Available: https://www.agrifarming.in/ ebb-and-flow-hydroponics advantages-disadvantages
P. van Weel et al., “Ebb and flood nutrient delivery system for sustainable greenhouse production,” Wageningen University & Research, 2023. [Online]. Available: https://edepot.wur.nl/538068
S. Plast, “Ebb & flow systems – how does it work?” 2023. [Online].Available: https://staal-plast.dk/ebbflow-systems-how-does-it-work/