Next Article in Journal
Smartphone-Based Pedestrian Dead Reckoning for 3D Indoor Positioning
Previous Article in Journal
Characterization and Improvement of Heat Resistance of a Polymer-Ceramic Pressure-Sensitive Paint at High Temperatures
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

An Integrated Wireless Multi-Sensor System for Monitoring the Water Quality of Aquaculture

Department of Computer Science and Information Engineering, Da-Yeh University, Changhua 515006, Taiwan
*
Author to whom correspondence should be addressed.
Sensors 2021, 21(24), 8179; https://doi.org/10.3390/s21248179
Submission received: 12 November 2021 / Revised: 27 November 2021 / Accepted: 3 December 2021 / Published: 7 December 2021
(This article belongs to the Section Smart Agriculture)

Abstract

:
Water temperature, pH, dissolved oxygen (DO), electrical conductivity (EC), and salinity levels are the critical cultivation factors for freshwater aquaculture. This paper proposes a novel wireless multi-sensor system by integrating the temperature, pH, DO, and EC sensors with an ESP 32 Wi-Fi module for monitoring the water quality of freshwater aquaculture, which acquires the sensing data and salinity information directly derived from the EC level. The information of water temperature, pH, DO, EC, and salinity levels was displayed in the ThingSpeak IoT platform and was visualized in a user-friendly manner by ThingView APP. Firstly, these sensors were integrated with an ESP32 Wi-Fi platform. The observations of sensors and the estimated salinity from the EC level were then transmitted by a Wi-Fi network to an on-site Wi-Fi access point (AP). The acquired information was further transmitted to the ThingSpeak IoT and displayed in the form of a web-based monitoring system which can be directly visualized by online browsing or the ThingView APP. Through the complete processes of pre-calibration, in situ measurement, and post-calibration, the results illustrate that the proposed wireless multi-sensor IoT system has sufficient accuracy, reliable confidence, and a good tolerance for monitoring the water quality of freshwater aquaculture.

1. Introduction

Suffering from the COVID-19 pandemic since 2020, both fisheries and aquaculture businesses have been facing a range of operational difficulties, such as labor, financing, logistics, and weak market procurement, all affecting the output reduction in 2020. As vaccine roll-out programs continue all over the world, fish production is expected to have a significant boost and positive growth. As pointed out by the Food and Agriculture Organization of the United Nations (FAO) [1], aquaculture has already demonstrated its crucial role in global food security with the production growing rate of 7.5%/year since 1970. As shown in Figure 1, the global fish consumption is ever-increasing, and fish production from aquaculture was of significant importance between 2000 and 2018. Notably, the fish production from inland aquaculture in 2018 was twice that in 2000. Therefore, both marine and inland aquaculture is significantly considered as an integral component for global food security and economic development. This implies aquaculture requires intensive care in the culture process to enhance yield, including stocking, feeding, and protection from predators and disease. The water quality of seawater and freshwater for aquaculture is essential. Therefore, in situ measurement instruments and water quality monitoring systems are of increasing importance for real-time and cost-effective aquaculture management.
Recently, many researchers have paid attention to water quality monitoring. Zhua et al. [2] demonstrated an online water quality monitoring system with temperature, pH, dissolved oxygen (DO), and electrical conductivity (EC) sensors for intensive fish culture, wherein the EC level was adopted to estimate the salinity level highlighted as “*” in Table 1. Based on the collected data, a DO forecast model with the ability of half hour-ahead was further designed using a convolutional neural network (CNN) stochastic gradient descent (SGD) with a momentum (SGDM) algorithm. Zhang et al. [3] used an Orion 5-Star Portable pH/ORP/DO/EC Multimeter to measure the levels of temperature, pH, DO, and EC for an integrated recirculating aquaculture system (RAS) in a constructed wetland for land-based fish farming. A smart wireless mesh sensor network called AquaMesh, with temperature, pH, DO, and EC sensors, was developed by Odey and Li for aquaculture [4]. Simbeye and Yang demonstrated a LabVIEW-based water quality monitoring and control system for aquaculture based on a wireless sensor network (WSN), which had the reading functions of temperature, pH, DO, and EC and had the ability to control pH level, water, and aerator pumps [5]. Schmidt et al. [6] addressed a low-cost, compact, autonomous water quality monitoring buoy system for coastal aquaculture, which used three temperature sensors, one DO sensor, and one pressure sensor arranged to acquire sensing data and stored in built-in data loggers. Then, the sensing data were manually offloaded to display using SOHO software. Saparudin et al. simply used water temperature sensing to demonstrate a proof-of-concept wireless water quality monitoring system for high density aquaculture [7]. Danh et al. demonstrated an IoT-based water quality monitoring system with the sensing ability of water temperature, pH, DO, and salinity levels for aquaculture [8]. To the best of our knowledge, the published papers are compared and tabulated in Table 1. From the above review, water temperature, pH, DO, EC, and salinity levels are important factors for freshwater aquaculture, and salinity level could be estimated using the EC value using the empirical relationship which is addressed in this work. It should be noted that the work of Zhua et al. [2] did not present the detail about salinity level estimation using the EC value. ZeeBee, Wi-Fi, and coexistent mobile data communication techniques such as GPRS/3G and current 4G/5G could be adopted as a WSN platform. Two types of technologies for the service layer in Internet of Things (IoT) are private intranet [2] and public IoT APIs [4,7,8]. With the ever-increasing developments in WSNs, integrated multiple sensors with commercially available Wi-Fi modules such as ESP-32 featuring cost-effectiveness, compactness, and flexible input/output (I/O) interfaces are commercially available. These motivated us to integrate commercially available temperature/pH/DO/EC sensors and a cost-effective ESP-32 Wi-Fi module to develop a wireless multi-sensor water quality monitoring system for aquaculture in the ThingSpeak IoT API, where the water temperature, pH, DO, EC, and salinity information can be visualized in a user-friendly manner through an online browser or the ThingView APP.
The main contribution of this paper is the integration of the water temperature, pH, dissolved oxygen (DO), and electrical conductivity (EC) sensors with Wi-Fi wireless communication to illustrate and demonstrate the above sensing data and estimated salinity level information by the EC level in the ThingSpeak IoT platform for freshwater aquaculture; this has been illustrated and evaluated with sufficient accuracy and confidence. The remainder of this paper is organized as follows. First, the system design and the related theory are described in Section 2. Section 3 reveals the implementation of the proposed wireless multi-sensor system by integrating temperature, pH, DO, and EC sensors with an ESP-32 Wi-Fi module to provide the above readings and an estimated salinity level for monitoring the water quality of aquaculture. The evaluation results are illustrated in Section 4. Finally, brief conclusions and future works are drawn in Section 5.

