An IoT-Based Environmental Monitoring System with Machine Learning Soil Moisture Prediction for Polybag Rice Cultivation on Limited Land
Downloads
The continued decline in conventional farmland has created a need for cultivation methods that do not depend on paddy field infrastructure. This study presents an Internet of Things (IoT)-based environmental monitoring and automated irrigation system for polybag rice cultivation, developed using an ESP32 microcontroller integrated with a DHT22 temperature and humidity sensor, a BH1750 ambient light sensor, and an analog soil moisture sensor. Sensor readings were transmitted to the Firebase Realtime Database and visualized through a responsive web dashboard, while pump actuation followed a two-threshold control logic at soil moisture levels of 50% and 80%. Functional validation yielded a mean absolute percentage error (MAPE) of 0.53% for the DHT22 and 2.86% for the BH1750, an average transmission time of 409.8 ms to the cloud and 3.8 s to the dashboard, and pump response times of 1.2 s in automatic mode and 12 s in manual mode, with a preliminary dashboard usability rating of 4.2 out of 5. Beyond functional validation, a 79-day continuous field deployment generated 7,208 environmental samples, from which diurnal soil moisture patterns and the correlation structure of the polybag growing medium were quantitatively characterized. A machine learning model was subsequently developed to predict soil moisture using only data obtained from the low-cost sensors. Among the four approaches evaluated using chronologically held-out data, the Random Forest model achieved an R² of 0.997 and reduced prediction error by 94.5% compared with a non-predictive baseline. Overall, the results demonstrate the feasibility of transitioning from reactive to anticipatory irrigation using a low-cost cultivation platform designed for land-constrained environments.
Al-Muqit, M. M. (2023). Design and implementation of ESP32-based IoT devices. Sensors, 23(15), 6739.
Botta-Dukát, Z. (2023). Quartile coefficient of variation is more robust than CV for traits calculated as a ratio. Scientific Reports, 13(1), 4671.
Chicaiza, K., Paredes, R., Sarzosa, I. M., Yoo, S. G., & Zang, N. (2024). Smart farming technologies: A methodological overview and analysis. IEEE Access, 12, 164922–164941.
ElBeheiry, N., & Balog, R. S. (2023). Technologies driving the shift to smart farming: A review. IEEE Sensors Journal, 23(3), 1752–1769.
Farooq, M. S., Riaz, S., Helou, M. A., Khan, F. S., Abid, A., & Alvi, A. (2022). Internet of Things in greenhouse agriculture: A survey on enabling technologies, applications, and protocols. IEEE Access, 10, 53374–53397.
Irawan, A., Noor, T. I., & Karyani, T. (2023). Faktor-faktor yang berkaitan dengan alih fungsi lahan sawah di Kecamatan Purwasari Kabupaten Karawang Provinsi Jawa Barat. Mimbar Agribisnis, 9(1), 277–290.
Karel, F. N., Fauziah, & Soepriyono, G. (2022). Smart agriculture: Pengendalian kelembapan dan suhu pada penyiraman otomatis tanaman berbasis IoT. Jurnal Teknik Informatika Dan Sistem Informasi (JATISI), 9(2), 839–854.
Khan, M. M. H. H. (2024). Internet of Things-based smart agriculture irrigation and monitoring system using Ubidots server. Engineering Proceedings, 82(1), 99.
Majumder, S. (2023). Assessing low-cost capacitive soil moisture sensors: Accurate, affordable, and IoT-ready solutions for soil moisture monitoring. International Journal of Environment and Climate Change, 13(11), 2233–2242.
Mukasine, A., Sibomana, L., Jayavel, K., Nkurikiyeyezu, K., & Hitimana, E. (2023). Correlation analysis model of environment parameters using IoT framework in a biogas energy generation context. Future Internet, 15(8), 265.
Naseer, A., Shmoon, M., Shakeel, T., Rehman, S. U., Ahmad, A., & Gruhn. (2024). A systematic literature review of the IoT in agriculture—global adoption, innovations, security, and privacy challenges. IEEE Access, 12, 60986–61021.
Pan, S. (2024). Using the Pearson’s correlation coefficient as the sole metric to measure the accuracy of quantitative trait prediction: Is it sufficient? Frontiers in Plant Science, 15, 1480463.
Qazi, S., Khawaja, B. A., & Farooq, Q. U. (2022). IoT-equipped and AI-enabled next generation smart agriculture: A critical review, current challenges and future trends. IEEE Access, 10, 21219–21235.
Santos, E. P. D., Martini, D. K. T., Lele, O. K., & Kiuk, Y. (2024). Rice plant cultivation technology (Oryza sativa L.) based on organic fertilization in realizing food security in the RI–RDTL border area. Jurnal Penelitian Pertanian Terapan, 24(3), 434–442.
Saraf, P. R., Jadhao, S. M., Wanjari, S. J., Kolwate, S. G., & Patil, A. D. (2022). A review on Firebase (backend as a service) for mobile application development. International Journal for Research in Applied Science and Engineering Technology, 10(1), 967–971.
Suspidayanti, L., & Rokhmana, C. A. (2021). Identifikasi fase pertumbuhan padi menggunakan citra SAR Sentinel-1. Elipsoida: Jurnal Geodesi Dan Geomatika, 4(1), 9–15.
Thilakarathne, D. N., Bakar, M. S. A., Abas, P. E., & Yassin, H. (2023). Towards making the fields talks: A real-time cloud enabled IoT crop management platform for smart agriculture. Frontiers in Plant Science, 13, 1030168.
Togneri, R., dos Santos, D. F., Camponogara, G., Nagano, H., Custódio, G., Prati, R., Fernandes, S., & Kamienski, C. (2022). Soil moisture forecast for smart irrigation: The primetime for machine learning. Expert Systems with Applications, 207, 117653. https://doi.org/10.1016/j.eswa.2022.117653
Tran, L. G., Tran, N. M., & Tran, T. V. (2021). IoT system for monitoring a large-area environment sensors and control actuators using real-time Firebase database. In Intelligent Human Computer Interaction.
Wardani, I. K. (2023). The feasibility study: Accuracy and precision of DHT22 in measuring the temperature and humidity in the greenhouse. IOP Conference Series: Earth and Environmental Science, 1230(1), 12146.
Copyright (c) 2026 Defitriana Fardiyanti, Rendy Munadi, Helni Mutiarsih Jumhur

This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.
Authors who publish with this journal agree to the following terms:
- Authors retain copyright and grant the journal right of first publication with the work simultaneously licensed under a Creative Commons Attribution-ShareAlike 4.0 International (CC-BY-SA). that allows others to share the work with an acknowledgement of the work's authorship and initial publication in this journal.
- Authors are able to enter into separate, additional contractual arrangements for the non-exclusive distribution of the journal's published version of the work (e.g., post it to an institutional repository or publish it in a book), with an acknowledgement of its initial publication in this journal.
Authors are permitted and encouraged to post their work online (e.g., in institutional repositories or on their website) prior to and during the submission process, as it can lead to productive exchanges, as well as earlier and greater citation of published work.





