Prototype Measuring Levels of Dissolved Ammonia Based on TSL2561 Sensor Calibrated Thermo Scientific Genesys 30 Visible Spectrophotometer

In this study, a prototype measuring instrument for dissolved ammonia levels based on the TSL2561 sensor and calibrated thermo scientific Genesys 30 visible spectrophotometers has been realized, which aims to create a system for reading dissolved ammonia levels. This measuring instrument uses a violet LED as a light source, Arduino UNO as the central processor, and an I2C LCD to display measured values. This research was carried out by reading sensor tests on artificial instruments and spectrophotometer with dissolved ammonia samples with levels varying from 0-0.3 mg/l to obtain an equation for converting the absorbance value of the artificial measuring instrument into the dissolved ammonia level value, which was implemented in the Arduino program. Furthermore, an artificial measuring instrument is applied by measuring the dissolved ammonia level in the wastewater sample, namely the wastewater from the shrimp seeds tank, artemia tank, and tilapia tank. This measuring instrument has a measurement range from 0-0.3 mg/l. The sensor test results show that the greater the dissolved ammonia level, the greater the absorbance value. The results of the application of artificial measuring instruments obtained the value of dissolved ammonia levels in the wastewater of the shrimp seeds tank of 0.2811 mg/l, the wastewater of the artemia tank of 0.0672 mg/l, and the wastewater of the tilapia pond at 0.0156 mg/l. Based on the calculation results, it was obtained that the average accuracy and precision for the shrimp seeds tank wastewater was 98.63% and 98.47%, the Artemia tank wastewater was 97.72% and 98.08%, while for the pond wastewater tilapia by 95.71% and 99.74 %.

Industrial activities generally produce waste in the form of solid or liquid which can have a negative impact if the waste is discharged into the environment without being managed first (Eko Sugiharto, 2012). These wastes are estimated to contain nitrogen compounds which, when dissolved in Water, are in the form of nitrate, nitrite, and ammonia compounds (Suparno, 2016). The results of industrial processes, in addition to being positive from an economic point of view, are also negative from an environmental point of view with the presence of bonds in the form of ammonia compounds (Candra, 2009). The shrimp farming industry is an example of an industrial sector in the aquaculture sector whose results can improve the economy and even become one of the primary industries in developing aquaculture products in Indonesia (Directorate General of Aquaculture, 2019). An intensive system is needed in the shrimp farming industry to be more efficient in producing shrimp. However, the intensive shrimp farming system creates several problems, namely, the rapid accumulation of feed residues, organic matter, and toxic nitrogen compounds (Elfidiah, 2016).
Ammonia is a compound formed due to the decomposition of the accumulated organic compounds from feed residues and shrimp manure at the bottom of the pond (Komarawidjaja, 2006). This is a real problem resulting from the aquaculture industry where fish and shrimp only use 20%-30% of feed, and the remaining percentage is excreted through the fish's body so that it collects in the Water, which causes the accumulation of ammonia content in the pond. If the wastewater from this process is disposed of directly at harvest time without being managed first, pollution will occur in the waters (Gunadi & Hafsaridewi, 2008).
Ammonia is one of the compounds derived from nitrogen which has toxic properties at low concentrations (0.2 mg/L). The toxicity of ammonia compounds can even cause death (Suparno, 2016). If they have reached the quality standard, Ammonia levels can irritate the respiratory organs, such as bronchiolar and alveolar edema. In addition, when exposed to the environment, it can cause ecosystem damage, such as increasing water hyacinth in the river (eutrophication), so additional treatment is needed to avoid the adverse effects of water hyacinth. the ammonia (Slamet & Kalmapuspita, 2017) .
According to Suparno's research (2016), one way to determine the presence or absence of nitrogen compounds, especially ammonia compounds found in the waters of Lampung Bay, is the UV-Vis spectrophotometric method. Spectrophotometry can determine the amount of concentration in a sample by irradiating the compound molecules using light with a specific wavelength. When light passes through the sample, some light will be absorbed, some will be scattered, and some will be transmitted. Absorbance is the light that is absorbed, while transmittance is the light that is scattered. This is according to the Lambert-Beer Law. This absorbance value can affect the value of the concentration of a compound contained in the solution. The greater the measured absorbance, the greater the concentration of a compound in the solution (Neldawati et al., 2013).
According to Ngibad's research (2019), ammonia levels in waters determined using the spectrophotometer method and measured by the Nessler method result in a linear relationship between dissolved ammonia levels and absorbance, so the more significant the absorbance value, the higher the dissolved ammonia level. Therefore, this research was conducted to create a dissolved ammonia level measuring instrument based on the TSL2561 sensor calibrated by Thermo Scientific Genesys 30 Visible Spectrophotometer to detect dissolved ammonia levels in Water. This study will measure ammonia levels in several types of waste: fry wastewater, Artemia wastewater, and tilapia pond wastewater. In conducting this research, applying the principle of light absorption on the material and utilizing Violet LEDs as a light-producing source, and using a TSL2561 sensor to capture the intensity of the light produced so that it can determine the dissolved ammonia level in the liquid.

