# Optimization of Water Microbial Concentration Monitoring System Based on Internet of Things

Authors: Miaomiao Zheng; Shanshan Zhang; Yidan Zhang; Baozhong Hu
Journal: Complexity
 (2021)

---

## Abstract

The Internet of Things is an emerging information industry. Applying the information collection, transmission, and processing technologies in the Internet of Things technology to environmental monitoring, environmental emergency, and other environmental protection supervision fields will greatly improve the speed and accuracy of environmental supervision and facilitate the scientific development of environmental protection. Through the Internet of Things, people can obtain a large amount of reliable real-time information, and it is not easy to be affected by time, place, and environment, while the wireless sensor network has the advantages of easy installation and low cost, so environmental monitoring through the Internet of Things is the future development trend. In this paper, in view of the current situation of water scarcity and serious water pollution in China, combined with the development trend and advantages of the Internet of Things (IoT), and based on the inadequacy of the existing microbial sensor data collection equipment, we propose a design scheme of microbial concentration monitoring system for waters based on IoT. The system is based on Zig Bee wireless sensor network to build a common data acquisition platform and design special hardware to carry out high-precision microbial sensor data acquisition in water and through the PC to complete the real-time measurement data storage, waveform display, and data processing. In this paper, the schematic diagram and PCB board design of the system hardware module NUC120 main control board, CC2530 RF board, Wi-Fi wireless communication module, and high-precision ADC acquisition module are completed and fabricated. Then, the four modules are combined to realize the development of the data aggregation node and data acquisition node of the dedicated Zig Bee wireless network hardware device.


---

## Body

## 1. Introduction

The trend of strengthening resource and environmental constraints has not yet fundamentally changed, and the task of optimizing economic development for environmental protection is still arduous [1]. At this stage, it is necessary to save natural resources, change the rough production method, and improve resource utilization and reduce pollution on the basis of scientific development, so as to achieve ultimately sustainable development [2]. With the maturity and rapid development of wireless communication, computer network, sensor network, and embedded and other technologies, people put forward the concept of the “Internet of Things,” hoping to realize the seamless connection between people and things and things through the Internet and sensor network [3]. The Internet of Things is an emerging information industry [4]. Applying the information collection, transmission, and processing technologies in the Internet of Things technology to environmental monitoring, environmental emergency, and other environmental protection supervision fields will greatly improve the speed and accuracy of environmental supervision and facilitate the scientific development of environmental protection [5]. Through the Internet of Things, people can obtain a large amount of reliable real-time information, and it is not easy to be affected by time, place, and environment, while the wireless sensor network has the advantages of easy installation and low cost, so environmental monitoring through the Internet of Things is the future development trend [6].Microbial sensors play an increasingly important role in water quality testing, for example, BOD sensors can achieve online monitoring, to overcome the traditional 5-day incubation method to obtain data lag, and instrumentation costs and testing costs are low [7]. However, there is no supporting data acquisition and wireless transmission system for such sensors, thus limiting their scope of application. This topic comes from the need to implement remote monitoring of microbial concentration in water bodies, requiring the use of wireless methods to achieve data acquisition of microbial sensors, through the detection of microbial concentration in the water body to calculate the microbial content, so as to provide a reference basis for the determination of good and bad water quality and pollution control [8]. At this stage, researchers in the water body microbial content measurement using pen recorder to microbial sensors converted analog signal waveform to record [9]. After the test is completed, the testers manually transcribe the data from the coordinate paper and complete the data conversion and then calculate the microbial content data; the workflow is shown in Figure 1. Through electronic tags, wireless sensors, perceptrons, and RFID technology in the Internet of Things (IoT), microorganisms can be monitored and tracked throughout the process, and the required assessment indicators can be uploaded to the IoT. However, with the rapid development of the aquaculture industry, a variety of microbial concentration problems followed, including microbial farming, processing, and distribution to consumption of various aspects [10]. Microorganisms in the breeding process of fishery medicine, microbial contamination, processing and production process of illegal additive pollution, and environmental pollution, as well as those in the microbial transport process and its compartment environment on the quality of microorganisms caused by the danger, such as the Qingdao formalin-soaked baby silverfish incident exposed in April 2011, the Jiangsu mercury swordfish incident, and the shrimp products in the EU were detected to contain chloramphenicol [11]. The frequent microbiological safety incidents not only affect people's health and even endanger their lives but also have a bad impact on the country’s economic development and social stability. For this reason, food safety issues are a key concern in countries around the world, including the United Nations Agrifood Organization and the World Health Organization. With the development of global economic integration, countries and regions are closely linked, and if a food safety incident occurs in one country or region, it will have a negative impact on the food safety of imports and exports in other countries [12]. The United States, South Korea, Japan, Norway, and other countries have made some progress in microbial safety assessment after continuous exploration and research to find the corresponding assessment methods, while China is compared with developed countries, whether from the safety management of microorganisms or laws and regulations and safety determination; there is a very large deficiency [13]. Through the wireless sensor network to carry out real-time tracking and monitoring of microorganisms, the required assessment indicators involve multiple links, assessment indicators are more, many assessment indicators are not easy to obtain, and manual collection of assessment indicators was time-consuming and labor-intensive.Figure 1
Existing process of microbial concentration detection in water.This paper requires real-time monitoring of microbial concentration in water through a wireless network, so as to provide a reference basis for judging the quality of water and the treatment of polluted water bodies. The development of wireless sensor networks, especially the emergence of Zig Bee wireless communication technology, provides a new solution for establishing wireless water microbial concentration monitoring. In this paper, we propose the design and implementation of a microbial concentration monitoring system for waters in the IoT environment and the wireless acquisition of microbial sensor data through Zig Bee technology. The main work of this thesis is as follows. First, the research background of the topic is introduced, the current research status of IoT is outlined, and the potential advantages of Zig Bee technology in microbial concentration monitoring are analyzed. According to the actual demand of microbial sensor data monitoring, the overall scheme design and demonstration of microbial concentration monitoring system in waters are completed. The hardware and software structure and custom communication frame format of the system are determined, and the functions and design requirements of each component module of the system are clarified. Secondly, according to the development requirements of system hardware modules, the schematic diagram and PBC board design of the NUC120 main control baseboard, CC2530 RF board, Wi-Fi wireless communication module, and high-precision ADC acquisition module are completed, and the physical objects are made. Through the module combination, the data aggregation node and data acquisition node of the Zig Bee wireless network hardware device are obtained. Finally, the NUC120 main control baseboard and CC2530 RF board are programmed to realize the wireless communication of the Zig Bee network and the acquisition of microbial sensor data; the Lab VIEW software is used to develop the system upper computer monitoring software to realize the control of data acquisition nodes and the storage, display, and processing of sensor data. The experimental test results show that the system can meet the data acquisition requirements of microbial sensors and can completely replace the existing paper recorders. The system is technically characterized by stable and reliable data communication, high measurement accuracy, good scalability, novel design, and good promotion value in application.


