Design of an IoT Water Quality Monitoring System for Tropical Fish Aquaculture

Vol. No. Abstract Water quality is one of the most important factors in fish production and aquaculture. Good water quality helps the fish to live, feed, reproduce and grow. Monitoring water quality parameters is the first step before fish farmer can take action to ensure the water qualities is in the desired condition. Implementation of periodic manual lab sampling to check water quality is cumbersome while dependency on human visual inspection can be inaccurate. This paper proposed a technique to monitor water quality parameters such as turbidity, pH and temperature using an IoT system. Using electronic sensors and a microcontroller, the measurement of the parameters will be read before sending the values via SMS to the user. This system can help the users to know the present turbidity, pH and temperature of the pond water, so they will know when they should perform maintenance actions. The prototyped of the system has been tested for Sumatra Barb species and successfully tested with error measurement of 0, 0.1. 0.12 for turbidity, temperature and pH respectively.


Introduction
Malaysia is one of the top 15 global producer with 521,000 tonnes of total aquaculture production. Fish farming began as early as the 1920s in Malaysia and has rapidly grown in the last five years (Fathi et al., 2018). As the increased of the demand recently, the management system of producing quality and quantity of the fish has become subject matter of interest among researchers. One of the factors that affects fish growth, performance, and health of the fish is the water quality. Parameter such as pH, temperature, dissolve oxigen, turbidity etc has been identified as indicators of the water quality for healthy habitats of the fish. Table  1 has shown the list of essential parameters and its analytical method to measure the water quality (Wang et al., 2011). Different species of fish have different aspects of water quality within where and how their condition growing. In order to have a good water quality, certain parameter inspection need to be done periodically. This is crucial especially for a large-scale cultivation and intensive farming which have resulted in deterioration of aquaculture water quality and higher rate of aquatic animal diseases (Danh et al., 2020). To monitor the water quality, a routine checking is usually done to know the water condition berfore taking an appropriate maintanence actions. It can be done manually i.e. by taking samples and processed in the lab. Or for a small scale fish farm will monitor the water quality through human senses such as inspecting the coloration of the water. However these methods tends to be impractical, requires high worker wages, and has a potential of human error (Madrid et al., 2018). It will effect the accuracy too. Thus, to lessen the impact of these drawbacks, an implementation of water quality monitoring system applying the advances in the field of Information Technology (IT) which has been rapidly investigated (Komarudin et al., 2021). The parameters of water quality data can be retrieved through sensors and collected into a database or memory automatically. Then the data will be processed and visualized in order to support precision water quality monitoring as part of fish farm management system. In this paper, a design of water quality monitoring system which measure pH, turbidity and temperature is presented. The system was tested for tiger carbs or "Sumatra Barb" fish. The paper is organized by explaining the recent related works, process of the methodology ,the results obtained and its discussion and finally the conclusion.

Literature Review
A recent work to monitor shrimp aquaculture has been done by Komarudin et al. 2021 at PB Tunas Baru pond using wireless network system. The developed system consists of three node sensors to monitor temperature, pH, and salinity in shrimp ponds water. The sensors were installed at nodes which actively sending data to the master board. This design was done as to reduce the need for fast access to the internet. The validation of the result was done by using calibrated apparatus and the resullt for salinity pH and temperature sensors consecutively is 1.65%, 1.25%, and 0%.
Research on a system which automatically measures and manages pH, temperature, dissolved oxygen, and ammonia has been done by Africa et al. 2011. The results showed the real measurements and regulation for these four parameters. The recorded data are sent to a LabVIEW database. Next, the parameters readings are compared to programmed set-points which depend on the limitations of each parameter for the fish. If any of the parameters are outside of the safe range, the system will automatically take action to reduce harmful levels of pH, temperature, dissolved oxygen, and ammonia. These action will be informed by sending an SMS notification to the user. A method of Real-Time Water Quality Monitoring for the Tilapia fish pond has been proposed by Madrid et al. 2018. An Arduino microcontroller was used to measure the water level, temperature, pH, and DO using sensors. The user can get information at regular intervals through SMS. This integrated solution reduces the need for farmers to hire workers on-site, saving operational costs and increasing efficiency. MySQL was used to create the prediction interface. A paper presented a prototype water quality monitoring system which consists of sensor probes and a microcontroller to collect data of DO, pH, and EC sensors from the sample water and convert it to an electrical signal (Baliado et al. 1998). The result has temperatures vary from 27 to 30 degrees Celsius, pH is from 6 to 9, salinity range from 19 to 24 ppt, and DO is 4.5 to 8.2 ppm. The measure % error for pH, EC, and temperature reading is between the ranges of 0.464 to 4.416, 0.014 to 0.233, and 0.76 respectively. Another research which monitor the water quality using IoT system was proposed (Duangwongsa et al., 2021). In this system, the parameters including temperature, potential hydrogen (pH) level, turbidity, and dissolved oxygen were measured. The system utilized sensors, micro controllers(Arduino Nano), and a mobile application for acquiring and monitoring data. The notification will be sent to user when those parameters are above or below the standard values From the literature review, it can be concluded that microcontroller system which integrated with an IoT provides a good results with low error rates. Furthermore this system is low cost yet robust is one of the reasons why it is a popular among researchers. As such, this paper contributed on evaluating an IoT water monitoring system on a fish species which named as Sumatra Barb.

Methodology
Every species has its optimum values that the fish can tole. The project proposes a method for real-time water quality monitoring that has been measured for Tiger Carb or "Sumatra barb" in an aquarium for this publication. Figure 1 depicts a flow diagram of the research process, with each component described in depth in the following sections.

