Dissolved oxygen sensor is the key of dissolved oxygen measurement and it is usually implemented by electrochemical method, which measures dissolved oxygen content by the diffusion rate of molecular oxygen through film. However, the film on the electrochemical sensor probe is most likely to be blocked up by the waterborne contaminant, which may reduce the service life of the sensor and the indirect influence on the sensor’s current. This is caused by changes of water temperature, which may lead to the decline in the accuracy of the sensor’s output. This paper suggests a new method to implement the intelligent dissolved oxygen sensor. Our method mainly aims at ultrasonic automatic cleaning, automatic adjustment, and adaptation for the changes of temperature, which can not only regularly clean the dissolved oxygen sensor probe but also automatically calibrate the instruments based on the changes of temperature by combining software and hardware. The experiments show that the ultrasonic cleaning technology can not only increase the service life of the sensor by cleaning the film on the probe safely and effectively but also improve the accuracy of the sensor’s output. Our method also has the advantages of simple structure, high accuracy of measurement, long service life, convenience, and stability, which is suitable for application and popularization.

1. Introduction

Dissolved oxygen [1] is not only a main parameter to characterization of water environment quality but also an essential condition for the survival of higher aquatic animals such as fish. The dissolved oxygen measurement is of great significance for the environmental monitoring and the development of aquaculture.

The common methods of dissolved oxygen measurement are iodimetry [2, 3], current measurement (Clark dissolved oxygen electrode) [4, 5], fiber-optic fluorescence quenching [68], and so on. Iodimetry is a classical method of dissolved oxygen measurement with high accuracy, but since it is time-consuming and laborious, it is unsuitable for online monitoring. Fiber-optic fluorescence quenching has complex manufacturing process and high manufacturing cost, so it is less used at present. Current measurement is an electrochemical method that obtains the dissolved oxygen content by measuring the current of dissolved oxygen sensor. Since the sensor solves the online measurement problem of dissolved oxygen and it is simple, fast, and not easy to be affected by chromaticity of water, turbidity of water, and impurities, it is widely used in water quality environmental measurement. Liu et al. proposed the measuring instrument of dissolved oxygen based on MSP430 [9]. Li et al. set forward the AVR in Detection of Dissolved Oxygen [10], Dong and Zhan designed an automatic control system based on ZigBee technology for the oxyty in fresh water cultivation [11]. The design conducted effective researches on the principle, structure, and system of the online measurement of dissolved oxygen. Nowadays, neural network [12, 13], self-adaptive methods, machine learning, and deep learning have been successfully applied in various fields and achieved significant results [1416].

However, the probe of dissolved oxygen sensor is easy to be blocked up by algae and phytoplankton in water, which leads it to not be able to continuously work for a long time and it cannot be used in projects, and the change of water temperature can easily increase the output current of the probe and indirectly affects the accuracy of measurement. In order to solve the above problems and improve the accuracy of measurement, this paper suggests a new design of dissolved oxygen sensor based on ultrasonic self-adaption and self-cleaning. This novel dissolved oxygen sensor with cleaning mechanism and automatic calibration solves the problem of pollution and blockage, which leads to the continuous decrement of the sensitivity of probe, improves the accuracy of measurement, and produces a barrier-free dissolved oxygen sensor with long service life and high precision.

2. Structure of System

2.1. Overall Structure of Measurement System

The dissolved oxygen sensor is an advanced intelligent sensor, which has an important component of the dissolved oxygen measurement system. The dissolved oxygen measurement system is shown in Figure 1. It includes some intelligent dissolved oxygen sensors with remote communication function, a cloud server, and some intelligent terminals such as mobile phones. Among them, the intelligent dissolved oxygen sensors measure the water temperature and the dissolved oxygen content, upload data, automatically clean the probe, and adapt to temperature for calibration. The cloud server stores the data uploaded by intelligent dissolved oxygen sensors and the control command of intelligent terminals. The intelligent terminals monitor the status of water temperature and dissolved oxygen in real time, dynamically display the historical curve, and send the control commands such as cleaning and calibration.

2.2. Circuit Composition

The main functions of an intelligent dissolved oxygen sensor are to measure the water temperature, measure the dissolved oxygen content, calibrate the system, and clean the probe automatically. Its structure is shown in Figure 2. It is composed of an embedded microcontroller (MCU), a one-wire digital temperature sensor, a primary battery dissolved oxygen sensor, an operational amplifier circuit, a relay module group, an ultrasonic power supply, an ultrasonic transducer, a system power supply, and the GPRS/4G module.