## 2. Related Work

In order to meet the requirements of low-power wireless communication for IoT, the wireless communication technology standards used include Ir DA, Bluetooth, and Zig Bee, and their characteristics are introduced as follows [14]. IrDA is a point-to-point wireless data transmission protocol, whose communication medium is near-infrared with a wavelength of about 900 nm, the transmission rate is up to 16 Mbps, and the communication distance is generally between 0 and 1 meter, with strong confidentiality, suitable for transmitting large-capacity files and multimedia data over short distances. Since Ir DA is a line-of-sight communication, the communicating devices cannot be separated by other objects and must be aligned, so this communication method is only applicable to the connection between 2 (not multiple) devices [15]. Bluetooth works in the 2.4 GHz ISM band, with data transmission bandwidth up to 1 Mbps, and can realize wireless data transmission from a single point to multiple points (up to seven points) within a radius of 10 meters. However, the hardware cost of this communication method is high, the number of online communication devices supported is small, and the technology development is not mature enough [16]. Zig Bee uses IEEE 802.15.4 protocol, it is a new generation of wireless sensor network technology with very low complexity, cost, and power consumption, its communication rate is 20∼250 kpbs, mainly applicable to the field of automatic control and remote control with low-rate data transmission, and it has the following advantages [17].(1)
Low latency: Zig Bee’s response time is fast, generally it takes only 15 ms to switch from sleep to working state, and only 30 ms for nodes to access the network, which further saves power. In comparison, Bluetooth requires 10 s to join the network for data communication(2)
Low power consumption: the equipment has a low standby leakage current and can operate for months or even years under standard battery power conditions(3)
Low cost: it has simple equipment development, easy installation, low equipment cost, installation cost, and maintenance cost(4)
High network capacity: IEEE 802.15.4 standard PHY and MAC layers are used, and a single network can theoretically support up to 65535 devices(5)
Reliability: it supports MESH network protocol, with network self-recovery capabilityFrom the above comparison, it is clear that Zig Bee technology has a unique advantage in low-rate communication, making it the preferred choice for wireless communication in the IoT.Zig Bee is an emerging short-range, low-rate wireless network technology, which is the current technology standard for wireless sensor networks with the advantages of low power consumption, short delay, large network capacity, safety, and reliability, and has been widely used in the Internet of Things [18]. The application of Zig Bee wireless sensor network technology to water microbial concentration monitoring has the following advantages [19]:(1)
Easy to deploy and easy to achieve long-term monitoring. Due to the slow change of microbial sensor signal, the transmission rate required by the system is very low, and the equipment is in sleep mode most of the time. With the use of battery power, the equipment can work normally for a long time, which can effectively reduce the system maintenance cost(2)
Easy system expansion: Zig Bee network has large capacity, a star structure Zig Bee network can theoretically support up to 1 coordinator and 65536 end devices, and multiple Zig Bee networks can exist in the same area. Users can dynamically add new acquisition nodes for expansion according to actual needs, so the whole measurement system is very scalable(3)
Easy to locate the measurement nodes: each end node in the Zig Bee network has a unique IEEE address, and its IEEE address makes it easy to obtain its corresponding location from its network topology. When there are many measurement nodes in the network, the location of the faulty node can be found quickly to ensure the reliability of the systemRisk assessment of microorganisms is of great significance for microbial concentrations, not only to improve microbial concentrations, reduce the occurrence of food crisis events, and avoid causing public safety problems in society, but also to provide great convenience to our user subjects, including government agencies, enterprises and institutions, and most of all, consumers who are involved in their own safety. Since risk assessment is an important part of risk analysis, government agencies, consumers, processors, producers, etc. can know the safety or otherwise of microbial quality through the results of microbial concentration assessment [20–23].The water microbial concentration monitoring system uses integrated circuit chips to complete the entire hardware design. The measurement accuracy of the existing paper recorder is of magnitude, and in order to achieve the new equipment’s measurement accuracy no less than that of the paper recorder, the resolution of the new equipment should be less than 1μV and, at the same time, has the characteristics of anti-interference.Government agencies can use the assessment results to better monitor and control the risk of hazards occurring in microbial quality; consumers can choose microorganisms they are comfortable with based on the assessment results; the risk assessment results can also effectively restrain illegal business and operations of unscrupulous traders [24–26]. Therefore, the need to find a suitable assessment method is urgent, to establish a microbial safety risk assessment system, because there is a possible occurrence of microbial concentration problems to analyze, to be able to give accurate warnings or forecasts before unsafe events will occur, and to truly prevent problems before they occur.


