Jurnal Teknologi. Vol. No. April 2026, 105-112 Prototype of Detector for Metal Content in Packaged Drinks Using Salinity Sensor Based on Arduino Uno Mauliddin1. Muhammad Daud1,*. Teuku Multazam1. Ainal Mardhiah2. Fitra Waldi1 1Department of Electrical Engineering. Universitas Malikussaleh. Lhokseumawe. Indonesia 2Department of Nursing. Universitas Malikussaleh. Lhokseumawe. Indonesia *E-mail: mdaud@unimal. Abstract Article history: Received: 05-03-2026 Accepted: 12-04-2026 Published: 29-04-2026 Keywords: packaged drinks. iron (F. manganese (M. salinity sensor. kalman filter. This research aims to design and build a prototype device for detecting iron (F. and manganese (M. metals in packaged drinks using a salinity sensor processed using the Kalman filter method. Packaged drinks are a popular choice due to their convenience and variety of flavors, but their metal content needs to be monitored to prevent health risks. This system was designed using an Arduino Uno microcontroller as the main controller, with a salinity sensor to detect Fe and Mn levels, and an LCD as the data display. Testing was conducted by comparing the device's detection results with laboratory data obtained from the Banda Aceh Industrial Standardization and Services Center. The results showed that the device was able to detect Fe with an accuracy of 98. 48% and Mn with an accuracy of 100%. The average measurement error for Fe was 1. 52%, while for Mn, the error was 0%. These results demonstrate that the designed device functions well and has high accuracy, thus potentially being used as an independent test tool for the suitability of packaged drinks. Introduction The consumption of packaged drinks has increased significantly in recent years due to their convenience, affordability, and wide variety of flavors. These beverages are widely consumed by the public, ranging from mineral water to flavored and carbonated drinks. , . However, despite their popularity, the safety and quality of packaged drinks remain important concerns, particularly regarding the presence of dissolved metals that may pose health risks if consumed in excessive amounts. According to the Regulation of the Ministry of Health of the Republic of Indonesia No. 492 of 2010, drinking water must meet specific quality standards, including limits on chemical parameters such as iron (F. and manganese (M. , . The maximum permissible concentrations are 0. 3 mg/L for iron and 0. mg/L for manganese. Excessive levels of these metals in drinking water can cause health problems, including nausea, irritation, and in severe cases, long-term organ damage. Therefore, monitoring the metal content in packaged drinks is essential to ensure their safety for consumption. Several previous studies have focused on detecting water quality parameters using various types of sensors and laboratory-based testing methods. , . Conventional laboratory testing provides accurate results. however, it requires sophisticated equipment, trained personnel, and relatively high costs, making it less accessible for routine or real-time In recent years, microcontrollerbased systems combined with sensors have been developed to provide more practical and costeffective monitoring. Nevertheless, most existing systems still face challenges related to measurement noise and data instability, which can reduce the accuracy of sensor readings. Based on these limitations, there is a need for a low-cost, portable, and real-time detection system that is capable of providing accurate measurements of metal content in packaged drinks. The novelty of this research lies in the integration of a salinity sensor with a Kalman filter algorithm to improve measurement accuracy by reducing noise in sensor data. The Kalman filter is an optimal estimation technique that can enhance the reliability of sensor outputs, making it suitable for real-time applications in water quality monitoring. Therefore, this study aims to design and develop a prototype device for detecting iron (F. and manganese (M. content in packaged drinks using a salinity sensor based on an Arduino Uno microcontroller. In addition, this research evaluates the performance and accuracy of the proposed system by comparing the measurement results with laboratory data. The expected outcome is a practical and reliable Jurnal Teknologi. Vol. No. April 2026, 105-112 tool that can be used for independent and realtime assessment of packaged drink safety . Methods System Design and Implementation Techniques The overall system workflow is illustrated in Figure 1, where the sensor signal is acquired, processed, filtered, and then converted into concentration values before being displayed. Figure 2. The 3D design of the research device The device is designed with dimensions of 18 y 10 y 6 cm. The complete dimensional design of the device can be seen in Figure 3. Figure 1. Block diagram of system 2 Electronic Aspect The electronic system consists of a salinity sensor connected to the analog input of the Arduino Uno. The Arduino processes the input signal and sends the output data to the LCD via an I2C communication module. The Arduino Uno operates with a 10-bit ADC resolution, converting analog voltage signals from the sensor into digital values. The system includes supporting components such as a power supply module, step-down converter, and interconnection circuits. The overall circuit schematic is shown in Figure 4. TR2 Power supply BR2 U10 GND 2W005G Volts TRAN-2P2S LCD2 VSS VDD VEE U12 SCL SDA INT PCF8574A PD4/T0/XCK PD3/INT1 PD2/INT0 TX PD1/TXD RX PD0/RXD RV2 PD7/AIN1 PD6/AIN0 PD5/T1 GND PC0/ADC0 PC1/ADC1 PC2/ADC2 PC3/ADC3 PC4/ADC4/SDA PC5/ADC5/SCL PB0/ICP1/CLKO DIGITAL (PWM) ANALOG IN AREF PB5/SCK PB4/MISO PB3/MOSI/OC2A PB2/SS/OC1B PB1/OC1A RESET LM016L DUINO4 1 Mechanical Aspect The mechanical aspect of system design includes circuit design, which represents the schematic or illustration of the electronic circuit, as well as the mechanical design that will be realized in physical form. This prototype device is developed as an initial step to test and implement the basic concept of the proposed The prototype design focuses on core functionality while considering efficiency, reliability, and ease of production. Using a design created in the SketchUp application, the prototype enables testing of various parameters and serves as a foundation for developing a more refined final version, as shown in Figure 2. Figure 3. Specifications and dimensions ATMEGA328P-PU The proposed system consists of three main parts: input, processing, and output. The input is a salinity sensor used to measure the electrical conductivity of beverage samples, concentration, including iron (F. and manganese (M. The processing unit is an Arduino Uno microcontroller that converts analog signals into digital data and processes them using a Kalman filter algorithm . The output is displayed on a 16y2 LCD via an I2C interface . The Kalman filterAebased system for detecting iron (F. and manganese (M. content in packaged drinks involves three main aspects in its development process, namely the mechanical aspect, the electronic aspect, and the programming aspect. ARDUINO UNO R3 Figure 4. Overall schematic design 3 Application Program Aspect The programming aspect of system design includes the development of the overall program Jurnal Teknologi. Vol. No. April 2026, 105-112 Programming for the device that detects iron (F. and manganese (M. content in packaged drinks using a Kalman filterAebased salinity sensor is carried out using the C programming language through the Arduino IDE Software design, commonly referred to as programming in this device, involves developing program codes to acquire data from the sensor, process it, and then display the This process includes sensor calibration, detection logic, and appropriate output, as illustrated in Figure 5. The tested samples consisted of packaged drinks commonly available in the market, categorized into two groups: fresh water (A1 and A. and flavored beverages (B1. B2, and B. Data collection was carried out by recording sensor readings for each sample, followed by processing using the Kalman filter to obtain more stable measurement results. Data analysis was performed using a comparative method between the prototype measurements and laboratory reference results to evaluate system performance. The deviation between the two measurements was quantified using the percentage error, defined as: yaycycycuyc(%) = . cuOey. ycu 100% ycu The overall system accuracy was then determined based on the average error obtained from all samples. yaycaycaycycycaycayc(%) = 100% Oe ycaycyceycycayciyce yceycycycuyc . Figure 5. Flowchart of application program Testing. Data Collection, and Data Analysis Techniques The development of the prototype system for detecting iron (F. and manganese (M. content in packaged drinks employs a Kalman filter algorithm to improve measurement accuracy by reducing noise in sensor readings. The Kalman filter functions as a data processing and filtering method that produces more stable and reliable outputs based on the sensor measurements, which are subsequently displayed on the LCD. System testing was conducted to evaluate whether the designed device operates according to the intended specifications and programming. The measurement using a salinity sensor, where the sensor was immersed into beverage samples to obtain conductivity-based readings. The collected sensor data were then processed and compared with laboratory test results obtained previously as reference values. In addition, the effectiveness of the Kalman filter was evaluated by comparing raw sensor data with filtered data in terms of noise reduction and signal stability, providing insight into the reliability of the proposed system. If the system performance did not meet the re-evaluation improvement of the system were conducted. Otherwise, the validated data were further analyzed to support the discussion of system performance in detecting Fe and Mn content in packaged drinks. Results and Discussion. Laboratory Test Results of Iron and Manganese Content in Packaged Drinks The drinks samples were packaged drinks commonly sold in the community, which we coded A for fresh water and B for flavored water. There were two brands of fresh water and three brands of flavored water. The laboratory test results of these samples are presented in Table The data in Table 1 are the results of tests conducted at the Center for Standardization and Industrial Services Banda Aceh. Laboratory results indicate that the iron (F. and manganese (M. levels contained in each sample comply with the applicable standards set by the National Agency of Drug and Food Control. Jurnal Teknologi. Vol. No. April 2026, 105-112 Table 1. Laboratory test results of samples Sample Iron (F. Manganese (M. Content . g/L) Based on regulation No. 492 of 2010 issued by the Ministry of Health of the Republic of Indonesia, the permitted maximum levels are 3 mg/L for iron (F. , 250 mg/L for manganese (M. , 500 mg/L for TDS, 0. 2 mg/L for aluminum (A. , 3 mg/L for zinc (Z. , 250 mg/L for sulfate (SOCE), 2 mg/L for copper (C. , 0. 07 mg/L for nickel (N. , and 0. 01 mg/L for lead (P. Experimental data show that the average iron (F. content in the tested samples is 0. mg/L, while the manganese (M. level is 0. mg/L. Results of Iron (F. and Manganese (M. Content Testing in Packaged Drinks Using the Prototype of Detection Device The testing process was carried out by immersing the salinity sensor into the prepared drinks samples. The results of iron (F. and manganese (M. content measurements obtained using the designed device are presented in Table 2. Table 2. Test results of iron (F. and manganese (M. content using the system Sample Code Iron (F. Manganese (M. Content . g/L) Based on the data in Table 2, the test results obtained using the designed device show values that are nearly similar to the laboratory test results previously presented in Table 2. comparing the testing results in Tables 1 and 2, it can be concluded that the measurements produced by the designed device demonstrate a good level of accuracy. System Accuracy Testing in Detecting Iron and Manganese Content in Packaged Drinks To evaluate the systemAos accuracy in detecting iron (F. and manganese (M. content, experimental testing was conducted. The results of the sensor error calculation are presented in Table 3. Table 3. Measurement error calculation for iron (F. and manganese (M. using the salinity Sam Sensor test . g/L) Laboratory result . g/L) Error (%) Iron (F. Mangan (M. Iron (F. Manga (M. Iron (F. Mang (M. Based on the calculations and data presented in Table 3, the average measurement error of iron (F. content detected by the salinity sensor is 1. Meanwhile, the average measurement error of manganese (M. content detected by the salinity sensor is 3. Test Result Analysis Laboratory analysis of iron (F. and manganese (M. content is commonly conducted to evaluate the quality of water, soil, or other materials. The procedure for analyzing these test results is as follows: 1 Laboratory Test Result Analysis Laboratory results indicate that the iron (F. and manganese (M. levels in each sample comply with the standards established by the National Agency of Drug and Food Control. Experimental data show that the average iron (F. concentration in the tested samples is 0. mg/L, while the manganese (M. concentration 003 mg/L. Furthermore, a comparison between the iron content values obtained from laboratory testing conducted at the Industrial Services Standardization and Policy Agency. Jurnal Teknologi. Vol. No. April 2026, 105-112 Industrial Services Standardization and Policy Agency Banda Aceh, and the national standard values is presented in Table 4. obtained from the device. The comparison data between laboratory measurements and the device in detecting iron (F. content are presented in Table 6. Table 4. Comparative data of laboratory iron (F. results with standard values Table 6. Comparison of laboratory and device test results in detecting iron (F. content Sample Standard value . g/L) Lab value . g/L) Condition Sample Lab value . g/L) Device value . g/L) Condition Suitable Suitable Suitable Suitable Suitable Suitable Suitable Suitable Suitable Suitable The data in Table 4 indicate that the test results of the five samples analyzed at the Badan Standarisasi dan Kebijakan Jasa Industri. Industrial Services Standardization and Policy Agency, are suitable for consumption, as the iron (F. content in each sample is well below the applicable maximum Furthermore, the comparison between the laboratory results of manganese content and the corresponding standard values is presented in Table 5. Table 5. Comparative data of laboratory manganese (M. results with standard values Standard value . g/L) Lab value . g/L) Suitable Suitable Suitable Suitable Sample Condition Suitable The data in Table 5 indicate that, based on laboratory testing of five samples conducted at the Industrial Services Standardization and Policy Agency, specifically the Industrial Services Standardization and Policy Agency Banda Aceh, all samples are suitable for consumption since the manganese (M. content in each sample is well below the applicable maximum limit. The laboratory results show that the manganese (M. concentration of the five samples is 0. mg/L, whereas the maximum permissible standard is 0. 4 mg/L. 2 Device Test Result Analysis The testing was carried out by comparing laboratory results with the detection results The results indicate that the values obtained from the system show only very small Data in Table 6 demonstrate slight discrepancies between the device test results and the laboratory measurements. In sample A1, the laboratory result shows an iron content of 0216 mg/L, whereas the device indicates a value of 0. 0238 mg/L. The value produced by the device shows a very small deviation from the laboratory result. The difference between the laboratory and device measurements for sample A1 is 0. 0006 mg/L, which is considered very Meanwhile, the comparison data between laboratory and device test results in detecting manganese (M. content are presented in Table Table 7. Comparison of laboratory and device test results in detecting manganese (M. content Sample Lab Value . g/L) Device Value . g/L) Condition Suitable Suitable Suitable Suitable Suitable The data in Table 7 indicate that the device test results and laboratory measurements show similar values. For the five tested samples, the results reveal no differences between the two The laboratory result for manganese content in B1 sample is 0. 003 mg/L, while the designed device also detects a manganese content of 0. 003 mg/L. Similarly, the other samples show identical values between laboratory and device The manganese content detected in A1. A2. B2, and B3 is 0. 003 mg/L. Kalman Filter Graph Display of Iron (F. and Manganese (M. Content Test Results in Packaged Beverage Samples After testing the iron (F. and manganese (M. content using the salinity sensor, the data are subsequently filtered using the Kalman The Kalman filter provides the most accurate values based on the data read by the system, which are then displayed on the LCD. The Kalman filter graph can be observed through the serial monitor. The graphical display of the Kalman filter for A1 sample is presented in Figure 6. Concentration . g/L) Jurnal Teknologi. Vol. No. April 2026, 105-112 Iron Manganese Figure 7. Parameter graph for A1 sample Figure 6. Kalman filter signal for A1 sample Figure 7 shows the signal graph consisting of a red line, a dark blue line, and a light blue line. The red line represents the raw data, while the dark blue and light blue lines represent data that have been filtered using the Kalman filter Similarly, the Kalman filter graph display for all tested samples (A2. B1. B2, and B. shows a generally similar pattern. The Kalman filter graph for sample A2 is presented in Figure 8. Meanwhile, the dark blue graph represents the Kalman filter data for detecting iron (F. content, while the light blue graph represents the Kalman filter data for detecting manganese (M. content, as shown in Figure 9. Concentration . g/L) Figure 8. Kalman filter graph for A2 sample Iron Manganese Figure 9. Parameter graph for A2 sample The Kalman filter graph for detecting iron (F. content in each sample shows varying values, whereas the Kalman filter graph for detecting manganese (M. content exhibits a constant value. The Kalman filter graph display for sample A2 is presented in Figure 10. Jurnal Teknologi. Vol. No. April 2026, 105-112 Concentration . g/L) Iron Manganese Figure 13. Parameter graph for B2 sample Figure 10. Kalman filter graph for B1 sample Concentration . g/L) The dark blue graph represents the Kalman filter data for detecting iron (F. content, while the light blue graph represents the Kalman filter data for detecting manganese (M. content, as shown in Figure 11. Figure14. Kalman filter graph for B3 sample Iron Manganese Figure 11. Parameter graph for B1 sample The Kalman filter graphs for samples B2 and B3 are presented in Figures 12-15. Concentration . g/L) Iron Manganese Figure 15. Parameter graph for B3 sample Figure 12. Kalman filter graph for B2 sample Conclusion This study demonstrates the successful design and development of a prototype device for detecting iron (F. and manganese (M. content in packaged drinks using a salinity The device consists of main components, including an Arduino Uno microcontroller, a salinity sensor, an LCD, and an I2C module, all of which operate in an integrated manner according to the designed system. The implementation of the Kalman filter method has proven effective in improving measurement Jurnal Teknologi. Vol. No. April 2026, 105-112 Test results indicate that the sensor achieves an accuracy level of 98. 48% in detecting iron (F. content with an average error 52%, while the accuracy for manganese (M. detection reaches 100% with no detected References