Mamdani Fuzzy-Based Soil Fertility Detection Using Moisture and Color Sensors

Authors

DOI:

https://doi.org/10.17509/pxw0mw89

Keywords:

Internet of Things (IoT), Soil fertility, Soil moisture sensor, TCS3200, Fuzzy Mamdani

Abstract

Soil fertility plays an important role in supporting agricultural productivity and sustainable farming practices. Conventional methods for determining soil fertility, such as visual observation of soil color and manual inspection of soil moisture, are often subjective, inefficient, and less accurate. This study proposes an Internet of Things (IoT)-based soil fertility detection system using a soil moisture sensor and a TCS3200 color sensor to provide real-time and objective soil condition monitoring. The system employs a NodeMCU ESP8266 microcontroller for data acquisition and wireless communication. Sensor data are processed using the Mamdani Fuzzy Inference System (FIS) to classify soil fertility into three categories: fertile, moderately fertile, and infertile. The developed system displays monitoring results locally through an OLED display and remotely through Google Spreadsheet integration for real-time observation. Sensor calibration and field testing were conducted using several soil samples with different moisture and color characteristics. Experimental results showed that the soil moisture sensor achieved an average error rate of 1.57%, indicating good measurement accuracy. Furthermore, the fuzzy-based classification successfully identified soil fertility levels according to the measured parameters. The integration of IoT technology and fuzzy logic provides an effective low-cost solution for precision agriculture applications, particularly for small-scale farming environments. The proposed system is expected to assist farmers in monitoring soil conditions more efficiently, accurately, and continuously.

Downloads

Download data is not yet available.

References

[1] R. Sreeram, S. Adithya Krishna, A. S. Kumar, S. Remya, and Y. Y. Cho, ‘Soil moisture monitoring technologies in smart agriculture: A comprehensive review’, Farming System, vol. 4, no. 2, p. 100189, Apr. 2026, doi: 10.1016/J.FARSYS.2025.100189.

[2] Y. Wu, Z. Yang, and Y. Liu, ‘Internet-of-Things-Based Multiple-Sensor Monitoring System for Soil Information Diagnosis Using a Smartphone’, Micromachines 2023, Vol. 14, vol. 14, no. 7, Jul. 2023, doi: 10.3390/MI14071395.

[3] I. N. Afifah, ‘An IoT-Based Real-Time Soil Moisture Monitoring System for Smart Agriculture Using ESP32’, 2026.

[4] T. S. Kalaivani, T. Kamireddy, and S. Govindakumar, ‘IoT-Enabled Soil and Crop Monitoring System Using Low-Cost Smart Sensors for Precision Agriculture’, Engineering Proceedings 2025, Vol. 118, vol. 118, no. 1, p. 77, Nov. 2025, doi: 10.3390/ECSA-12-26537.

[5] R. Silvestri, M. Vecchio, M. Pincheira, and F. Antonelli, ‘Smart Irrigation with Fuzzy Decision Support Systems in Trentino Vineyards’, Sensors 2025, Vol. 25, vol. 25, no. 23, Nov. 2025, doi: 10.3390/S25237188.

[6] R. Silvestri, M. Vecchio, M. Pincheira, and F. Antonelli, ‘Smart Irrigation with Fuzzy Decision Support Systems in Trentino Vineyards’, Sensors 2025, Vol. 25, vol. 25, no. 23, Nov. 2025, doi: 10.3390/S25237188.

[7] H. Sujadi, M. D. Purwanto, D. Susandi, and I. Marina, ‘Development of a Soil Quality Monitoring System for Soybean Cultivation Based on Internet of Things with Mamdani Fuzzy Logic Method’, INCITEST 2024 - Proceedings of the 7th International Conference on Informatics, Engineering, Sciences and Technology, 2024, doi: 10.1109/INCITEST64888.2024.11121496.