## 3. Overall System Structure Design

### 3.1. Design Requirements and Objectives of the Water Microbial Concentration Monitoring System

The microbial concentration monitoring system based on the Internet of Things is mainly used to monitor the microbial concentration in the water in real time and to store, display, and analyze the microbial sensor data in real time, so as to provide a reference basis for judging the quality of water and the treatment of polluted water through the changes of microbial concentration in the water. The main functions to be achieved by this design are monitoring the change of microbial concentration in the water through Zig Bee wireless sensor network technology, realizing the high-precision acquisition of microbial sensor weak voltage signal, displaying the real-time waveform of the microbial sensor through PC monitoring software, realizing the configuration of working parameters and acquisition switch control of the acquisition node, and saving and processing the collected sensor data. It is also possible to save and process the collected sensor data. For the actual application requirements of microbial concentration monitoring in waters, the detailed design requirements and objectives of the system are as follows.(1)
Easy to install and maintain: the system adopts a wireless method to realize data transmission and uses a battery to power the collection nodes, which is easy to install, maintain, and recycle; the system can be configured by the user according to the actual needs of the number of measurement nodes, which is highly scalable(2)
The data acquisition node is small in size and high in precision(3)
Ability to control the acquisition nodes: the system is able to configure the sampling frequency of the acquisition node through the PC-based measurement and control software and to manually start and stop the sensor data acquisition operation(4)
The system upper computer monitoring software is easy to use and has strong functional scalability. The monitoring software is capable of saving sensor data, displaying real-time waveforms, calculating first- and second-order derivatives, etc. It provides software function interfaces to facilitate future expansion of system functionsAccording to the design requirements and objectives of the microbial sensor concentration monitoring system, the overall design scheme of the system is shown in Figure2 by combining Zig Bee wireless sensor network technology and computer technology. The scheme can realize the automatic monitoring of microbial sensor data and intelligent management of information, which consists of two parts: microbial sensor data acquisition network and PC monitoring software. The PC-based monitoring software is connected to the data aggregation node through a Wi-Fi network or USB cable, and the data aggregation node communicates with the data acquisition node through a Zig Bee wireless network, both of which use custom communication frames to interact with control information and forward sensor data.Figure 2
General structure framework of water microbial concentration monitoring system.The data acquisition node is an executive component of sensor data acquisition, which has three basic functions: (i) establishing wireless data communication links with the data aggregation node, (ii) receiving and parsing the control commands forwarded by the execution aggregation node, and (iii) collecting weak voltage signals from microbial sensors through the high-precision ADC acquisition module, and sending the collection results to the information aggregation node after forming frames according to the customized communication frame format.node. The data aggregation node is the connection hub between the host computer monitoring software and the data acquisition node and is the bridge for data communication between them. It also has three basic functions: (1) establishing and maintaining the Zig Bee wireless sensor network, (2) forwarding the control commands from the host computer monitoring software to the data acquisition node, and (3) collecting the microbial sensor data sent by the data acquisition node and forwarding them to the host computer monitoring software for processing.The upper computer software in the local monitoring center receives control commands from users through the user interface and sends them to the corresponding data collection nodes, while receiving the measurement data information uploaded by the data aggregation nodes to realize real-time waveform display, historical data storage, and data processing of microbial sensor data. The workflow of the single measurement of the water microbial concentration monitoring system is shown in Figure3, and its specific steps are as follows:(1)
The user sends control commands, including ADC module configuration information and start acquisition commands, to the Coordinator data aggregation node via the PC-based monitoring software(2)
The aggregation node parses the received control commands according to the custom frame format, obtains the destination EndDevice data collection node address, and then forwards the control commands(3)
The acquisition node receiving the control command parses the command, starts the ADC data acquisition module according to the parameter configuration, and periodically sends sensor data communication frames(4)
The aggregation node forwards the received sensor data directly to the host computer monitoring software(5)
PC-based monitoring software is used to store, display, and process the received sensor data(6)
When the sensor data remains basically unchanged, the user sends a stop command to the Coordinator data aggregation node via the PC monitoring software(7)
Control commands are forwarded by the aggregation node(8)
When the data acquisition node receives the stop acquisition command, the ADC acquisition module is turned off and the measurement process is finishedFigure 3
Flow chart of single waveform measurement of water microbial concentration monitoring system.