The MCU requires a certain amount of IO, enough timers and interrupts, an analog-to-digital converter (ADC), a one-wire interface, an universal asynchronous serial interface, and other universal interfaces, as well as a watchdog timer and strong anti-interference ability. It is suitable to choose STM32 series products of Italian French Semiconductor Company, PIC series products of Microchip Company, or relevant compatible microcontroller products as MCU.

The operational amplifying circuit is applied to amplify the millivolt level voltage signal output by the dissolved oxygen sensor almost 100 times and complete the measurement with the ADC in MCU. Since most of the ADC in MCU is 10-bit precision or 12-bit precision, the products that are not satisfied with such settings need the higher measurement precision in order to add 16-bit or 24-bit special ADC module in the back end of operational amplifier circuit such as AD7705, MAX195, AD7710, and ADuC845.

DS18B20 [1719] can be used as the temperature sensor, which is flexible and portable and has high precision. It can provide temperature in the range of −55°C∼125°C with precision of ±0.5°C. DS18B20 uses one-wire interface, which is simple to connect with MCU and convenient to be applied.

The relay module group is applied to control the ultrasonic power supply and submersible pump in order to automatically clean the probe.

GPRS/4G module is applied to connect the cloud server remotely and build a communication channel for the establishment of intelligent aquaculture Internet of things system and the implementation of remote monitoring of intelligent terminals.

2.3. Dissolved Oxygen Sensor

The intelligent dissolved oxygen sensor is the front end of the measurement system. Its quality, service life, and accuracy are the basis of water environment monitoring and aquaculture development. A good design ensures the safety, the accuracy, the stability, and a long service life of the measurement system.

In general, coated primary battery electrode or polarographic electrode is used as the electrode of dissolved oxygen sensor, so the sensor is essentially an oxygen battery, with oxygen as its cathode and lead as its anode. The sensor’s cathode is usually made of silver wire, which is filled with electrolyte inside and covered with coating outside for isolation, since oxygen needs to be discharged by metal. The molecular oxygen in water enters the sensor through the permeable film and meets the electrode, which leads to the oxidation-reduction reaction; then the cathode of the electrode outputs the microlevel current. The reaction formulas that take place in battery are as follows:Cathode: O2 + 2H2O + 4e⟶4OHAnode: 2Pb + 4OH−⟶2Pb(OH)2 + 4e−Total chemical equation: O2 + 2Pb + 2H2O⟶2Pb(OH)2

The coated oxygen sensor is a current element. In the coated oxygen sensor, the current outputted by the electrode is proportional to the oxygen consumption, and the rate of oxygen passing through the film is also proportional to the pressure on the film. Since oxygen is consumed rapidly at the cathode, it can be assumed that there is no pressure on the film, which will lead to the diffusion of oxygen, and that the force through the film and the pressure on the film both force the oxygen to reach the electrode rapidly. If the pressure outside the probe increases, more dissolved oxygen will diffuse through the film and more current will be generated. Otherwise, the current decreases, which can be described by the diffusion current model. The related formula is as follows:

In this formula, n is the number of electrons in electrode reaction, F is the Faraday constant, A is the surface area of the cathode, D is the coefficient of oxygen diffusion, L is the distance from the outer surface of the permeable film to the surface of the cathode, and C is the partial pressure of oxygen. According to Faraday’s law, when the material and structure of battery are determined, the current generated by the diffusion of molecular oxygen through the film to the electrode is proportional to the partial pressure of oxygen at certain temperatures, which can be expressed as linear element: .

3. Mechanical Structure of Intelligent Sensor

Intelligent sensor is a digital measurement system rather than a common sensor element. It has the rational and perfect design including MCU, conditioning circuit, communication circuit, measurement mechanism, and cleaning mechanism. It is not only convenient in output control and function enhancement but also has a short learning curve. The mechanical structure of intelligent sensor is shown in Figure 3. The sensor system floats on the surface of water; the upper part of it (above the surface) and the lower part of it (below the surface) are both in the shape of cylinders, and the middle part of it is in the shape of a disc (floating on the surface). The groove in the center of the upper part is embedded with a dissolved oxygen probe, and the cavity around it is used to contain the water which is pumped up by the submersible pump and needs to be measured. One side of the lower edge of the middle part is the water inlet which is connected with a small submersible pump, and another side is the lower water outlet, while the upper water outlet is on the upper part. The upper water outlet with a large opening is the main water outlet, and the lower water outlet with a small opening is the auxiliary water outlet. The flow direction of water is also shown in Figure 3. The purpose of this design is to provide water for the probe, while the water flows in a suitable speed, and prepare for air calibration (see Section 4) by stopping the submersible pump, draining the water, and exposing the dissolved oxygen probe to the air. The temperature sensor which is inserted into the bottom shell of the upper part is used to measure the temperature of the water in cavity.

