Development of a Decision Support System for Crop Selection Using A 7-in-1 Soil Sensor: A Case Study of Huye District, Rwanda

Development of a Decision Support System for Crop Selection Using A 7-in-1 Soil Sensor: A Case Study of Huye District, Rwanda

Mporanzi Joel and Musoni Willison
University of Kigali, Rwanda
Email: joelmporanzi9@gmail.com

Abstract: This study developed and evaluated an Internet of Things (IoT)-based decision support system for crop selection using a 7-in-1 soil sensor in Huye District, Rwanda. The prototype combines a soil sensor and ESP32 microcontroller with a Flask web application, MySQL database and Random Forest machine learning model. The sensor measures nitrogen, phosphorus, potassium, pH, temperature, soil moisture and electrical conductivity, and transmits readings wirelessly for crop recommendation. A design science research approach and Agile development process were adopted. A total of 150 soil samples were collected from 50 farms in five sectors of Huye District. Because the field dataset was small and imbalanced across seven crop classes, model training and evaluation used a 2,100-record literature-grounded synthetic dataset, divided into training (1,470), validation (315) and test (315) subsets. Laboratory testing recorded a 95.3% first-attempt transmission success rate and an average response time of 27 seconds. On the synthetic held-out test set, Random Forest achieved 94.60% accuracy, 94.69% macro precision, 94.64% macro recall and a 94.57% macro F1-score, outperforming a Decision Tree baseline by 6.03 percentage points in accuracy. Forty participants evaluated usability, producing a mean System Usability Scale score of 76.9. The findings demonstrate the technical feasibility and promising usability of the prototype. However, the model’s reported accuracy reflects performance on synthetic data and requires validation using a larger, independently labelled real-world soil dataset before operational deployment.

Leave a Reply

Your email address will not be published. Required fields are marked *