### 3.2. Overall System Hardware Composition

The hardware equipment developed for the IoT-based water microbial concentration monitoring system consists of two types of data aggregation nodes: Coordinator data aggregation nodes and EndDevice data acquisition nodes, which are composed of four general-purpose modules: NUC120 master control module, CC2530 RF module, Wi-Fi wireless communication module, and high-precision ADC acquisition module through the combination of NUC120 master control module, CC2530 RF module, Wi-Fi wireless communication module, and Wi-Fi wireless communication module. The Coordinator data aggregation node consists of NUC120 master control module, CC2530 RF module, and optional Wi-Fi wireless communication module: when the system includes Wi-Fi wireless communication module, the data aggregation node can communicate with PC wirelessly through Wi-Fi network; on the other hand, it can only communicate with PC through USB of NUC120 master control module. When the system includes the Wi-Fi wireless communication module, the data aggregation node can communicate wirelessly with the PC through the Wi-Fi network. The module composition of the device is shown in Figure4.Figure 4
Modular composition of the data aggregation node.The software of the IoT-based water microbial concentration monitoring system includes NUC120 master control software, CC2530 wireless communication software, and PC-based monitoring software. Among them, NUC120 master control software and CC2530 wireless communication software both run on Coordinator data aggregation node and EndDevice data acquisition node, and monitoring software runs on PC. The Coordinator implements the UART communication with the CC2530 RF module and Wi-Fi wireless communication module and the VCOM (virtual serial port) communication with the monitoring software on the PC through the USB interface, and it also implements the control of other peripherals such as LED indicators and buzzer through GPIO. EndDevice implements UART communication with CC2530 RF module, controls high-precision ADC acquisition module via SPI bus, and controls other peripherals such as LED indicator and buzzer via GPIO. Since most of the functions of Coordinator and EndDevice are the same, from the perspective of code reuse, the system combines the codes of Coordinator and EndDevice into one project and distinguishes their owners by macro definitions. When compiling, just define the corresponding macros for Coordinator and EndDevice, respectively, to get the code they need. The biggest advantage of this is that it is convenient to modify the underlying driver and ensure the consistency of the code. The CC2530 wireless communication software implements the same function in the Coordinator data aggregation node and the EndDevice data acquisition node, both of which implement Zig Bee wireless network data communication, but their implementation codes are different, and they are also realized by code reuse. The PC control software uses visual programming software to send control commands and display real-time waveforms, store historical data, and calculate first and second-order derivatives of sensor data by interacting with the user.


### 3.3. Selection of Assessment Indicators

