Buletin Ilmiah Sarjana Teknik Elektro ISSN: 2685-9572
Optimization of Catfish Pond Water pH with PID Control using Outseal PLC
Abdillah Ali Rachman 1, Muhamad Ariandi 2
1 Department of Electrical Engineering, Universitas Bina Darma, Indonesia
2 Department of Information Systems, Universitas Bina Darma, Indonesia
ARTICLE INFORMATION | ABSTRACT | |
Article History: Submitted 28 August 2023 Revised 20 September 2023 Accepted 30 September 2023 | The increasing need for national consumption fish every year makes the business of cultivating consumption fish such as catfish increasingly developed. In catfish farming, the pH level factor in water affects the growth and development of catfish. If the pH level is not appropriate, it causes catfish disease and catfish appetite decreases. So it is necessary to control the pH level of water automatically which makes it easy to maintain pH levels in fish ponds using PID control. The system is designed using Outseal which is an Arduino bootloader-based PLC (Progammable Logic Control) which is open source at an affordable price connected to the RDD-AFE-001 sensor to send readings of actual pH levels into the PID control process. The PID output is in the form of a pwm value to run the L2890N motor driver as a nutrient pump speed regulator based on the pH value. The results of analyzing the value of PID parameters using simulink software obtained the value of Kp = 30, Ki = 20 and Kd = 15. The Propotional role produces a better rise time so that the pH sensor reading response is faster, then the integral role eliminates overshoot which causes more accurate sensor readings and the derivative role eliminates steady state errors that affect the stability of the pH sensor reading. The test results successfully maintain the pH level in water with a value of 7.0 with water temperatures ranging from 26° C - 30° C. The existence of this system can increase the growth and stability of the pH sensor reading. With this system can improve the growth and development of catfish and away from contracting diseases and facilitate farmers in terms of maintaining the pH level of catfish water. | |
Keywords: Outseal PLC; pH Control; PID; Scada; Catfish | ||
Corresponding Author: Muhamad Ariandi, Department of Electrical Engineering, Universitas Bina Darma Palembang, Indonesia. Email: muhamad_ariandi@binadarma.ac.id | ||
This work is licensed under a Creative Commons Attribution-Share Alike 4.0 | ||
Document Citation: A. A. Rachman and M. Ariandi, “Optimization of Catfish Pond Water pH with PID Control using Outseal PLC,” Buletin Ilmiah Sarjana Teknik Elektro, vol. 5, no. 3, pp. 398-406, 2023, DOI: 10.12928/biste.v5i3.8944. |
Fish farming is one of the perennial businesses in the fisheries sector [1]. Based on data from the Ministry of Maritime Affairs and Fisheries (KPP), the national fish consumption rate touched 55.37 Kg/capita in 2021. One type of fish that is widely consumed is catfish [2]. Catfish is a type of fish that is quite easy to cultivate, because of the advantages of catfish that can survive in murky water conditions, easy to get seeds and easier maintenance [3]. The advantages of catfish can make catfish farming profitable if it is intensively pursued. The success factor in catfish farming lies in the pH of the pond water, for standard pH recommendations in pond water ranging from 6.5 to 7 [4][5]. The impact of inappropriate pH causes fungal growth and slow growth of catfish. The cause of changes in the pH of the water can be caused by excessive food waste in the pond and rainwater that falls on the catfish pond. So that breeders must always routinely check the pH of pond water, especially after the rain hits [6][7].
At Agrotekno Wisata 044 located in Gelebak Dalam Village, Rambutan District, Banyuasin Regency, South Sumatra, there is a catfish farm, where there is an Automatic Fish Feeder tool. The tool has a function of feeding according to a schedule that has been set at 06.00 WIB and 18.00 WIB, then monitoring the temperature of the pond water, the level of turbidity of the pond water and monitoring the pH level in the fish pond [8]. But the tool is only limited to monitoring using the Blynk application and giving notifications when there are changes in pond water that exceed safe limits [9][10]. In the pH monitoring tool, there is no automatic water neutralization, so farmers still neutralize water manually by adding water nutrients manually into the fish pond.
Based on this background, researchers are interested in better development in terms of neutralizing the pH level of fish ponds automatically by adding a PID control system to regulate the speed of the pump in dripping water nutrients in the pond automatically [11][12]. In existing studies, most of them use Arduino as the controller, so researchers are interested in using Outseal as the controller. Outseal it self is an arduino bootloader-based PLC (Programmable Logic Control) at an affordable price that uses ladder diagram language as its program language. The use of the RDD-AFE-001 pH sensor as a pH reading in the pool and using PID control for better pH readings and functions for setting the speed of the nutrient pump based on the output value of the PID control. The working system of the researcher's tool is that the pH sensor reads the pH level in the pool water, then sends the reading results to the outseal for the PID control system process, then the output value of the PID control is used to adjust the speed of the nutrient pump based on the pH value read. Arduino Uno serves to transfer values from Outseal via serial communication which will display parameter values such as the pH value read, pump pwm and setpoint of the desired pH in a 16x2 LCD. Haiwell Cloud Scada also functions to monitor the running system using a laptop as an HMI.
The purpose of this research is to design a pH control system in stable pond water using PID control so that the pH in catfish pond water is always in a neutral state with a pH value of 7.0 [13]. So that with this pH control system is expected to help improve the quality of catfish growth and development and minimize the risk of catfish infected with fungi due to unstable pH [14].
In this research there are two stages of planning, namely design for hardware and design for software. For hardware design contains system components in the form of block diagrams and wiring tools. Then the software design contains a flowchart of the work system process of the tool being made [15].
In the hardware design of the research tool system, the central controller uses Outseal Mega Slim V2.1 which controls all sensors and actuators. The block diagram of the research tool system can be seen in Figure 1. The design of this pH control system uses Outseal PLC as the controller, L2890N motor driver to adjust the pump speed based on the PID output, the current pump serves to accelerate the mixing of pH neutral nutrients in the pool water, Arduino Uno as an intermediary communication line to display parameter values on the 16x2 LCD, Haiwell Cloud Scada to see the process of the system working when the tool is running and the nutrient pump to drip pH nutrients into the pool [16]. Selection of Outseal PLC as a controller because for programming using ladder diagrams and also Outseal PLC is a PLC made by the nation's children using the basis of Arduino which already supports MODBUS RTU for communication with HMI or SCADA [17]. To facilitate the assembly of hardware components, a tool wiring diagram is required. Tool wiring is a wiring diagram of all hardware components [18]. The overall tool wiring diagram can be seen in Figure 2.
Figure 1. Hardware diagram
Figure 2. Hardware wiring diagram
Figure 2 is the hardware of the entire component where the Outseal takes power from the 24V power supply output, the L2890N motor driver is connected to the Outseal pwm pin to adjust the pump speed, the Arduino uno is connected to the Outseal by MODBUS by connecting its RX pin and TX pin, the RDD-AFE-001 pH sensor is connected to the Outseal Analog pin, the relay is connected to the Outseal digital output and the 16x2 lcd is connected to the Arduino uno pin. The pins used in this tool can be seen in Table 1.
Table 1. Input dan Output
Components | Pins Used |
Driver motor L2890N | R.8 (pwm), R.7 (pwm) |
Acid Pump | R.6 |
Base Pump | R.5 |
Relay | R.4 |
pH sensor board | A.1, 5+, GND |
Arduino Uno | RX, TX |
LCD 16×2 I2C | SDA, SCL, 5+, GND |
In the Outseal system software design, it is made with the Outseal Studio application with a ladder diagram for programming. To facilitate the making of the program, first design a flow chart of the tool's work process, starting with the input voltage into Outseal which functions to control the sensors and actuators. Figure 3 is a diagram of the entire system of this tool.
Based on Figure 3, when the system works to initialize the I or O followed by an active current pump and a dead solution pump. The sensor reads the pH value of the water, from the pH reading results enter the PID control system to analyse the PID output, when the pH is below the set point, the base pump will be active based on the output of the PID with a non-negative value and vice versa when the pH is above the set point value, the acid pump is active based on the PID output with a negative value [19][20]. When the pH value is right at the set point, both pumps turn off with the state of the PID output value of 0.
Figure 3. Flowchart of working system
To get the appropriate PID parameter value when applied in the system, a simulation is carried out using simulink software to see the response of each PID parameter with the trial and error method until it gets a parameter value that has a stable system as evidenced by the waveform results in the simulation [21]. In this case what is emphasized is the response of the pH sensor which affects the response of the pH liquid nutrient pump [22]. Figure 4 is a simulation diagram of the researcher's system, where the one using PID simulates the response of the pH sensor reading using PID control while the one without using PID simulates the response of the pH sensor reading without using PID control.
Figure 5 is the PID parameter block and the output of the system response. From the results of the trial and error method carried out by changing the value of Proportional (P), Integral (I) and Derivative (D) in the Simulink PID parameter block. With a parameter value of P = 30, I = 20 and D = 15 produces a better rise time so that the response of the pH sensor reading is faster, then there is no overshoot which causes more accurate sensor readings and no steady state error that affects the stability of the pH sensor reading. In this case, the PID control system is better than a system that does not use PID.
Figure 4. Simulink system diagram
Figure 5. PID parameter value
The pH sensor reading produces an Analog value in the form of a voltage that is processed in Outseal and converted to ADC with equation (1). Testing is done using a pH buffer solution that is widely sold in the market with values of 4.01, 6.86 and 9.18. The error rate of the pH sensor reading with the actual value of the pH buffer uses equation (2).
Table 2 in the pH sensor reading there is a difference with the pH meter because the Outseal PLC does not yet support float numbers or comma numbers (,), so the pH sensor reading is done in tens, for example the pH sensor reads pH 40 then the actual pH value measured is 4.0. In this test, there is no error between the pH sensor reading and the pH meter. The purpose of this test is to calibrate the pH sensor so that the pH reading is accurate according to the actual pH used so that there is no error in the PID control reading.
(1) | ||
(2) |
Table 2. Comparison of pH sensor reading results
pH Buffer | pH Sensor | pH Meter | Voltage(V) | Error(%) |
4.01 | 40 | 4.0 | 1.69 | 0.2 |
6.86 | 68 | 6.8 | 1.94 | 0.8 |
9.18 | 91 | 9.1 | 2.15 | 0.8 |
This test is carried out to see the performance of the pH sensor response to the actual pH without PID. In the test carried out, the condition of the pH level in the pool water is at a value of 7.0. Figure 6 is the result of testing without PID with the actual value of pH 7.0 and setting the graph reading taking data every 1 second. The trend graph shows the readings on the pH sensor are unstable, where the readings on the pH sensor go up and down which causes the pump to work irregularly, causing the pH in the pool water to be unstable. So from this analysis, PID control is needed so that sensor readings are accurate and stable.
Figure 6. System response without PID
This test is carried out to determine the stability and accuracy of the pH sensor reading with the actual value of pH. In this test the actual value of pH levels in pond water is at a value of 7.0. Accurate pH sensor readings greatly affect the reading of the PID control which functions to control the work of the nutrient liquid pump so that the pH level of the water in the pool is stable and always at a value of 7.0. Figure 7 is the result of testing the system using PID control. In this test, the Proportional value plays a role in eliminating the deviation of the pH sensor reading from the actual value, the Integral value plays a role in the response of the pH sensor reading and the Derivative value plays a role in eliminating the steady state error which causes the pH sensor reading to stabilize.
Figure 7. System response using PID
The actual test was conducted by inserting the pH probe into the catfish pond and the pond water temperature ranged from 26° C to 30° C. Testing was carried out from September 11, 2023 - September 16, 2023 with the system working for 24 hours. With a feeding schedule every day as much as 2x feeding at 06.00 WIB and 18.00 WIB. This test is to determine whether the system has succeeded in maintaining the pH of the water in a neutral state worth 7.0 or not. Table 3 is the actual PID test result data from checking the system in the morning, afternoon and evening. By checking using a pH meter measuring instrument.
Table 3 is the result of data collection carried out by monitoring the pH level of water during working hours, namely at 08.00 WIB, 11.00 WIB and 16.00 WIB using a pH meter, to find out whether the system is working properly or not. On September 11, 2023, was the first time testing the tool in the fish pond, the pH read on the sensor was 7.5 so that the pH down pump was active to neutralize the pH of the water in the catfish pond. Then the tool is turned on 24 hours non-stop to maintain pH levels at the setpoint value of 7.0. The results in Table 3 state that the system works normally, namely the system is able to maintain and neutralize the pH level of water in the value range of 7.0 in neutral conditions. With a test time of 6 days, the nutrients that have been used for pH up are 40ml and pH down 20ml. Conditions that affect pH changes are caused by excessive feeding, so that the remaining feed that settles causes pH levels to become acidic and the influence of rainwater entering the catfish pond water.
Table 3. Testing PID system on catfish ponds
Day or Date | Time | pH Sensor | Description |
Monday, September 11th, 2023 | 08.00 | 7.5 | Pump pH Down ON |
11.00 | 7.0 | Safe Limit | |
16.00 | 7.0 | Safe Limit | |
Tuesday, September 12th, 2023 | 08.00 | 7.0 | Safe Limit |
11.00 | 7.0 | Safe Limit | |
16.00 | 7.0 | Safe Limit | |
Wednesday, September 13th, 2023 | 08.00 | 7.0 | Safe Limit |
11.00 | 7.0 | Safe Limit | |
16.00 | 7.0 | Safe Limit | |
Thursday, September 14th, 2023 | 08.00 | 7.0 | Safe Limit |
11.00 | 7.0 | Safe Limit | |
16.00 | 7.0 | Safe Limit | |
Friday, September 15th, 2023 | 08.00 | 7.0 | Safe Limit |
11.00 | 7.0 | Safe Limit | |
16.00 | 7.0 | Safe Limit | |
Saturday, September 16th, 2023 | 08.00 | 7.0 | Safe Limit |
11.00 | 7.0 | Safe Limit | |
16.00 | 7.0 | Safe Limit |
Based on the tests carried out, the pH control system in catfish pond water runs in accordance with the research objectives, which serves to control the pH of catfish pond water to always be in a neutral state with a pH value of 7.0 automatically. PID control plays a role in stabilizing the pH reading and increasing the accuracy of the actual pH value reading and adjusting the speed of the nutrient pump depending on the actual pH value, making it more efficient in terms of time and cost savings because there is no need for more supervision in monitoring the pond and also improving the quality of the harvest. Limitations faced in checking the pH of the water at night, due to constraints on working hours. So that it can only check in the morning, afternoon and evening. This research can still be developed in the future, by adding an HMI (Human Machine Interface) that supports IoT so that it can be monitored via cell phone anywhere and anytime as well as not using a laptop again as SCADA. It is hoped that this pH control device can improve the quality of the harvest in catfish and can be applied to other cultivation so that it can help other cultivators in terms of maintaining pH in similar cultivation.
ACKNOWLEDGMENT
Our deepest gratitude to the team of editors and reviewers for all forms of advice, input, and assistance in the process of publishing this manuscript. Thanks also to all parties involved in this research and providing moral and material assistance.
REFERENCES
[1] S. Khanal, S. Khatri, and S. Khanal, “Production, marketing, and future prospects of fish farming in Nepal: National and global scenario,” Cogent Food and Agriculture, vol. 6, no. 1, 2020, https://doi.org/10.1080/23311932.2020.1860384.
[2] A. Halim e al., “Developing a functional definition of small-scale fisheries in support of marine capture fisheries management in Indonesia,” Marine Policy, vol. 100, pp. 238-248, 2019, https://doi.org/10.1016/j.marpol.2018.11.044.
[3] D. Deswati, R. Zein, S. Suparno, and H. Pardi, “Modified biofloc technology and its effects on water quality and growth of catfish,” Separation Science and Technology, vol. 58, no. 5, pp. 944-960, 2023, https://doi.org/10.1080/01496395.2023.2166843.
[4] C. S. Tucker and K. K. Schrader, “Off-flavors in pond-grown ictalurid catfish : Causes and management options,” Journal of the World Aquaculture Society, vol. 51, no. 1, pp. 7–92, 2020, https://doi.org/10.1111/jwas.12672.
[5] O. L. Oparinde, “Gender Differentials in Livelihood Security among Aquaculture Fish Farmers in Southwest Nigeria,” In Sustainable Development in Africa: Fostering Sustainability in one of the World's Most Promising Continents, pp. 337-355, 2021, https://doi.org/10.1007/978-3-030-74693-3_19.
[6] F. Alfisyahrin and S. B. Prayitno, “Prevalence and identification fungal of fungal disease on Catfish (Clarias gariepinus) juvenile at Kendal Coastal Region, Central Java,” In IOP Conference Series: Earth and Environmental Science, vol. 246, no. 1, p. 012048, 2019, https://doi.org/10.1088/1755-1315/246/1/012048.
[7] P. J. Henriksson, et al., “Unpacking factors influencing antimicrobial use in global aquaculture and their implication for management: a review from a systems perspective,” Sustainability Science, vol. 13, pp. 1105-1120, 2018, https://doi.org/10.1007/s11625-017-0511-8.
[8] X. Fu, Y. Zhou, F. Yang, L. Ma, H. Long, Y. Zhong, and P. Ni, “A review of key technologies and trends in the development of integrated heating and power systems in agriculture” Entropy, vol. 23, no. 2, p. 260, 2021, https://doi.org/10.3390/e23020260.
[9] F. Jan, N. Min-Allah, and D. Düştegör, “Iot based smart water quality monitoring: Recent techniques, trends and challenges for domestic applications,” Water, vol. 13, no, 13, p. 1729, 2021, https://doi.org/10.3390/w13131729.
[10] M. A. Iqbal, Z. Wang, Z. A. Ali, and S. Riaz, “Automatic fish species classification using deep convolutional neural networks,” Wireless Personal Communications, vol. 116, pp. 1043-1053, 2021, https://doi.org/10.1007/s11277-019-06634-1.
[11] C. Jie, S. Yingying, W. Junhui, W. Yusheng, S. Huiping and L. Kaiyan, "Intelligent Control and Management System for Recirculating Aquaculture," 2019 IEEE 2nd International Conference on Electronics and Communication Engineering (ICECE), pp. 438-443, 2019, https://doi.org/10.1109/ICECE48499.2019.9058567.
[12] Y. Wei, W. Li, D. An, D. Li, Y. Jiao and Q. Wei, "Equipment and Intelligent Control System in Aquaponics: A Review," in IEEE Access, vol. 7, pp. 169306-169326, 2019, https://doi.org/10.1109/ACCESS.2019.2953491.
[13] S. Gorjian, F. Kamrani, O. Fakhraei, H. Samadi, and P. Emami, “Emerging applications of solar energy in agriculture and aquaculture systems,” Solar energy advancements in agriculture and food production systems, pp. 425-469, 2022, https://doi.org/10.1016/B978-0-323-89866-9.00008-0.
[14] T. Lieke, T. Meinelt, S. H. Hoseinifar, B. Pan, D. L. Straus, and C. E. W. Steinberg, “Sustainable aquaculture requires environmental-friendly treatment strategies for fish diseases,” Reviews in Aquaculture, vol. 12, no. 2, pp. 943–965, 2020, https://doi.org/10.1111/raq.12365.
[15] C. -Y. Huang, M. -C. Yang, C. -Y. Huang, Y. -J. Chen, M. -L. Wu and K. -W. Chen, "A Chatbot-supported Smart Wireless Interactive Healthcare System for Weight Control and Health Promotion," 2018 IEEE International Conference on Industrial Engineering and Engineering Management (IEEM), pp. 1791-1795, 2018, https://doi.org/10.1109/IEEM.2018.8607399.
[16] I. K. Yadav, et al., “Influence of material properties and equipment configuration on loss-in-weight feeder performance for drug product continuous manufacture,” Powder Technology, 348, 126-137, 2019, https://doi.org/10.1016/j.powtec.2019.01.071.
[17] F. Rossi, J. P. Sembiring, A. Jayadi, N. U. Putri and P. Nugroho, "Implementation of Fuzzy Logic in PLC for Three- Story Elevator Control System," 2021 International Conference on Computer Science, Information Technology, and Electrical Engineering (ICOMITEE), pp. 179-185, 2021, https://doi.org/10.1109/ICOMITEE53461.2021.9650221.
[18] N. K. Bharti, M. D. Dongargaonkar, I. B. Kudkar, S. Das and M. Kenia, "Hydroponics System for Soilless Farming Integrated with Android Application by Internet of Things and MQTT Broker," 2019 IEEE Pune Section International Conference (PuneCon), pp. 1-5, 2019, https://doi.org/10.1109/PuneCon46936.2019.9105847.
[19] R. Zhou et al., “Fuzzy Neural Network PID Strategy Based on PSO Optimization for pH Control of Water and Fertilizer Integration,” Applied Sciences (Switzerland), vol. 12, no. 15, 2022, https://doi.org/10.3390/app12157383.
[20] M. A. Mohammed and A. J. Abid, “Design and implementation of fast and highly precise water magnetizer,” TELKOMNIKA (Telecommunication Computing Electronics and Control), vol. 18, no. 6, pp. 3155-3163, 2020, https://doi.org/10.12928/telkomnika.v18i6.15916.
[21] S. Balamurugan and A. Umarani, "Study of Discrete PID Controller for DC Motor Speed Control Using MATLAB," 2020 International Conference on Computing and Information Technology (ICCIT-1441), pp. 1-6, 2020, https://doi.org/10.1109/ICCIT-144147971.2020.9213780.
[22] Y. E. Fimbres-Acedo, S. Traversari, S. Cacini, G. Costamagna, M. Ginepro, and D. Massa, “Testing the Effect of High pH and Low Nutrient Concentration on Four Leafy Vegetables in Hydroponics,” Agronomy, vol. 13, no. 1, p. 41, 2023, https://doi.org/10.3390/agronomy13010041.
AUTHOR BIOGRAPHY
Optimization of Catfish Pond Water pH with PID Control Using Outseal PLC (Abdillah Ali Rachman)