2. Wireless Multi-Sensor IoT System Design

As shown in Figure 2, the proposed wireless multi-sensor water quality monitoring system for aquaculture consists of temperature, pH, DO, and EC sensors, an ESP32 Wi-Fi module and Wi-Fi access point (AP), as well as the ThingSpeak IoT API. With the availability of the EC level, the salinity level can be directly estimated and the information on the water temperature, pH, DO, EC, and salinity levels can be simultaneously visualized in the ThingSpeak IoT platform and by the ThingView APP. Accuracy, reliability, easy maintenance, and expandability are essential for the design requirements of the proposed in situ remote aquaculture monitoring system. Therefore, sensors with a high sensitivity should be chosen for data accuracy and confidence. Some parts in the sensor are replaceable, such as the filling solution and electrode probe, lowering maintenance costs. The modularization of the sensors, ESP32 Wi-Fi module, and Wi-Fi AP make the overall system highly reliable and easy to maintain. The proposed system features expandability attributing to both multiple general purpose I/O (GPIO) interfaces in ESP-32 and configurable channels in the ThingSpeak IoT platform.

2.1. Sensors Description for Aquaculture

As shown in Figure 3, the temperature, pH, DO, and EC sensors are integrated in the proposed multi-sensor system. Figure 3a shows a waterproof 1-wire DS18B20 temperature sensor which is a DS18B20 digital thermometer encapsulated in a 6 × 50 cm stainless steel tube with its three pins are jacketed in PVC [9]. The DS18B20 digital thermometer consists of four main data components: (1) a 64-bit lasered ROM; (2) a temperature sensor; (3) nonvolatile temperature alarm triggers TH and TL; and (4) a configuration register. In order to perform accurate temperature conversions, information is sent–received over a 1-wire interface “DQ” with external power input from the other two pin ports: “VDD” and “GND”. Based on such a pin configuration of the DS18B20 digital thermometer, the external power causes other data traffic on the 1-wire “DQ” port during the active conversion time and other DS18B20s to be placed on the same 1-wire bus. The DS18B20 digital temperature probe was adopted to measure the water temperature with a wide range from −55 °C to 125 °C and high accuracy of ±0.5 °C @ −10 °C to 85 °C.
pH is a quantitative unit of measure on a scale of 0 to 14 that describes the degree of acidity or alkalinity of a substance. The formal definition of pH is the negative logarithm of the hydrogen ion concentration [H+], i.e., pH = 10 log([H+]), which is the hydrogen ion activity. As shown in Figure 3b, the pH meter is itself a potentiometer containing both sensing and reference electrodes to read the potential difference between the sensing and reference electrodes. The standard solution of the reference is a liquid with the hydrogen mole concentration of 1 mol/L. To find the effect of temperature on the pH reading, the pH meter with a pH electrode is first calibrated using at least two pH buffers that bracket the pH values of samples. The calibration is programmed with the expected pH values of the pH buffers at different temperatures based on the ISO 10523 standard [10] as shown in Table 2. Furthermore, the relationship between the potential and hydrogen ion activity in the sample, described by the Nernst equation, is given as
E pH = E pH 0 2.3 R T n F l o g ( H + )
where EpH is the total potential (mV) between the sensing and reference electrodes, EpH0 is the standard potential of the reference electrode in the standard solution, R is the gas constant (= 8.314 J K−1 mol−1), T is the temperature (K), n is the number of ion carriers, F is the Faraday constant (= 96,485 C mol−1), and [H+] is the concentration of hydrogen ions in the sensing solution. Taking the hydrogen ions into consideration, the readings relationship between the potential of the pH electrode and pH value can be rewritten as
E pH = E pH 0 + 0.23 γ PH pH
where γpH is the temperature-related compensation factor of the pH reading (in mV/pH). For the temperature of 0 °C, 25 °C, 50 °C, and 100 °C, the values of γpH are 54.20, 59.16, 64.12, and 74.04 mV/pH, respectively. An operational amplifier (OP Amp.) circuit is used to linearly amplify the output voltage of the pH probe as shown in Figure 3b. An Analog pH Sensor/Meter Pro Kit V2 for Arduino with industrial an pH electrode and BNC connector [11] was used to acquire the pH value of the water quality for aquaculture. The analog pH sensor is itself a potentiometer containing both sensing and reference electrodes to read the potential difference between the sensing and reference electrodes. The measuring range of the analog pH sensor is between 0 and 14 with an operation temperature in the range of 55 to 125 °C and an accuracy of ±0.1 (@25 °C).
DO is oxygen (O2) dissolved in water in proportion to the partial pressure of O2 in the atmosphere, which can be expressed as the amount of O2 dissolved per unit volume of water (mg/L). DO level is of upmost importance to a great deal of aquatic life, including fish, invertebrates, bacteria, and plants which make use of oxygen in respiration similar to organisms on land. Bottom feeders, crabs, oysters, and worms have minimal amounts of biological oxygen demand (BOD) (1–6 mg/L), while shallow water fish have higher BOD levels (4–15 mg/L) [12]. It is known that the saturation level of O2 dissolved in pure water at 25 °C and 1 atm (1013 kPa) is 8.11 mg/L. The types of DO sensor can be categorized as electrochemical (such as galvanic or polarographic DO sensors) and optical sensors. The factors of aquatic temperature, salinity, barometric pressure, and flow could affect the electrochemical DO reading; however, only the temperature effect on the DO level is considered due to the temperature sensor being available. A commercially available galvanic DO sensor (Analog Dissolved Oxygen Sensor) with the measurement range of 0–20 mg/L and an operation temperature range between 0 °C and 50 °C was used to measure the aquatic DO level [13]. As shown in Figure 3c, when a galvanic DO sensor is immersed in water, the anode electrode is oxidized and releases electrons and the cathode electrode passes electrons to have a reduction of dissolved oxygen in water. The oxidation and reduction reactions occur as follows.
Anode   oxidation   reaction :   2 Zn 2 Zn 2 + + 4 e
Cathode   reduction   reaction :   O 2 + 4 e + 2 H 2 O 4 OH 4 OH + 2 Zn 2 + 2 Zn ( OH ) 2
Total   reaction :   2 Zn + O 2 + H 2 O 2 Zn ( OH ) 2
The resulting current is proportional to the partial pressure of oxygen, which is calculated by the following equation [14]:
i DO = 4 F μ MB T A MB p O 2 d MB
where μMB(T), AMB, and dMB are the permeability, area, and thickness of the membrane and p O 2 is the partial pressure of O2.
As shown in Figure 3d, EC is a measure of the ability of water to conduct electrical current due to aquatic dissolved and other organic chemicals carrying electrical charges. The EC of aquatic water can be defined as
σ = q i = 1 N μ i + + μ i η i
where q is the electrical charge (=1.602 × 10−19 C), μ i + and μ i are, respectively, the mobility of positively and negatively charged ions, and ηi is the ion concentration. The EC of ions in the aquatic water is highly temperature-dependent as in the electron conductivity of metallic conductors; however, the aquatic EC typically raises with increasing temperature. The temperature-related EC can be described as
σ EC T = σ EC T Ref 1 + γ EC T T Ref
where σEC(T) and σEC(TRef) are, respectively, the EC values for the specific and reference temperatures T and TRef. In addition, γEC is the temperature-related compensation factor which ranges from 3 to 1 and in the most naturally occurring samples of water is about 2%/°C. Having the EC level, the corresponding salinity value can be estimated by the following equation:
η Sal = 640 σ EC T
where σEC(T) is the EC value in mS/cm [15]. For reading the EC value of freshwater aquaculture, an EC sensor (Analog Electrical Conductivity Sensor/Meter V2 (K = 1)) [16] with a measuring range of 0–20 ms/cm, an accuracy of ± 5% F.S., and an operation temperature range between 0 °C and 40 °C was selected. The main specifications of temperature, pH, DO, and EC sensors for the proposed wireless water quality monitoring system are listed in Table 3. Referring to the water quality indicators for aquaculture [17,18], the warning ranges of the corresponding sensors are also predefined and tabulated in Table 3.

