Application of the Internet of Things Technology (Iot) in Designing an Automatic Water Quality Monitoring System for Aquaculture Ponds

pdf 12 trang Gia Huy 20/05/2022 2320
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 bạn click vào nút DOWNLOAD ở trên

Tài liệu đính kèm:

  • pdfapplication_of_the_internet_of_things_technology_iot_in_desi.pdf

Nội dung text: Application of the Internet of Things Technology (Iot) in Designing an Automatic Water Quality Monitoring System for Aquaculture Ponds

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