Mamdani Fuzzy Control of Coffee Fertigation Duration Using Pore Water Electrical Conductivity and Soil Moisture

Authors

  • Alessy Milandra Fahrezi IPB University Author
  • Gde Saputra Pramana Artha IPB University Author
  • Fattih Algie Maulana IPB University Author
  • Christian Leonardo Setiawan IPB University Author
  • Muhammad Habiburrahman IPB University Author
  • Wuliddah Tamsil Barokah IPB University Author

DOI:

https://doi.org/10.62535/5m6qgb35

Keywords:

coffe fertigation, ESP32, Mamdani fuzzy logic, pore water electrical conductivity, soil moisture

Abstract

Coffee fertigation must respond to both soil nutrient and soil water status, yet low-cost soil sensors report bulk electrical conductivity (EC), which changes with moisture as well as nutrient concentration. This study designs and verifies an ESP32-based Mamdani fuzzy controller that determines fertigation pump duration from pore water EC and volumetric water content (VWC). Bulk EC from an RS485 soil sensor is converted to pore water EC using the Topp and Hilhorst models and expressed as a relative error from an operator-defined setpoint. Membership functions are anchored to FAO-56 soil water thresholds for clay soil and coffee, and to published EC ranges for coffee fertigation. The nine-rule inference was verified by manual calculation, MATLAB simulation, and processor-in-the-loop execution on the ESP32 using 36 systematically designed test vectors and a 21-day synthetic scenario. For the worked case (VWC 33%, error −25%), the analytical centroid was 51.80 s against 52.03 s from 101-point discretization, and the mean absolute difference between MATLAB and ESP32 was 3.55 × 10⁻⁶ s. The scenario showed that dosing stops when the soil enters the water-stress zone even when EC is below target, and resumes after irrigation. The controller offers a verifiable basis for moisture-aware coffee fertigation.

References

Abiyaksa, D., Adi, S. H., & Siskandar, R. (2020). Pembuatan prototype smart budidaya ikan mas koki berbasis Arduino [Making smart prototype goldfish culture based on Arduino]. Indonesian Journal of Science, 1(1), 45–50. https://doi.org/10.59897/jsi.v1i1.6

Agustian, I., Prayoga, B. I., Santosa, H., Daratha, N., & Faurina, R. (2022). NFT hydroponic control using Mamdani fuzzy inference system. Journal of Robotics and Control (JRC), 3(3), 374–383. https://doi.org/10.18196/jrc.v3i3.14714

Alfriansyah, M. S., Bagaskara, S. M., Hassan, G., Sabillah, C. H., Assariy, M. F., & Warno, R. A. R. D. (2026). Fuzzy logic-based paddy field irrigation control using pH, moisture, and water level. Journal of Applied Science, Technology & Humanities, 3(3), 1066–1084. https://doi.org/10.62535/zxfzgx38

Allen, R. G., Pereira, L. S., Raes, D., & Smith, M. (1998). Crop evapotranspiration: Guidelines for computing crop water requirements (FAO Irrigation and Drainage Paper No. 56). Rome: FAO.

Allen, R. G., Pereira, L. S., Smith, M., Raes, D., & Wright, J. L. (2005). FAO-56 dual crop coefficient method for estimating evaporation from soil and application extensions. Journal of Irrigation and Drainage Engineering, 131(1), 2–13. https://doi.org/10.1061/(ASCE)0733-9437(2005)131:1(2)

Chen, C.-H., Jeng, S.-Y., & Lin, C.-J. (2022). Fuzzy logic controller for automating electrical conductivity and pH in hydroponic cultivation. Applied Sciences, 12(1), 405. https://doi.org/10.3390/app12010405

Coelho, V. P. de M., Rosa, K. M., Paiva, P. E. B., Moreira, É. F. A., & Carvalho, M. (2018). Fertigation and growth regulator on coffee seedling production in tubes. Pesquisa Agropecuária Tropical, 48(4), 350–357. https://doi.org/10.1590/1983-40632018v4852148

Enggalmulia, S. H., Masnang, A., & Aisyah. (2024). Comparative study through soil fertility analysis on Andosol, Latosol and Podsolik soil types in Bogor District. Jurnal Agriment, 9(1), 1–11. https://doi.org/10.51967/jurnalagriment.v9i1.3067

Friedman, S. P. (2005). Soil properties influencing apparent electrical conductivity: A review. Computers and Electronics in Agriculture, 46(1–3), 45–70. https://doi.org/10.1016/j.compag.2004.11.001