There are two clusters of equivalence relationsI and Q in the sample set theoretical domain U of microbial concentration indicators, if there are(1)PcQ=PiQ,where a Q-independent subset C of I belongs to I. C is said to be a Q-compact of I. All Q-compact relational clusters of I are denoted as REDQ(I). In the sample set of microbial safety indicators in the domain U, there are two equivalent relational clusters I and Q. The Q kernel of I denotes all indispensable primitive relational clusters of Q contained in I and is denoted as COREQ(I), where(2)CI=PiQ∩RQIQx.In an information systemS of microbial concentration indicators, for a ∈ A, the dependence of the conditional attribute a on the decision attribute D is(3)aI=PiQ∩RQIU,D≤1.Given an incomplete microbial assessment index systemS0 ≤ U0, A, V, f > 0, the values of each attribute are discrete and uniformly distributed so that the conditional attribute a ∈ A has value domain N = {ai1, ai2, …, ain}, and so that x ∈ U, and there are a total of ai1. ai2, …, ain possibilities for the values of the X decision attribute D(x), ai2, ..., ain kinds. Then, x, y ∈ U, and the probability of the total probability that sample x and sample y can be taken on attribute ai is(4)pix,y=ai∗biy∪bix,qix,y=ai∗biy∩bix,pix,y=0,ai2=b∗bix,pix,y=0,ai=0.The microbial concentration assessment method under the IoT architecture is to use the RFID and EPC coding technology of the IoT sensing layer to transmit the microbial quality information to the application layer, i.e., the assessment system, through the network layer, and use the microbial concentration assessment method to complement the collected microbial concentration information, filter the data, and finally perform the microbial concentration assessment. The final microbial concentration assessment is carried out. It can be seen that the formation of the whole assessment method system is inseparable from the system architecture of the Internet of Things. The RFID and EPC coding technology of the sensing layer of the Internet transmits the microbial quality information to the application layer, i.e., the evaluation system, through the network layer, and uses the microbial concentration evaluation method to complement the collected microbial concentration information with incomplete data, filtering processing, and finally the microbial concentration evaluation. It can be seen that the formation of the whole assessment method system is inseparable from the system architecture of the Internet of Things.At the same time, the process of microbial breeding, processing, and transportation involves a large amount of information entry and update, which is a tedious and time-consuming process, while using IoT technology, the whole information is automatically stored and identified, which reduces the time and errors of manual microbial information entry and improves the work efficiency. In addition, due to the special requirements of microorganisms on temperature, it is necessary to manually carry out regular temperature checks during the transportation of microorganisms, which increases the transportation time of microorganisms and also leads to microorganisms that are not fresh and rotten. Internet of things technology through electronic tags, sensing technology, and video surveillance can monitor the whole process of microbial temperature and the environment in which it is located using sensing equipment transmitted to the microbial monitoring center; once the temperature does not meet the microbial storage temperature, you can use intelligent means to adjust its storage temperature, reduce human and material resources, and greatly improve the quality of microorganisms. And there is a timely and effective treatment of microorganisms that are about to deteriorate, reducing the economic consumption of enterprises due to microbial quality damage, reducing the cost of enterprises, and improving the efficiency of enterprises.


## 3.1. Design Requirements and Objectives of the Water Microbial Concentration Monitoring System

The microbial concentration monitoring system based on the Internet of Things is mainly used to monitor the microbial concentration in the water in real time and to store, display, and analyze the microbial sensor data in real time, so as to provide a reference basis for judging the quality of water and the treatment of polluted water through the changes of microbial concentration in the water. The main functions to be achieved by this design are monitoring the change of microbial concentration in the water through Zig Bee wireless sensor network technology, realizing the high-precision acquisition of microbial sensor weak voltage signal, displaying the real-time waveform of the microbial sensor through PC monitoring software, realizing the configuration of working parameters and acquisition switch control of the acquisition node, and saving and processing the collected sensor data. It is also possible to save and process the collected sensor data. For the actual application requirements of microbial concentration monitoring in waters, the detailed design requirements and objectives of the system are as follows.(1)
Easy to install and maintain: the system adopts a wireless method to realize data transmission and uses a battery to power the collection nodes, which is easy to install, maintain, and recycle; the system can be configured by the user according to the actual needs of the number of measurement nodes, which is highly scalable(2)
The data acquisition node is small in size and high in precision(3)
Ability to control the acquisition nodes: the system is able to configure the sampling frequency of the acquisition node through the PC-based measurement and control software and to manually start and stop the sensor data acquisition operation(4)
The system upper computer monitoring software is easy to use and has strong functional scalability. The monitoring software is capable of saving sensor data, displaying real-time waveforms, calculating first- and second-order derivatives, etc. It provides software function interfaces to facilitate future expansion of system functionsAccording to the design requirements and objectives of the microbial sensor concentration monitoring system, the overall design scheme of the system is shown in Figure2 by combining Zig Bee wireless sensor network technology and computer technology. The scheme can realize the automatic monitoring of microbial sensor data and intelligent management of information, which consists of two parts: microbial sensor data acquisition network and PC monitoring software. The PC-based monitoring software is connected to the data aggregation node through a Wi-Fi network or USB cable, and the data aggregation node communicates with the data acquisition node through a Zig Bee wireless network, both of which use custom communication frames to interact with control information and forward sensor data.Figure 2
General structure framework of water microbial concentration monitoring system.The data acquisition node is an executive component of sensor data acquisition, which has three basic functions: (i) establishing wireless data communication links with the data aggregation node, (ii) receiving and parsing the control commands forwarded by the execution aggregation node, and (iii) collecting weak voltage signals from microbial sensors through the high-precision ADC acquisition module, and sending the collection results to the information aggregation node after forming frames according to the customized communication frame format.node. The data aggregation node is the connection hub between the host computer monitoring software and the data acquisition node and is the bridge for data communication between them. It also has three basic functions: (1) establishing and maintaining the Zig Bee wireless sensor network, (2) forwarding the control commands from the host computer monitoring software to the data acquisition node, and (3) collecting the microbial sensor data sent by the data acquisition node and forwarding them to the host computer monitoring software for processing.The upper computer software in the local monitoring center receives control commands from users through the user interface and sends them to the corresponding data collection nodes, while receiving the measurement data information uploaded by the data aggregation nodes to realize real-time waveform display, historical data storage, and data processing of microbial sensor data. The workflow of the single measurement of the water microbial concentration monitoring system is shown in Figure3, and its specific steps are as follows:(1)
The user sends control commands, including ADC module configuration information and start acquisition commands, to the Coordinator data aggregation node via the PC-based monitoring software(2)
The aggregation node parses the received control commands according to the custom frame format, obtains the destination EndDevice data collection node address, and then forwards the control commands(3)
The acquisition node receiving the control command parses the command, starts the ADC data acquisition module according to the parameter configuration, and periodically sends sensor data communication frames(4)
The aggregation node forwards the received sensor data directly to the host computer monitoring software(5)
PC-based monitoring software is used to store, display, and process the received sensor data(6)
When the sensor data remains basically unchanged, the user sends a stop command to the Coordinator data aggregation node via the PC monitoring software(7)
Control commands are forwarded by the aggregation node(8)
When the data acquisition node receives the stop acquisition command, the ADC acquisition module is turned off and the measurement process is finishedFigure 3
Flow chart of single waveform measurement of water microbial concentration monitoring system.