The middle part is designed as a disc in order to float on the water and store enough flowing water to be measured. The lower part is used to put the ultrasonic transducer and the ultrasonic power supply and they are both set below the water line. Such setting has two advantages: firstly, the temperature below the water line is lower than the temperature above, which is convenient for the heat dissipation of the ultrasonic power supply; secondly, the weight of the ultrasonic transducer and the ultrasonic power supply is large enough to be used as the counterweight of the system in order to prevent the system structure from overturning. However, there is a difficulty in manufacture that it is hard to ensure the features of waterproofing and sealing in ultrasonic transducer and ultrasonic power supply shell.

4. The Design of Automatic Cleaning

The effect of the permeable film on the probe is to make the molecular oxygen in water permeate through it from the outside under the push of dissolved partial pressure and react with the electrode in the probe to generate current, while water, organic matter, and other macromolecules are blocked outside the film at the same time. Due to the selective feature of the film, the organic matter will be stuck on the surface of the film and lead to the film pollution, which is the main factor that limits the sensor to continuous work for a long time. Therefore, the effective cleaning of the permeable film is a good way to extend the sensor’s service life. Common cleaning methods include biological cleaning, chemical cleaning, and physical cleaning.

Biological cleaning is to remove the contaminants on the film with the help of microorganisms, enzymes, and other biological active agents. Its weakness is that the cleaning takes a long time and it is prone to secondary pollution after cleaning. Chemical cleaning is to soak and clean the film with a cleaning solution added with a suitable chemical agent. Its weakness is that the cleaning is time-consuming, laborious, and unsafe. Both of the above cleaning methods can improve the permeability of the film, but there is also a possibility that they introduce new contaminants and damage the film. Otherwise, they are complex in operation and have low reliability.

Physical cleaning includes mechanical method and ultrasonic method. Mechanical methods, such as manual wiping, water washing, and automatic wiping mechanism, have several disadvantages such as difficult cleaning operation, poor cleaning effect, and high damage rate since the thickness of the probe film is usually 20–40 μm.

Ultrasonic cleaning is to use the cavitation effect of ultrasonic to break down the adsorption of the dirt and the surface of the cleaning parts and destroy the dirt layer. The cavitation effect is that the micro bubble (cavitation core) in the liquid vibrates under the periodic action of ultrasonic, so the micro bubble in the liquid will expand rapidly and then suddenly close. At the moment of bubble closing, the strong shock wave and the high-temperature and high-speed micro jet will be generated, and the shock wave will hit on the interface between solid and liquid. In addition, the high-temperature and high-speed micro jet will hit on the surface of the film. It will destroy the insoluble dirt, wash the particles and organic substances away, and make them separate and disperse in the liquid, so as to achieve the purpose of cleaning.

Cui et al., combined with the application of the technology of ultrasonic cleaning and the research of relative influencing factors, looked forward to the development’s direction of ultrasonic cleaning technology [20, 21]; Huang and Mo investigated the film pollution and the cleaning statue of water source polluted by suspended growth MBR and two kinds of adherent growth MBR [22]; the results showed that the ultrasonic cleaning can significantly improve the performance of the film with high surface viscosity polluted by adherent growth MBR. The previously mentioned researches show that the ultrasonic cleaning technology will be suitable for the cleaning of the film of the dissolved oxygen sensor probe if the cleaning mechanism is designed reasonably and the working parameters are selected appropriately.

In this design, the ultrasonic cleaning mechanism is located at the bottom of the sensor system, with the transducer facing up and facing the vertical probe, which means that the ultrasonic cleaning mechanism is especially designed for the cleaning. In the process of the cleaning, the submersible pump keeps working normally and the cavity is full of water, which is used as cleaning fluid. After the repeated experiments, this paper finds that it can ensure the probe’s nondestructive cleaning and long-term use when the working frequency is 28 kHz, the transducer is 50 W, the cleaning period is four times a day, and the cleaning time is 20 seconds.

The flow chart of regular automatic cleaning is shown in Figure 4. The concentration polarization of the electrolyte in the sensor is caused by ultrasonic wave; that is, the concentration of the electrolyte near the two electrodes is obviously higher than the electrolyte itself; the electrode potential of the anode or cathode of the sensor deviates from the equal potential produced by the concentration of the electrolyte itself, which causes the output current of the sensor to change greatly and the result of measurement to increase suddenly, so the system cannot normally measure the dissolved oxygen content. Therefore, the system stops data sampling in the process of cleaning and after the process of cleaning in order to prevent the collection of the error data with large deviation.