Research methods
This research is structured on the manufacture of hardware and software with the tools used in this study consisting of a Spectrophotometer, Lux meter, measuring cup, dropper, solder, and lead wire. The materials used in this research are Arduino Uno, TSL2561 Sensor, 16x2 I2C character LCD, Resistor, LED Violet, Cuvette, TCA9548a, Switch, Board, Aquades, Ammonia solution, Nessler reagent, and wastewater.

1.1
Hardware Design ( Hardware ) The hardware for measuring ammonia levels consists of a Violet LED as a light source, a prism as a light divider, a cuvette as a sample container, a TSL2561 sensor as an input circuit Arduino Uno as a process and an LCD as an output. The block diagram can be seen in Figure 1. In Figure 1 it can be explained the working principle of the measuring instrument. Namely, the sample solution will be placed between the prism and TSL2561, the light source emits light which will be divided by the prism, then the prism will divide two light, one light is continued directly to the TSL2561-1 sensor, and the second light is passed through The sample cuvette is then transmitted to the TSL2561-2 sensor. The TSL2561-1 and TSL2561-2 sensors will read the intensity of each light. Then the input from the TSL2561 sensor reading will be 91 Aripta TP, Suciyati SW, Supriyanto A, and Junaidi, 2022, Prototype of Dissolved Ammonia Level Measurement Tool Based on Tsl2561 Sensor Calibrated Thermo Scientific Genesys 30 Visible Spectrophotometer, Journal of Energy, Materials, and Instrumentation Technology, Vol. 3 No. 3, 2022 accepted by Arduino to produce an output value in the form of the number of ammonia levels displayed on the LCD. The whole series of artificial measuring instruments is shown in Figure 2.

Figure 2. The whole series of artificial measuring instruments
This study used samples as ammonia solution for sensor testing with distilled Water to dilute ammonia concentration. The concentration of ammonia solution used varied as many as 31 solutions ranging from 0-0.3 mg/l. Testing The whole system was carried out by reading the ammonia level in this study using three waste samples: fry wastewater, artemia wastewater, and tilapia pond wastewater.

Software Design ( Software )
In this study, software design is made to support the system's performance so that it can work well and obtain output as expected. In software design, program development uses Arduino IDE software. In the Arduino IDE, the program will be written, then the program will be compiled, and the last is the program uploading. For more details, the program that will be implemented in this research can be seen in Figure 3. Sensor testing aims to determine the ability of the sensor to read the received light intensity. This is done by measuring the light intensity using sensors with varying distances, then calculating the error percentage value ( error ), accuracy, and precision using Equations 1-3. The hardware is tested on each component used to determine the ability of the component to perform its function.
With as the Reference parameter value, is the nth measured Parameter Value, and ̅ is the Average of the nth measured parameter value. Furthermore, the sensor is tested for light intensity readings against time to determine the stability of the sensor readings. After the test on the TSL2561 sensor has been completed, the next step is to carry out the calibration process for the artificial measuring instrument. This artificial measuring instrument is calibrated by comparing the absorbance value read on the spectrophotometer as a standard measuring instrument with the absorbance read on the artificial instrument. The standard measuring instrument used in this calibration is the thermo scientific genesis 30 visible spectrophotometers. In addition, this calibration process uses standard ammonia solutions with varying solution levels and uses Nessler's reagent as an ammonia solvent. The process of making varying levels of solution using Equation 4 With V1 = initial volume of standard solution (ml); M1 = Initial molarity of standard solution (M); V2 = Final volume of standard solution (ml), and M2 = Final concentration of the standard solution (M).
The absorbance reading process was repeated five times each for each level variation. The absorbance measurement results obtained are calculated to get the percentage error value at Equation 1, the percentage of accuracy in Equation 2, and the percentage of precision in Equation 3. In addition, a graph of the relationship between absorbance readings using an artificial measuring instrument and a spectrophotometer as a standard measuring instrument is obtained, where the equation will be implemented into the Arduino program.

