Application of the internet of things technology (IoT) in designing an automatic water quality monitoring system for aquaculture ponds

ISSN 2588-1299  
VJAS 2020; 3(2): 624-635  
Vietnam Journal  
of Agricultural  
Sciences  
Application of the Internet of Things  
Technology (Iot) in Designing an Automatic  
Water Quality Monitoring System for  
Aquaculture Ponds  
Nguyen Quang Huy1, Vu Thi Thu Giang2, Le Vu Quan1 & Ho The  
Vo Cuong1  
1Faculty of Engineering, Vietnam National University of Agriculture, Hanoi 131000,  
Vietnam  
2Faculty of Information Technology, Vietnam National University of Agriculture, Hanoi  
131000, Vietnam  
Abstract  
The current paper aims to apply the Internet of Things technology  
(IoT) in designing an automatic system for measuring and monitoring  
important parameters of aquaculture ponds such as temperature, pH,  
and dissolved oxygen (DO). The system includes the Arduino Nano  
main microcontroller (the device that transmits and pushes data to the  
Raspberry Pi 3 Web server), the DS18B20 temperature sensor  
module, the pH sensor module V1.1, and the DO Sensor SKU  
SEN0237. The system is capable of continuously measuring the  
above parameters of aquaculture ponds. The measurement results are  
stored and transmitted wirelessly to smart devices such as computers  
and mobile phones. Farmers can continuously monitor water quality  
parameters of aquaculture ponds (pH, DO, temperature) through  
these smart devices. In addition, a warning message will be sent to  
the farmer's phone when the DO index of the aquaculture pond falls  
below the prescribed level. The results of the test evaluation also  
show the high accuracy of the system when compared with the  
sample measuring device. All relative errors are satisfied less than  
the limit value of 5%.  
Keywords  
IoT, Arduino Nano Micro, Raspberry, sensor, pond monitoring  
Introduction  
Vietnam is a country with a dense system of rivers and long  
seaways, which is very convenient for developing fishing and  
aquaculture activities. According to data from the Vietnam  
Association of Seafood Exporters and Producers (2020), Vietnam's  
seafood production has maintained continuous growth over the past  
17 years with an average increase of 9.07% per year. With the  
Received: April 12, 2020  
Accepted: July 31, 2020  
Correspondence to  
624  
Vietnam Journal of Agricultural Sciences  
Nguyen Quang Huy et al. (2020)  
Vietnamese government’s policy of  
promoting the development of the aquaculture,  
aquaculture activities have made strong  
development steps, the output from aquaculture  
activities has continuously increased over the  
years with an average of 12.77% increase per  
year, making a significant contribution to the  
growth of the country's total fishery output.  
According to a report by the General Department  
of Fisheries (2020), the value of fishery  
production in 2018 reached about VND  
228,139.8 billion, an increase of 7.7% as  
compared to 2017. The total output reached  
about 7.74 million tons, an increase of 7.2%, of  
which fishing output reached 3.59 million tons,  
up 6.0%, aquaculture reached 4.15 million tons,  
up 8.3%, respectively.  
exceeds the threshold limits, aquatic animals will  
be affected. For example, low DO in the water  
will lead to difficulty in breathing for aquatic  
organisms which may threaten their lives.  
Therefore, it is imperative to control all water  
quality indicators and have timely treatments to  
ensure they are within the threshold limits.  
Among the above water quality indicators,  
there are some fast-changing indicators  
(continuously changing during the day) such as  
DO, pond temperature, and pH. These indicators  
need to be tracked and monitored all the time of  
the day. The remaining indicators, due to the low  
speed of change, can be monitored by test kits  
(KIT) or hand-held meters to reduce the  
investment cost for the monitoring system. Table  
1 presents the limit of DO thresholds for some  
aquatic animals.  
Water quality in aquaculture ponds plays a  
crucial role in the growth and development of  
aquatic animals. Indicators that directly influence  
water quality in aquaculture ponds are DO  
concentration, temperature, pH, NH3, Nitrite,  
H2S, alkalinity, salinity, mineral concentration,  
nitrate concentration, phosphorus concentration,  
bacterial density, and algae density, etc. All of  
these indicators must be within the threshold  
limits. As long as one of the above indicators  
Recently, in Vietnam, the indicators of water  
quality of aquaculture ponds are mainly  
measured by hand-held meters as shown in  
Figure 1. These methods are not very effective  
since they must use manpower and can only be  
conducted manually a few times a day.  
Therefore, the water quality parameters of  
the pond are not monitored continuously and  
may have brought inaccurate information.  
Table 1. Threshold limits of DO of some aquatic animals (Vietnam Fisheries Society, 2018)  
Critical limit of dissolved oxygen  
Aquatic animal  
(mg L-1)  
Dead zone (mg L-1)  
Coldwater fish  
Warmwater fish  
Shrimp  
5.0 - 6.0  
4.0 - 5.0  
3.0 - 4.0  
2.5 - 3.5  
1.0 - 2.0  
0.5 - 1.0  
Figure 1. Some types of equipment for measuring DO in aquaculture ponds (Baonghean, 2020)  
625  
Application of the Internet of Things technology in designing an automatic water quality monitoring system for aquaculture ponds  
Currently, the strong development of science  
and technology, especially the Internet of Things  
(IoT) and computer science, has led to the  
introduction of wireless measuring devices and  
sensor networks (Wireless sensor networks). IoT  
is a highly promising technology that is offering  
many innovative solutions to modernize the  
agriculture sector. Throughout the world, IoT  
and wireless technologies have been studied and  
applied in many different fields of agriculture  
such as farms and growers, fisheries, animal  
husbandry, and agribusiness supply chains.  
Existing research in this field has usually focused  
on measurement and monitoring of production  
environment parameters (Akhmetov & Aitimov,  
2015; Ran, 2014), precision agriculture (Lin,  
2015), improving product quality (Athanasios &  
Charalampos, 2010), and building a data  
management system forensuring food safety  
(Liu, 2015).  
(smartphones) or computers. Moreover, the  
system is also able to send warning messages to  
farmers immediately when the water quality  
indicators of the ponds are below the threshold  
limits.  
Materials and Methods  
Overall structure of the system  
The ovarall structure of the automatic  
measurement and monitoring system of the  
parameters in aquaculture ponds is illustrated in  
Figure 2.  
The indicators of the aquaculture ponds such  
as temperature, pH, and DO are measured by  
sensors and then converted into voltage signals  
that are sent to the Arduino Nano central  
microcontroller. The microcontroller processes  
signals according to the installation algorithm,  
the data is then transferred to the Raspberry Pi3  
block where the data is processed and pushed to  
the Web server. Users can use computers or  
smartphones with a network connection to track  
and monitor the parameters of aquaculture  
ponds, such as temperature, pH, and DO  
concentration, through the ThingSpeak interface.  
Besides, when the DO level in the pond falls  
below the threshold limit, the system will send a  
warning message to the farmer's phone via a SIM  
900 A module and turn on the aerator to timely  
supply additional DO to the pond.  
In Vietnam, the application of IoT  
technology in agricultural production has been  
initially researched and sporadically conducted.  
Binh & Tri (2016) presented the simulation of  
measuring environment temperature in ponds  
using Matlab programming language. In their  
work, they build a virtual pond combining  
DS18B20 temperature sensor with Arduino  
microcontroller circuit and MATLAB software,  
and then create a tool to collect, store, and  
retrieve temperature data in a 3D environment of  
the virtual pond. In the study by Duy et al.  
(2015), the authors have initially applied sensors  
and controllers to monitor the parameters of the  
pond environment; however, the results are  
limited in monitoring some parameters such as  
temperature, pH, and light intensity. The very  
important DO concentration was missing in their  
work. Moreover, the results have not been  
recorded and there have been no timely warnings  
to farmers when pond water quality indicators  
fall below threshold limits.  
Materials to design an automatic system of  
measuring and monitoring parameters in  
aquaculture ponds  
Sensors used to measure parameters in  
aquaculture ponds  
DS18B20 temperature sensor  
To measure water temperature in  
aquaculture ponds, we used the DS18B20 sensor  
as shown in Figure 3. This is a MAXIM high  
resolution (12bit) temperature sensor, capable of  
Water resistant, with stainless compact design.  
The construction consists of a transducer  
immersed in water and an output consisting of 3  
pins directly connected to the central control  
board.  
The above limitations motivated us to  
conduct our study. The aim of our work was to  
apply Internet of Things in measuring important  
indicators of the pond environment automatically  
and continuously. More specifically, in our  
system, DO, pH, and pond temperature are stored  
and transmitted wirelessly to smart devices  
Specifications  
Vietnam Journal of Agricultural Sciences  
626  
Nguyen Quang Huy et al. (2020)  
Power input: 3.0 to 5.5V  
pH sensor  
To measure the pH level of the water in the  
ponds, we used the pH sensor module V1.1 of  
Gizmo Mechatronix central as presented in  
Figure 4. The main construction of the sensor  
consists of a pH probe and a signal conditioning  
board which gives an output that is proportional  
to the pH value and can be interfaced directly  
with any Micro-controller.  
Usable temperature range: -55 to 125°C (-67  
to +257°F)  
Accuracy: ±0.5°C accuracy from -10 to  
+85°C  
Selectable resolution: 9-12 bits  
Query time: less than 750ms  
Diameter of the tube: 6mm  
Specifications  
Communication: 1-Wire interface- requires  
only one digital pin  
Power Input: 5VDC  
Working Current: 5 to 10mA  
Power Consumption: 0.5W  
Output: 3 wires - Red connects to 3-5V,  
Black connects to ground, and Yellow is for data  
DISSOLVED  
OXYGEN  
SENSOR  
TEMPERATURE  
SENSOR  
pH-  
SENSOR  
INTERMEDIATE  
RELAY  
MODULE SIM  
900A  
THE CENTRAL CONTROL  
BOARD ARDUINO NANO  
RASPBERRY PI 3  
DISSOLVED  
OXYGEN AERATOR  
WEB SERVER  
SMART PHONE  
COMPUTER  
Figure 2. Structure diagram of the automatic system of measuring and monitoring parameters in aquaculture ponds  
Figure 3. The DS18B20 temperature sensor (Getblocky, 2020)  
627  
Application of the Internet of Things technology in designing an automatic water quality monitoring system for aquaculture ponds  
Response time: 5s  
response time is 90s, the working pressure range  
is 0-50Psi, and the connecting cable length is 2m.  
The second one is a 42x32mm signal converter  
board which is plug and play and has good  
compatibility. It can be easily integrated into any  
control or detecting system, the operating voltage  
is 3.3-5V, an the output signal is 0-3V.  
Detection Concentration Range: 0 to 14  
Output: Analog  
PCB Dimensions: 42 x 32mm  
Working Temperature: -10 to +50oC.  
Dissolved Oxygen (DO) sensor  
Central control board  
The DO indicator in water plays a vital role  
in the development of aquatic animals. To  
measure this indicator, we used DO sensor  
module SKU SEN0237 developed by DFRobot  
as shown in Figure 5.  
The central control board receives data from  
the sensors, implements control algorithms, and  
communicates with modules such as Raspberry  
and sim module. In our work, we use the Arduino  
Nano board. It is a small, complete, and  
breadboard-friendly board based on the  
microcontroller ATmega328P (Arduino Nano  
3.x). It offers similar connectivity and  
specifications to the Arduino Uno Rev3 and  
works with a Mini-B USB cable instead of a  
There are two main components of this  
sensor. The first one is a galvanic probe, no need  
for polarization time, and stays available at any  
time. The filling solution and membrane cap are  
replaceable, meaning low maintenance costs.  
The DO measuring range is 0-20 mg L-1, the  
Figure 4. The pH sensor (Bo-cam-bien-do-do-ph-6060476, 2020)  
Figure 5. The Dissolved Oxygen (DO) sensor (mlab, 2020)  
Vietnam Journal of Agricultural Sciences  
628  
Nguyen Quang Huy et al. (2020)  
The Raspberry Pi 3 Model B+, as in Figure  
6, is the latest product in the Raspberry Pi 3  
range, boasting a 64-bit quad-core processor  
running at 1.4GHz, dual-band 2.4GHz and 5GHz  
wireless LAN, Bluetooth 4.2/BLE, faster  
Ethernet, and PoE capability via a separate PoE  
HAT.  
standard one. Arduino Nano uses the CH340 chip  
to convert from USB to UART instead of using  
ATmega16U2 chip to simulate COM port as on  
Arduino Uno or Arduino Mega. Thus, the  
product costs are reduced while the main features  
and functions of the other boards are kept and the  
communication and programming of an Arduino  
Nano board can be performed easily.  
SIM 900 A module  
Specifications  
The process of sending a warning message  
to the farmer when the DO level in the pond fell  
below the threshold limits was carried out via  
SIM 900A module. It has basic features like a  
cell phone including calling, sending SMS, and  
accessing GPRS. Due to its high stability,  
simplicity of use, and 5VDC standard operating  
voltage. Figure 7 illustrates Sim 900 A module  
with the diagram of pins connected to the  
Arduino Nano central board.  
Microcontroller: ATmega328P  
Communication chip: CH340 USB-Serial  
Operating Voltage: 5V  
Digital I/O Pins: 22 (6 of which are PWM)  
Analog IN Pins: 8  
DC Current per I/O Pins: 40mA (I/O Pins)  
SRAM: 2KB  
EEPROM: 1KB  
Dissolved Oxygen aerator  
Clock Speed: 16MHz  
To provide DO for a 0.45-m3 tank, we used  
the Mini Pump with 5-12V MB385, the capacity  
of 12W, the flow of 4-5 L/Minute. This pump  
was controlled via an intermediate relay.  
Raspberry Pi 3 Model B+ module  
The data of temperature, pH, and DO were  
processed according to the programming  
algorithm at the central control board and then  
sent to the Raspberry Pi 3 B+ module. Here the  
data continued to be processed and sent to the  
cloud where it was stored in either a private or a  
public channel, from which they would be stored  
and observed via computers and smartphones  
using the ThingSpeak platform.  
Methods  
Algorithm flowchart of the automatic  
control system for measuring and monitoring  
aquaculture pond parameters  
The Algorithm flowchart of the system of  
automatically measuring and monitoring the  
Figure 6. Module Raspberry Pi 3 B+ (Raspberrypi, 2020).  
629  
Application of the Internet of Things technology in designing an automatic water quality monitoring system for aquaculture ponds  
parameters of aquaculture ponds is presented in  
Figure 8. The water quality indicators of the  
ponds, including temperature, pH, and DO  
levels, were measured by the sensors, and then  
sent to the processor by the Arduino Nano  
controller chip. Here, we set the DO threshold  
limits at 2.0 mg L-1, if the DO level of the pond  
fell below 2.0 mg L-1, it would turn on the oxygen  
aerator to provide in-time with the amount of DO  
for the pond, and through the SIM 900A module,  
a warning message would be immediately sent to  
the farmer's phone. The temperature, pH, and DO  
data were stored and pushed to the Cloud via the  
Raspberry Pi module. Farmers could use  
Thingspeak software installed on phones or  
computers to track and monitor these indicators  
continuously.  
provides a full range DO readings from 0 to  
19.9 mg L-1 with ±1.5% accuracy.  
The pH meter: HI8314 type made by Hanna.  
It provides a full range of pH measurement  
from 0 to 14 with ±0.01pH accuracy.  
The results are presented in Tables 2, 3, and  
4. To achieve these results, we operated the  
system and conducted measurements 5 times per  
hour. The system can perform the measurement  
of parameters, viz. temperature, pH, and DO of  
the ponds, continuously in a long time.  
Tracking and monitoring parameters in  
aquaculture ponds via computer or  
Smartphone  
By using the open-source ThingSpeak data  
transfer platform, we were able to track and  
monitor the parameters in aquaculture ponds  
including temperature, pH, and DO indicators  
through computers or Smartphones. The users  
need a smart device (either smartphone or  
computer) that is connected to the internet. Then,  
one can access the ThingSpeak website and use  
the previously registered account and password  
to track the parameters of aquaculture ponds.  
During the process, if the DO level in the pond  
falls below the threshold level, the system will  
send a warning message to the farmer and turn on  
the aerator to provide oxygen to the pond.  
Figures 9 and 10 below illustrate the process of  
tracking and monitoring parameters on a  
computer and sending warning messages to  
farmers. To receive the warning messages, the  
Results and Discussion  
Measurement results of temperature, pH, and  
DO concentration  
To show the effectiveness of our system, we  
compared our measurement results and reference  
samples by the following standard machines:  
The water temperature meter: DYS HDT-10  
type made by EMIN, Korea. It measurres  
temperature range from -50oC to +300oC  
with ±1oC accuracy. This temperature meter  
meets the EC No. E8 04 08 53916 001  
quality certification.  
The DO meter: DO Hanna HI9142 type  
made by Hanna Romania. The meter  
Figure 7. SIM 900 A module module (Arduino, 2020)  
Vietnam Journal of Agricultural Sciences  
630  
Nguyen Quang Huy et al. (2020)  
Start  
Declarations of  
temp = 0, oxy = 0, pH = 0  
Sensor results read  
temp = temperature, oxy =dissolved oxygen, and  
pH = pH level  
Turn off the DO  
aerator  
Oxy < 2.0 mg L-1  
Turn on the DO  
aerator  
Sending the warning  
messages to cell phones  
Sending data of temperature, pH, and  
dissolved oxygen to Raspberry Pi 3 and  
transferring data to a Web server  
End  
Figure 8. The Algorithm flowchart of the automatic system for measuring and monitoring parameters in aquaculture ponds  
phone number of the user needs to be added into  
the coding for SIM 900 A Module. Then, the user  
needs to maintain monthly payments to keep the  
SIM 900 A active.  
measurement of DO was quite accurate with the  
maximum relative error of 2.88%.  
From the discussions above, we can see that  
by using this sytem, the users could actively track  
and monitor the parameters of the aquaculture  
ponds such as temperature, pH, and DO  
concentration through smartphones or computers  
with internet access. All these parameters were  
stored in the system, and when the important  
index of DO in the pond fell below the specified  
level, there would be a warning message sent to  
the farmer so that a method could be applied to  
It can be seen that the system operated  
according to the requirements. The temperature,  
pH, and DO indicators of the ponds were  
continuously measured, stored, and transmitted  
to the network. The maximum relative error of  
the result when compared to the sample  
measuring devices was 3.57%, which was still  
lower than the limit value of 5%. The  
631  
Application of the Internet of Things technology in designing an automatic water quality monitoring system for aquaculture ponds  
increase the DO level. In this case, the dissolved  
aerator machine would be turned on to timely  
provide DO to the pond. This is the main  
advantage of our system in comparison with the  
works of Duy et al. (2015) or Binh & Tri (2016).  
field of aquaculture. It not only helps to reduce  
the time and effort of the farmers significantly  
but also helps to improve aquaculture’s  
productivity. In the near future, more research is  
needed to develop the system to measure more  
water quality parameters such as turbidity,  
ammonia (NH3), and hydrogen sulfide (H2S) and  
to employ solar energy for the operation of the  
system.  
Conclusions  
In this work, we presented the design of an  
automatic system for measuring and monitoring  
water quality indicators of aquaculture ponds,  
including temperature, pH, and DO. The test  
results showed that the system achieved accuracy  
in measuring temperature, pH, and DO, and was  
reliable and easy to use. The autonomic system is  
an important application of IoT technology in the  
Acknowledgements  
This work was supported by the ARES  
Programwith Vietnam National University of  
Agriculture [grant number T2019-09-24VB].  
Table 2. Comparison of temperature results  
Results by the system  
Results by the standard machines  
(oC)  
Relative Error  
(%)  
Measurement times  
(oC)  
1
15.6  
15.9  
1.88  
2
3
4
5
17.8  
20.8  
22.2  
29.7  
18.3  
21.4  
22.9  
30.8  
2.73  
2.8  
3.05  
3.57  
Table 3. Comparison of pH level results  
Results by the system  
(mol L-1)  
Results by the standard machines  
(mol L-1)  
Relative Error  
(%)  
Measurement times  
1
2
3
4
5
7.8  
7.9  
7.8  
7.7  
8.0  
7.8  
7.8  
7.8  
7.8  
7.8  
0
1.28  
0
1.28  
2.56  
Table 4. Comparison of DO results  
Results by the system  
Results by the standard machines  
(mg L-1)  
Relative Error  
(%)  
Measurement times  
(mg L-1)  
1
2
3
4
5
10.2  
10.4  
10.4  
10.4  
10.4  
10.4  
1.92  
2.88  
1.92  
2.88  
0.96  
10.7  
10.6  
10.7  
10.5  
Vietnam Journal of Agricultural Sciences  
632  
Nguyen Quang Huy et al. (2020)  
Figure 9. Tracking and monitoring temperature, pH level, and dissolved oxygen indicators through a computer  
633  
Application of the Internet of Things technology in designing an automatic water quality monitoring system for aquaculture ponds  
Figure 10. Warning messages sent to farmers when the dissolved oxygen drops below the threshold level  
Liu X. (2015). Traceability system design for fruits and  
References  
vegetables safety based on internet of things  
Akhmetov B. & Aitimov M. (2015). Data Collection and  
Analysis Using the Mobile Application for  
Environmental Monitoring. Procedia Computer  
Science. 56: 532-537.  
technology. Advance Journal of Food Science and  
Technology. 8(10): 711-715.  
Ran N. (2014). Design and implementation of intelligent  
greenhouses based on the internet of things. Applied  
Mechanics and Materials. 188-191.  
Athanasios S. V., Charalampos Z. P., Alexander B. S.,  
Vasileios A. N. & Eftychia M. X. (2010). A complete  
farm management system based on animal  
identification using RFID technology. Computers and  
Electronics in Agriculture. 70: 380-388.  
Vietnam Association of Seafood Exporters and  
Proceducers (2020). Overview of Vietnam's seafood  
industry in 2019. Retrieved on February 3, 2020 from  
nganh.htm (in Vietnamese).  
Binh D. T. & Tri V. M. (2016). 3D field model of  
environmental parameters for aquaculture pond.  
Science Magazine. Can Tho University. 102-108.  
Vietnam Fisheries Society (2018). Solution of stabilizing  
dissolved oxygen index in ponds. Retrieved on  
Duy N. T. K., Tu N. D., Son T. H. & Khanh L. H. D. (2015).  
Automated monitoring and control system for shrimp  
January  
20,  
2020  
from  
farms  
based on embedded system and wireless  
sensor network. In Electrical, Computer and  
Communication Technologies (ICECCT), 2015 IEEE  
International Conference. 1-5.  
Some types of equipment for measuring dissolved oxygen  
in aquaculture ponds (2020). [Picture of Some types of  
equipment for measuring dissolved oxygen in  
aquaculture ponds] [Photograph]. Some types of  
equipment for measuring dissolved oxygen in  
aquaculture ponds. Retrieved on March 5, 2020  
General Department of Fisheries (2019). Seafood exports  
reached a record of 9 billion USD in 2018. Retrieved  
on  
February  
3,  
2020  
from  
301242.html (in Vietnamese).  
The DS18B20 temperature sensor (2020). [The DS18B20  
temperature sensor] [Photograph]. The DS18B20  
temperature sensor. Retrieved on February 3, 2020  
Lin H., Cai K., Chen H. & Zeng Z. F. (2015). The  
construction of a precise agricultural information  
system based on internet of things. International  
Journal of Online Engineering. 11(6): 10-15.  
Vietnam Journal of Agricultural Sciences  
634  
Nguyen Quang Huy et al. (2020)  
The pH sensor (2020). [The pH sensor] [Photograph]. The  
pH sensor. Retrieved on February 4, 2020 from  
B+] [Photograph]. Module Raspberry Pi 3 B+.  
Retrieved  
on  
February  
5,  
2020  
The Dissolved Oxygen (DO) sensor (2020). [The Dissolved  
Oxygen (DO) sensor] [Photograph]. The Dissolved  
Oxygen (DO) sensor. Retrieved on February 5, 2020  
Module Sim 900 A (2020). [Module sim 900 A]  
[Photograph]. Module sim 900 A. Retrieved on  
Module Raspberry Pi 3 B+ (2020). [Module Raspberry Pi 3  
635  
pdf 12 trang yennguyen 22/04/2022 340
Bạn đang xem tài liệu "Application of the internet of things technology (IoT) in designing an automatic water quality monitoring system for aquaculture ponds", để tải tài liệu gốc về máy hãy click vào nút Download ở trên

File đính kèm:

  • pdfapplication_of_the_internet_of_things_technology_iot_in_desi.pdf