5. Temperature Compensation Design

The temperature compensation of an instrument is to correct the final parameters (indirect parameters), which are easily affected by the temperature.

The measurement of dissolved oxygen is a relative measuring method, which obtains the dissolved oxygen content by linear calculation through measuring the output current of the sensor. Due to the limitation of thickness of the film, the electrolyte concentration, the purity of lead silver metal, and the manufacturing level, the output current of each sensor probe is different. Therefore, zero calibration and span calibration should be carried out before measurement, that is, calibrating the instrument’s current value of the zero point and the saturation point under a certain temperature t. Since the current value of zero point corresponds to the zero dissolved oxygen value and the current value of saturation point corresponds to the saturated dissolved oxygen value under temperature t and there is a linear relationship between the dissolved oxygen content and the output current of the electrode when the temperature is constant, the two-point calibration can determine the coefficient of linear relationship between current and dissolved oxygen kt, and the mapping relationship between current and dissolved oxygen at temperature t is established. For example, if the dissolved oxygen sensor system is calibrated at 20°C, i = k20c can be used for accurate calculation to obtain the accurate dissolved oxygen content when the water is at 20°C.

Figure 5 is a comparison of the relationship between dissolved oxygen saturation and temperature under ordinary temperature, salinity of 0°C, and standard atmospheric pressure. Since the relationship between dissolved oxygen saturation and temperature is not linear just like the example above, k20 cannot be used to calculate the dissolved oxygen content when the temperature rises to 22°C or falls to 18°C. The calibration line has different slopes at different temperatures. Since the linear relationship between the electrode current and oxygen partial pressure is based on environmental temperature, if the temperature of water changes, the output current will increase or decrease. For example, with the increment of temperature, the oxygen penetration coefficient of the film will increase and the diffusion coefficient of dissolved oxygen in the electrolyte solution will increase, so the permeability of dissolved oxygen will increase, which leads to the increment of the reaction speed of electrode and the change of the signal of current, so the indirect measurement results of dissolved oxygen content will also increase. At the same time, the oxygen partial pressure may remain or change very little, so the dissolved oxygen content will remain and the change of temperature will change the probe’s current output and lead to an inaccurate measurement. Therefore, the probe should be compensated based on temperature.

Ding et al. put forward a compensation and correction method for intelligent dissolved oxygen sensor [23]. Zhang and Shao studied the characteristics of the temperature of dissolved oxygen sensor [24], analyzed the temperature compensation of oxygen electrode, and designed a software compensation method. The accuracy of dissolved oxygen measurement can be significantly improved when the difference between the calibration temperature and the water temperature is small. However, the software temperature compensation may miscalculate the dissolved oxygen content when the difference is large enough (±8°C). Moreover, the third-order polynomial which is used to fit the slope of the temperature saturated dissolved oxygen degree may cause too heavy burden of MCU, which is inconvenient and impractical. Therefore, it is necessary to study and design a new and advanced temperature compensation method to improve the accuracy of dissolved oxygen measurement.

In this paper, a method combining software temperature compensation with real-time recalibration is suggested. In this new method, the linear temperature compensation model is used when the temperature difference is tiny, and the real-time recalibration is used when temperature difference is large, which means that the measured water temperature is within the range of ±2°C of the calibration temperature. At first, it uses the formulation D = KT + b to correct the saturated solubility, and then it uses the formulation i = ktc to indirectly calculate the dissolved oxygen content (partial pressure of dissolved oxygen). If the water temperature is outside the range of ±2°C of the calibration temperature, it needs to recalibrate and calibrate the instrument at a new temperature to determine new kt. On one hand, since the zero calibration of the instrument is generally determined by anaerobic water before the product leaving factory and is hardly affected by the temperature, the recalibration can be ignored. On the other hand, there are four kinds of span calibration: classical chemical method, air calibration method, water calibration method, and electrolytic oxygen calibration method, and air calibration method and water calibration method are usually used in online measurement. In this paper, air calibration method is selected to be implemented.

Air calibration method is also known as air calibration for water’s saturated vapor. When the water is saturated by air at a certain temperature, the partial pressure of dissolved oxygen is equal to the partial pressure of oxygen in the air on the surface of water, so the rate of oxygen entering the water from the air is equal to the rate of oxygen escaping from the water to the air. Therefore, no matter whether the electrode is immersed in water or placed in the air, it can produce the same current, and the method that is based on it is known as air calibration method. The air calibration method is easy to implement and is able to measure at high accuracy, so it is one of the best methods for on-site calibration.