Overall Tool Test
Testing on the software is carried out to determine the tool's performance following the program implemented on the artificial measuring instrument. This test is done by verifying the program on the Arduino IDE software. If there are no syntax errors, the next thing to do is upload the program. After the testing process has been carried out on the device, the following process is collecting data for measuring ammonia levels in liquid waste using artificial measuring instruments.
This study used three types of waste, each repeated five times. The steps in this test are as follows. 1.
The first stage is to prepare the tools and materials needed for this research.

2.
In the second stage, pour 5 ml of wastewater into a test tube, add two drops of Nessler's reagent, and then leave it for 10 minutes. This is done for five repetitions for each waste.

3.
The third stage is turning on the measuring instrument 5 minutes before the waste of waiting time is over. 4.
In the fourth stage, after 10 minutes have passed, pour the wastewater mixed with Nessler's reagent into the cuvette using a 4 ml dropper pipette. In the fifth stage, input the cuvette into the measuring instrument and record the value read on the LCD.

Measurement Tool Prototype Realization
prototype for measuring dissolved ammonia levels based on the TSL2561 sensor has been realized with the results shown in Figure 3.  Energy, Materials, and Instrumentation Technology, Vol. 3 No. 3, 2022 This tool has dimensions of 32.3 cm × 14.8 cm × 12 cm. The components of this measuring instrument are 2 TSL2561 sensors connected to TCA9548a, Arduino Uno R3, LED Violet as a light source, and a 16x2 I2C character LCD to display measurement readings. In addition to the electronic components mentioned above, there are other constituent components, namely a cuvette as a sample holder and a prism that focuses and transmits light to the sensor.

16x2 I2C. LCD Testing
The results will be displayed using a 16x2 I2C character LCD connected to Arduino Uno via A4, A5, 5V, and GND. The Arduino pins are connected to the 16x2 LCD pins, namely SDA, SCL, VCC, and GND. This program uses the Wire.h and LiquidCrystal_I2C.h code libraries already available in the Arduino IDE. The library initialization is carried out on the pins that will be used in order to communicate with the LCD. The display of LCD Test Results can be seen in Figure 4.  Figure 4 shows the results of the 16x2 LCD test in the form of an LCD screen display that prints the words "<<<Ammonia Test>>>." This indicates that the 16x2 I2C character LCD is in good condition to display the measurement results.

TSL2561 . sensor test
The TSL2561 sensor is a second-generation light sensor device that can read the light intensity value into a digital output signal as an I2C interface (Gunawan et al., 2021). In this study, the intensity read is the intensity of the Violet LED through the sample cuvette and the intensity without going through the sample cuvette. In this study, 2 TSL2561 sensors were used so that a TCA9548a multiplexer was used to read the address of each sensor. The pins on this TSL2561 sensor module use I2C communication pins. The SDA, SCL, VCC, and GND pins on each sensor are connected to the SD2, SC2, VCC, and GND multiplexer for the first sensor, and the second sensor is connected to the SD6, SC6, VCC, and GND multiplexer pins which are then connected to the SDA, SCL, VCC pins, and Arduino Uno's GND. This TSL2561 sensor test aims to determine if the sensor is working correctly. Testing this sensor is done by directing the sensor towards the light source with a distance that varies from 1-20 cm and is repeated five times. The following are the results of the tests carried out in Table 1.
Based on the test results of the TSL2561 sensor, the test result data can be presented in graphical form, as shown in Figure 5.

