Next Article in Journal
The Two-Stage Suspension System of the Fiber Optic Vector Hydrophone for Isolating the Vibration from the Mooring Rope
Previous Article in Journal
Fractal Properties of Heart Rate Dynamics: A New Biomarker for Anesthesia—Biphasic Changes in General Anesthesia and Decrease in Spinal Anesthesia
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

A Modularized IoT Monitoring System with Edge-Computing for Aquaponics

1
College of Information and Electrical Engineering, China Agricultural University, Beijing 100083, China
2
National Digital Fisheries Innovation Center, Beijing 100083, China
3
College of Information Technology, Hebei University of Economics and Business, Shijiazhuang 050062, China
4
Information Center, Beijing Municipal Bureau of Agriculture and Rural Development, Beijing 100101, China
*
Author to whom correspondence should be addressed.
Sensors 2022, 22(23), 9260; https://doi.org/10.3390/s22239260
Submission received: 27 October 2022 / Revised: 20 November 2022 / Accepted: 24 November 2022 / Published: 28 November 2022
(This article belongs to the Section Internet of Things)

Abstract

:
Aquaponics is a green and efficient agricultural production model that combines aquaculture and vegetable cultivation. It is worth looking into optimizing the proportion of fish and plants to improve the quality and yield. However, there is little non-destructive monitoring of plant growth in aquaponics monitoring systems currently. In this paper, based on the Internet of Things technologies, a monitoring system is designed with miniaturization, modularization, and low-cost features for cultivation-breeding ratio research. The system can realize remote monitoring and intelligent control of parameters needed to keep fish and plants under optimal conditions. First, a 32-bit chip is used as the Microcontroller Unit to develop the intelligent sensing unit, which can realize 16 different data acquisitions as stand-alone extensible modules. Second, to achieve plant data acquisition and upload, the Raspberry Pi embedded with image processing algorithms is introduced to realize edge-computing. Finally, all the collected data is stored in the Ali-cloud through Wi-Fi and a WeChat Mini Program is designed to display data and control devices. The results show that there is no packet loss within 90 m for wireless transmission, and the error rate of environment parameters is limited to 5%. It was proven that the system is intelligent, flexible, low-cost, and stable which is suitable for small-scale aquaponics well.

1. Introduction

The prototype of aquaponics came from fish farming in rice paddies which happened in ancient China [1]. Modern aquaponics systems integrate aquaculture, soilless cultivation, and modern agricultural information technology [2]. Ibtissame E. et al. [3] compared aquaponics with the hydroponic and the traditional method, pointing out the advantages of aquaponics systems in agricultural production. Aquaponics provides high-quality agricultural products while reducing the ecological impact. With the rapid development of science and technology, agricultural informatization has moved from traditional agriculture to smart agriculture mainly supported by Internet of Things technology [4]. The smart factory of aquaponics was proposed in recent years, which uses smart sensing, information control, and other Internet of Things (IoT) technology to achieve a low-cost, green cycle production model.
While aquaponic farming is an alternative agricultural method [5], the varying adaptability of species to the environment poses significant challenges for research in both academic and commercial sectors. To improve production efficiency as much as possible, it becomes indispensable to monitor and regulate the growth environment of fish and vegetables by using IoT technology. This technology when used alongside innovative agricultural techniques such as aquaponics can lead to new dimensions of food production [6]. Numerous technological studies have been undertaken in an effort to better handle this type of agricultural technology. Studies have shown that it is efficient in aquaponics systems to use intelligent analysis and processing [7].
Nhan Chi Nguyen et al. [8] introduced an aquaponics monitoring and control system based on IoT technology, which allows users to monitor the potential of hydrogen (pH) value, Dissolved Oxygen (DO), temperature, and humidity through an application on their smartphones, and to set thresholds to control water and air pumps. This method eliminates manual intervention and simplifies production costs compared with manual monitoring methods, but the monitoring parameters cannot yet be comprehended. Sun Jian et al. [9] conducted a study on an aquaponics environmental monitoring system based on IoT technology and described its role in promoting aquaponics technology. Ma Zichao et al. [10] designed a low-power monitoring device with ZigBee for an aquaponics system to collect temperature and pH values online. The device can be used to remotely control fish feeding, and save water resources effectively. FL Valiente et al. [11] monitored and controlled pH and temperature in a Nile tilapia-lettuce aquaponics system through IoT. The growth of plants and fish in the automated aquaponics system was significantly better than in the traditional aquaponics system. Siyao An et al. [12] designed a data collection device for aquaponics systems to realize real-time monitoring of various environmental data. Then, an aquaponics data service platform was developed to make the best decisions by monitoring the status of the system online. Mohanad Odema et al. [13] proposed a system with Modbus Transmission Control Protocol (TCP) as the primary communication protocol, allowing it to benefit from the advantages of Modbus and TCP technologies simultaneously. Murad et al. [14] have developed a low-cost system for monitoring and controlling water parameters using Arduino as a Microcontroller Unit (MCU). Mandap et al. [15] equipped Arduino with a web application to design an automated aquaponics system that allows the system to control actuators in response to pH level, temperature, and DO parameter changes. However, the systems mentioned above are mainly designed for the monitoring of pH, temperature, and DO, which belongs to water quality monitoring. Some of them have added remote control functions. The data monitoring is not comprehensive enough for aquaponics scenarios.
Further, Haryanto et al. [16] designed a smart aquaponics system that could control and monitor the degree of acidity, water level, water temperature, and fish feed that were integrated with an internet-based mobile application. Mohammad Alselek et al. [17] developed a complete 5G-enabled IoT system for fully monitoring the performance of fishery farms, which improves the state-of-the-art in terms of aquaponics life cycle monitoring metrics and communication technologies. Mehra et al. [18] introduced deep neural networks to the analysis of tomato hydroponic growth parameters and compared them with traditional soil culture. These studies extend the parameters monitored by the system but still did not overcome the problem of automatic acquisition of plant growth condition data.
In conclusion, up to now, the research on aquaponics systems was mostly focused on system integration, water-quality, environmental parameters monitoring, and fish behavior detection, but many disadvantages have not considered, such as poor mobility, long development cycle, complicated operation, and high power-consumption. Additionally, there is a relative lack of attention to research on plant growth monitoring in aquaponics systems. The image processing technology is a low-cost solution for vegetable growth monitoring. However, for cloud-storage IoT systems, image data upload and cloud computing are limited by bandwidth and transmission delay.
According to the characteristics of aquaponics systems and urban agriculture scenarios, a miniaturized intelligent aquaponics monitoring system is proposed in this paper. This system can realize real-time monitoring of key indicators, such as water quality, planting environment, and plant growth conditions based on intelligent embedded technology and edge-computing. To overcome the impact of uploading speed and delay during processing a large amount of image data, an image edge-computing unit is introduced to the aquaponics system for monitoring growth conditions, such as plant height, plant stem, etc., which can improve the data transmission efficiency rapidly.
The contributions of our work are three-fold:
  • We propose a modularized IoT monitoring system with edge-computing for aquaponics, which overcomes many problems of traditional handheld aquaponics systems, such as high latency, labor-intensive, low efficiency, and poor scalability.
  • We build an end-edge-cloud system architecture. Using Raspberry PI as an edge sensor, an edge image processing module is implemented, which enables the system to monitor plant growth conditions by deep learning without destruction.
  • We develop a WeChat Mini Program for the monitoring system, improving system management efficiency, and reducing cost. With the software platform, users can easily realize remote monitoring and control of the aquaponics system by smart cell phone.
This paper has the following structure and organization: First, in this section, cases and work related to traditional and modern aquaponics systems are discussed. Section 2 describes the overall architecture and functions of the monitoring system that we designed. The main hardware modules include intelligent sensing unit design, edge image processing module design, and so on are shown in Section 3. Section 4 presents the system software design. The tests and results are listed in Section 5. In Section 6, we summarize our research results, clarify the significance of the work, and analyze the prospects for future work.

2. System Architecture

When it involves high yields and quality, designing and managing a system for aquaponic is a difficult task. Due to a combination of a greenhouse and a symbiotic environment, the parameters and factors that must be controlled are diverse. [19]. Therefore, in light of the investigation and analysis of current research related to the aquaponics system, the aquaponics monitoring system is built based on embedded edge-computing and IoT technology to reach the full supervision and abnormal monitoring of water quality (temperature, pH, DO, etc.), planting environment (temperature, humidity, light intensity, etc.), and plant growth conditions (plant height, plant stem, leaf area, etc.). The general framework of the system was presented in Figure 1.
The IoT can empower systems and machines to communicate with each other and make decisions based on data without human intervention. In general, the architecture of IoT consists of three layers: Perception Layer (sensing), Network Layer (data transmission), and Application Layer (data storage and manipulation) [20]. In this paper, the perception layer mainly contains three parts: the environment sensing unit, the plant growth conditions sensing unit, and the intelligent control unit. The environment sensing unit used Wireless Sensor Network (WSN) technology to realize the collection of water quality and planting environment in the aquaponics system. The edge-computing module with image processing algorithms is introduced to the plant growth sensing unit, which can quickly obtain and upload the indicator data of plant growth and alleviate the network transmission load. Intelligent control unit enables remote control of equipment in aquaponics systems. The network layer uses Wireless Fidelity technology (Wi-Fi) to transmit the processed data to the server for storage via TCP-based Message Queuing Telemetry Transport (MQTT) protocol. The application layer includes the Ali-cloud server and WeChat Mini Program. MySQL database is deployed in the server for cloud storage, sending, and receiving of IoT data. The Mini Program can realize the functions of real-time monitoring, history data display, abnormal alarm, and remote control with the collected data.

3. System Hardware Design

3.1. Intelligent Sensing Unit Design

The overall framework of the hardware is shown in Figure 2. The perception layer uses the STMicroelectronics 32-bit family of microcontroller chip (STM32) as the MCU, whose periphery includes five major parts: fishpond water-quality monitoring module, planting environment monitoring module, plant growth conditions monitoring module, intelligent control module, and edge-computing module unit; the network layer uses ESP8266 for Wi-Fi wireless communication.
In Figure 2, the water-quality monitoring module includes pH sensors, water temperature sensors, DO sensors, signal amplification, and peripheral signal conversion circuits. The planting environment monitoring module includes temperature-humidity sensors, CO2 sensors, light intensity sensors, and peripheral signal conversion circuits. The intelligent control module can remotely start/stop the pump, light, and alarm to accomplish the intelligent regulation of the system. The edge-computing unit is designed to perform localized calculations on image data for efficient acquisition of growth conditions data, realizing the continuous monitoring of the plant stem and plant height.

3.2. Sensor Selection

The small-scale aquaponics system mainly demonstrates the intelligent monitoring of three key indicators of aquaponics: DO, light intensity, and plant height. For other needs, users can also connect the required sensors to Input/Output (I/O) ports for real-time monitoring of more indicators.
Two types of DO measurement principles are commonly used: electrochemical electrodes and polarographic electrodes. In this paper, electrochemical electrodes were chosen because of their fast start-up and low-maintenance features. Moreover, the XC6206 voltage regulator and TP5551 zero-drift operational amplifier are used to design the signal conditioning module peripherally. The BH1750 is a digital light intensity sensor integrated chip with an input light range of 1-65535lx and a minimum error variation of ±20%. It mainly uses the photovoltaic effect generated by the internal photodiode to convert the light signal into an electrical signal for calculation. The Raspberry Pi camera module (Pi Cam) was released in May 2013 and is equipped with a 5 Mpixel sensor that can be connected to the Camera Serial Interface (CSI) on the Raspberry Pi easily. Considering that the small-scale aquaponics system is currently under exploration, part of sensing devices in the multi-sensing process, such as DO, light intensity, and CO2, are selected for system verification in this paper. The specific sensor selection results are listed in Table 1.

3.3. Edge Image Processing Module Design

Due to the limitation of serial port speed and data processing capability of the STM32, it is difficult to transmit and process image data remotely in an instant. Therefore, to deal with this problem, this paper integrated the image processing module based on Raspberry Pi for collecting growth conditions into the perception layer as the edge-computing device. Thus, the end-edge-cloud system architecture is constructed, and the edge image processing module is extended with flexible image data. A lightweight training model is installed on Raspberry Pi with the Pytorch framework. The deep learning algorithm is integrated to capture plant growth conditions within 10 s by performing target detection, target cropping, image enhancement, and binarization calculations on image data. In other words, the extraction of plant growth condition data can be done quickly, precisely, and non-destructively by shooting on site. The above processing results will be transmitted to the cloud storage through wireless communication. The structure of the edge image processing module is shown in Figure 3.
In this paper, the edge image processing architecture is based on the concept of edge-computing. According to the Edge-computing Reference Architecture 3.0 (2018) [21], its basic architecture is shown in Figure 4. Edge-computing refers to processing the data on the device and very close to the device [22], which has better real-time monitoring, stability, and security compared to traditional cloud computing and can be proposed to surmount the problems caused by high latency and low bandwidth. The edge image processing module will complete the image data acquisition and analysis calculations in advance. STM32 is responsible for the automatic transfer of packaged data to the cloud. Accordingly, not only is the pressure of data explosion and stream relieved greatly but also the efficiency of information transmission is improved [23].

3.4. Data Acquisition Circuit Design

The sensor detection module consists of four parts: voltage stabilization, signal amplification, voltage following, and temperature compensation. The internal resistance of some composite electrodes is extremely high, for example, up to 1012 Ω for glass electrodes. Since a high impedance input is required, the correct voltage signal can be obtained only when the input impedance of the op-amp is higher than the internal resistance of the sensor. The design uses a TLC4502 dual Operational Amplifier (Op-Amp) with an input impedance of 1012 Ω at room temperature to realize the function of signal amplification and convert microvolts to voltages in the range of 0 to 5 V, which can be sent to the main control chip for data processing. In addition, the temperature is an important factor that affects the sensor output voltage, so DS18B20 is used as a temperature compensation sub-module to improve the data accuracy. The analog to digital converter (ADC) circuit is mainly used to convert the analog signals collected in real-time into digital signals that can be processed by the MCU to support its processing of the signals collected in real-time. The schematic diagram of the data acquisition circuit is shown in Figure 5.

3.5. Main Control Circuit and Peripheral Circuit Design

The main control circuit and peripheral interaction circuit are presented in Figure 6. To match low power and multi-signal scenarios, the MCU uses STM32F103C8T6 as the main control chip, which is used to provide control signals for data monitoring and transmission circuit. It is a 32-bit microcontroller based on the Cortex-M3 core introduced by STMicroelectronics (ST), with high performance, low cost, and low power consumption. In addition, it integrates various communication serial ports, with two Inter-Integrated Circuit Bus (IIC) interfaces, two Serial Peripheral Interfaces (SPI), three Universal Synchronous/Asynchronous Receiver/Transmitter (USART), and one Controller Area Network (CAN), and a total of twelve channels of ADC, which facilitates easy development of different data requirements. Peripheral circuit includes screen display circuit, alarm circuit, and power switching circuit, which are connected through the I/O port for real-time display of data monitoring and chirp alarm when the data is abnormal. Organic Light-Emitting Diode (OLED) driven by SSD1306; buzzer driven by S8050.

3.6. Wireless Transmission Network Design

The network layer is one of the key layers in the system, as a bridge between the perception layer and the application layer, whose main task is to accomplish the interconnection of the information collected by the underlying sensors and the upper layer applications. The wireless transmission unit adopts ESP8266 for Wi-Fi transmission, which is a low-power, cost-effective embedded wireless network module. The complete TCP/IP protocol stack has been embedded in the module, so it can send data from traditional serial devices to the Internet. It supports three working modes: serial to STA, serial to AP, and STA + AP, and supports the standard IEEE802.11 b/g/n protocol. The features of the module cover no new wires, easy to use, quick start, etc. The serial port rate can reach up to 4 Mbp. Figure 7 shows the material object of the data acquisition node and transceiver.

4. System Software Design

4.1. Intelligent Sensing Unit Program Design

The hardware part was developed in Keil and programmed in C, which mainly implements the sensing data acquisition and Wi-Fi wireless transmission functions. The intelligent sensing unit mainly has three major states: initialization, status judgment, and data reading. The block program diagram of the intelligent sensing unit is shown in Figure 8.
After each module is initialized in turn, the STM32-ESP8266 connection request will be sent out. Wait for 10 s for the server reply after a successful connection, the buzzer will beep to indicate successful access. Otherwise, it will reset the ESP8266 for reconnection.
With the PB6 pin going high, the IIC is started during the falling of edge PB7 pin. Then the MCU sends power-on and measurement commands to the IIC device. The measurement ends when the ACK signal of BH1750 is detected, and the calculation of light intensity is performed after reading the register data. Similarly, when the PB10 pin goes high, the PB11 pin shows a falling of edge to indicate the IIC is woken up, and SGP30 reads and writes CO2 data in sequence.
After ADC initialization, ADC conversion is triggered using software to calibrate the voltage and data conversion, then the DO value is calculated by formula. After the data measurement, the data display work is performed by timer TIM2. The status of the PA0 pin is read as a flag to determine whether there is data abnormality and alarm action.
The program for the edge-computing module was developed in Raspberry Pi using Pycharm and programmed in Python. The main function is to provide acquisition commands for pictures of plants during growth and integrate segmentation and detection algorithms to achieve segmentation of plant targets and calculation of growth indicators and transfer the result data to the main control module for cloud storage.

4.2. Wireless Transmission Network Program Design

The network layer uses Wi-Fi. The ESP8266 modules supporting the three modes are used to send the data measured by the smart sensing unit to the cloud server for database storage via TCP-based MQTT protocol, which is convenient for historical data queries and later relationship analysis. In this design, the communication module is set to STA mode using the AT command, when the device is connected to the AP hotspot as the station. Table 2 represents the specific configuration of part of the command.
UART2 is configured as a communication serial port, with TXD pin connected to the PA2 pin and RXD pin connected to the PA3 pin. Turn on timer TIM3, set 10 ms interruption, and the program will determine whether the data is continuous by calculating whether the time difference between 2 consecutive characters is greater than 10 ms. The circular queue is used as the buffer for data reception, which is used to save the data received in the UART2 interrupt function. Signal REV_OK indicates that the reception is complete, and the data can be sent out. The block diagram of the wireless transmission network program is shown in Figure 9.

4.3. Application Layer Platform Design

4.3.1. IoT Gateway Design

Elastic compute service (ECS) is a simple, efficient, safe, and reliable computing service with elastic and scalable processing capacity. At present, the larger domestic cloud service platforms include Ali-cloud, Baidu Cloud, Tencent Cloud, WeChat hardware platform, Giz Cloud, OneNET, etc. Among them, Ali-cloud has the characteristics of high stability, full functionality, and flexible development, which is an infrastructure as a service (IaaS) cloud server with superior performance. In this paper, we choose Ali-cloud as the storage and processing center of cloud data and use Community Enterprise Operating System (CentOS) 7.2.1 to build and configure the server. The overall architecture of the application layer platform is shown in Figure 10.
The server mainly includes two parts: remote data reception and database management. The water-quality data and environmental data collected by the intelligent sensing unit use JavaScript Object Notation (JSON) format to communicate with the remote server, and the server will subscribe to a topic for port listening. The design uses MySQL, which is fast and flexible, as the database for cloud storage and management. Through the programming interface it provides, the master control module is able to upload the collected data to Ali-cloud through Wi-Fi and able to receive cloud server commands to achieve interconnection between services and devices.

4.3.2. Mini Program Design

In this paper, Visual Studio with the mpVue framework was used for WeChat Mini Program development, including four parts: user login, real-time monitoring, history display, and remote control. Figure 11 represents the framework of the Mini Program. The most important feature is that it can be accessed without downloading. The Mini Program realizes the user experience of “come and use”, which is one of the best alternatives to mobile client apps.
According to the registration information, users can log in to check the real-time data of the aquaponics system. The Mini Program will automatically send a server connection request. With a successful connection, the Mini Program gets real-time data through the subscribed “PubTopic” and sends control commands through “SubTopic”. Finally, it realizes the display of weather overview, water quality, planting environment, and plant growth conditions on the monitoring page and the switch on and off control of water pump, light, and alarm on the remote-control page, which can assist to complete planting evaluation with the mature model deployed in the cloud.

5. Experiments, Results and Discussion

5.1. Experiments Setting and Evaluation Indices

Three experiments were conducted in this paper, which correspond to verifying the transmission reliability, system stability, and measurement accuracy respectively. In the data packet loss rate test, the packet loss rate (PLR) at different distances (DIS) was used as the evaluation index. The calculation method is shown in Equation (1), NOP stands for the number of packages and NORP stands for the number of receiving packages. Low PLR means system transmission is reliable. The stability test is primarily concerned with whether the system can be online for a sustained period without going offline. The field tests mainly verified the accuracy of the system measurements by comparing the manual sampling (actual values) with the system recording values. Mean absolute error (MAE), mean squared error (MSE), and root mean square error (RMSE) were used as evaluation indices in this paper. The calculation method is shown in Equations (2)–(4), y i is the actual value measured manually, and y i ^ is the predicted value recorded by the system. Similarly, the lower these indices are, the smaller error of the system measurement is.
PLR = 1 NORP NOP
MAE = 1 m i = 1 m | ( y i y i ^ ) |  
  MSE = 1 m i = 1 m ( y i y i ^ ) 2
RMSE = 1 m i = 1 m ( y i y i ^ ) 2  

5.2. Data Packet Loss Rate Test

To verify the reliability of the network layer of the system, the packet loss rate of the wireless transmission network is tested at different communication distances. With the IoT intelligent monitoring system connected to the server and router, the mobile collection nodes send 500 data packets at intervals of 50 m, 70 m, 90 m, 110 m, 130 m, and 150 m for testing the packet loss rate. From Table 3, it can be concluded that this system can achieve reliable data communication within the communication distance of 90 m and can meet the application requirements.

5.3. System Stability Test

To verify the stability of this system, the water quality, environment, and plant growth conditions of the aquaponics system were monitored for 24 h of continuous operation. The real-time monitoring and historical data page of the Mini Program are shown in Figure 12.
Figure 12 represents the system that can collect lots of key indicators of the aquaponics system stably, without disconnection during the monitoring process. Meanwhile, it can accomplish functions of data wireless transmission, trend curve drawing, and database storage, which indicates that the system is stable and reliable in operation.

5.4. Field Test

Field testing began on 20 July 2022 and lasted for two months. The site was located in an aquaponics system within the College of Information and Electrical Engineering building at the China Agricultural University. The monitoring system was powered up and calibrated prior to the test, and the monitoring interval was set to 1 min. The system was set to take average data every 1 h and upload it to the cloud for historical storage. During the test period, the three test indicators were manually sampled at 9:00, 12:00, 15:00, 18:00, and 21:00 each day using a handheld photometer, DO detection device, and a scale respectively. The field test environment is shown in Figure 13.
Figure 14 shows the changes in DO over 3 days. Since the system is equipped with an oxygenation pump that can be intelligently controlled, the DO data as shown oscillates between 7 and 8, providing a good growing environment for the fish. Table 4 compares the indicators obtained by manual sampling with those obtained by system monitoring. The results show that the MAE of the DO value is 0.093. The MSE and RMSE is 0.012, and 0.111, respectively.
Figure 15 shows the variation of lightness over 3 days, with data cycling from large to small, consistent with the daily regular pattern. Due to the additional fill light during 2:00–5:00, the period of the graph shows a boost of data. Table 5 compares the indicators obtained by manual sampling with those obtained by systematic monitoring. The results show that the MAE of light intensity is 0.045. The MSE and RMSE is 0.007 and 0.082, respectively.
The validation of the growth monitoring module lasted for one month due to the slow growth rate of the plants. Figure 16 shows the change in plant height during this period with an increasing trend. Table 6 compares the indicators obtained by manual sampling with those obtained by systematic monitoring using edge-computing. The results show that the MAE of plant height value is 0.758. The MSE and RMSE is 0.583 and 0.763, respectively. Though, it is clear that there is a uniform bias due to image acquisition calibration. Thus, the result is helpful to evaluate plant growth with tiny data transmission.
In summary, the embedded edge-computing-based aquaponics network monitoring system can effectively monitor various key indicators in the aquaponics system and provide valuable references for agricultural production. Especially for plant growth monitoring, the use of edge sensors for image processing makes the transmission efficiency much higher.

6. Conclusions

As this study has demonstrated, we focused on the integrity of monitoring parameters in the aquaponics system and realized the possibility of simultaneous remote monitoring and intelligent control of the environment, water quality, and plant growth conditions. The proposed system ensures the quality operation of aquaponics system and lays a foundation for the research of cultivation-breeding ratio to a certain extent.
As for the environment and water-quality parameters, the system overcomes many problems of the traditional handheld aquaponics system, such as high latency, labor-intensive, low efficiency, and poor scalability. Furthermore, in order to monitor the growth conditions of plants in the aquaponics system and improve the intelligence of the system, edge computing was introduced to build an end-edge-cloud system architecture. Thus, deep learning algorithms can be used for image processing. In this way, the computing tasks of the traditional system are transferred from the data center to the edge sensor, realizing the diversion of high energy-consuming image data and low energy-consuming sensing data. It proves that the edge sensor can improve the timeliness of data calculation, reduce the flow pressure, improve the efficiency of data transmission and enhance the scalability of the system. Using the WeChat Mini Program as the software platform, users can easily access remote monitoring and control of the aquaponics system by using a smart cell phone. The test results show that the system can provide stable local data collection and remote transmission, trend curve plotting, and database storage services for aquaponics systems effectively. The packet loss rate of the wireless transmission network is 0% within 90 m and 3.2% at 110 m. The system measurement data is proven to reflect the system condition well.
Due to the limited site, the research object of this paper is set in the miniaturized aquaponics system. In theory, a larger site can be covered by more monitoring nodes. This paper provides a good basis for further discussion and study. In the future, further research can make the system more efficient and intelligent by strengthening the computing power at the edge, such as further pruning and compression of the model or connecting the accelerator for deep learning in the periphery of the microcontroller.

Author Contributions

All authors have made significant contributions to this manuscript. Conceptualization, S.W. and H.W.; methodology, S.W. and Z.L.; software, S.W.; validation, S.W. and Z.L. and K.Z.; formal analysis, K.Z.; investigation, J.L.; resources, T.L.; data curation, K.Z.; writing original draft preparation, S.W.; writing—review and editing, H.W.; project administration, J.L. All authors have read and agreed to the published version of the manuscript.

Funding

This work was supported by the National Natural Science Foundation of China (Grant No. 61871380) and Key Common Technologies for High-quality Agricultural Development (Grant No. 21327401D-1).

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

Not applicable.

Acknowledgments

We acknowledge the National Digital Fisheries Innovation Center, Beijing, China for the support and the use of the facilities and equipment provided.

Conflicts of Interest

The authors declare no conflict of interest.

Abbreviations

AbbreviationMeaning
IoTInternet of Things
pHPotential of hydrogen
DODissolved Oxygen
TCPTransmission Control Protocol
MCUMicrocontroller Unit
WSNWireless Sensor Network
Wi-FiWireless Fidelity technology
MQTTMessage Queuing Telemetry Transport
STM32STMicroelectronics 32-bit family of microcontroller chip
I/OInput/Output
CSICamera Serial Interface
Op-AmpOperational Amplifier
ADCanalog to digital converter
STSTMicroelectronics
IICInter-Integrated Circuit Bus
SPISerial Peripheral Interfaces
USARTUniversal Synchronous/Asynchronous Receiver/Transmitter
CANController Area Network
OLEDOrganic Light-Emitting Diode
ECSElastic Compute Service
IaaSInfrastructure as a service
CentOSCommunity Enterprise Operating System
JSONJavaScript Object Notation
FNFile Number
PLRpacket loss rate
DISdistance
NOPnumber of packages
NORPnumber of receiving packages
MAEmean absolute error
MSEmean squared error
RMSEroot mean square error

References

  1. You, X. Fish farming in rice fields—One of the typical examples of sustainable development of traditional agriculture. Agric. Archaeol. 2006, 4, 222. [Google Scholar]
  2. Rao, W.; Li, D.; Wei, Y.; Yang, W. A new model of recirculating aquaculture- aquaponics system. China Aquac. 2017, 5, 76–79. [Google Scholar]
  3. Ibtissame, E.; Rachida, A.A.; Khaoula, T.; Marzak, A. Hydroponic and Aquaponic Farming: Comparative Study Based on Internet of things IoT technologies. Procedia Comput. Sci. 2021, 191, 499–504. [Google Scholar]
  4. Li, D. Internet of things and smart agriculture. Agric. Eng. 2012, 2, 1–7. [Google Scholar]
  5. Khaoula, T.; Abdelouahid, R.A.; Ezzahoui, I.; Marzak, A. Architecture design of monitoring and controlling of IoT-based aquaponics system powered by solar energy. Procedia Comput. Sci. 2021, 191, 493–498. [Google Scholar] [CrossRef]
  6. Manju, M.; Karthik, V.; Hariharan, S.; Sreekar, B. Real time monitoring of the environmental parameters of an aquaponic system based on Internet of Things. In Proceedings of the 2017 Third International Conference on Science Technology Engineering & Management (ICONSTEM), Chennai, India, 23–24 March 2017; pp. 943–948. [Google Scholar]
  7. Sharma, N.; Acharya, S.; Kumar, K.; SINGH, N.; Chaurasia, O.P. Hydroponics as an advanced technique for vegetable production: An overview. J. Soil Water Conserv. 2018, 17, 364–371. [Google Scholar] [CrossRef]
  8. Nguyen, N.C.; Nguyen, K.P.H.; Nguyen, Q.H.; Nguyen, H.V.; Ho, H.T. Design of a monitoring and control system for Aquaponics based on Iot technology. Sci. Technol. Dev. J.-Nat. Sci. 2020, 4, 800–810. [Google Scholar] [CrossRef]
  9. Sun, J.; Zhang, L. Research on IoT-based aquaponics environmental monitoring system. Internet Things Technol. 2018, 8, 22–23. [Google Scholar]
  10. Ma, Z.; Ruan, W.; Li, X.; Zhao, Y. Research on the design of aquaponics system based on ZigBee. Agric. Netw. Inf. 2017, 000, 18–20. [Google Scholar]
  11. Valiente, F.L.; Garcia, R.G.; Domingo, E.; Estante, S.M.T.; Ochaves, E.J.L.; Villanueva, J.C.C.; Balbin, J.R. Internet of Things (IOT)- Based Mobile Application for Monitoring of Automated Aquaponics System. In Proceedings of the 2018 IEEE 10th International Conference on Humanoid, Nanotechnology, Information Technology, Communication and Control, Environment and Management Management (HNICEM), Baguio City, Philippines, 29 November–2 December 2018; pp. 1–6. [Google Scholar]
  12. An, S.; Zheng, Z. A Data Acquisition Device for Aquaponics System. CN201920196981.X, 11 October 2019. [Google Scholar]
  13. Odema, M.; Adly, I.; Wahba, A.; Ragai, H. Smart Aquaponics System for Industrial Internet of Things (IIoT). In International Conference on Advanced Intelligent System and Informatics; Springer International Publishing: Cham, Switzerland, 2017; pp. 844–854. [Google Scholar]
  14. Zainol Murad, S.A.; Harun, A.; Mohyar, S.N.; Sapawi, R.; Ten, S.Y. Design of aquaponics water monitoring system using Arduino microcontroller. AIP Conf. Proc. 2017, 1885, 020248. [Google Scholar]
  15. Mandap, J.P.; Sze, D.; Reyes, G.N.; Dumlao, S.M.; Reyes, R.; Chung, W.Y.D. Aquaponics pH Level, Temperature, and Dissolved Oxygen Monitoring and Control System Using Raspberry Pi as Network Backbone. In Proceedings of the TENCON 2018-2018 IEEE Region 10 Conference, Jeju, Republic of Korea, 28–31 October 2018; pp. 1381–1386. [Google Scholar]
  16. Ulum, M.; Ibadillah, A.F.; Alfita, R.; Aji, K.; Rizkyandi, R. Smart aquaponic system based Internet of Things (IoT). J. Phys. 2019, 1211, 012047. [Google Scholar]
  17. Alselek, M.; Alcaraz-Calero, J.M.; Segura-Garcia, J.; Wang, Q. Water IoT Monitoring System for Aquaponics Health and Fishery Applications. Sensors 2022, 22, 7679. [Google Scholar] [CrossRef] [PubMed]
  18. Mehra, M.; Saxena, S.; Sankaranarayanan, S.; Tom, R.J.; Veeramanikandan, M. IoT based hydroponics system using Deep Neural Networks. Comput. Electron. Agric. 2018, 155, 473–486. [Google Scholar] [CrossRef]
  19. Yanes, A.R.; Martinez, P.; Ahmad, R. Towards automated aquaponics: A review on monitoring, IoT, and smart systems. J. Clean. Prod. 2020, 263, 121571. [Google Scholar] [CrossRef]
  20. Taha, M.F.; ElMasry, G.; Gouda, M.; Zhou, L.; Liang, N.; Abdalla, A.; Rousseau, D.; Qiu, Z. Recent Advances of Smart Systems and Internet of Things (IoT) for Aquaponics Automation: A Comprehensive Overview. Chemosensors 2022, 10, 303. [Google Scholar] [CrossRef]
  21. Li, L.; Zhou, P.; Cheng, P.; Shi, Z. Architecture challenges and applications of edge computing. Big Data Res. 2019, 5, 3–16. [Google Scholar]
  22. Shi, W.; Cao, J.; Zhang, Q.; Li, Y.; Xu, L. Edge computing: Vision and challenges. IEEE Internet Things J. 2016, 3, 637–646. [Google Scholar] [CrossRef]
  23. Wang, X. Smart edge computing: A bridge from the Internet of Everything to the Empowerment of Everything. Acad. Front. 2020, 9, 6–17+77. [Google Scholar]
Figure 1. The general framework of the system.
Figure 1. The general framework of the system.
Sensors 22 09260 g001
Figure 2. The general framework of the hardware.
Figure 2. The general framework of the hardware.
Sensors 22 09260 g002
Figure 3. The architecture of edge image processing module.
Figure 3. The architecture of edge image processing module.
Sensors 22 09260 g003
Figure 4. The basic network architecture of edge-computing.
Figure 4. The basic network architecture of edge-computing.
Sensors 22 09260 g004
Figure 5. Data acquisition circuit: The number stands for the pin.
Figure 5. Data acquisition circuit: The number stands for the pin.
Sensors 22 09260 g005
Figure 6. Main control circuit and peripheral interaction circuit: The number stands for the pin.
Figure 6. Main control circuit and peripheral interaction circuit: The number stands for the pin.
Sensors 22 09260 g006
Figure 7. Physical picture of data acquisition node and transceiver.
Figure 7. Physical picture of data acquisition node and transceiver.
Sensors 22 09260 g007
Figure 8. Block program diagram of intelligent sensing unit.
Figure 8. Block program diagram of intelligent sensing unit.
Sensors 22 09260 g008
Figure 9. Block program diagram of wireless transmission network.
Figure 9. Block program diagram of wireless transmission network.
Sensors 22 09260 g009
Figure 10. The architecture of the application layer.
Figure 10. The architecture of the application layer.
Sensors 22 09260 g010
Figure 11. Block diagram of the Mini Program function.
Figure 11. Block diagram of the Mini Program function.
Sensors 22 09260 g011
Figure 12. Pages of Mini Program for monitoring aquaponics system. (a) The curves of 3 environment indicators in 24 h; (b) Page of real-time system monitoring.
Figure 12. Pages of Mini Program for monitoring aquaponics system. (a) The curves of 3 environment indicators in 24 h; (b) Page of real-time system monitoring.
Sensors 22 09260 g012
Figure 13. Proposed aquaponics system.
Figure 13. Proposed aquaponics system.
Sensors 22 09260 g013
Figure 14. System record value and manual sampling of DO.
Figure 14. System record value and manual sampling of DO.
Sensors 22 09260 g014
Figure 15. System record value and manual sampling of light intensity.
Figure 15. System record value and manual sampling of light intensity.
Sensors 22 09260 g015
Figure 16. System record value and manual sampling of plant height.
Figure 16. System record value and manual sampling of plant height.
Sensors 22 09260 g016
Table 1. Parameters of sensors.
Table 1. Parameters of sensors.
SensorsMeasurement RangeOutput TypePrecision
SGP300~60,000 ppmI2C15%
DHT11TEM: 0~50 °C; HUM: 20~90% RH1-Wire®TEM: ±1%; HUM: ±4%
BH17501~65535 LxI2C±20%
DS18B2055~125 °C1-Wire®±0.5 °C
Table 2. AT instruction set of ESP8266.
Table 2. AT instruction set of ESP8266.
DescriptionInstructionResponse
TestATOK
Reset (restart)AT + RSTOK
Set baud rateAT + CIOBAUD = BaudRateOK
Set working modeAT + CWMODE = ModeOK
Set the pass-through modeAT + CIPMODE = ModeOK
Query the connected AP currentlyAT + CWJAP?Current AP Information
Connecting to HotspotsAT + CWJAP = “SSID”,
“password”
OK
Set the single connection modeAT + CIPMUX = 0OK
Establishing a TCP connectionAT + CIPSTART = “TCP”, XXXXOK
Transmission of dataAT + CIPSENDOK
Table 3. Packet loss rate of the wireless transmission network.
Table 3. Packet loss rate of the wireless transmission network.
FNDIS/mNOP/pcNORP/pcPLR/%
1505005000
2705005000
3905005000
41105004843.2
51505004784.4
62005004559
Table 4. Comparison of the results of DO value.
Table 4. Comparison of the results of DO value.
FNDateTimeSystem RecordManual SamplingMAEMSERMSE
17/2509:007.817.750.0930.0120.111
27/2512:007.387.29
37/2515:007.697.57
47/2518:007.387.26
57/2521:007.547.44
67/2609:007.587.50
77/2612:007.357.29
87/2615:007.367.33
97/2618:007.577.29
107/2621:007.717.66
117/2709:007.517.38
127/2712:007.537.47
137/2715:007.417.39
147/2718:007.507.39
157/2721:007.637.54
Table 5. Comparison of the results of light intensity value.
Table 5. Comparison of the results of light intensity value.
FNDateTimeSystem Record/103 LxManual Sampling/103 LxMAEMSERMSE
19/1009:006.7996.6800.045 0.082
29/1012:003.3123.280
39/1015:001.6781.650
49/1018:000.3550.350
59/1021:000.0380.040
69/1109:005.8895.800
79/1112:002.2892.310
89/1115:001.1731.1400.007
99/1118:000.3200.300
109/1121:000.0350.033
119/1209:0019.87019.600
129/1212:001.7331.750
139/1215:001.2951.320
149/1218:000.2680.259
159/1221:000.0410.038
Table 6. Comparison of the results of plant height value.
Table 6. Comparison of the results of plant height value.
FNDateSystem RecordManual SamplingMAEMSERMSE
17/2015.5316.200.7580.5830.763
27/2517.5318.27
37/3018.5719.17
48/418.9919.77
58/920.3021.17
68/1421.5122.33
78/1922.3223.15
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Share and Cite

MDPI and ACS Style

Wan, S.; Zhao, K.; Lu, Z.; Li, J.; Lu, T.; Wang, H. A Modularized IoT Monitoring System with Edge-Computing for Aquaponics. Sensors 2022, 22, 9260. https://doi.org/10.3390/s22239260

AMA Style

Wan S, Zhao K, Lu Z, Li J, Lu T, Wang H. A Modularized IoT Monitoring System with Edge-Computing for Aquaponics. Sensors. 2022; 22(23):9260. https://doi.org/10.3390/s22239260

Chicago/Turabian Style

Wan, Shiqi, Kexin Zhao, Zhongling Lu, Jianke Li, Tiangang Lu, and Haihua Wang. 2022. "A Modularized IoT Monitoring System with Edge-Computing for Aquaponics" Sensors 22, no. 23: 9260. https://doi.org/10.3390/s22239260

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