Gunadireja, F., Rania, G., Abdillah, R., Alrusdi, R. P., Assariy, M. F., Sabillah, C. H., & Warno, R. A. R. D. (2026). Computational analysis of Mamdani fuzzy logic on microcontrollers for broiler coop microclimate status. Journal of Applied Science, Technology & Humanities, 3(3), 1047–1065. https://doi.org/10.62535/eraczj69

Heiniger, R. W., McBride, R. G., & Clay, D. E. (2003). Using soil electrical conductivity to improve nutrient management. Agronomy Journal, 95(3), 508–519. https://doi.org/10.2134/agronj2003.5080

Hilhorst, M. A. (2000). A pore water conductivity sensor. Soil Science Society of America Journal, 64(6), 1922–1925. https://doi.org/10.2136/sssaj2000.6461922x

Lai, S. V., Maharani, A., Hilmatuzzahra, N., Alviani, L., Wijaya, M. L. S., Assariy, M. F., . . . Warno, R. A. R. D. (2026). Implementation of the Mamdani fuzzy method for gourami aquaculture water quality control using pump systems. Journal of Applied Science, Technology & Humanities, 3(3), 1106–1118. https://doi.org/10.62535/9qhc5h24

Li, R., Cheng, J., Liu, X., Wang, Z., Li, H., Guo, J., . . . Zhao, L. (2023). Optimizing drip fertigation at different periods to improve yield, volatile compounds and cup quality of Arabica coffee. Frontiers in Plant Science, 14, 1148616. https://doi.org/10.3389/fpls.2023.1148616

Mamdani, E. H., & Assilian, S. (1975). An experiment in linguistic synthesis with a fuzzy logic controller. International Journal of Man-Machine Studies, 7(1), 1–13. https://doi.org/10.1016/S0020-7373(75)80002-2

Najdenko, E., Lorenz, F., Dittert, K., & Olfs, H. W. (2024). Rapid in-field soil analysis of plant-available nutrients and pH for precision agriculture—A review. Precision Agriculture, 25(6), 3189–3218. https://doi.org/10.1007/s11119-024-10181-6

Pathirana, S., Lambot, S., Krishnapillai, M., Cheema, M., Smeaton, C., & Galagedara, L. (2025). Pore-water electrical conductivity assessment: An integrated ground-penetrating radar-electromagnetic induction approach. Environmental Science: Advances, 4(9), 1514–1527. https://doi.org/10.1039/d5va00121h

Pujiharsono, H., & Kurnianto, D. (2020). Mamdani fuzzy inference system for mapping water quality level of biofloc ponds in catfish cultivation. Jurnal Teknologi dan Sistem Komputer, 8(2), 84–88. https://doi.org/10.14710/jtsiskom.8.2.2020.84-88

Qomaruddin, M., Riansyah, A., & Hermawan, H. M. (2024). Mamdani fuzzy-based water quality monitoring and control system in vannamei shrimp farming using the internet of things. International Journal of Advances in Applied Sciences, 13(1), 180–187. https://doi.org/10.11591/ijaas.v13.i1.pp180-187

Ramirez-Builes, V. H., Küsters, J., Thiele, E., Leal-Varon, L. A., & Arteta-Vizcaino, J. (2023). Influence of variable chloride/sulfur doses as part of potassium fertilization on nitrogen use efficiency by coffee. Plants, 12(10), 2033. https://doi.org/10.3390/plants12102033

Rosa, K. M., Paiva, P. E. B., Coelho, V. P. de M., Carvalho, M., & de Assis, H. L. B. (2021). Low concentration fertigation solution allows greater macronutrient use efficiency in coffee seedlings. Coffee Science, 16. https://doi.org/10.25186/.v16i.1941

Santosa, S. H., Hidayat, A. P., & Siskandar, R. (2021). SAFEA application design on determining the optimal order quantity of chicken eggs based on fuzzy logic. IAES International Journal of Artificial Intelligence, 10(4), 858–871. https://doi.org/10.11591/ijai.v10.i4.pp858-871

Satoh, Y., & Kakiuchi, H. (2021). Calibration method to address influences of temperature and electrical conductivity for a low-cost soil water content sensor in the agricultural field. Agricultural Water Management, 255, 107015. https://doi.org/10.1016/j.agwat.2021.107015

Schwamback, D., Persson, M., Berndtsson, R., Bertotto, L. E., Kobayashi, A. N. A., & Wendland, E. C. (2023). Automated low-cost soil moisture sensors: Trade-off between cost and accuracy. Sensors, 23(5), 2451. https://doi.org/10.3390/s23052451

