Applicability of Machine Learning and Internet of Things-Based for Crop Selection

Authors

  • Uwihanganye Vedaste University of Lay Adventists of Kigali (UNILAK)
  • Nyesheja M. Enan University of Lay Adventists of Kigali (UNILAK)

Keywords:

IoT, Machine Learning, Random Forest, Soil Assessment, Crop Selection

Abstract

Agriculture plays a big role in ensuring global food security and sustainability. To optimize crop yields, it is essential to understand the soil and weather conditions of a farm. In this study, we developed a Crop Selection System that leverages the IoT and ML, specifically the Random Forest algorithm, to assist farmers of Rwanda in choosing the most suitable crops for their piece of land. The system makes recommendations based on measurements of nitrogen, phosphorus, potassium, pH, humidity, rainfall, and temperature before cultivation begins. Real-time field data was gathered using IoT sensors deployed in farm areas to collect soil and environmental information. Our device utilized soil sensors to measure nitrogen, soil pH, humidity, phosphorus, temperature, and potassium. The NodeMCU microcontroller preprocessed the data and uploaded it to a cloud database. The data collection took place in Gicumbi District, and the collected samples were analyzed using our crop selection model. The model was developed using the Random Forest algorithm to evaluate soil compatibility and rank the crops based on their probability of successful growth. By training the model with a dataset of crops’ ecological requirements, we achieved an accuracy of 96%. We then tested the model with newly collected data from the field. Over a period of seven days, the model's predictions indicated that potatoes had the highest growing probability at 56%, followed by beans at 43%, carrots at 33%, tomatoes at 33%, and rice at 17%. This data-driven approach significantly enhances farmers' decision-making by enabling them to make informed choices about crop selection. This technology can boost agricultural productivity while reducing unnecessary costs, such as excessive fertilizer use, by ensuring crops are cultivated based on the available ecological conditions. The system helps farmers assess nutrient levels and implement corrective measures to restore soil fertility. This method advances precision agriculture and contributes to the overall modernization of farming practices.

Author Biography

Uwihanganye Vedaste, University of Lay Adventists of Kigali (UNILAK)

Department of Master of Information Technology

References

in one multiparameter soil sensor with esp32 - Other Hardware / Sensors - Arduino Forum. (n.d.). Retrieved 10 March 2025, from https://forum.arduino.cc/t/7-in-one-multiparameter-soil-sensor-with-esp32/1138788

V DC MICROFIT POWER SUPPLY - WM Systems LLC - Innovation in Smart IoT / M2M systems. (n.d.). Retrieved 10 March 2025, from https://m2mserver.com/en/product/12v-dc-microfit-power-supply/

Ayub Joshua Semwenda. (2016). Challenges Facing Agricultural Extension In The Current Institutional Context: The Case Of Hai District, Kilimanjaro Region Morogoro.

De Dieu Hagenimana, J., & Sumbiri, D. (n.d.). 1||pp 16-24||March||2025 Ngororero Sector. In EdinBurg Peer Reviewed Journals and Books Publishers Journal of Information and Technology (Vol. 5, Issue 1).

East African Community. (n.d.).

In Numbers. (n.d.). www.wfp.org/countries/Tanzania

In-Depth: Interfacing Soil NPK Sensor with Arduino. (n.d.). Retrieved 10 March 2025, from https://lastminuteengineers.com/soil-npk-sensor-arduino-tutorial/

Intelligent Techniques for Cyber-Physical Systems. (n.d.). www.routledge.com/

Kübra Seda Kimyager, & Yasin Ömer Bıdık. (2022). Controllable Cleaning Robot with Bluetooth That Can Detect Obstacles. 4(1).

Kumar, R., Anand, R., Kumar, A., & Mondal, K. (2024). IOT’S ROLE IN ADVANCING PRECISION AGRICULTURE. In IOT’S ROLE IN ADVANCING PRECISION AGRICULTURE IIP Series (Vol. 3, Issue 1). https://www.researchgate.net/publication/380295549

Kuradusenge, M., Hitimana, E., Hanyurwimfura, D., Rukundo, P., Mtonga, K., Mukasine, A., Uwitonze, C., Ngabonziza, J., & Uwamahoro, A. (2023). Crop Yield Prediction Using Machine Learning Models: Case of Irish Potato and Maize. Agriculture (Switzerland), 13(1). https://doi.org/10.3390/agriculture13010225

Maku, R. M., & Muriira, G. P. (2022). Record Management Technology and Information Service Delivery at the Land Registry in Nyandarua County. Kenya. Journal of Information and Technology, 2(2), 1–17.

Michelson, H., Fairbairn, A., Ellison, B., Maertens, A., & Manyong, V. (2021). Misperceived quality: Fertilizer in Tanzania. Journal of Development Economics, 148. https://doi.org/10.1016/j.jdeveco.2020.102579

Misaki, E., Apiola, M., Gaiani, S., & Tedre, M. (2018a). Challenges facing sub-Saharan small-scale farmers in accessing farming information through mobile phones: A systematic literature review. Electronic Journal of Information Systems in Developing Countries, 84(4). https://doi.org/10.1002/isd2.12034

Misaki, E., Apiola, M., Gaiani, S., & Tedre, M. (2018b). Challenges facing sub-Saharan small-scale farmers in accessing farming information through mobile phones: A systematic literature review. Electronic Journal of Information Systems in Developing Countries, 84(4). https://doi.org/10.1002/isd2.12034

Nadim Iqbal, F. (2012). A BRIEF INTRODUCTION TO APPLICATION PROGRAMMING INTERFACE (API). Corporation. https://doi.org/10.5281/zenodo.10198423

Omar, A. Y., Gichohi, P. M., & Juma, I. (2024). Information Needs of the Nomadic Communities in Improving their Livelihood in Garissa County. In Journal of Information and Technology (Vol. 4, Issue 2).

Suwadu Sakho-Jimbira, & Ibrahima Hathie. (2020). The future of agriculture in Sub-Saharan Africa.

National Institute of Statistics of Rwanda. (2022). 5th POPULATION AND HOUSING CENSUS. https://doi.org/10.5M

Senapaty, M. K., Ray, A., & Padhy, N. (2023). IoT-Enabled Soil Nutrient Analysis and Crop Recommendation Model for Precision Agriculture. Computers, 12(3). https://doi.org/10.3390/computers12030061

Sharma, A., Jain, A., Gupta, P., & Chowdary, V. (2021). Machine Learning Applications for Precision Agriculture: A Comprehensive Review. In IEEE Access (Vol. 9, pp. 4843–4873). Institute of Electrical and Electronics Engineers Inc. https://doi.org/10.1109/ACCESS.2020.3048415

Singh Parihar, Y., & Parihar, Y. S. (2019). Internet of Things and Nodemcu A review of use of Nodemcu ESP8266 in IoT products (Vol. 6). JETIR. www.jetir.org

Summary_of_the_NST2 (1). (n.d.).

World bank. (n.d.). Agriculture in Tanzania pp. 1–2, 2016. 1–2. https://doi.org/www.worldbank.org

Downloads

Published

2025-04-14

How to Cite

Vedaste, U. ., & Enan, N. M. . (2025). Applicability of Machine Learning and Internet of Things-Based for Crop Selection. Journal of Information and Technology, 5(2), 23–43. Retrieved from https://edinburgjournals.org/journals/index.php/journal-of-information-technolog/article/view/460

Issue

Section

Articles

Most read articles by the same author(s)