[8] D. Firmansyah and I. B. G. Dwidasmara, ‘Implementasi IoT pada Alat Pendeteksi Kesuburan Tanah Menggunakan Algoritma Fuzzy Logic’, Jurnal Nasional Teknologi Informasi dan Aplikasinya , vol. 2, no. 2, pp. 333–338, Feb. 2024, doi: 10.24843/JNATIA.2024.V02.I02.P12.

[9] S. A. Finecomess, G. Gebresenbet, and H. M. Alwan, ‘IoT Utilizing an Internet of Things (IoT) Device, Intelligent Control Design, and Simulation for an Agricultural System’, 2024, doi: 10.3390/iot5010004.

[10] A. W. Hakis, A. Latief Arda, and A. Jalil, ‘IoT-based Soil Nutrient Monitoring and Control Using Fuzzy Logic and Multi-Modal Sensor Integration’, Journal of Applied Informatics and Computing (JAIC), vol. 9, no. 5, pp. 2736–2745, 2025, [Online]. Available: http://jurnal.polibatam.ac.id/index.php/JAIC

[11] K. Jenis Tanaman Pertanian Bagi Petani et al., ‘Analysis of Fuzzy Mamdani Implementation in Decision Making of Agricultural Plant Types for Farmers’, Sistemasi: Jurnal Sistem Informasi, vol. 13, no. 2, pp. 841–850, Mar. 2024, doi: 10.32520/STMSI.V13I2.3612.

[12] A. Yunan and S. Kurniadi, ‘Implementation of Fuzzy Inference Mamdani System Based on Graphic User Interface for the timing of planting rice on rice plants in traditional farming systems in South Aceh district’, Jurnal Inotera, vol. 6, no. 2, pp. 119–127, Nov. 2021, doi: 10.31572/INOTERA.VOL6.ISS2.2021.ID151.

[13] R. Madhumathi, T. Arumuganathan, and R. Shruthi, ‘Soil Nutrient Detection and Recommendation Using IoT and Fuzzy Logic’, Computer Systems Science and Engineering, vol. 43, no. 2, pp. 455–469, Apr. 2022, doi: 10.32604/CSSE.2022.023792.

[14] I. Agustian, B. I. Prayoga, H. Santosa, N. Daratha, and R. Faurina, ‘NFT Hydroponic Control Using Mamdani Fuzzy Inference System’, Journal of Robotics and Control (JRC), vol. 3, no. 3, pp. 374–383, Jul. 2022, doi: 10.18196/jrc.v3i3.14714.

[15] R. R. Poppiel et al., ‘Soil Color and Mineralogy Mapping Using Proximal and Remote Sensing in Midwest Brazil’, Remote Sensing 2020, Vol. 12, vol. 12, no. 7, Apr. 2020, doi: 10.3390/RS12071197.

[16] E. H. Mamdani and S. Assilian, ‘An experiment in linguistic synthesis with a fuzzy logic controller’, Int. J. Man. Mach. Stud., vol. 7, no. 1, pp. 1–13, Jan. 1975, doi: 10.1016/S0020-7373(75)80002-2.

[17] W. Van Leekwijck and E. E. Kerre, ‘Defuzzification: criteria and classification’, Fuzzy Sets Syst., vol. 108, no. 2, pp. 159–178, Dec. 1999, doi: 10.1016/S0165-0114(97)00337-0.

[18] J. Fraden, ‘Handbook of modern sensors: Physics, designs, and applications’, Handbook of Modern Sensors: Physics, Designs, and Applications, pp. 1–758, Jan. 2016, doi: 10.1007/978-3-319-19303-8/SAVE-RESEARCH.

[19] N. R. Zani, ‘Design and Development of Soil Nutrients Level Detection System based on Soil Color and pH for Crop Recommendations using Fuzzy Algorithms’, The Indonesian Green Technology Journal, vol. 11, no. 01, Jun. 2022, doi: 10.21776/UB.IGTJ.2022.011.01.05.

Downloads

Published

2026-06-30