Zero : Jurnal Sains, Matematika, dan Terapan
Vol 9, No 2 (2025): Zero: Jurnal Sains Matematika dan Terapan

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

Surbakti, Nurul Maulida (Universitas Negeri Medan)
Kartika, Dinda (Unknown)
Amry, Zu (The Statistics Study Program, Universitas Negeri Medan, Indonesia)
Ashari, Muhammad (The Electrical Engineering Study Program, Universitas Negeri Medan, Indonesia)
Pahlawan, Riza (Master of Informatics Program, Universitas Sumatera Utara, Medan, Indonesia)



Article Info

Publish Date
28 Nov 2025

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.

Copyrights © 2025