2.2. Hardware Description for the Wireless MCU and IoT System

Furthermore, the ESP32 is a successor to the ESP8266, featuring the integration of low-cost, low-power system-on-a-chip (SoC) microcontrollers integrating with Wi-Fi and dual-mode Bluetooth. A commercially available ESP32 module, ESP-WROOM-32, created by Espressif [19], was adopted as the microcontroller platform in charge of receiving the sensing data from the temperature, pH, DO, and EC sensors and forwarding them to the ThingSpeak IoT API through a neighboring Wi-Fi AP. The pin assignments of the ESP-WROOM-32 Wi-Fi module include both the GPIOs and the power supply of 5 VDC and GND for the temperature, pH, DO, and EC sensors as shown in Figure 2. The programmable ESP-WROOM-32 SoC-based microcontroller was designed to feature the functions of both automatic warning and line notify, which can be implemented by the code programming as explained later. The warning ranges of the temperature, pH, DO, and EC sensors are listed in Table 3. For the Wi-Fi AP, its SSID and password are checked in advance and are coded in the software program later.
The open-source IoT application program interface (API), well-known as “ThingSpeak IoT” [20], conveniently provides an IoT platform to store and retrieve sensing data from temperature, pH, DO, and EC sensors using the Message Queuing Telemetry Transport (MQTT) publish–subscribe network protocol and application layer Hypertext Transfer Protocol (HTTP) over the Internet. The ThingSpeak IoT API provides the sensing data logging and update application as well as the geographic information system (GIS) for the location tracking application. The live data streams in the cloud can be further aggregated, visualized, and analyzed using MATLAB software. The hardware implementation of the proposed wireless water quality monitoring system for aquaculture is illustrated in Figure 2.

3. System Implementation

3.1. Hardware Implementation for the Wireless Multi-Sensor IoT System

Figure 2 reveals the hardware implementation for the proposed wireless multi-sensor IoT system for monitoring the water quality of freshwater aquaculture, which consists of DS18B20 temperature, pH, DO, and EC sensors, acquired signal converters, an ESP-WROOM-32 Wi-Fi module and Wi-Fi AP, and the ThingSpeak IoT platform. As shown in Figure 2, the commercially available DS18B20 temperature sensor, Analog pH Sensor, Analog Dissolved Oxygen Sensor, Analog Electrical Conductivity Sensor, and the corresponding signal converters are arranged in parallel to connect with an ESP-WROOM-32 Wi-Fi module which simultaneously provides the 5 VDC and signal ground (GND) for the sensors. In addition, the ESP32 Wi-Fi module further computes the corresponding salinity level by the acquired EC level. Firstly, a 4.7 kΩ resistor is added between the digital signal pin DQ and the 5 VDC power source to make the temperature reading transfer stable as shown in Figure 3a. The reading value of water temperature was further used to automatically compensate the fluctuation output of the pH/DO/EC electrodes. The built-in automatic temperature compensation (ATC) function of the software cost-effectively facilitates the quick and accurate results of pH/DO/EC readings as well as the salinity estimation for in situ application. The BNC connectors for the pH/DO/EC electrodes are directly connected to the corresponding signal conversion transmitters, respectively. The output values are then read by the ESP-WROOM-32 Wi-Fi module. The pin assignment of the ESP-WROOM-32 Wi-Fi module for the temperature, pH, DO, and EC sensors is tabulated in Table 4. The ESP32 Wi-Fi module forwards the data of water temperature, pH, DO, EC, and salinity level through the on-site Wi-Fi AP to the ThingSpeak IoT platform. The information of the water temperature, pH, DO, EC, and salinity level can be visualized by online browsing or by the ThingView APP.