Design Flow
The flowchart in Figure 2 shows the flow of the project. When the project starts, it will monitor all the water quality parameters which is associated to the sensors used i.e. water temperature, pH and turbidity sensor. The analog sensors will be read by Arduino Mega 2560. As a validation purpose, two LCDs was connected to the microcontroller in order to display the value of the measured parameters. An integrated GSM system was attached to the microntroller. Thus, an SMS will be received as a notification for every interval of data recording. In addition, the parameters which has been read was also kept in an Excel File for user monitoring purposes.

System Circuit Diagram
The proposed system circuit diagram of the project is shown in Figure 3. All sensors were connected to pin A0 on Arduino board. Pin TXD on SIM900 GSM Module was connected to pin D10 while pin RXD on SIM900 GSM Module was connected to pin D11 on Arduino Mega board. SDA pin of LCD 1 and LCD 2 were connected to pin SDA.

Hardware Development
The hardware consists of three sensors and a microcontroller. Sensors used in this hardware development including DFRobot Turbidity, DFRobot PH meter and DS18B20 programmable temperature sensor from Maxim Integrated. The temperature sensor measures temperatures from -55°C to +125°C (-67°F to +257°F). The DFRobot Turbidity sensor has two types of output which consist of analog output: 0-4.5V. and the digital output with high-low-level signal (user can adjust the threshold value by adjusting the potentiometer). The DFRobot PH meter measuring range is from 0 to 14 pH. There were two 16x2 I2C LCDs to display the parameter's values. Temperature and pH values was displayed on LCD 1, and turbidity values was displayed on LCD 2. The parameter's values recorded will be displayed every 3000 milliseconds. The system was powered by LIPO battery 7.4V 900mAH.

Data Gathering
Data of the three parameters; temperature, pH, and turbidity were recorded for 6 days duration. The data has been recorded twice a day at 7 am and 7 pm. The microcontroller will send the data to the SIM900 GSM module. Next, this GSM module will send the parameter's value via an SMS. Data recorded will be sent to the Excel file in real-time. An aquarium that contained with three Tiger carb fishs was chosen as a prototype of the water quality monitoring system.

Result and Discussion
The result of the methodologies used in this article are presented in this part. This involves presenting the actual hardware as well as the results of the data gathered in by the prototype model.

A. Developed Hardware and Prototype
Figure 4 present the prototype system for collecting the sensors parameters. LCD 1 and LCD 2 were mounted outside of the box to ensure the user can see the parameter values. Three sensors probes were placed outside of the box as to make it easily placed in the aquarium. All the circuit connections was placed in the box so that the prototype system looks tidy.  Figure 5 shows the aquarium that was used to collect data. There were Tiger carb type of fish in the aquarium. The aquarium has no automatic oxygen supply. During the data gathering period, the fishes were fed twice a day. Once at 9 am and once at 9 pm.  Figure 6 shows the recorded parameter which has been displayed on both LCDs. These parameter will automatically imported to Excel file. PLX-DAQ-v2 was used to integrate with Arduino Mega. When the user stop recording the data, the Excel file can be saved on the laptop for future reference or analysis. Figure 7 shows the SMS notification received by the user when the data is recorded. The notification consist of all three parameters.  Figure 8, 9, 10 shows the line graph of temperature, pH and turbidity values respectively which has been recorded for 7 days, from 1st June 2021 to 7th June 2021. Data recorded at twice a day at 7 am and 7 pm daily. From Figure 8, the value for temperature for 7 pm was slightly low from the value taken in the morning for all 7 days. Thus, it can be conclude that, the water temperature was not influenced by the surrounding temperature as morning is less heaty than in the evening. Other than that, the temperature values may depend on where the fish was kept, since the aquarium was located in the house, hence it will have less influence by the heat from the sun.
From figure 9, the pH value has the arising trend for every three days. This is due to the water has been changed for the third and the sixth day, hence it indicates that the pH level which influence by the cleanliness of the water. It is inline with statement in Water Quality Standard Handbook, where the water chemistry such as pH is based on concentration of H + and OH + . pH value was influenced on copper toxicity and copper is one of the plumbing component for water distribution in Malaysia.
Water turbidity is defined as the amount of cloudiness in the water which effected by germs, bacteria and mud of the water supply (Martin et al. 2018). Since the water was changed for every three days, and the analysis was taken for 7 days only, the turbidity value maintain at the same level with a very small variance for each day i.e. less than 0.09. To know the accuracy of the measured value, the water of the fish aquarium was changed for the third day. Thus the value for the first day and the third day should be the same. Then the errors between these two days (Mohajan 2017) is calculated. Table 4 summarized the error measurement for all three parameters. From the table, it can be seen that the error value is very small between day 1 and day 3 data. Hence it can be concluded that the data is valid. The error is calculated using Eq. 1 (Mohajan 2017) below: Table 4. Error for parameter measurement

Conclusion
The proposed system prototype achieved the objective of measuring, monitoring, and notifying the pH, temperature, and turbidity of water for aquaculture. This research presented a low-cost technology which, allowing the fish farmers to observe real-time and historical data. Real-time water quality monitoring provides remote access to the water quality and reduces the need for physical monitoring. We tested the system at an aquarium with three Tiger carbs that came from tropical water. This prototype has been used in testing the system for 7 days from 1 st June 2021 to 7 th June 2021. Recommendation that can be done in future is on the computation using such as Machine Learning to predict the water quality in future.