A high-sensitivity multilayer soil moisture monitoring sensor based on a double high-frequency tuning detection circuit

The multilayer soil moisture Internet of things sensor is designed to monitor the moisture of multiple soil profiles in real time. Its sensitivity and accuracy are of great concern to improve the performance of sensors. This article introduces the system composition of the end-cloud integrated multilayer soil moisture Internet of things sensor and then focuses on the design of key technologies, such as the moisture detection circuit, the time division multiplexing detection technology, and the deredundancy circuit in the analog–digital integrated design. The performance of the soil moisture detection circuit is directly related to the measurement accuracy of the sensor. A detection method is proposed using a high-frequency double-resonance circuit, which can detect small changes in moisture by changing the circuit detuning voltage. The maximum root mean square error of the calibration is less than 1.35% for five typical soils from different places. Compared with that of an independent detection method, the output consistency of the time division multiplexing detection is significantly improved by using the time division multiplexing detection method, which has a root mean square error of only 0.12%. In order to reduce errors caused by inconsistency in each burial, the gravimetric analysis is used in the sensitivity monitoring test, which shows that small changes in soil moisture can be detected by the circuit.


Introduction
A multilayer soil moisture sensor can be used to monitor the moisture content in multiple soil profiles in real time and provide accurate data for the agricultural Internet of things. Its sensitivity and accuracy are of great significance for studying the water requirement of crop roots and for formulating reasonable irrigation strategies. 1 At present, there are many methods for detecting soil moisture, such as drying method, tensiometer method, neutron decay method, 2,3 X-ray method, 4 gray transmission method, 5,6 near-infrared method, 7 satellite AMSR-E sensor, 8 graphene quantum dot sensor, 9 and double-probe thermal pulse sensor. 10 The measurement of point scale is mainly based on dielectric sensor. The dielectric constant detection method [11][12][13][14] is widely used in the field of soil moisture measurements owing to its advantages of the fast measurement speed and the zero radioactivity. The main methods of dielectric constant measurements are time domain reflectometry (TDR), [15][16][17][18] the frequency domain (FD) technique, [19][20][21] and the standing wave ratio (SWR). 22 Most traditional sensors with needle-type probes are portable applications, which are not suitable for multilayer in situ soil moisture measurements.
In order to monitor the change in soil moisture at multiple measuring points synchronously, multilayer soil moisture sensors have appeared in recent years. In 2010, Sayde C et al. 23 forward a new method using a fiber optic temperature sensing to obtain accurate distributed measurements of soil water content, together with algorithm of the time integral of temperature deviation. In 2013, Italy's Majone et al. 24 used 135 single-point low-cost sensors to self-organize, consisting of 27 monitoring points (five layers for each monitoring point). Although the sensor cost is low, the system is complicated, and the calibration work is cumbersome. With the development of electronic information technology and Internet of things (IoT) technology, systems have emerged that integrate multiple analog sensors, data acquisition devices, and wireless transmission devices. In 2014, Sun Yurui and colleagues 25 from China Agricultural University designed a sensor based on the impedance principle to measure soil water content at three different soil depths. In 2016, Zhao Yandong 26 designed a three-layer soil moisture measurement sensor by using the standing wave method. The sensor working in the polyvinyl chloride (PVC) pipe buried in the soil could obtain the information of temperature and moisture of the three layers, and its performance was stable and the data were reliable. This study provides a highly efficient method for obtaining the real-time information of multilayer soil moisture and temperature.
How can one design a sensor with high sensitivity, high precision, and low cost that can measure the soil moisture in multiple layers of a vertical profile at the same time? Based on a high-frequency double-resonance loop, 27 a new detection method is proposed, which reduces the loss of cable and the nonlinear distortion of operational amplifier and improves the sensitivity, precision, and stability. It can sense small changes in soil moisture by tuning the circuit detuning voltage.

System composition
The soil moisture monitoring system integrates analog sensing, data acquisition, wireless communication, elastic compute service, and a user terminal. The structure of the system is shown in Figure 1. It measures parameters such as the moisture and temperature of multilayer soil profiles of one point simultaneously. It also measures the atmospheric pressure, air temperature, and humidity. Its appearance is shown in Figure 2. The details of the soil moisture detection circuit are shown in Figure 3, and the corresponding waveform is shown in Figure 4. The system minimizes the redundant circuits in the integrated design, and the four sensing probes use time division multiplexer circuits, taking turns occupying an analog detection circuit, which reduces the power consumption of the analog circuit to a quarter of the original power consumption. In addition, the analog and digital circuits are integrated in order to eliminate redundant circuits. The solid frame in the figure is the focus of this article and is the core technology of this system. The details of microcontroller unit (MCU) chip are shown in Figure 5(b). The time division multiplexing detection (TDMD) appearance is shown in Figure 6, and the corresponding gate chip details are shown in Figure 7.

Principle of soil moisture detection
The soil moisture detection circuit uses a doubleresonance circuit as shown in Figure 3. Researches [28][29][30] show that the different frequency of electromagnetic wave has an effect on the accuracy of moisture measurement in porous media; 100 MHz sine wave is adopted in this high-frequency oscillator. The sensing probe Cx is inserted into the soil and is connected to both ends of the detection circuit C through a cable.
The soil moisture detection circuit is shown in Figure 3, in which C * represents the capacitance and R * represents the resistance. In order to share the same circuit with multidepth moisture sensing metallic ring, connect the Cx to the YA pin of the time division multiplexing chip ch444 (Figure 7). LTC5507 is a detector tube chip that converts a high-frequency signal to a direct current (DC) voltage signal. And finally, the detection results are connected with U 1 and U 2 pins of the single chip through U 1 and U 2 (as shown in Figure 5(b)).
In the circuit, the impedance of the sensing probe is represented by Cx, which is connected to C3 in parallel through a cable. The other capacitors are all coupled, except C3 and C8, and only a high-frequency signal can pass through. The DC signal cannot pass through. R1, R2, R3, and R6 not only act as dividers but also as protective resistors to prevent over voltage breakdown of the capacitors when the circuit is in series resonance. Furthermore, R4, R5, and R7 are installed to prevent a short circuit or a high current from burning the chips. The impedance of the sensing probe is related to the soil moisture content. Therefore, when the sensing probe is in air, Cx has only a few pF, and the amplitude of u 2 is greater than the amplitude of u 1 j j, as shown in Figure 4(a). When the sensing probe is inserted into dry soil, Cx increases up to 10 pF. The first resonance occurs when Cx approaches 30 pF. The inductor L1 and C3 are series-resonant near the signal frequency of 100 MHz and there is u 1 j j= u 2 j j approximatively ( Figure 4(b)). When the soil moisture increases, Cx increases, and L1 with the parallel capacitors of Cx and C3 is detuned. The second resonance occurs when the voltage at u 1 j j increases and u 2 j j decreases as soil in the moisture increases. C8 is resonant in parallel with L1, which is connected in series to the parallel capacitors Cx and C3.
When the soil moisture content gradually changes from dry to wet, Cx gradually increases, and the circuit gradually detunes and moves away from the center frequency. That causes the magnitude of u 1 to increase  and u 2 to decrease ( Figure 4(b)). If the soil moisture content continues to increase, the magnitude of u 1 will continue to increase and u 2 will continue to decrease. In Figure 4(c), when the soil is saturated, the magnitude of u 1 increases slowly and that of u 2 decreases slowly. Suppose U out = k( u 1 j j À u 2 j j) = kDU, and k is a constant. Then, U out changes monotonously with Cx (as shown in Figure 4(d)). This is related to the permittivity of soil. Therefore, the functional relationship can be determined by a soil calibration test. The doubleresonance circuit ensures that the circuit has a high sensitivity. That is, when there is a small change in Cx (0.1% moisture), u 1 and u 2 also change.
Removing redundant circuits to eliminate measurement instability In Figure 6, the cable connection of the sensing ring and the moisture detecting circuit is critical. The moisture detection circuit is usually at the top of the tube. The longest and shortest distances between the sensing ring and the circuit is 80 and 30 cm. There will be larger attenuation using a 50O coaxial cable to transmit highfrequency signals. As a result, the sensitivity of the sensor will be reduced.
The traditional method is able to compensate for the losses in the high-frequency cable. The operational amplifier of the analog detection circuit is used to amplify the attenuated signal. Therefore, there are two potentiometers to adjust the input and amplification to ensure the consistency of each layer output, but this also increases the instability and drift of the measured output value. Figure 5(a) is the traditional and operational amplifier circuit, which is a part of the soil moisture detection circuit. AD623ARMZ is an operational amplifier chip. U 1 and U 2 are inputs from pin 3 and pin 2 of the operational amplifier after resistive subdivision. Due to the inconsistent performance of the components, the input values and amplification factors of the operational amplifier are inconsistent, which is manifested in the inconsistency of the operating points of the operational amplifier circuits of different layers of the same sensor and the inconsistencies of different sensors. Therefore, all the operational amplifiers of the detection circuit need to be debugged: the input value is adjusted to R121 and the amplification factor is adjusted to Rp100.  To reduce measurement errors caused by signal loss and nonlinear distortion and to eliminate the drift of the measured value caused by the two variable potentiometers of the operational amplifier, this analog detection circuit and the digital acquisition circuit are comprehensively optimized, and the traditional instrument amplification circuit is abandoned. The highfrequency double-resonance detection circuit and the amplitude detection circuit output signal are directly sent to a single-chip microcomputer for A/D conversion without the amplification circuit. As shown in Figure  5(b), U 1 and U 2 are, respectively, connected to pin 19 and pin 20 of the microcontroller N76E003AT20. The difference in value between U 1 and U 2 is output to the transmitting module through pin 2, thereby reducing the measurement error caused by signal attenuation and nonlinear distortion. This improves the accuracy and stability.

TDMD method
Traditional multilayer soil moisture sensors are composed of multiple independent detection circuits and analog circuits for each pair of sensing loops (as shown in Figure 6(a)). Furthermore, the multiple-circuit components make it difficult to ensure a good consistency of performance, operating points, and output value. As a result, this leads to inconsistencies of measurements in multiple layers and increased error. To overcome the mutual interference caused by multiple detection circuits and the inconsistency of multiple detection circuit components, the TDMD method is used for a sensor with only one detection circuit (see Figure 6(b)).
The TDMD hardware adopts a high-frequency analog switch that double selects one from four CH444, as shown in Figure 7. When the number of layers is less than or equal to 4, channel A is used to select one from four, and channel B is used when there are five to eight layers. Sensing rings are connected from S1A to S4A with high-frequency cables from the first to the fourth layers, respectively. Which output is selected is controlled by IN0 and IN1. The control sequence of the TDMD detection circuit and the output waveform is shown in Figure 8.

Experimental preparation
There are several soil samples used in the following experiments, as shown in Table 1. According to the  drying method, the dry soil mass m s = r 2 V s is calculated by using the dry bulk density of the soil. The PVC barrels are selected with an inner diameter of 15 cm and a layer of 25 cm as test containers. Moreover, the soil samples with different water content are prepared by adding different amounts of deionized water. Next, the prepared soil sample is sealed and placed for 48 h before being tested so that the moisture of the samples can be fully mixed.

Calibration experiment
The drying method is usually considered as the most accurate method, and therefore, the experimental result obtained by this method is employed to calibrate the measurement result from our method. The three-order polynomial equation is taken as the calibration equation.
Besides the third-order polynomials, the calibration equation can also be a linear equation, a power function equation, multiscale wavelet approximation function, B-spline function, and so on. The results should be determined by means of the determination coefficient and root mean square error of the fitting equation. Topp et al. 15 pointed out that the empirical relationship between soil permittivity e and volume moisture content u is a third-order polynomial equation This implies that the three-order polynomial fitting equation can be taken as the calibration equation. In addition, polynomial fitting equation is a simple and effective equation compared with other equations.
The soils from different regions in Table 1 were made into five samples to be tested with different weights and water contents. The debugged sensor was inserted into each sample, and the voltage output of the sensors was read separately. Next, the samples were taken out with the ring knife method, weighed, and dried to calculate the volumetric moisture content of each sample. The relationship between soil moisture and sensor output according to the least squares method is shown in Table 2. It can be seen from Figure 9 that four different soil particle size compositions have the same trend curves. The determination coefficient R 2 and the root mean square error of the fitting curves for each soil are shown in Table 2.

Four-layer conformance test
Approximately 20 kg of soil was made into six different samples according to certain weight and moisture  contents. These were placed in a rectangular parallelepiped container (18 3 18 3 60 cm) with a 6 cm diameter hole at the top (Figure 10(a)). TDMD circuit sensor and independent circuit sensor are inserted, respectively, from the hole into the soil in the box, and then, the power is turned on to measure the value. The data can be viewed through a cloud-based platform and recorded. Afterwards, the soil sample is taken out using a ring knife of 100 cm 3 volume and dried to a standard value and compared with the measured value.
The comparison results are shown in Figure 10.
The defined standard deviation of the consistency of measurements for each layer is as follows where x i is the measurement result from the multiple layers and x 0 is the actual moisture content of the soil sample by using the drying method. The standard deviation of consistency is shown in Table 3. It can be seen that the consistency standard deviation through the TDMD detection method is smaller than 0.2. Moreover, the independent detection of each channel is bigger than 1.0. This indicates that the TDMD monitoring method can ensure that the measured output values of the four layers have good consistency in the same sample soil.