3.2. Software Design for the Wireless Multi-Sensor IoT System

The design of the ESP-WROOM-32 SoC-based microcontroller can be programmed in the same way as Arduino platforms under the open-source Arduino integrated development environment (IDE), which supports the languages C and C++ with specified rules of code structure. After the installation of the CP2102 USB drive and ESP drive files in the Arduino IDE environment, the software for the proposed wireless multi-sensor water quality monitoring system was developed in the same coding configuration in the same platform. After including the associate libraries, accessing the configuration of the ThingSpeak IoT platform, and constant/variable declaration, the Wi-Fi AP access and the start of the pH/DO/EC sensors are initialized. Then, the temperature, pH, DO, and EC sensors begin to visualize the water temperature and pH/DO/EC levels, the corresponding ATC calibrations for the pH/DO/EC readings are conducted, and the salinity level is estimated by the calibrated EC level. The values of water temperature, pH, DO, EC, and salinity levels are sequentially arranged and sent to the predefined channel in the ThingSpeak IoT platform. The visualization of water quality is conducted every 15 min automatically without external interruption. The observations can be visualized in the ThingSpeak IoT Platform as shown in Figure 4. The observation data are analyzed based on the MATLAB environment. The same information can be visualized by the ThingView APP as shown in Figure 5. The flowchart of data acquisition for the proposed wireless multi-sensor module is depicted in Figure 6. It should be noted that the ThingSpeak IoT API provides the line notify function through ThingHTTP Apps online with user-friendly configuration interfaces. In addition, the code for the Line Notify function was directly programmed and downloaded into the ESP-WROOM-32 Wi-Fi module in the proposed water quality monitoring system for freshwater aquaculture.

4. Results and Discussion

In order to double-check the accuracy, confidence, and reliability of the proposed water quality monitoring system for aquaculture, the temperature, pH, DO, and EC sensors were calibrated in advance, then the wireless multi-sensor system conducted an in situ evaluation for 20 consecutive days, and finally the sensors were post-calibrated to check the possible drift in instrument accuracy. The associated processes are described as follows.

4.1. Pre-Calibration Process

Before integrating the temperature, pH, DO, and EC with an ESP-WROOM-32 Wi-Fi module, the sensors can be calibrated in advance. A HEL-711 3-wire Resistance Temperature Detector (RTD) with an accuracy of ±0.3 °C (@ −40 °C to 100 °C) [21] was adopted to calibrate the waterproof DS18B20 temperature sensor. Both the DS18B20 temperature sensor and HEL-711 RTD were put in a cup of distilled water for 24 h with a 10 min sampling rate. In order to calibrate the pH sensor prior to in situ measurement, the Analog pH Sensor was calibrated using three buffer solutions with pH levels of 4.0, 6.86, and 9.18 [10]. The DO value is one of the most important factors for aquatic water quality. Therefore, an optical DO (ODO) sensor (FOPTOD Optical Dissolved Oxygen) with an accuracy of ±0.1 mg/L (@ −40 °C to 100 °C) [22] was used to calibrate the DO sensor. The Analog EC Sensor was calibrated using two conductivity solutions of 1413 μS/cm and 12.88 mS/cm [13]. The accuracy and confidence of the estimated salinity level was evaluated as compared to the measurement result by an in situ, commercially available salinity sensor [23].
The observation of the sensors with pH/EC buffer solutions and instruments at a 1 min sampling period for 24 h measurement is depicted in Figure 7. Taking the pH/EC buffer solutions and the measurement results of the calibration instruments as references, the relative difference between the measurement and calibration results is defined as
e i j = x i j x ¯ i j
where x i j and x ¯ i j are the jth measurement values of the multi-sensor module and measurement instruments and i = T (temperature); pH, DO, EC, and salinity. The performance indexes of both the mean absolute error (MAE) and root mean square error (RMSE) for accuracy analysis are defined as
MAE i = 1 N j = 1 N x i j x ¯ i j
and
RMSE i = 1 N j = 1 N x i j x ¯ i j 2
where N is the observation number. As shown in Figure 7a, the reading difference between the DS18B20 temperature sensor and HEL-711 RTD ranged from −0.10 °C to 0.10 °C, and the corresponding MAE and RMSE values were 0.0331 °C and 0.0403 °C, respectively. This means that the DS18B20 waterproof temperature sensor, compared to the RTD sensor, has enough confidence in the operation environment of freshwater aquaculture with an accuracy of ≤±0.5 °C. Taking the pH buffer solutions of 4.0, 6.86, and 9.18 as references, the difference comparisons for the analog pH sensor were in the ranges of −0.26–0.31, −0.20–0.16, and −0.31–0.23, respectively. Furthermore, the corresponding MAE and RMSE (MAE/RMSE) values were 0.0889/0.1094, 0.0624/0.0755, and 0.0920/0.1119, respectively. From the above accuracy analysis with pH buffer solutions, the analog pH sensor has better performance for freshwater aquaculture, which is caused by the offset voltage being near the pH level of 7.0. As compared with the FOPTOD ODO, the difference range for the galvanic DO sensor ranged from −0.10 mg/L to 0.10 mg/L; moreover, the corresponding MAE and RMSE values were 0.0339 mg/L and 0.0414 mg/L, respectively. The better performance of the galvanic DO sensor was attributed to the static flow of water. Referring to both EC buffer solutions of 1413 μS/cm and 12.88 mS/cm, the differences for the analog EC sensor were in the range of −0.19–0.17 mS/cm and −0.28–0.26 mS/cm, respectively. In addition, the corresponding MAE and RMSE (MAE/RMSE) values were 0.0574/0.0698 mS/cm and 0.0882/0.1082 mS/cm, respectively. With reference to the measurement results of the EC sensor and EC buffer solution of 1413 μS/cm, the estimated salinity results were compared to the measurement ones by a Vernier Salinity Sensor. The salinity differences between the estimated and measured results ranged from −10 ppm to 9 ppm, and the corresponding MAE and RMSE values were 3.0285 ppm and 3.6451 ppm, respectively. It should be noted that the salinity level can be estimated in a cost-effective manner with sufficient accuracy by the EC sensor for freshwater aquaculture based on Equation (9). The accuracy analysis results between the proposed multi-sensor module and measurement instruments in the pre-calibration process are tabulated in Table 5. The results show that these relative differences are all small enough to be acceptable as compared to the accuracy of the measurement instruments. These illustrate the reading accuracy and measurement confidence of the proposed multi-sensor system.

