SMATIKA : STIKI Informatika Jurnal Vol. No. Desember 2024, pp. ISSN: 2087-0256, e-ISSN: 2580-6939 Design and Development of a Water Quality Recommendation System Prototype for Nila Aquaculture Mochamad Subianto1* Ernanda Kusuma Wardhana2 1,2 Teknik Informatika. Universitas Ma Chung. Villa Puncak Tidar Blok N no. Doro. Karangwidoro. Kec. Dau. Kabupaten Malang. Jawa Timur 65151. Indonesia subianto@machung. id, 2312110022@machung. *Penulis Korespondensi: Mochamad Subianto subianto@machung. Abstract In fish farming, specific processes are required for fish intended for food or ornamental purposes. In addition to food and weather, water quality must also be considered. Water quality parameters include ammonia content, water temperature, pH, turbidity, and Total Dissolved Solids (TDS). Poor water quality can result in the presence of toxic compounds, leftover feed, organic materials, and substances that cause diseases in fish. Conversely, good water quality can reduce water turbidity, allowing sufficient sunlight penetration and potentially increasing fish productivity. This study discusses a water quality detection device using five sensors: a temperature sensor, pH sensor, ammonia sensor. TDS sensor, and turbidity sensor, all connected to an Arduino Nano ATmega-328 to read the sensor data. Testing was conducted under five different water conditions: tilapia pond water, clean water, tilapia pond water mixed with clean water, catfish pond water, and tilapia pond water mixed with catfish pond water. The standard deviation for temperature, pH, and ammonia for all water conditions was less than 0. The standard deviation for TDS in catfish pond water and tilapia pond water mixed with catfish pond water was less than 1. 0, and the turbidity values were below 7. Keywords: Water quality, pH, ammonia. Arduino Nano ATmega-328. Rule-Based Reasoning. Introduction Indonesia has abundant natural water resources. The abundance of these water resources presents opportunities for the community, such as starting fish farming businesses. Fish are popular among the public due to their affordability and high nutritional content. Additionally, some fish can be used as raw materials for Albumin serum based on Fish Serum Albumin (FSA) in the healthcare sector. Fish such as catfish, carp, and tilapia have good FSA concentrations and are often used as a source of raw material for Albumin. In fish farming, special processes are required for fish that are intended as food or as ornamental Besides food and weather, water quality is another important factor to consider. Water quality includes ammonia content, water temperature, pH, turbidity, and total dissolved solids (TDS). Poor water quality can lead to the presence of toxic compounds, leftover feed, organic matter, and substances that cause diseases in fish. Conversely, good water quality can reduce water turbidity, allowing sunlight to penetrate adequately, which can even increase fish Indonesia's water resources have been significantly impacted by environmental pollution, both in urban and rural areas. In urban environments, water is often contaminated by industrial waste and poor waste management at landfills, leading to the pollution of water sources. In rural areas, water sources are also polluted by improperly disposed garbage and household detergent waste. Contaminated household wastewater containing as little as 5% detergent can be lethal to fish fry in ponds. An expert system is a computer system that mimics the decision-making ability of a human expert. It is divided into two main components: the knowledge base and the inference engine. Water Cite: Subianto M, dan Wardhana. K, . Rancang Bangun Prototipe Sistem Rekomendasi Kualitas Air Untuk Budidaya Ikan Nila. SMATIKA : STIKI Informatika Jurnal, 14. doi: https://doi. org/10. 32664/smatika. Rancang Bangun Prototipe Sistem Rekomendasi Kualitas Air Untuk Budidaya Ikan Nila quality detection using the Forward Chaining method is a technique of drawing conclusions starting from premises to a conclusion. Related research on water quality has also been The first previous study used parameters such as temperature, hardness, and salinity, utilizing a web localhost system that had to be connected via a LAN cable network, displaying sensor readings every 20 minutes. The second study employed pH and water turbidity sensors to measure water quality. The results of this system testing indicated that as the acid concentration increases, the pH value detected by the sensor decreases. In the two previous studies, the sensors used in the tests did not measure all the water quality parameters comprehensively and did not provide recommendations on what actions should be taken if certain factors, such as pH levels. Total Dissolved Solids (TDS), turbidity, and temperature, were above or below the standards for optimizing fish farming. In this study, testing will be conducted on factors that can affect water quality, such as pH levels. Total Dissolved Solids (TDS), water turbidity, water temperature, and ammonia content, using the Rule-Based Reasoning method, along with recommendations for actions, which provide added value compared to previous research. This system is also designed based on IoT technology, offering a level of technological novelty that enables users to access real-time data remotely. , . Research Methodology Rule-Based Reasoning (RBR) is a method designed to analyze information stored in memory using a set of rules in the knowledge base, which is derived from literature studies and expert information without considering the specific case at hand. This method is a decision support system that includes a knowledge base and utilizes rules presented in an IF-THEN format, where each condition's rules are interconnected through logical connectors, forming a logical function. Below is an example of a rule in manual calculation. Problem-solving based on the artificial intelligence approach uses a technique that relies on rules found in the knowledge base to address issues . , . A Rule-Based System is a computer program that can process information, make decisions, and solve problems. The initial use in developing the Rule-Based method involves creating a set of rules within the knowledge base. obtain new information, an inference engine is used. , . The Rule-Based method uses an IFTHEN model, resulting in static rules. The Rule-Based System method has three main modules: the knowledge base, working memory, and inference engine. Other supporting factors are also necessary, such as the user interface, developer interface, explanation facility, and external The explanation of the main modules and supporting modules is as follows. Knowledge Base is the knowledge from one or more experts needed to solve problems, consisting of two basic elements: facts and rules. Working Memory is the storage place for known facts. Inference Engine is the brain of the expert system, containing the reasoning mechanism and patterns used by an User/Developer Interface is the interface presented to both the user and the developer. The user interface is simple and easy to access, while the developer interface involves source code and an editor. Explanation Facility functions to explain to the user the reasoning behind the solutions provided. External Program supports the system, such as databases, algorithms, and other factors necessary for problem-solving. A 2024 SMATIKA Jurnal. Published by LPPM STIKI Malang This is an open access article under the CC BY SA license. ttps://creativecommons. org/licenses/by-sa/4. Rancang Bangun Prototipe Sistem Rekomendasi Kualitas Air Untuk Budidaya Ikan Nila Table 1. Manual Calculation Rule for Rule-Based Reasoning in Water Quality Detection and Recommendations Value Temperature value < 25EE Explanation Low water temperature Recommendation Add warm water/heater 25EE O Temperature value Ou 32EE Normal water High water temperature Too low Normal pH level High pH level Normal amo level High amo level No further action is needed Temperature value > 32EE pH value < 6 6 O pH Value Ou 8,5 pH Value > 8,5 Ammonia concentration < 0,02 ppm Ammonia concentration > 0,02 ppm TDS concentration < 1000 ppm Clean water Add water/Need Sircular water No action needed No action needed Use RO/deionized water No action needed Replace 25% of the water / Ammonia remover No action needed TDS concentration >1000ppm High TDS in water Install aerator and water filter Turbidity < 400 NTU Non-turbid water No action needed Turbidity > 400 NTU Air keruh Tambah kincir dan Filter air In the use of an expert system, there are steps that are carried out and divided into three important points as follows. Analyze the problems that arise and decompose them into modules to simplify the issues. Followed by evaluation, design and organize the obtained information into a format that is easy to apply on a computer. And implement the system on the computer. In the use of the Rule-Based Reasoning method, there are several advantages and disadvantages. The advantages of the Rule-Based Reasoning method are as follows. The method uses natural language with IF-THEN statements, which are easier for users to understand. The system only employs rules relevant to the problem at hand. It can work with variables. It allows tracing the source of information. The conclusion of a problem is found in the THEN part, while the facts are in the IF part, which facilitates rule checking. The disadvantages of using the Rule-Based Reasoning method are as follows. Requires more detailed matching. Connecting rules can often be challenging. Processing time can be quite lengthy if there are many rules. The prototype is constructed using five elements, which include. Input Hardware: Sensors for temperature, pH, ammonia. Total Dissolved Solids (TDS), and water turbidity. Microcontroller: An Arduino Nano ATmega-328. Output Hardware: A 16x2 LCD screen. Software: A program embedded in the Arduino Nano ATmega-328 to serve as a bridge between the software and hardware, ensuring effective communication. The circuit connection diagram of the prototype is shown in Figure 2. This diagram illustrates the five sensors used to measure water quality parameters according to their respective functions. The sensor measurement data is then sent to the Arduino Nano ATmega-328 microcontroller to be compared with water quality standards for tilapia farming in freshwater ponds. The compared data is used to provide recommendations regarding the water quality in the pond. The LCD displays the processed data from the Arduino Nano ATmega-328 microcontroller in text format. There are several components involved in the development of the prototype in this study, which include both hardware and software components. The software component consists of a program with the . ino extension, written in C using the Arduino IDE. The hardware components include a laptop, a microcontroller (Arduino Nano ATMega-328P), several sensors including a waterproof temperature sensor, a water turbidity sensor, a water pH sensor, a Total Dissolved Solids (TDS) A 2024 SMATIKA Jurnal. Published by LPPM STIKI Malang This is an open access article under the CC BY SA license. ttps://creativecommons. org/licenses/by-sa/4. Rancang Bangun Prototipe Sistem Rekomendasi Kualitas Air Untuk Budidaya Ikan Nila sensor, and an ammonia gas sensor. Additionally, the prototype includes an LCD 16x02 screen as an output to display the results from the sensor readings. The prototype is designed to operate with a 5-volt power source. It is equipped with buttons for operation, with each sensor having its own button for measuring water quality parameters. The configuration includes four sensors immersed in the water: temperature sensor, pH sensor, turbidity sensor, and TDS sensor. The ammonia sensor is placed close to the water being tested. When the prototype is turned on, it remains in standby mode, waiting for a button to be pressed. When a button corresponding to a sensor is pressed, the sensor collects data for 10 seconds, averages the data, and then analyzes it using Rule-Based Reasoning to determine the water quality status based on the sensor readings. The analyzed and processed data using the Rule-Based Reasoning algorithm will be used to provide recommendations on the water quality and what actions should be taken to improve it based on the measured parameters. Potential challenges that need to be addressed for its implementation. For example, the systemAos performance in varying environmental conditions, such as fluctuating temperatures and high humidity, could affect the accuracy of sensor readings. Additionally, the durability of the sensors in different water conditions . , salty or highly turbid wate. and the prototypeAos overall reliability in long-term usage are important considerations. Furthermore, the scalability of the system to handle multiple sensors or integrate with other systems for real-time monitoring will be evaluated in the next phase. Image 1. Prototype Tool for Water Quality Detection and Recommendation The data obtained from the sensor includes digital data . - . and 10-bit analog data . - 1. This data will undergo a translation process into various types of data depending on the sensor The translation process for each sensor will differ because each sensor has its own library, while some do not have a library. Below is a table of sensors and their output data types. Table 2. Sensor Name and Output Data Sensor Temperature Amonia TDS Turbidity Outut Data Type Digital Analog Analog Analog Analog A 2024 SMATIKA Jurnal. Published by LPPM STIKI Malang This is an open access article under the CC BY SA license. ttps://creativecommons. org/licenses/by-sa/4. Rancang Bangun Prototipe Sistem Rekomendasi Kualitas Air Untuk Budidaya Ikan Nila These five water quality parameters are the standard measurements routinely taken by shrimp The data from these parameters obtained from the sensors will be directly compared with the established standards according to requirements, and it will be checked whether the data falls within the appropriate levels. There are three possible outcomes: water lacking a certain parameter, water having an adequate level of a certain parameter, and water exceeding a certain These three data points will be used as benchmarks for making recommendations. No. Table 3. Water Quality Standards Parameter Batas Bawah Batas Atas Temperature Amonia TDS Turbidity 25EE 0,02 mg. L-1 1000 mg. L-1 The reasoning behind selecting the five water quality parameters . emperature, pH, ammonia. TDS, and turbidit. stems from their critical role in fish farming. As outlined in the document, these parameters directly influence water quality, which affects fish health, productivity, and Temperature is essential for maintaining the metabolic and physiological processes of pH is critical for aquatic life. extreme levels can harm fish and disrupt biological functions. Ammonia is toxic even at low levels. it can accumulate from organic waste and uneaten feed. Total Dissolved Solids (TDS) is indicates water salinity and quality. high levels can stress aquatic Turbidity is affects light penetration and water quality. high turbidity may limit photosynthesis and harbor pathogens. , . The selection of these parameters reflects their established importance in aquaculture for ensuring optimal water conditions and minimizing stress or disease in fish. Before conducting the tests, calibration is first performed to ensure that the sensors provide accurate readings. In this case, the sensor that requires calibration is the turbidity sensor. The following are the steps to be carried out for calibrating the turbidity sensor in this study. Prepare clean water in a container. Open Arduino IDE. Prepare the program code in Arduino IDE. Compile the program until Connect the water quality detection and recommendation prototype to the computer. Once the prototype is connected, upload the program to Arduino IDE. Immerse the turbidity sensor in the prepared clean water container. Record the voltage values from the output on the serial monitor. Divide the recorded values by 4. 20 using the formula, and perform the calculations Add the results from step 9 to the program. Calibration is complete. Result Sensor data testing was performed using mineral water, with 100 data readings recorded. The average and standard deviation of these readings were then examined. Table 4. Results of Sensor Consistency Testing Temperature (EE) Amonia TDS Turbidity (NTU) 28,44 28,44 28,44 28,44 28,44 28,44 6,23 6,22 6,24 6,23 6,23 6,32 0,00491 0,00467 0,00479 0,00479 0,00479 0,00491 167,61 167,61 171,08 167,61 167,61 169,35 0,90 0,90 0,90 0,90 0,90 0,90 A 2024 SMATIKA Jurnal. Published by LPPM STIKI Malang This is an open access article under the CC BY SA license. ttps://creativecommons. org/licenses/by-sa/4. Rancang Bangun Prototipe Sistem Rekomendasi Kualitas Air Untuk Budidaya Ikan Nila Temperature (EE) Amonia TDS Turbidity (NTU) 28,44 28,50 28,50 28,50 28,37 6,40 6,39 6,33 6,37 6,29 0,00491 0,00491 0,00467 0,00467 0,00466 169,35 169,35 167,61 169,35 169,19 0,90 0,90 0,90 0,90 0,06 0,06 0,06 0,00032 1,58 0,00 Average Standard This test is conducted in stages. The sensors will be exposed to three different water conditions, and the results will display the concentration values for each parameter along with recommendations, which will be shown on the LCD. Table 5. Results of Testing Tilapia Pond Water Average Standard Recommendation Temperature (EE) Amonia TDS . Turbidity (NTU) 26,69 26,69 26,69 26,62 26,69 26,69 26,69 26,69 26,62 26,69 26,6291 8,35 8,18 8,14 8,11 8,01 8,02 8,16 8,177 0,00115 0,00123 0,00115 0,00123 0,00115 0,00123 0,00123 0,00129 0,00115 0,00115 0,00112 206,62 205,67 203,91 205,67 202,14 203,91 205,67 205,67 200,36 203,91 203,81 378,04 378,08 378,08 378,06 378,05 378,07 378,06 378,04 378,05 378,05 378,056 0,02366 0,09932 0,00005 1,53773 0,01326 No action No action No action No action No action Table 6. Results of Testing Clean Water Average Standard Recommendation Temperature (EE) Amonia TDS . Turbidity (NTU) 25,81 25,81 25,81 25,81 25,81 25,81 25,81 25,81 25,81 25,81 25,81 8,17 8,14 8,19 8,22 8,14 8,12 8,09 8,03 8,1192 0,00108 0,00111 0,00111 0,00115 0,00108 0,00111 0,00108 0,00108 0,00111 0,00108 0,0011 180,43 184,11 180,43 180,43 182,28 184,11 180,43 180,43 182,28 180,43 183,924 0,98 0,93 0,88 0,93 0,93 0,88 0,93 0,93 0,88 0,88 0,92048 0,00000 0,09200 0,00003 2,48019 0,02485 No action No action No action No action No action A 2024 SMATIKA Jurnal. Published by LPPM STIKI Malang This is an open access article under the CC BY SA license. ttps://creativecommons. org/licenses/by-sa/4. Rancang Bangun Prototipe Sistem Rekomendasi Kualitas Air Untuk Budidaya Ikan Nila Table 7. Results of Testing Tilapia Pond Water Mixed with Clean Water Temperature (EE) Amonia TDS . Turbidity (NTU) 26,25 26,19 26,19 26,25 26,19 26,19 26,19 26,19 26,19 26,19 26,2056 8,24 8,39 8,34 8,03 8,09 8,25 8,37 8,07 8,31 8,2236 0,00108 0,00115 0,00108 0,00108 0,00115 0,00111 0,00111 0,00115 0,00111 0,00111 0,00109 206,19 205,07 202,754 293,26 293,29 293,29 294,27 293,78 294,27 294,27 293,29 293,687 0,02645 0,12114 0,00004 1,81063 0,53654 No action No action No action No action No action Average Standard Recommendation Table 8. Results of Testing Catfish Pond Water Average Standard Recommendation Temperature (EE) Amonia TDS Turbidity (NTU) 26,81 26,87 26,87 26,81 26,81 26,81 26,87 26,81 26,81 26,81 26,7992 8,55 8,44 8,55 8,49 8,49 8,37 8,47 8,58 8,3824 0,00219 0,00219 0,00207 0,00207 0,00207 0,00213 0,00207 0,00213 0,00207 0,00195 0,00194 540,29 539,59 539,59 539,59 540,29 539,59 539,59 538,89 540,29 539,59 539,26 Ou3000 Ou3000 Ou3000 Ou3000 Ou3000 Ou3000 Ou3000 Ou3000 Ou3000 Ou3000 0,03234 0,13475 0,00012 0,67969 No action No action No action No action Install aerator and water filter Table 9. Results of Testing Tilapia Pond Water Mixed with Catfish Pond Water Temperature (EE) Amonia TDS Turbidity (NTU) 8,12 8,03 8,19 8,16 8,16 8,23 0,00184 0,00195 0,00184 0,00184 0,00179 0,00189 0,00184 0,00179 348,23 348,23 348,23 346,96 348,23 346,96 345,69 348,23 2059,68 2081,10 2081,10 2081,10 2081,10 2059,68 2059,68 2059,68 A 2024 SMATIKA Jurnal. Published by LPPM STIKI Malang This is an open access article under the CC BY SA license. ttps://creativecommons. org/licenses/by-sa/4. Rancang Bangun Prototipe Sistem Rekomendasi Kualitas Air Untuk Budidaya Ikan Nila Average Standard Recommendation Temperature (EE) Amonia TDS Turbidity (NTU) 26,4886 8,18 8,17 8,1564 0,00184 0,00179 0,00196 346,96 346,96 347,519 2059,68 2059,68 2060,07 0,02789 0,06292 0,00016 0,96061 6,92233 No action No action No action Install and water Add aerator and water Discussion The presentation of the results could benefit from more comparative analysis to align the data with industry standards for fish farming. For instance, while the results list measured values for parameters like temperature, pH, ammonia. TDS, and turbidity, they should explicitly indicate how these values compare with the established standards in Table 3 of the document: Temperature 81Ae28. 03Ae8. Standard Range 25Ae32EE 6Ae8. Ammonia TDS Turbidity 00108Ae0. 00491 mg/L 61Ae540. 29 mg/L 90AeOu3000 NTU O 0. 02 mg/L O 1000 mg/L O 400 NTU Parameter Measured Value Range Comparison Within range Mostly within range. one slightly exceeds upper limit Well within range Within range Exceeds limit in some cases . catfish pond wate. Integrating such analysis clarifies whether the system's recommendations are effective and aligned with aquaculture practices. It highlights areas for improvement, such as addressing turbidity in high-stress conditions Conclusion Based on the overall results, it can be concluded that the program created using Rule-Based Reasoning can detect the levels of water quality parameters such as temperature, pH, ammonia. TDS, and turbidity, and provide recommendations on what actions to take if the parameter levels do not meet the standards, whether they are below or above the standard. The testing involved five different types of water conditions: tilapia pond water, clean water, tilapia pond water mixed with clean water, catfish pond water, and tilapia pond water mixed with catfish pond water. The standard deviations for temperature, pH, and ammonia were <0. The standard deviation for TDS in catfish pond water and tilapia pond water mixed with catfish pond water was <1. 0, and the turbidity values were <7. In this study, testing has not yet been conducted under varying environmental conditions, such as fluctuating temperatures and high humidity, which could affect the accuracy of sensor readings. Additionally, testing on the durability of the sensors in different water conditions . , salty or highly turbid wate. and the overall reliability of the prototype in long-term usage has not been performed, which are important considerations. Future studies could focus on improving the system's precision by calibrating sensors in diverse environmental conditions or refining the algorithms used for data processing. Additionally, implementing and testing the system in real-world farming environments over an extended period would provide insights into its long-term reliability and practical applicability. A 2024 SMATIKA Jurnal. Published by LPPM STIKI Malang This is an open access article under the CC BY SA license. ttps://creativecommons. org/licenses/by-sa/4. Rancang Bangun Prototipe Sistem Rekomendasi Kualitas Air Untuk Budidaya Ikan Nila Referensi