## 3.2. Overall System Hardware Composition

The hardware equipment developed for the IoT-based water microbial concentration monitoring system consists of two types of data aggregation nodes: Coordinator data aggregation nodes and EndDevice data acquisition nodes, which are composed of four general-purpose modules: NUC120 master control module, CC2530 RF module, Wi-Fi wireless communication module, and high-precision ADC acquisition module through the combination of NUC120 master control module, CC2530 RF module, Wi-Fi wireless communication module, and Wi-Fi wireless communication module. The Coordinator data aggregation node consists of NUC120 master control module, CC2530 RF module, and optional Wi-Fi wireless communication module: when the system includes Wi-Fi wireless communication module, the data aggregation node can communicate with PC wirelessly through Wi-Fi network; on the other hand, it can only communicate with PC through USB of NUC120 master control module. When the system includes the Wi-Fi wireless communication module, the data aggregation node can communicate wirelessly with the PC through the Wi-Fi network. The module composition of the device is shown in Figure4.Figure 4
Modular composition of the data aggregation node.The software of the IoT-based water microbial concentration monitoring system includes NUC120 master control software, CC2530 wireless communication software, and PC-based monitoring software. Among them, NUC120 master control software and CC2530 wireless communication software both run on Coordinator data aggregation node and EndDevice data acquisition node, and monitoring software runs on PC. The Coordinator implements the UART communication with the CC2530 RF module and Wi-Fi wireless communication module and the VCOM (virtual serial port) communication with the monitoring software on the PC through the USB interface, and it also implements the control of other peripherals such as LED indicators and buzzer through GPIO. EndDevice implements UART communication with CC2530 RF module, controls high-precision ADC acquisition module via SPI bus, and controls other peripherals such as LED indicator and buzzer via GPIO. Since most of the functions of Coordinator and EndDevice are the same, from the perspective of code reuse, the system combines the codes of Coordinator and EndDevice into one project and distinguishes their owners by macro definitions. When compiling, just define the corresponding macros for Coordinator and EndDevice, respectively, to get the code they need. The biggest advantage of this is that it is convenient to modify the underlying driver and ensure the consistency of the code. The CC2530 wireless communication software implements the same function in the Coordinator data aggregation node and the EndDevice data acquisition node, both of which implement Zig Bee wireless network data communication, but their implementation codes are different, and they are also realized by code reuse. The PC control software uses visual programming software to send control commands and display real-time waveforms, store historical data, and calculate first and second-order derivatives of sensor data by interacting with the user.


## 3.3. Selection of Assessment Indicators

There are two clusters of equivalence relationsI and Q in the sample set theoretical domain U of microbial concentration indicators, if there are(1)PcQ=PiQ,where a Q-independent subset C of I belongs to I. C is said to be a Q-compact of I. All Q-compact relational clusters of I are denoted as REDQ(I). In the sample set of microbial safety indicators in the domain U, there are two equivalent relational clusters I and Q. The Q kernel of I denotes all indispensable primitive relational clusters of Q contained in I and is denoted as COREQ(I), where(2)CI=PiQ∩RQIQx.In an information systemS of microbial concentration indicators, for a ∈ A, the dependence of the conditional attribute a on the decision attribute D is(3)aI=PiQ∩RQIU,D≤1.Given an incomplete microbial assessment index systemS0 ≤ U0, A, V, f > 0, the values of each attribute are discrete and uniformly distributed so that the conditional attribute a ∈ A has value domain N = {ai1, ai2, …, ain}, and so that x ∈ U, and there are a total of ai1. ai2, …, ain possibilities for the values of the X decision attribute D(x), ai2, ..., ain kinds. Then, x, y ∈ U, and the probability of the total probability that sample x and sample y can be taken on attribute ai is(4)pix,y=ai∗biy∪bix,qix,y=ai∗biy∩bix,pix,y=0,ai2=b∗bix,pix,y=0,ai=0.The microbial concentration assessment method under the IoT architecture is to use the RFID and EPC coding technology of the IoT sensing layer to transmit the microbial quality information to the application layer, i.e., the assessment system, through the network layer, and use the microbial concentration assessment method to complement the collected microbial concentration information, filter the data, and finally perform the microbial concentration assessment. The final microbial concentration assessment is carried out. It can be seen that the formation of the whole assessment method system is inseparable from the system architecture of the Internet of Things. The RFID and EPC coding technology of the sensing layer of the Internet transmits the microbial quality information to the application layer, i.e., the evaluation system, through the network layer, and uses the microbial concentration evaluation method to complement the collected microbial concentration information with incomplete data, filtering processing, and finally the microbial concentration evaluation. It can be seen that the formation of the whole assessment method system is inseparable from the system architecture of the Internet of Things.At the same time, the process of microbial breeding, processing, and transportation involves a large amount of information entry and update, which is a tedious and time-consuming process, while using IoT technology, the whole information is automatically stored and identified, which reduces the time and errors of manual microbial information entry and improves the work efficiency. In addition, due to the special requirements of microorganisms on temperature, it is necessary to manually carry out regular temperature checks during the transportation of microorganisms, which increases the transportation time of microorganisms and also leads to microorganisms that are not fresh and rotten. Internet of things technology through electronic tags, sensing technology, and video surveillance can monitor the whole process of microbial temperature and the environment in which it is located using sensing equipment transmitted to the microbial monitoring center; once the temperature does not meet the microbial storage temperature, you can use intelligent means to adjust its storage temperature, reduce human and material resources, and greatly improve the quality of microorganisms. And there is a timely and effective treatment of microorganisms that are about to deteriorate, reducing the economic consumption of enterprises due to microbial quality damage, reducing the cost of enterprises, and improving the efficiency of enterprises.


## 4. System Optimization Test