4.2. In Situ Monitoring Results

In order to evaluate the performance of the proposed wireless multi-sensor water quality monitoring system for aquaculture, a consecutive 20-day in situ evaluation was conducted in the H715 Lab. Room, Da-Yen University in Taiwan on 1 August to 20 August 2021. All on-site observations of water temperature, pH, DO, and EC were acquired at a 10 min interval. The measured data and the estimated salinity level were sent to a local Wi-Fi AP by the ESP-WROOM-32 Wi-Fi module and were further transmitted to the ThingSpeak IoT platform (Channel ID:1408273, available online: https://thingspeak.com/channels/1408273, accessed on 27 November 2021). Figure 8a shows a small variation in water temperature measurement at about 25.1 °C. Taking the average of water temperature as a reference, the variation range of the water temperature was in the range of −3.1 °C to −3.4 °C, which could be caused by environmental disturbances the temperature sensor worsened The extension of the min–max difference between the measured and mean temperature caused the corresponding MAE and RMSE values to increase (MAET = 0.0961 °C, RMSET = 0.0961 °C). The pH level as shown in Figure 8b slightly increases as the measurement process progresses, which could be caused by the natural evaporation of water. Therefore, the circulation and supplement of water for aquaculture is of importance to maintain the aquatic pH level. The difference between the measured and mean pH level ranged from −0.20 to 0.20, and the corresponding MAE and RMSE values were 0.0640 and 0.0782, respectively. Furthermore, the measurement results in Figure 8c illustrate that the water quality naturally declines, with the DO level descending without external aeration. Figure 8d presents the low EC level of freshwater and the satisfactory performance of the analog EC sensor. The average EC level of the freshwater was 0.7239 mS/cm, the difference between the measured and mean EC level and was in the range of −0.18 ms/cm to 0.18 ms/cm, and the corresponding MAE and RMSE values were 0.0571 ms/cm and 0.0694 ms/cm, respectively. The EC has a sufficient accuracy for freshwater aquaculture;
Figure 8e demonstrates an accurate and confident estimation for the aquatic salinity. The average salinity level of the freshwater was 464 ppm, the difference range between the measured and mean EC level was ±2 ppm, and the corresponding MAE and RMSE values were 0.5337 ppm and 0.7557 ppm, respectively. The accuracy analysis for temperature, pH, DO, EC, and salinity level for the in-situ measurement is listed in Table 6. The in situ measurements with a sampling rate of 10 min intervals for 20 continuous days have demonstrated the accuracy, confidence, and durability of the proposed multi-sensor wireless IoT water quality monitoring system for freshwater aquaculture.

4.3. Post-Calibration Results

After the 20-day on-site monitoring process, the proposed wireless multi-sensor system was calibrated with the same temperature, pH, ODO, EC, and salinity sensors as illustrated in the pre-calibration process. In order to verify the reliability and confidence of the proposed multi-sensor system, the post-calibration process was carried out for freshwater aquaculture at the same environment and conditions for each sensor. The measurement results for both the multi-sensor module and measurement instruments are depicted in Figure 9. During the 20-day measurement from 1 August to 20 August 2021, only ambient temperature was controlled at 25 °C Figure 9 depicts continuous 24 h readings for 10 days from 10 August 2021 to monitor the water quality of the in situ aquaculture. As compared to those in Figure 7, there are no obvious differences existing for the water temperature, pH, DO, EC, and salinity readings. The details of sensing differences are also listed in Table 7, and the differences are highlighted in blue. Both MAE and RMSE for the B18D20 temperature sensor are slightly rising. The variation of the difference in pH level decreases by a small margin. In addition, the differences for both the EC sensor and salinity estimation have a slight increase.

4.4. Discussion

In order to easily assess the accuracy of the proposed wireless multi-sensor IoT system, the difference between the measurement results of the proposed multi-sensor system and commercial sensors in pre-calibration and post-calibration processes are shown in Figure 7 and Figure 9. The corresponding performance measures of MAE and RMSE were adopted to evaluate the accuracy. The MAE is a linear score, which means that all the individual differences are weighted equally in the average. On the other hand, The RMSE is a quadratic scoring rule which measures the average magnitude of the differences. Since the differences are squared before they are averaged, the RMSE gives a relatively high weight to large ones. This means the RMSE is the most useful measure when large differences are particularly undesirable.
Even having sufficient performance in the electrical characteristics, the possible contamination in the electrodes of individual sensors could be caused by buffer solutions and freshwater. The cleaning and proper care after measurement are of great importance for both the measurement accuracy and longevity of sensors. The possible variation effect caused by the buffer solutions and aquatic corrosion on the multi-sensor system was verified by the post-calibration. The results found that no possible pollution is caused by the proposed multi-sensor module after pre-calibration and in situ measurement. Self-cleaning and optimal care for versatile aquatic sensors will be designed in the future. The aging issue and maintenance of the proposed multi-sensor system could be further verified and pre-defined.

5. Conclusions

A wireless multi-sensor Internet of Things (IoT) system which integrates water temperature, pH, dissolved oxygen (DO), and electrical conductivity (EC) sensors with Wi-Fi wireless communication and demonstrates the above sensing data and an estimated salinity level by the EC level in the ThingSpeak IoT platform for freshwater aquaculture has been illustrated and evaluated with sufficient accuracy and confidence. The proposed multi-sensor IoT system has the good tolerance performance of sterile cultivation for freshwater aquaculture. From the viewpoint of smart aquaculture, the proposed wireless multi-sensor IoT system features (1) a much simpler set-up and maintenance and more cost-effectiveness than multiple single sensors without external sample-taking instruments and wiring; (2) sufficient accuracy and reliability with pre-calibration even for commercialized sensor devices; and (3) simultaneous on-site monitoring of multiple sensing parameters in close proximity to an aquatic cultivation field over weeks or even months and a substantially cost-effective improvement in labor cost. Thanks to the promising development of precision agriculture, the proposed IoT platform will provide a flexible and expandable biotechnology development to simultaneously monitor a wide range of cultivation parameters in agricultural with transparency and quality control through the whole process. The issues of ageing and maintenance requirements of aquatic sensors will be further considered for measurement robustness and user-friendliness.

Author Contributions

Conceptualization, J.-Y.L. and H.-L.T.; methodology, J.-Y.L. and H.-L.T.; software, J.-Y.L. and W.-H.L.; validation, J.-Y.L. and H.-L.T.; formal analysis, J.-Y.L. and H.-L.T.; investigation, J.-Y.L. and H.-L.T.; resources, J.-Y.L. and H.-L.T.; data curation, J.-Y.L. and W.-H.L.; writing—original draft preparation, H.-L.T. and J.-Y.L.; writing—review and editing, H.-L.T.; visualization, J.-Y.L.; supervision, J.-Y.L. and W.-H.L.; project administration, H.-L.T.; funding acquisition, H.-L.T. All authors have read and agreed to the published version of the manuscript.

Funding

The authors gratefully acknowledge the financial support by the project MOST 110-2622-B-212-003 from the Ministry of Science and Technology of the Republic of China.

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

Not applicable.

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. Food and Agriculture Organization of the United Nations (FAO). The State of World Fisheries and Aquaculture 2020; Food and Agriculture Organization of the United Nations (FAO): Roma, Italy, 2020. [Google Scholar] [CrossRef]
  2. Zhua, X.; Lia, D.; Heb, D.; Wanga, J.; Maa, D.; Li, F. A remote wireless system for water quality online monitoring in intensive fish culture. Comput. Electron. Agric. 2010, 71S, S3–S9. [Google Scholar] [CrossRef]
  3. Zhang, S.Y.; Li, G.; Wua, H.B.; Liu, X.G.; Yao, Y.H.; Tao, L.; Liu, H. An integrated recirculating aquaculture system (RAS) for land-based fish farming: The effects on water quality and fish production. Aquacult. Eng. 2011, 45, 93–102. [Google Scholar] [CrossRef]
  4. Odey, A.J.; Li, D. AquaMesh—design and implementation of smart wireless mesh sensor networks for aquaculture. Am. J. Netw. Commun. 2013, 2, 81–87. [Google Scholar] [CrossRef] [Green Version]
  5. Simbeye, D.S.; Yang, S.F. Water quality monitoring and control for aquaculture based on wireless sensor networks. J. Netw. 2014, 9, 840–849. [Google Scholar] [CrossRef]
  6. Schmidt, W.; Raymondb, D.; Parishb, D.; Ashton, I.G.C.; Millerc, P.I.; Camposd, C.J.A.; Shutler, J.D. Design and operation of a low-cost and compact autonomous buoy system for use in coastal aquaculture and water quality monitoring. Aquacult. Eng. 2018, 80, 28–36. [Google Scholar] [CrossRef] [PubMed]
  7. Saparudin, F.A.; Chee, T.C.; Ab Ghafar, A.S.; Majid, H.A.; Katiran, N. Wireless water quality monitoring system for high density aquaculture application. Indones. J. Electr. Eng. Comput. Sci. 2019, 13, 507–513. [Google Scholar] [CrossRef]
  8. Danh, L.V.Q.; Dung, D.V.M.; Danh, T.H.; Ngon, N.C. Design and deployment of an IoT-based water quality monitoring system for aquaculture in Mekong Delta. Int. J. Mech. Eng. Robot. Res. 2020, 9, 1170–1175. [Google Scholar] [CrossRef]
  9. Quick-Teck. DS18B20 Waterproof Temperature Sensor. Available online: https://www.quick-teck.co.uk/Management/EEUploadFile/1420644897.pdf (accessed on 7 July 2021).
  10. International Organization of Standards (ISO). ISO 10523 Water Quality Determination of pH; International Organization of Standards (ISO): Geneva, Switzerland, 2008. [Google Scholar]
  11. DFRobot. Analog pH Sensor/Meter Kit V2. Available online: https://media.digikey.com/pdf/Data%20Sheets/DFRobot%20PDFs/SEN0161-V2_Web.pdf (accessed on 21 March 2021).
  12. Environmental Protection Administration (EPA) United States. Chesapeake Bay Total Maximum Daily Load for Nitrogen, Phosphorus and Sediment. 29 December 2010, pp. 3–9, 3–10. Available online: https://www.epa.gov/sites/default/files/2014-12/documents/cbay_final_tmdl_exec_sum_section_1_through_3_final_0.pdf (accessed on 7 July 2021).
  13. DFRobot. Analog Dissolved Oxygen Sensor/Meter Kit for Arduino. Available online: https://media.digikey.com/pdf/Data%20Sheets/DFRobot%20PDFs/SEN0237-A_Web.pdf (accessed on 21 March 2021).
  14. Fondriest Environmental, Inc. “Measuring Dissolved Oxygen.” Fundamentals of Environmental Measurements. 2014. Available online: https://www.fondriest.com/environmental-measurements/measurements/measuring-water-quality/dissolved-oxygen-sensors-and-methods/ (accessed on 7 July 2021).
  15. Richards, L.A. (Ed.) Diagnosis and Improvement of Saline and Alkali Soils; United States Salinity Laboratory Staff: Riverside, CA, USA, 1954; pp. 16–17. [Google Scholar]
  16. DFRobot. Analog Electrical Conductivity Sensor/Meter (K = 1). Available online: https://media.digikey.com/pdf/Data%20Sheets/DFRobot%20PDFs/DFR0300-H_Web.pdf (accessed on 21 March 2021).
  17. Environmental Protection Administration (EPA) United States. Indicators Used in the National Aquatic Resource Surveys. Available online: https://www.epa.gov/national-aquatic-resource-surveys/indicators-used-national-aquatic-resource-surveys (accessed on 14 May 2021).
  18. Swann, L. A Fish Farmer’s Guide to Understanding Water Quality. Available online: https://southcenters.osu.edu/sites/southc/files/site-library/site-images/FishFarmersGuideToWaterQuality.pdf (accessed on 7 July 2021).
  19. Espressif Systems. ESP32 Series Datasheet, Ver. 3.7. 2021. Available online: https://www.espressif.com/sites/default/files/documentation/esp32_datasheet_en.pdf (accessed on 14 May 2021).
  20. ThingSpeak. Available online: https://thingspeak.com/channels/1408273 (accessed on 14 May 2021).
  21. Honeywell. Thin Film Platinum RTDs: HEL-700 Series. Available online: https://sensing.honeywell.com/honeywell-sensing-hel-700-series-thin-film-platinum-rtd-productsheet-009080-1-en.pdf (accessed on 14 May 2021).
  22. FOPTOD. FOPTOD Optical Dissolved Oxygen. Available online: http://www.jetec.com.tw/pdf/6/english/FOPTOD_E_data.pdf (accessed on 14 May 2021).
  23. Vernier. Salinity Sensor. Available online: https://www.vernier.com/files/manuals/sal-bta/sal-bta.pdf (accessed on 14 May 2021).
Figure 1. Global fish production of capture fisheries and aquaculture.
Figure 1. Global fish production of capture fisheries and aquaculture.
Sensors 21 08179 g001
Figure 2. System schematic of wireless multi-sensor water quality monitoring system.
Figure 2. System schematic of wireless multi-sensor water quality monitoring system.
Sensors 21 08179 g002
Figure 3. Schematics of sensors: (a) DS18B20 temperature sensor; (b) pH sensor; (c) DO sensor; and (d) EC sensor.
Figure 3. Schematics of sensors: (a) DS18B20 temperature sensor; (b) pH sensor; (c) DO sensor; and (d) EC sensor.
Sensors 21 08179 g003
Figure 4. Snapshot of ThingSpeak IoT for water quality monitoring system.
Figure 4. Snapshot of ThingSpeak IoT for water quality monitoring system.
Sensors 21 08179 g004
Figure 5. Snapshot of ThingView APP for water quality monitoring system.
Figure 5. Snapshot of ThingView APP for water quality monitoring system.
Sensors 21 08179 g005
Figure 6. Flowchart of wireless multi-sensor module.
Figure 6. Flowchart of wireless multi-sensor module.
Sensors 21 08179 g006
Figure 7. The 24 h measurement results of pre-calibration process: (a) DS18B20 temperature sensor vs. HEL-711 RTD; (b) pH sensor vs. pH 4.4 buffer solution; (c) pH sensor vs. pH 6.86 buffer solution; (d) pH sensor vs. pH 9.0 buffer solution; (e) DO sensor vs. FOPTOD ODO; (f) EC sensor vs. EC 1413 μS/cm solution; (g) EC sensor vs. EC 12.88 mS/cm solution; and (h) salinity estimation vs. Vernier salinity sensor.
Figure 7. The 24 h measurement results of pre-calibration process: (a) DS18B20 temperature sensor vs. HEL-711 RTD; (b) pH sensor vs. pH 4.4 buffer solution; (c) pH sensor vs. pH 6.86 buffer solution; (d) pH sensor vs. pH 9.0 buffer solution; (e) DO sensor vs. FOPTOD ODO; (f) EC sensor vs. EC 1413 μS/cm solution; (g) EC sensor vs. EC 12.88 mS/cm solution; and (h) salinity estimation vs. Vernier salinity sensor.
Sensors 21 08179 g007aSensors 21 08179 g007b
Figure 8. The 10-day in situ measurement results: (a) water temperature; (b) pH level; (c) DO level; (d) EC level; and (e) salinity level.
Figure 8. The 10-day in situ measurement results: (a) water temperature; (b) pH level; (c) DO level; (d) EC level; and (e) salinity level.
Sensors 21 08179 g008
Figure 9. The 24 h measurement results of post-calibration process: (a) temperature; (b) pH level; (c) DO level; (d) EC level; and (e) salinity level.
Figure 9. The 24 h measurement results of post-calibration process: (a) temperature; (b) pH level; (c) DO level; (d) EC level; and (e) salinity level.
Sensors 21 08179 g009
Table 1. Comparisons of water quality monitoring systems for aquaculture.
Table 1. Comparisons of water quality monitoring systems for aquaculture.
No.SensorsProcessorCommunicationInformation PlatformReferences
TpHDOECTDORPSal
1211100*PICNIC 2.0CDMAIntranet
Platform
Zhua et al. (2010)
21111000Multimeter××Zhang et al. (2011)
31111000WastmodeZeeBee/WiFi/GPRSDiGi InternationalOdey & Li (2013)
41110000ATMegaZeeBeeLabVIEWSimbeye & Yang (2018)
53010000DatalogerManual offloadHOBO Schmidt et al. (2019)
61101011Raspberry PiWiFi/CDMAThingSpeakSaparudin et al. (2019)
71110010Embeded MCURoLa/WiFiThingSpeakDahn et al. (2020)
81111001ESP-32WiFiThingSpeakProposed
Table 2. Look-up table for temperature-related modification of pH buffer solutions.
Table 2. Look-up table for temperature-related modification of pH buffer solutions.
pHpH Buffer Solutions @25 °C
°C1.684.016.867.009.1810.1012.46
01.674.016.987.129.4610.3213.47
51.674.016.957.099.3910.2513.25
101.674.006.927.069.3210.1813.03
151.674.006.907.049.2710.1212.83
201.684.006.887.029.2210.0612.64
251.684.016.867.009.1810.0112.46
301.694.016.856.989.149.9712.29
351.694.026.846.989.109.9312.14
401.704.036.846.979.079.8911.99
451.704.046.836.979.049.8611.86
501.714.066.836.979.019.8311.73
551.724.086.836.978.999.8111.61
Table 3. Main specification and warning range of aquatic sensors.
Table 3. Main specification and warning range of aquatic sensors.
SensorsMeasuring RangeMeasuring AccuracyOperating TemperatureWarning Range
Temperature−55–125 °C±0.5 °C @ −10–85 °C−55–125 °C≤0 °C or ≥40
pH0–14±0.1 @ 25 °C0–60 °C<6.5 or >8.5
DO0–20 mg/LNA0–50 °C≤6 mg/L
EC0–20 mS/cm±5% F.S.0–40 °C≥5 mS/cm
Table 4. Pin assignment of ESP32 Wi-Fi module for proposed multi-sensor system.
Table 4. Pin assignment of ESP32 Wi-Fi module for proposed multi-sensor system.
Pin No.Pin FunctionFunctionRemark
3GPIO36 (ADC0)pH readingInput only
4GPIO39 (ADC3)DO readingInput only
5GPIO34 (ADC6)EC readingInput only
6GPIO35 (ADC7)Temperature readingInput only
14GNDGround
195 VDCPower supply
Table 5. Accuracy analysis of water temperature, pH, DO, and EC, and salinity levels for pre-calibration.
Table 5. Accuracy analysis of water temperature, pH, DO, and EC, and salinity levels for pre-calibration.
ItemsReferenceAccuracy Analysis
Difference RangeMAERMSE
Temperature sensorHEL-711 RTD−0.10–0.10 °C0.0331 °C0.0403 °C
pH sensorpH 4.0 buffer solution−0.26–0.310.08990.1094
pH 6.86 buffer solution−0.20–0.160.06240.0755
pH 9.18 buffer solution−0.31–0.230.09200.1119
DO sensorFOPTOD ODO−0.10–0.10 mg/L0.0339 mg/L0.414 mg/L
EC sensor1413 μS/cm
conductivity solution
−0.19–0.17 mS/cm0.0574 mS/cm0.0698 mS/cm
12.88 mS/cm
conductivity solution
−0.28–0.26 mS/cm0.0882 mS/cm0.1082 mS/cm
Salinity estimationVernier Salinity Sensor−10–9 ppm3.0285 ppm3.6451 ppm
Table 6. Accuracy analysis of water temperature, pH, DO, and EC, and salinity levels for in situ measurement.
Table 6. Accuracy analysis of water temperature, pH, DO, and EC, and salinity levels for in situ measurement.
ItemsAccuracy Analysis
MeanDifference RangeMAERMSE
Temperature sensor25.0951 °C−0.31–0.34 °C0.0961 °C0.1178 °C
pH sensor7.1755−0.20–0.200.06400.782
DO sensor9.5228 mg/L−0.35–0.33 mg/L0.0990 mg/L0.1217 mg/L
EC sensor0.7923 mS/cm−0.18–0.18 mS/cm0.0571 mS/cm0.0694 mS/cm
Salinity estimation464 ppm−2–2 ppm0.5337 ppm0.7557 ppm
Table 7. Accuracy analysis of water temperature, pH, DO, and EC, and salinity levels for post-calibration.
Table 7. Accuracy analysis of water temperature, pH, DO, and EC, and salinity levels for post-calibration.
ItemsReferenceAccuracy Analysis
Difference RangeMAERMSE
Temperature sensorHEL-711 RTD−0.10–0.10 °C0.0339 °C0.0417 °C
pH sensorpH 6.86 buffer solution−0.23–0.150.06030.0738
DO sensorFOPTOD ODO−0.10–0.10 mg/L0.0329 mg/L0.401 mg/L
EC sensor1413 μS/cm
conductivity solution
−0.19–0.17 mS/cm0.0574 mS/cm0.0698 mS/cm
Salinity estimationVernier Salinity Sensor−10–10 ppm2.9743 ppm3.6078 ppm
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Share and Cite

MDPI and ACS Style

Lin, J.-Y.; Tsai, H.-L.; Lyu, W.-H. An Integrated Wireless Multi-Sensor System for Monitoring the Water Quality of Aquaculture. Sensors 2021, 21, 8179. https://doi.org/10.3390/s21248179

AMA Style

Lin J-Y, Tsai H-L, Lyu W-H. An Integrated Wireless Multi-Sensor System for Monitoring the Water Quality of Aquaculture. Sensors. 2021; 21(24):8179. https://doi.org/10.3390/s21248179

Chicago/Turabian Style

Lin, Jen-Yung, Huan-Liang Tsai, and Wei-Hong Lyu. 2021. "An Integrated Wireless Multi-Sensor System for Monitoring the Water Quality of Aquaculture" Sensors 21, no. 24: 8179. https://doi.org/10.3390/s21248179

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop