Embedded TinyML for Predicting Soil Moisture Conditions in Rice Fields Using Weather Data

Nurul Maulida Surbakti, Dinda Kartika, Zu Amry, Muhammad Ashari, Riza Pahlawan

Abstract


This study implements a lightweight TinyML model to classify soil moisture conditions and support irrigation decisions in rice cultivation, chosen over conventional cloud-based ML because it enables low-power, low-latency, fully offline inference on microcontrollers—critical for rural areas with limited connectivity. Trained on 3,021 localized microclimate records from Denai Lama Village (temperature, humidity, rainfall, cloud cover) using logistic regression for its simplicity and interpretability under resource constraints, the model was deployed on an ESP32 for real-time predictions into three classes (underwatered, optimal, overwatered). Experimental results show accuracy = 0.982 and weighted F1 = 0.982 on the validation set (ROC–AUC = 0.997), and on the held-out test set (N = 194) the model achieved 93.4% accuracy, 0.927 weighted F1 (precision 0.914; recall 0.942), and ROC–AUC = 0.988. These findings indicate that TinyML provides a practical, low-cost, and scalable edge-AI pathway for reliable, energy-efficient decision support in precision irrigation without network dependence, offering a deployable template for smallholder farming contexts.

Keywords


TinyML; Soil Moisture; Rice Irrigation; Embedded System; Weather Data;

References


A. Gamage et al., “Advancing sustainability: The impact of emerging technologies in agriculture,” Curr. Plant Biol., vol. 40, p. 100420, Dec. 2024, doi: 10.1016/j.cpb.2024.100420.

A. L. Duguma and X. Bai, “How the internet of things technology improves agricultural efficiency,” Artif. Intell. Rev., vol. 58, no. 2, p. 63, Dec. 2024, doi: 10.1007/s10462-024-11046-0.

M. Vahdanjoo, C. G. Sørensen, and M. Nørremark, “Digital transformation of the agri-food system,” Curr. Opin. Food Sci., vol. 63, p. 101287, Jun. 2025, doi: 10.1016/j.cofs.2025.101287.

E. Mamabolo et al., “Application of precision agriculture technologies for crop protection and soil health,” Smart Agric. Technol., vol. 12, p. 101270, Dec. 2025, doi: 10.1016/j.atech.2025.101270.

G. Mgendi, “Unlocking the potential of precision agriculture for sustainable farming,” Discov. Agric., vol. 2, no. 1, p. 87, Nov. 2024, doi: 10.1007/s44279-024-00078-3.

N. Aijaz, H. Lan, T. Raza, M. Yaqub, R. Iqbal, and M. S. Pathan, “Artificial intelligence in agriculture: Advancing crop productivity and sustainability,” J. Agric. Food Res., vol. 20, p. 101762, Apr. 2025, doi: 10.1016/j.jafr.2025.101762.

I. A. Lakhiar et al., “A Review of Precision Irrigation Water-Saving Technology under Changing Climate for Enhancing Water Use Efficiency, Crop Yield, and Environmental Footprints,” Agriculture, vol. 14, no. 7, p. 1141, Jul. 2024, doi: 10.3390/agriculture14071141.

K. Obaideen et al., “An overview of smart irrigation systems using IoT,” Energy Nexus, vol. 7, p. 100124, Sep. 2022, doi: 10.1016/j.nexus.2022.100124.

V. Sharma, G. Kaur, S. S., V. Chhabra, and R. Kashyap, “Smart irrigation systems in agriculture: An overview,” Comput. Electron. Agric., vol. 239, p. 111008, Dec. 2025, doi: 10.1016/j.compag.2025.111008.

M. R. Islam, K. Oliullah, M. M. Kabir, M. Alom, and M. F. Mridha, “Machine learning enabled IoT system for soil nutrients monitoring and crop recommendation,” J. Agric. Food Res., vol. 14, p. 100880, Dec. 2023, doi: 10.1016/j.jafr.2023.100880.

M. Padhiary, D. Saha, R. Kumar, L. N. Sethi, and A. Kumar, “Enhancing precision agriculture: A comprehensive review of machine learning and AI vision applications in all-terrain vehicle for farm automation,” Smart Agric. Technol., vol. 8, p. 100483, Aug. 2024, doi: 10.1016/j.atech.2024.100483.

J. M. Cadenas, M. C. Garrido, and R. Martínez-España, “A Methodology Based on Machine Learning and Soft Computing to Design More Sustainable Agriculture Systems,” Sensors, vol. 23, no. 6, p. 3038, Mar. 2023, doi: 10.3390/s23063038.