Figure 5. TSL2561 Sensor Test Graph with Lux meter
In Figure 5, it can be seen that the test results with the lux meter coincide with each other. This indicates that the sensor measurement is close to the lux meter measurement, where the farther the distance, the smaller the measured intensity. Table 1 can also obtain the percentage of error, percentage of accuracy, and percentage of precision the percentage of accuracy and precision in graphical form in Figure 6. Aripta et al, 2022/ J. Energy Mater. Instrument. Technol. Vol. 3 No. 3, 2022

Figure 6. (a). Sensor Accuracy Graph and (b). Sensor Precision Graphics
The graph in Figure 6a presents the percentage value of accuracy. The highest accuracy percentage is at a distance of 5 cm, 99.32 %, and the lowest value is at a distance of 13 cm, 94.08 %. This test obtains an average accuracy percentage on the sensor of 96.11%. Figure 6b presents a graph of the percentage precision of the TSL2561 sensor test results. Based on the graph, it can be seen that the highest percentage of precision on the sensor occurs at a distance of 11 cm, which is 100 %, and the lowest percentage is at a distance of 18 cm, which is 96.78 % and the average precision percentage in this test is 98.78%. This shows that the sensor is suitable and can be used for measurements.

95
Aripta TP, Suciyati SW, Supriyanto A, and Junaidi, 2022, Prototype of Dissolved Ammonia Level Measurement Tool Based on Tsl2561 Sensor Calibrated Thermo Scientific Genesys 30 Visible Spectrophotometer, Journal of Energy, Materials, and Instrumentation Technology, Vol. 3 No. 3, 2022  Based on Table 2, the results of measuring light intensity using a sensor against time are obtained so that a graph, as shown in Figure 7.

Figure 7. Graph of intensity over time
After testing the sensor characterization on the lux meter, the next step is to compare the absorbance value of the artificial measuring instrument to the spectrophotometer. The thermo scientific genesis 30 visible spectrophotometers were used in this study. All measuring instruments are used in this process, starting from the sensor circuit and LCD. This process uses 2 TSL2561 sensors where the task of sensor 1 is to capture the intensity of light that enters without going through the sample, and sensor 2 serves to capture the intensity of light that passes through the sample. Then these intensities are converted to obtain absorbance values using Equation 5, where A = absorbance, T = transmittance, It = transmittance intensity (lx), and Io = initial intensity (lx).
The listing program in this process is used to obtain absorbance values, which are as follows.
The listing uses several commands, including float Transmittance = Lux2/Lux1; this command is tasked with declaring the transmittance value obtained by dividing the Lux value from sensor two by the Lux value from sensor 1. Float Absorbance command = -log10(Lux2/Lux1); to declare the absorbance value by using the logarithmic formula on transmittance result or dividing Lux2 by Lux1. Furthermore, in this listing, there is a command Serial.print ("Transmit: "); and Serial.print ("Absorbance: ");. Both of these commands display the results of the Transmittance and absorbance calculations. Before carrying out the calibration process, the thing to do is to test the tool thoroughly. This test measures light intensity without the cuvette and the cuvette in an empty condition. The test results obtained the difference in light intensity between sensor one and sensor 2 when testing with a cuvette. This is because the cuvette has a specific thickness. So, the light intensity conversion formula in the sensor two program listing is added with the number 6 0 to produce the same results on the intensity readings of sensor one and sensor 2. The process of sensor characteristics and calibration of this measuring instrument performs tests with samples in the form of standard ammonia solutions, diluted by adding aquades. This ammonia solution uses the dilution formula as in Equation 4. The solution sample tested has varying levels of 0-0.3 mg /l. Calibration of this synthetic ammonia measuring instrument is done by comparing the absorbance of the ammonia solution measured using a spectrophotometer to the absorbance obtained from measurements using an artificial float Transmitan = Lux2/Lux1; Serial.print ("Transmitan: "); Serial.println(Transmitan); float Absorban = -log10(Lux2/Lux1); Serial.print ("Absorban: "); Serial.println(Absorban,4); Aripta et al, 2022/ J. Energy Mater. Instrument. Technol. Vol. 3 No. 3, 2022 measuring instrument. Based on the measurement results that have been carried out, a graph of the absorbance measurement data on dissolved ammonia levels is obtained in Figure 8. shows that dissolved ammonia levels influence the absorbance value. The greater the dissolved ammonia level, the results of the absorbance measurement with artificial measuring instruments and a genesis 30 visible thermo scientific spectrophotometer. The greater it is. From Figure 8a, it can be obtained the relationship between the absorbance of the thermo scientific genesis 30 visible spectrophotometers and the absorbance of the artificial measuring instrument, which is expressed by the linear regression graph in Figure 8b. Based on the graph in Figure 8b, a linear equation is obtained with an R2 value of 0.998 . R-value 2 close to 1 generally indicates that the independent variable significantly influences the dependent variable (Enjelita Ndruru et al., 2014). Figure  8b shows that the relationship between the two absorbance values is linear, with a positive upward trend. The linearity equation is shown in Equation 6. Therefore, it can be said that there is a strong relationship between the absorbance of the measurement results and the reference absorbance.
1,3527 0,0458 y x = + By assuming y as the absorbance value of the artificial measuring instrument and x as the value of the dissolved ammonia content, an equation can be written to calculate the value of the dissolved ammonia level as Equation 7.