In the collection of microbial concentration assessment indicators, the information initially collected, i.e., the culture stage of microorganisms, can only be guaranteed if the safety of the culture source is strictly controlled. Microbial culture information includes microbial water quality information, microbial culture management information, and aquatic seed information. Among them, the microbial culture management information includes the information of artificially placed feed, fishery medicine information, and inspection and quarantine information. Through the RFID tag in the microbial culture pool, the unique identity of each culture pool, including dissolved oxygen, water temperature, PH value, microorganisms, and heavy metals in water quality, the feed and fishery medicine put in the aquaculture process are identified by tags, which record the incoming information and use the information of feed and fishery medicine. In addition, drug residues and water quality safety information in aquaculture ponds are regularly tested and recorded on the label. The information of aquatic seeds records the virus information, heavy metal information, and microorganism information of microorganisms.Finally, the collected microbial culture information is saved in a local database and transmitted to the microbial concentration assessment platform via wireless sensors. First, after transporting the microorganisms with RFID tags from the farming origin to the processing plant, the inspectors screen and classify the microorganisms based on the basic information and health status of the microorganisms at the farming origin by scanning the tag information. Based on the microbial information and classification, the processors select the corresponding raw materials and processes for processing. Throughout the processing process, RFID tags can automatically identify and obtain data related to the product processing process, transmission route, and processing concentration as well as the operator's work number, processing process, and processing time, and transfer to the local database to facilitate data evaluation of the processing safety. After the microorganism processing is completed, the microorganism needs to be refrigerated and preserved. By scanning the information of the finished product into the warehouse, the microorganism will be placed in a fixed position, and the temperature sensor will be stored in the refrigerated room. If the temperature is lower than the microorganism refrigerated temperature, the IoT system will issue an alarm device to avoid the microorganism from deteriorating and becoming bad due to the high temperature.In addition, if you need to extract the processed microorganisms, you only need to enter the product's logo number in the system to find the microorganisms quickly, which improves the speed of microorganism shipping. The test was conducted by the PC-based measurement and control software written in Lab VIEW, using the VCOM method with USB interface, using one Coordinator data aggregation node and one EndDevice data acquisition node to sample the 1 V DC power supply (accuracy of 0.1 m V/V) at a sampling period of 1 second. A total of 64 samples were collected, and the sampling results were recorded as shown in Figure5.Figure 5
DC voltage acquisition results.From the test results, the mean value of the test data is 1.000954 V, and the standard deviation of the measurement is 3.56∗10−5 V. The mean value of the measured voltage has a positive drift, which is caused by the lack of zero adjustments, and since the voltage difference of the measured waveform is used to calculate the microbial concentration, this drift has no effect on the concentration calculation; in addition, since the DC power supply itself has a fluctuation factor of 0.1 m V/V fluctuation coefficient, compared with the fluctuation range of the microbial sensor, which is less than 1μ V/V, the accuracy of this system can fully meet the design requirements. From Figure 6, it can be seen that the waveforms obtained by the data acquisition node are in full agreement with the paper recorder and can be used for subsequent microbial sensor waveform curve tests.Figure 6
Measurement of the response signal of the standard S2 sensor.The overall architecture of microbial concentration assessment IoT means that under the three-layer architecture of IoT, firstly, the information affecting microbial concentration in each field is collected through tags and sensors in the perception layer, including the information of the breeding environment (microbial source information), the safety information of microorganisms in the transportation process, the safety information of microorganisms in the processing process, and the concentration information in the storage process, using the front-end processor reader, the infrared sensor reads the information and transmits the microbial concentration information to the application layer of the Internet of Things through the network transmission layer, and the application layer of the Internet of Things evaluates the microbial concentration by processing the collected data, including the completion of incomplete evaluation indicators and the screening of evaluation indicators, forms the microbial concentration evaluation platform and the microbial concentration warning platform, and releases and shares the evaluation information on the safety situation after the microbial evaluation. Compared to other methods, various types of microorganisms are processed through the processing plant in order to meet the various practical needs of people. Since the processing of microorganisms is complicated, it needs to be influenced by the manual operation and processing environment. Therefore, each process of microbial processing should be strictly evaluated and controlled to avoid unsafe microorganisms. The microbial concentration assessment platform and the microbial concentration warning platform will provide the government, people, and other relevant food departments with the corresponding microbial safety information to achieve the transparency of microbial concentration information so that all people can enjoy hygienic and safe microorganisms with confidence. The whole process of microbial concentration assessment is finished. The results of microbial concentration assessment under IoT architecture are shown in Figure7. The application of IoT technology in microbial safety should not be underestimated, which brings convenience to microbial concentration assessment, and also, the information of microorganisms in all aspects is collected through IoT, which enables consumers to check and choose the food of their choice at the terminal and, more importantly, ensures the concentration of microorganisms. This chapter introduces the perception layer, transmission layer, and application layer of microbial safety assessment IoT, respectively, and finally, by constructing the overall architecture diagram of product concentration assessment IoT, the whole assessment method research is integrated with the IoT architecture, which can give a clearer understanding of the microbial concentration assessment method research under the IoT architecture.Figure 7
Microbial concentration assessment results.In the 71 samples after rough set reduction, 8 evaluation indexes are initialized and normalized in the range of (−1, 1) using the S function and input into the BP network for training, the maximum number of training times of the network is 10000, and the convergence error is 0.01 using the adaptive learning rate. After simulation by MatLab, the relationship between the number of training times and the error can be obtained (Figure8). When the network training is close to 7000 times, the BP network error reaches the desired level and the network performance is more stable, so the BP neural network training process is finished. In order to better verify the effectiveness of the microbial concentration assessment method proposed in this paper, we output 71 flounder samples without rough set preprocessing directly to the BP neural network. At the training number close to 8560, the network training reaches the expected error, and its training number and convergence speed are significantly higher than those of the rough set preprocessed BP neural network, the computational complexity is higher, and the BP output and expected output values can be obtained. We input the sample without rough set processing and the sample after rough set filling and simplification to the BP neural network at the same time; due to the processing of the rough set, the evaluation index of microorganism is reduced from 12 to 8, and the dimensionality of the BP neural network is reduced. We can see that the output value of the sample after rough set preprocessing is closer to the expected output value, and its training accuracy is higher than that of the unprocessed samples.Figure 8
Concentration error plot after rough set preprocessing.


## 5. Conclusion

Because the existing paper recorder is large, bulky, and unsuitable for carrying, its data recording efficiency is low, the error rate is high, and it is not easy to reuse, this topic combines the development trend and advantages of the Internet of Things and proposes and implements the design of microbial concentration monitoring system of water based on Internet of Things. According to the actual demand of microbial sensor data measurement in water, a complete microbial concentration monitoring scheme is given, and the system can be used to monitor the microbial sensor waveform data in water in real time, so as to understand the pollution situation of the water body in time and provide reference basis for water pollution management. This paper implements the development of the NUC120 main control program and CC2530 wireless communication program on a self-designed hardware platform and completes the high-precision microbial sensor data acquisition based on the Zig Bee star network. The paper focuses on the construction of the front and backend scheduling system, the automatic timeout retransmission of data transmission, the data buffering processing of the cyclic queue method, the implementation of high-precision ADC acquisition in the NUC120, and the modification and porting of the ZStack protocol stack in the CC2530 to realize the wireless serial data forwarding based on custom frame communication. In addition, this paper also tests the system functions, including USB and Wi-Fi data communication test between NUC120 main control baseboard and upper computer, data frame communication of Zig Bee RF board, sampling accuracy test of ADC module, and waveform acquisition test of the microbial sensor.



---

*Source: 5154922-2021-05-10.xml*