S. Vijayakumar, V. Murugaiyan, S. Ilakkiya, V. Kumar, R. M. Sundaram, and R. M. Kumar, “Opportunities, challenges, and interventions for agriculture 4.0 adoption,” Discov. Food, vol. 5, no. 1, p. 265, Aug. 2025, doi: 10.1007/s44187-025-00576-3.

A. M. Hayajneh, S. A. Aldalahmeh, F. Alasali, H. Al‐Obiedollah, S. A. Zaidi, and D. McLernon, “Tiny machine learning on the edge: A framework for transfer learning empowered unmanned aerial vehicle assisted smart farming,” IET Smart Cities, vol. 6, no. 1, pp. 10–26, Mar. 2024, doi: 10.1049/smc2.12072.

M. Baishya and L. Dutta, “Tiny ML based crop recommendation system for precision agriculture 5.0,” Smart Agric. Technol., vol. 12, p. 101247, Dec. 2025, doi: 10.1016/j.atech.2025.101247.

I. Lamaakal et al., “A Comprehensive Survey on Tiny Machine Learning for Human Behavior Analysis,” IEEE Internet Things J., vol. 12, no. 16, pp. 32419–32443, Aug. 2025, doi: 10.1109/JIOT.2025.3565688.

J. D. Velasquez, L. Cadavid, and C. J. Franco, “Emerging trends and strategic opportunities in tiny machine learning: A comprehensive thematic analysis,” Neurocomputing, vol. 648, p. 130746, Oct. 2025, doi: 10.1016/j.neucom.2025.130746.

A. Trigkas, D. Piromalis, and P. Papageorgas, “Edge Intelligence in Urban Landscapes: Reviewing TinyML Applications for Connected and Sustainable Smart Cities,” Electronics, vol. 14, no. 14, p. 2890, Jul. 2025, doi: 10.3390/electronics14142890.

A. Subeesh and N. Chauhan, “Agricultural digital twin for smart farming: A review,” Green Technol. Sustain., p. 100299, Oct. 2025, doi: 10.1016/j.grets.2025.100299.

A. Basak, K. M. Schmidt, and O. J. Mengshoel, “From data to interpretable models: machine learning for soil moisture forecasting,” Int. J. Data Sci. Anal., vol. 15, no. 1, pp. 9–32, Jan. 2023, doi: 10.1007/s41060-022-00347-8.

S. N. Iilonga and O. G. Ajayi, “Implementation of deep learning algorithms to model agricultural drought towards sustainable land management in Namibia’s Omusati region,” Land use policy, vol. 156, p. 107593, Sep. 2025, doi: 10.1016/j.landusepol.2025.107593.

A. S. Priambodo and A. P. Nugroho, “Design & Implementation of Solar Powered Automatic Weather Station based on ESP32 and GPRS Module,” J. Phys. Conf. Ser., vol. 1737, no. 1, p. 012009, Jan. 2021, doi: 10.1088/1742-6596/1737/1/012009.

A. M. Pranta, S. M. A. Islam, and R. I. Khan, “Development of a sensor-integrated AI automation model for decision-based heat stress management in layer chickens under subtropical climate conditions,” Smart Agric. Technol., vol. 12, p. 101306, Dec. 2025, doi: 10.1016/j.atech.2025.101306.

S. Garai and S. Samui, “Advances in Small-Footprint Keyword Spotting: A Comprehensive Review of Efficient Models and Algorithms,” Jun. 2025, [Online]. Available: http://arxiv.org/abs/2506.11169

T. Kim, “Future-Proof Yourself: An AI Era Survival Guide,” Apr. 2025, [Online]. Available: http://arxiv.org/abs/2504.04378

C. Mawela, C. Ben Issaid, and M. Bennis, “A Web-Based Solution for Federated Learning With LLM-Based Automation,” IEEE Internet Things J., vol. 12, no. 12, pp. 19488–19503, 2025, doi: 10.1109/JIOT.2025.3542897.




DOI: http://dx.doi.org/10.30829/zero.v9i2.26551

Refbacks

  • There are currently no refbacks.


Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.

Publisher :
Department of Mathematics
Faculty of Science and Technology
Universitas Islam Negeri Sumatera Utara Medan
📱 WhatsApp:085270009767 (Admin Official)
SINTA 2 Google Scholar CrossRef Garuda DOAJ