(7)
Equation 7 is the equation used to calibrate the artificial measuring instrument in order to be able to obtain the results of the measurement of dissolved ammonia levels approaching the value of the thermo scientific genesis 30 visible spectrophotometers. Calibration of this artificial measuring instrument is done by entering Equation 7 obtained on the Arduino program.

Measuring Instrument Test
The testing process is carried out in several stages. After the calibration process has been successfully carried out, the following process tests the ammonia level measuring instrument in the waste. This data collection process is carried out by implementing the entire system on the measuring instrument. The following are the results of wastewater measurements using artificial instruments and standard tools, namely the thermo scientific Genesys visible spectrophotometer 3 0 in Table 4.

97
Aripta TP, Suciyati SW, Supriyanto A, and Junaidi, 2022, Prototype of Dissolved Ammonia Level Measurement Tool Based on Tsl2561 Sensor Calibrated Thermo Scientific Genesys 30 Visible Spectrophotometer, Journal of Energy, Materials, and Instrumentation Technology, Vol. 3 No. 3, 2022  Description: * Water from the tub that has been harvested fry ** Water from the harvested Artemia tub *** Water from tilapia ponds Table 4 shows the results of testing waste using synthetic ammonia measuring instrument. The measuring instrument's error value, accuracy, and precision are obtained in measuring waste. From these data, it can be seen that the accuracy in the measurement of fry waste is 98.63 %, artemia waste is 97.72%, and tilapia pond waste is 95.71%, so the average percentage of accuracy obtained is 97.35 %. The percentage of precision in fry waste is 99.47%, artemia waste is 99.08%, and tilapia fish pond waste is 99.08%, so the average precision of the measuring instrument is 99.74%. The results of this calculation show that the accuracy percentage in tilapia pond waste is smaller than that of fry and artemia waste. The accuracy value in tilapia ponds is obtained from a more significant error value than fry and artemia waste due to limited tools in measuring dissolved ammonia levels using Nessler solvent at levels below 0.02 mg/l following the measurement reference for measuring ammonia levels. At the national standardization body.

Conclusion
An electronic system for measuring ammonia levels can be made using a TSL2561 sensor and a Violet LED with Arduino Uno as the central processor in the circuit. The sensor test results show that the greater the ammonia content, the greater the absorbance value. The TSL2561 sensor has good sensitivity to light with an accuracy percentage of 96.11%. Based on the measurement results when the tool is applied, the average accuracy and precision for the frying tub wastewater are 98.63% and 98.47%, the Artemia tub waste water is 97.72% and 98.08%, while for tilapia pond wastewater was 95.71% and 99.74%, respectively.