Sensitivity test
At present, the common calibration methods of sensor formulas include field irrigation method, manual traveling comparative measurement method, laboratory ring knife weighing method, and standard soil sample determination method. 31 These methods have their own advantages and disadvantages. It should be selected reasonably according to the local actual situation. In the following, a simple and effective method is taken in the experiment.
Two kilograms of water was added to 7.32 kg of soil sample No. 5 until it was saturated. The total weight was 9.418 kg. It was well mixed and poured into a bag with the sensor. The bag was pressed tightly and fastened with a rope. The water evaporated through the bag, which was weighed once an hour by means of the electronic balance (Figure 11(a)). The weight and moisture content of the soil column were calculated. At the same time, the sensor automatically transmitted the output voltage and moisture values to the cloud platform at points of 20 and 30 cm below the soil surface. The soil moisture content was observed from saturated to dry in a total of 21 days. The weight moisture content and two-layer voltage value data were downloaded from the cloud platform and plotted with the weight values at different times. A historical line chart is shown in Figure 11(b). The process change of water has three stages: saturation, linear moisture change, and slow moisture change. The first 7 days with the most Figure 9. Calibration curve. moisture in the soil were the first phase of the experiment. To fix the sensor and the soil, the bag was filled in the PVC container, so the water dispersion was slow. Before the second stage, the water has dropped to approximately 17.3%. To accelerate the process of water dispersion, the soil bag was removed from the container in stage 2. The water content continued to drop below 3% during the third stage, when the moisture in the soil was similar to the moisture in the air, so the moisture decreased more slowly. At the end of the experiment, it was clear that the weighing method to obtain the corresponding weight moisture content was equally correlated to the changing trend of the output voltage at two sensing layers.

Performance analysis
1. The correlation between the sensor output and the weight moisture content is calculated using the following formula. Where x is the soil weight moisture content. x is the mean value of soil mass moisture content. Y is the sensing output value. y is the average output value of the sensor r = P n i = 1  The calculated correlation between the weight moisture content and the sensor voltage value at 20 and 30 cm is, respectively, 0.988 and 0.995. It can be seen that the output voltage of the sensor has a close relation with the moisture value.
2. There are first-order differences between the sensor output and weight moisture content.
Study the correlation between the sensor output changes and the moisture changes in order to determine the sensibility of the sensor. First, assume that the weight of the soil column is W t ð Þ, the sensor voltage outputs are U 1 (t) and U 2 (t), and the first-order difference values are dW (t), dU 1 (t), and dU 2 (t). Assume that the measurement start time t 0 is measured every hour and the measurement interval is h = 1, Eight sets of recorded moisture change values in three stages were selected from the historical data. The first-order difference values were calculated based on equation (3) as shown in Table 4.
The first-order difference curves of soil moisture weight and output voltage during the whole experiment are shown in Figure 12. One hundred thirtynine time points were monitored, and the first-order difference value of soil moisture was negative. If the first-order difference of the output voltage of the sensor was also negative, then it was considered to successfully track the change in moisture. One can calculate the probability of tracking changes in moisture as where n 1N , n 2N denote c difference n of soil moisture voltage (dU 1 (t), dU 2 (t)) at two depths, respectively. Where n 1P , n 2P , respectively, denote the number of negative values in the first-order difference n of soil moisture voltage (dU 1 (t), dU 2 (t)) at two depths. As calculated by equation (2), the two sensors (U 1 (t), U 2 (t)) can capture small changes of 83% and 77% in the soil moisture throughout the whole process.  Figure 12 shows tracking information between the output values of the soil moisture sensor and the soil moisture change value. From Figure 12, it can be seen that most of the soil moisture change values are between 0 and 10 g (mostly between 0 and 5 g). The output variation in the soil moisture sensor was mainly concentrated at 0-3 mV with soil moisture changes. The results show that the soil moisture sensor can completely capture small variations in soil moisture.
Compared to the experiment result in Zhitao et al., 26 in which the calculated correlation between the weight moisture content and the sensor voltage value is 0.999, our method is a little less accurate. Although it has high accuracy on the soil moisture measurements in the laboratory, the components can be affected by the soil temperature seriously; these results show that the measurement is unstable. Moreover, the moisture sensing metallic ring is connected with the detection circuit by coaxial cable, which makes the signal decay and affects the sensitivity. As mentioned above, TDMD is employed and all these shortcomings have been overcome in our method.

Conclusion
1. The soil moisture detection circuit uses a highfrequency double-resonance circuit with high sensitivity. When the minimum change in moisture is 1.9 g, the detection circuit of the sensor can track, capture, and change the voltage output value by at least 1 mV. 2. The sensor adopts the TDMD method, and the time-sharing detection not only saves costs but also ensures the consistency of multiple outputs. The standard deviation of the consistency reaches 0.12%. 3. Although the sensitivity experiment just monitored the bottom two layers of the sensor, the two voltage outputs of the sensor detection circuit can track very small changes in the soil moisture, and the correlations are 0.988 and 0.995. 4. The first-order difference calculation is performed for measured values of 139 points to evaluate the sensitivity. When there is a small change in water content (the gravimetric water content is less than 1%), if the sign of the firstorder difference of the water value is consistent with the first-order difference of the voltage, the sensitivity requirement is satisfied, that is, the sensor voltage can track its change in time when the water content changes. The trend of voltage change at 20 and 30 cm was 83% and 77%, respectively. 5. As the number of TDMD circuits is reduced from several to one, it is obvious that the cost of sensors will be reduced accordingly.