IoT-Based Water pH Monitoring and Control System for Ornamental Fish Using Fuzzy Logic Method
DOI:
https://doi.org/10.62535/88020163Keywords:
Internet of Things, Fuzzy Logic, Mamdani, Water Quality Monitoring, ESP32Abstract
Water quality, particularly pH, temperature, and turbidity parameters, plays an important role in maintaining the health of ornamental fish in aquariums. Fluctuations in these parameters can cause physiological stress and even death in fish if not properly controlled. This study aims to design an Internet of Things (IoT)-based water quality monitoring and control system using the Mamdani type Fuzzy Inference System (FIS) method. The system utilizes pH, temperature, and turbidity sensors connected to an ESP32 microcontroller to acquire data and transmit it in real-time to a cloud-based platform. Sensor values are processed through fuzzification, inference using the MIN operator and MAX aggregation, then defuzzification using the centroid method to produce decisions on fish conditions in the categories of healthy, sick, or dead. Simulation results using MATLAB Fuzzy Logic Toolbox show that the system is capable of providing a more stable non-linear response compared to conventional threshold methods. The integration of IoT and fuzzy logic enables more adaptive, proportional, and effective control in maintaining water quality within the optimal range for ornamental fish
References
Abdi F, Cichalewski W, Jałmużna W, Butkowski Ł, Branlard J, Bellandi A, Jabłoński G. 2023. FPGA-Based Implementation of an Adaptive Noise Controller for Continuous Wave Superconducting Cavity. Electronics (Basel). 13(1):155. doi:10.3390/electronics13010155.
Asadulagi M-AM, Pershin IM, Tsapleva V V. 2024. Research on Hydrolithospheric Processes Using the Results of Groundwater Inflow Testing. Water (Basel). 16(3):487. doi:10.3390/w16030487.
Bautista MGAC, Palconit MGB, Rosales MA, II RSC, Bandala AA, Dadios EP, Duarte B. 2022. Fuzzy Logic-Based Adaptive Aquaculture Water Monitoring System Based on Instantaneous Limnological Parameters. Journal of Advanced Computational Intelligence and Intelligent Informatics. 26(6):937–943. doi:10.20965/jaciii.2022.p0937.
Cabane H, Farias K. 2024. On the impact of event-driven architecture on performance: An exploratory study. Future Generation Computer Systems. 153:52–69. doi:10.1016/j.future.2023.10.021.
Chen C-H, Wu Y-C, Zhang J-X, Chen Y-H. 2022. IoT-Based Fish Farm Water Quality Monitoring System. Sensors. 22(17):6700. doi:10.3390/s22176700.
Hidayat AP, Santosa SH, Dardanella D. 2023. Implementasi Green Supply Chain Management untuk Pasokan Telur Ayam Menggunakan Metode Fuzzy AHP. JATI UNIK : Jurnal Ilmiah Teknik dan Manajemen Industri. 6(2):52–60. doi:10.30737/jatiunik.v6i2.3113.
Irawan Y, Chrismondari, Yolnasdi, Linarta A, Muhardi, Febriani A. 2021. Smart Home Light Based Service Oriented Architecture and IoT. J Phys Conf Ser. 1845(1):012070. doi:10.1088/1742-6596/1845/1/012070.
Joniwarta, Priatna W, Hamdani AR, Alexander AD. 2023. Implementasi Fuzzy Logic Pada Sistem Kontrol pH Air Mineral Berbasis IOT. The Indonesian Journal of Computer Science. 12(4). doi:10.33022/ijcs.v12i4.3356.
Li H-C, Yu K-W, Lien C-H, Lin C, Yu C-R, Vaidyanathan S. 2023. Improving Aquaculture Water Quality Using Dual-Input Fuzzy Logic Control for Ammonia Nitrogen Management. J Mar Sci Eng. 11(6):1109. doi:10.3390/jmse11061109.
Li M, Li C. 2022. Comparison of Flows through a Tidal Inlet in Late Spring and after the Passage of an Atmospheric Cold Front in Winter Using Acoustic Doppler Profilers and Vessel-Based Observations. Sensors. 22(9):3478. doi:10.3390/s22093478.
Marín-San Román S, Pérez-Álvarez EP, Sáenz de Urturi I, Parra-Torrejón B, Ramírez-Rodríguez GB, Delgado-López JM, Garde-Cerdán T. 2023. Changes on Grape Aroma Composition as a Consequence of Foliar Application of Methyl Jasmonate and Nano-Sized Particles Doped with Methyl Jasmonate. Applied Sciences. 13(4):2487. doi:10.3390/app13042487.
McGregor D, Frodsham S, Deller C. 2023. Participatory Inquiries That Promote Consideration of Socio-Scientific Issues Related to Sustainability within Three Different Contexts: Agriculture, Botany and Palaeontology. Sustainability. 15(8):6895. doi:10.3390/su15086895.
Mohd Jais NA, Abdullah AF, Mohd Kassim MS, Abd Karim MM, M A, Muhadi N ‘Atirah. 2024. Improved accuracy in IoT-Based water quality monitoring for aquaculture tanks using low-cost sensors: Asian seabass fish farming. Heliyon. 10(8):e29022. doi:10.1016/j.heliyon.2024.e29022.
Nagothu SK, Bindu Sri P, Anitha G, Vincent S, Kumar OP. 2025. Advancing aquaculture: fuzzy logic-based water quality monitoring and maintenance system for precision aquaculture. Aquaculture International. 33(1):32. doi:10.1007/s10499-024-01701-2.
Nakai K, Yamada K, Nagata T, Saito Y, Nonomura T. 2021. Effect of Objective Function on Data-Driven Greedy Sparse Sensor Optimization. IEEE Access. 9:46731–46743. doi:10.1109/ACCESS.2021.3067712.
Pathak H, Igathinathane C, Howatt K, Zhang Z. 2023. Machine learning and handcrafted image processing methods for classifying common weeds in corn field. Smart Agricultural Technology. 5:100249. doi:10.1016/j.atech.2023.100249.
Rahayu LP, Kindhi B Al, Pradika CD, Adhim FI, Priananda CW, Musthofa A, Indasyah E, Istiqomah F. 2021. Design of pH Control System and Water Recirculation in Aquaponic Cultivation Using Mamdani Fuzzy Logic Control. Di dalam: 2021 International Conference on Advanced Mechatronics, Intelligent Manufacture and Industrial Automation (ICAMIMIA). IEEE. hlm 287–292.
Rastegari H, Nadi F, Lam SS, Ikhwanuddin M, Kasan NA, Rahmat RF, Mahari WAW. 2023. Internet of Things in aquaculture: A review of the challenges and potential solutions based on current and future trends. Smart Agricultural Technology. 4:100187. doi:10.1016/j.atech.2023.100187.
Santosa SH, Hidayat AP, 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 (IJ-AI). 10(4):858. doi:10.11591/ijai.v10.i4.pp858-871.
Sarker MdJ, Sarker PK, Islam MdA, Rima NN, Joydas TV, Sultana N, Islam MdM, Hossain MdY, Hossain MB. 2024. Biometry, Growth, and Recruitment Pattern of a Commercially Important Nereid polychaete, Namalycastis fauveli, from the East Coast of Bangladesh. J Mar Sci Eng. 12(2):312. doi:10.3390/jmse12020312.
Shete RP, Bongale AM, Dharrao D. 2024. IoT-enabled effective real-time water quality monitoring method for aquaculture. MethodsX. 13:102906. doi:10.1016/j.mex.2024.102906.
Sundararajan SCM, Shankar YB, Selvam SP, Manogaran N, Seerangan K, Natesan D, Selvarajan S. 2025. IoT-based prediction model for aquaponic fish pond water quality using multiscale feature fusion with convolutional autoencoder and GRU networks. Sci Rep. 15(1):1925. doi:10.1038/s41598-024-84943-7.
Tay A, Lafont F, Balmat J-F, Hadjali A. 2023. An intelligent fuzzy system to manage western flower thrips population under biological treatment in roses yield. Comput Electron Agric. 212:108066. doi:10.1016/j.compag.2023.108066.
Trach R, Trach Y, Kiersnowska A, Markiewicz A, Lendo-Siwicka M, Rusakov K. 2022. A Study of Assessment and Prediction of Water Quality Index Using Fuzzy Logic and ANN Models. Sustainability. 14(9):5656. doi:10.3390/su14095656.
Xu J, Li H, Zhang X, Wang T, Huang Y, Yuan D. 2021. Development of an anti-chloride interference and high sensitivity on-line analyzer for analysis of total phosphorus in industrial circulating cooling water. Measurement. 178:109351. doi:10.1016/j.measurement.2021.109351.
Yang C-H, Lu P-P, Cao Y-M, Xu M, Yu Z-Y, Cheng P-F. 2022. Study on the Plugging Limit and Combination of CO2 Displacement Flow Control System Based on Nuclear Magnetic Resonance (NMR). Processes. 10(7):1342. doi:10.3390/pr10071342.
You G, Xu B, Su H, Zhang S, Pan J, Hou X, Li J, Ding R. 2021. Evaluation of Aquaculture Water Quality Based on Improved Fuzzy Comprehensive Evaluation Method. Water (Basel). 13(8):1019. doi:10.3390/w13081019.
Zhu Y, Yang G, Yang H, Guo L, Xu B, Li Zhenhai, Han S, Zhu X, Li Zhenhong, Jones G. 2022. Forecasting regional apple first flowering using the sequential model and gridded meteorological data with spatially optimized calibration. Comput Electron Agric. 196:106869. doi:10.1016/j.compag.2022.106869.




