IoT–Based Smart Agriculture System Using ESP32, DHT22, and Soil Moisture Sensors with Relay Control, MySQL–Bootstrap (Without PDO), and Chart.js for Water–Scarce Environments
DOI:
https://doi.org/10.34010/incitest.v1i.823Keywords:
IoT, smart irrigation , ESP32, DHT22, water conservation, precision agriculture, Chart.js, Bootstrap, MySQLAbstract
The Internet of Things (IoT) presents a transformative opportunity to address escalating water scarcity in agriculture, particularly in tropical regions where inefficient irrigation remains prevalent. This study aimed to design, implement, and evaluate a low-cost IoT-based smart irrigation system to optimize water usage while maintaining crop health. The system employed an ESP32 microcontroller integrated with DHT22 (temperature and humidity) and capacitive soil moisture sensors, coupled with a relay module to automate a water pump. Real-time sensor data was transmitted via Wi-Fi to a remote web server using PHP and MySQL (without PDO), and visualized through a responsive dashboard built with Bootstrap and Chart.js, enabling remote monitoring and control. Field testing over 30 days on a Capsicum annuum plot demonstrated a 37.2% reduction in water consumption compared to conventional manual irrigation, with sensor accuracy averaging 92.4%. The system achieved 99.8% operational uptime and an average data transmission latency of 1.18 seconds, confirming its reliability and responsiveness. These findings indicate that real-time, sensor-driven irrigation significantly enhances water efficiency without compromising agricultural output. The solution proves to be scalable, affordable, and accessible — particularly for smallholder farmers in resource-limited settings. By bridging technology and sustainable farming, this IoT implementation not only conserves vital water resources but also promotes climate-resilient agricultural practices, offering a replicable model for precision agriculture in water-stressed tropical environments