The air calibration process of the sensor is shown in Figure 6. It turns off the submersible pump at first and then drains the water and waits for 60 seconds, measures the temperature and current by adjusting the slope of the dissolved oxygen instrument based on Figure 6, and recalibrates the dissolved oxygen electrode at last.

6. Experiment and Discussion

There are two different aquaculture ponds selected for experiments below. The experiments mainly focus on two aspects of the probe. Experiment 1 was used to reveal the effect of ultrasonic cleaning on the durability of the probe. Experiment 2 was used to reveal the influence of the new temperature compensation technology on the accuracy of the measurement.

6.1. Experiment 1

There is an outdoor soil pond as aquaculture pond which is sunny and rich in algae. The main way to increase dissolved oxygen content is to naturally add oxygen, and the auxiliary way is to add oxygen by aerator. The aquaculture organism is Penaeus vannamei. The temperature of water is usually 25 ± 3°C. The measurement time each day is from 15:00 to 17:00 and the experiment lasts for 90 days. Among them, A corresponds to the results measured by iodimetry, B corresponds to the results measured by the probe which is periodically ultrasonic cleaned, and C corresponds to the results measured by the probe which is never cleaned. The results are shown in Figures 7 and 8.

The results show that the C-type probe’s relative error increases and its result of measurement decreases with the passing of time. In the 30th day, the C-type probe’s relative error has reached 30.3%, which means that this probe can no longer be used for measurement. However, the B-type probe can continuously work for more than 90 days and its relative error is still less than 1%. In practice, the sensor with B-type probe has already continuously worked for more than one year; it still does not need to replace the film or the electrolyte and its attenuation of output is less than 5%.

6.2. Experiment 2

There is an indoor factory-built cement pond as aquaculture pond. Its pond is paved with micropore oxygenating pipe. There are little algae in the water and the main way to increase dissolved oxygen content is to artificially add oxygen. The aquaculture organism is gentian grouper. The temperature of water changes in real time and the measurement time each day is from 8:00 to 18:00. Among them, A corresponds to the results measured by iodimetry, B corresponds to the results measured by the probe with software temperature compensation and real-time calibration, and C corresponds to the results measured by the probe which is only calibrated at 23°C. The results are shown in Figures 9 and 10.

The results show that the C-type probe’s relative error increases with the temperature deviation of 23°C (calibrated temperature) and its relative error reaches 2.38% at the maximum, though it retains the software temperature compensation. Meanwhile the B-type probe’s relative error is less than 1%, which means that it has a very good accuracy on measurement.

7. Conclusion

The research shows that the new dissolved oxygen measurement system developed by MCU can reasonably solve the problem of probe cleaning after applying ultrasonic cleaning technology, since, compared with other cleaning technologies, ultrasonic cleaning technology has the advantages of higher cleaning rate, less residue, shorter cleaning time, and better cleaning effect, and it greatly prolongs the service life of the sensor. The application of software temperature compensation and real-time air calibration can significantly improve the accuracy of the measurement, achieve the continuity, stability, reliability, and accuracy in dissolved oxygen measurement in water quality environmental monitoring, and provide important data for scientific aquaculture in aquaculture industry. At present, there are about 100 sets of measuring instruments implemented in many shrimp pond farms in Beihai, Qinzhou, Fangcheng, Haikou, Sanya, Zhongshan, and Shanwei of Guangdong Province, and all of them have worked continuously for more than one year. The introduced GPRS/4G module can effectively establish the big data of water quality monitoring and aquaculture industry and the new self-cleaning self-adaptive dissolved oxygen sensor system will provide higher-quality services for water-quality monitoring and aquaculture industry.

Data Availability

The data used to support the findings of this study are included within the article.

Conflicts of Interest

The authors declare that no conflicts of interest exist. Submitting authors are responsible for coauthors declaring their interests.


The authors thank the National Natural Science Foundation of China under Grants nos. 61772147 and 61100150, the University Innovation Team Construction Project of Guangdong Province under Grant no. 2015KCXTD014, the Major Scientific Research Project of Provincial Education Department of Chinese Hunan under Grant no. 19A271, Guangdong Province Natural Science Foundation of Major Basic Research and Cultivation Project under Grant 2015A030308016, the Collaborative Innovation Major Projects of Bureau of Education of Guangzhou City under Grant 1201610005, the Guangdong Province Natural Science Foundation of Major Basic Research and Cultivation Project under Grant 2015A030308016, the Open Subject Project of State Key Laboratory of Cryptography Science and Technology under Grant MMKFKT201913, and the National Cryptography Development Fund under Grant MMJJ20170117 for their support.