Siskandar, R., Fadhil, M. A., Kusumah, B. R., Irmansyah, & Irzaman. (2020). Internet of things: Automatic plant watering system using Android. Jurnal Teknik Pertanian Lampung (Journal of Agricultural Engineering), 9(4), 297–310. https://doi.org/10.23960/jtep-l.v9i4.297-310

Siskandar, R., Indrawan, N. A., Kusumah, B. R., Santosa, S. H., Irmansyah, I., & Irzaman, I. (2020). Penerapan rekayasa mesin sortir sebagai penentu kematangan buah jeruk dan tomat merah berbasis image processing [Application of a sorting machine to determine the ripeness of oranges and red tomatoes based on image processing]. Jurnal Teknik Pertanian Lampung (Journal of Agricultural Engineering), 9(3), 222–236. https://doi.org/10.23960/jtep-l.v9i3.222-236

Siskandar, R., Mandang, T., Hermawan, W., & Irzaman, I. (2023). Engineering of information monitoring system sensor reading data based on smart wireless using NVIDIA Jetson Nano and Arduino Mega on agricultural spraying machines. Jurnal Teknik Pertanian Lampung (Journal of Agricultural Engineering), 12(4), 921–936. https://doi.org/10.23960/jtep-l.v12i4.921-936

Siskandar, R., Mandang, T., Hermawan, W., & Irzaman, I. (2025). Rice farming applicator robot control system based on radio wave communication using Flysky Fs-iA6 type remote control and Arduino Mega. Jurnal Teknik Pertanian Lampung (Journal of Agricultural Engineering), 14(5), 1948–1961. https://doi.org/10.23960/jtep-l.v14i5.1948-1961

Siskandar, R., Santosa, S. H., Wiyoto, W., Kusumah, B. R., & Hidayat, A. P. (2022). Control and automation: Insmoaf (integrated smart modern agriculture and fisheries) on the greenhouse model. Jurnal Ilmu Pertanian Indonesia, 27(1), 141–152. https://doi.org/10.18343/jipi.27.1.141

Siskandar, R., Wiyoto, W., Hendriana, A., Ekasari, J., Kusumah, B. R., Halim, G., & Nugraha, I. J. (2022). Automated redox monitoring system (ARMS): An instrument for measuring dissolved oxygen levels using a potential redox sensor (ORP) in a prototype of shrimp farming pond with an internet-based monitoring system. Journal of Aquaculture and Fish Health, 11(2), 238–246. https://doi.org/10.20473/jafh.v11i2.31487

Siskandar, R., Wiyoto, W., Santosa, S. H., Hidayat, A. P., Kusumah, B. R., & Darmawan, M. D. M. (2023). Prediction of freshwater fish disease severity based on fuzzy logic approach, Arduino IDE and Proteus ISIS. Universal Journal of Agricultural Research, 11(6), 1089–1101. https://doi.org/10.13189/ujar.2023.110616

Siskandar, R., Wiyoto, W., Santosa, S. H., Sari, J. E., Darmawangsa, G. M., Hidayat, A. P., . . . Kusumah, B. R. (2023). Potential readings of water turbidity values based on optical sensors on fish-rearing biofloc media. Photonics Letters of Poland, 15(1), 1–3. https://doi.org/10.4302/plp.v15i1.1176

Spolaor, S., Fuchs, C., Cazzaniga, P., Kaymak, U., Besozzi, D., & Nobile, M. S. (2020). Simpful: A user-friendly Python library for fuzzy logic. International Journal of Computational Intelligence Systems, 13(1), 1687–1698. https://doi.org/10.2991/ijcis.d.201012.002

Topp, G. C., Davis, J. L., & Annan, A. P. (1980). Electromagnetic determination of soil water content: Measurements in coaxial transmission lines. Water Resources Research, 16(3), 574–582. https://doi.org/10.1029/WR016i003p00574

Yang, J., Li, X., Zheng, Q., & Liu, L. (2025). Particle swarm optimization-enhanced fuzzy control for electrical conductivity regulation in integrated water–fertilizer irrigation systems. Automation, 6(4), 76. https://doi.org/10.3390/automation6040076

Zemni, N., Bouksila, F., Slama, F., Persson, M., Berndtsson, R., & Bouhlila, R. (2022). Evaluation of modified Hilhorst models for pore electrical conductivity estimation using a low-cost dielectric sensor. Arabian Journal of Geosciences, 15(11), 1089. https://doi.org/10.1007/s12517-022-10354-5

Downloads

Published

2026-11-29

How to Cite

Mamdani Fuzzy Control of Coffee Fertigation Duration Using Pore Water Electrical Conductivity and Soil Moisture. (2026). Journal of Applied Science, Technology & Humanities, 3(5), 36-53. https://doi.org/10.62535/5m6qgb35