This study aims to design a system for detecting formalin and pH levels in fish using the Mamdani Fuzzy Logic method. The system consists of an HCHO sensor and a pH sensor as the system input, and an Arduino Mega 2560 microcontroller as a data processor. The data is processed in real-time and classified into three categories. Testing was carried out on snapper samples with a duration of 1–60 minutes and 10 repeats of the experiment. The results of the study showed that the accuracy rate of the system was 91%. The system can identify formalin levels and classify them into safe (0 ppm formalin, pH 6,5), alert (12,42 ppm, pH 6,64), and danger (19,29 ppm, pH 5,42). The implementation of this system can facilitate the direct detection of formalin in fish and can help increase public awareness of the dangers of formalin.
Copyrights © 2026