Simple and Effective Design Concept for Constructing In-Situ Soil Dielectric Property Sensor with Dual Low-Cost COTS Microwave Modules

This paper presents a compact sensor system for estimating the dielectric properties of materials based on commercial, off-the-shelf (COTS) modules. The dielectric constant and conductivity of a material under test can be determined from the measurement of the microwave reflected from the material. By using dual microwave sensor modules with a slightly different radio frequency, an identical intermediate frequency at the mixers of the modules was obtained. The intermediate frequency was chosen such that the associated microwave and data processing components could be easily obtainable, leading to a practical realization of the sensor system. Synchronization of the two microwave sensor modules was achieved using electronically controlled relays that simultaneously switch on the power supplies of both modules. Two microcontrollers were used to capture the corresponding signals. The sensor was designed at a 10 GHz band for measuring reflected waves from various kinds of materials, especially soils with different moisture and fertilizer contents. The evaluation results indicate a good agreement between the measured results from the proposed sensor and the ones from a network analyzer, verifying that the proposed sensor is fully functional for monitoring variation in the dielectric properties of materials, including soil. The average sensitivity for the dielectric constant of moist soil is 0.26/% moisture content and the error rate for dielectric constant measurement is 4.83%.


I. INTRODUCTION
Soil is an essential component of agricultural production and the habitat of some animal species. Healthy soil is a good foundation for a food production system that can sustainably produce healthy crops. Basic properties of soil include soil moisture, texture, bulk density, structure, salinity, organic matter content, and temperature. Excessive soil salinization can decrease the productivity of an agricultural area. Soil structure is influenced by organic matter and soil organisms, like bacteria and earthworms. Soil texture, density, and structure depend on local environmental conditions. The most influential property is soil moisture. Data on soil moisture and nutrient contents are essential for estimating agricultural productivity and irrigation management. Numerous research works have been conducted to characterize some soil properties. Wu et al. [1] showed that while visible and near-infrared remote sensing could not identify a high clay soil clearly, microwave remote sensing could. Ahire et al. [2] showed that the values of dielectric constant, conductivity, and relaxation time of moist soil increased with fertilizer content. Research works, such as [3]- [6], demonstrated correlations between dielectric properties and soil moisture content, in which the dielectric constant could increase nonlinearly with moisture content.
Two methods for determining the moisture content of soil are widely used: a direct and an indirect method. The direct method (gravimetric method) is a basic calibration method [7] that determines the moisture content by mass of soil where the reduction in mass by drying is due to loss of water. The drying oven is used to heat soil at 110±5 o C for 24 hours. The weight of soil is measured before and after drying, then moisture content can be calculated. This method is accurate but time-consuming and not portable. The indirect method requires the measurement of the electrical properties of the soil. Many approaches have been developed for measuring soil moisture via the dielectric constant including electrical capacitance or frequency domain reflectometry (FDR), electrical impedance or amplitude domain reflectometry (ADR), and time-domain transmission (TDT) and time domain reflectometry (TDR) [8]. The spectrum of measurement includes radio frequencies up to optical and infrared [9]. The accuracy of the indirect method relies on the calibration of the measurement system which relates the measured soil physical parameter to soil moisture content. For instance, TDR possesses an accuracy of approximately 2% referred to the direct method [10]. Although the indirect method is less accurate than the direct method, it is suitable for field tests of soil moisture content due to its portability and less time-consuming.
The in-situ sensor, that can measure the moisture content of not only the soil on the surface but also the soil slightly below the surface, is desirable. It can be easily integrated into a wireless sensor network (WSN) node for precision farming applications, aiming at reducing the consumption of irrigation water and fertilizer. Although numerous soil moisture sensors have been developed, some of them are invasive sensors, for instance, in [11]- [13]. Among various technologies [14], non-invasive technology is the most desirable.
One of today's most popular techniques for in-situ soil sensors, time-domain reflectometry (TDR), is invasive [15]. To explain TDR further, TDR is not very practical for soil characterization because a TDR probe must be placed invasively into the soil-some soil must be dug up which makes mapping a large area too time-consuming. The noninvasive TDR sensor has been developed to solve this problem [16]. Nevertheless, the probe must be contacted with the soil surface. Another non-invasive soil sensor is the one in [17] but measurement can be carried out by transmission measurement through the box containing soil. This sensor is not practical for in-situ measurement in a large area.
With the advent of robots and drones, it is desirable to have a non-invasive and non-contact soil sensor installed on one of them for monitoring the soil in a large area. Luciani et al. [18] proposed a non-invasive soil moisture sensor based on the open-ended waveguide. Orangi et al. [19] determined soil water content non-invasively with their capacitive sensor. Franceschelli et al. [20] proposed to measure the gain and phase of the reflected wave from the soil through an open waveguide. However, these last three sensors still need to be in contact with the soil surface. The non-contact and non-invasive sensor proposed in [21] is promising, but the sample is destroyed in preparation for measurement.
Therefore, to avoid those developmental issues and achieve a truly low-cost, non-invasive, non-destructive, and non-contact in-situ soil sensor, this work attempted to develop such a sensor based on commercial-off-the-shelf (COTS) microwave sensor modules. The challenge here was to utilize existing COTS devices effectively. The associated circuitry must be designed appropriately so that the implementation of the sensor system with readily available components in the market will be possible. Currently, the microwave sensor module operating at 10 GHz [22] is available at a low cost. The proposed in-situ sensor is a promising candidate for many kinds of applications, e.g., on-farm monitoring of soil moisture or fertilizer content. It will be useful for irrigation management. Moreover, it fulfills the role of the soil management equipment for sustainable agricultural production stated in the United Nations Sustainable Development Goal 15 (UN SDG15) [23]. Please note that although work on dual microwave sensors has been recently presented for vehicle detection [24], their operational principle is different from that of this proposed sensor. Moreover, they are not applicable for monitoring variation in dielectric properties of an object from the scattered waves as our proposed sensor does.
The novelty of the present contribution is twofold. First, the relationship of magnitude ratio and phase difference of reflected wave from the material under test are derived so the measured magnitude ratio and phase difference can be input to the COTS magnitude and phase detector. Second, analytical closed-form expressions of dielectric constant and conductivity in terms of magnitude and phase of reflection coefficient are derived. These expressions enable the dielectric properties calculation in a microcontroller. The benefit of the design in this work is that we can implement low-cost non-contact sensor for reflection measurements of the dielectric properties of soil. This sensor with an error rate of 4.83% can be a good candidate for data acquisition of fertilized as in a large area.
The outline of this paper is as follows. Following the introduction section, the operational principle of the proposed sensor is described in Section II. The design of the proposed sensor for operating at 10 GHz is described in Section III. Section IV shows the experimental results obtained from many types of materials, including soils with different moisture content and fertilizer content. Discussion of the obtained results is in Section V. Finally, a conclusion is given in Section VI.

A. ARCHITECTURE OF A MICROWAVE SENSOR BASED ON COTS MODULES
The objective of this work is to develop a cost-effective microwave sensor using COTS modules with less modification so that realization can be achieved as simple as possible. These less modified COTS modules are used as components of the sensor system. The overview of the architecture of the proposed sensor is depicted in Fig. 1. It consists of two identical COTS microwave sensor modules, two bandpass filters, a magnitude and phase detector, a microcontroller, and a power supply which supplies power to all active components. With the proposed architecture and the expressions derived in this section, a low-cost sensor can be designed using COTS microwave modules. The diagram of the COTS module is depicted in Fig.2 (a) where it consists of an oscillator, a power divider, a mixer, a transmitting antenna, and a receiving antenna. The oscillator is a tunable dielectric resonator oscillator (DRO) whose tuning range is a few percent. The power divider equally divides power from the oscillator to the transmitting antenna and the mixer. The output of the mixer is an intermediate frequency (IF) signal which then the mixed signal of the reflected signal from the material under test (MUT) received by the receiving antenna, and the oscillator signal. A functionally lower IF frequency is generated from mixing two signals with slightly different, but high frequencies beyond the input frequency range of the magnitude and phase detector. This lower IF frequency is suitable for feeding the magnitude and phase detector, which will output DC signals to the microcontroller, where these signals are processed by a developed embedded program into the value of the dielectric property on a display. For illustration, if the oscillator of the COTS module 1 is tuned to 10.0 GHz and that for the COTS MHz must be in the frequency range of the magnitude and phase detector. In this example, the bandpass filter (BPF) is designed to operate at 100 narrowband BPFs eliminates the undesired IF signal to the magnitude and phase detector, and provides low noise power which improves the signalto-noise ratio. A particular development of this design application is because the operational frequency of a COTS module can be tuned slightly and easily by turning a metallic screw over the DRO. Fig.2 (b) shows a photograph of the COTS module. A metallic screw is mounted over the DRO for frequency tuning, the SMA connector is soldered at the IF port of the module where the IF signal is delivered to the input of the magnitude and phase detector via a BPF. The diagram of the antennas with dimensions is depicted in Fig. 2 (c) where each COTS module has two two-element arrays of microstrip antennas; one is for transmission and the other one is for the reception. To achieve a simple realization, the four antennas of each module are used without any modification. The array of microstrip antenna Half-Power Power Beam-width (HPBW) in E-plane and H-plane of 80 o and 40 o , respectively. The gain of the antenna is around 8 dBi. The power r of oscillator of 10 dBm is equally divided into two parts: to the transmitting antenna and to the mixer. Therefore, the effective isotropic radiated power (EIRP) is 15 dBm. For the distance to the MUT of 5 cm, the total free space loss is 28.8 dB. For a conversion loss in a mixer of 8 dB, the IF signal entering the magnitude and phase detector must be higher than 10 dB of noise the floor of the detector, typically -60 dBm. Otherwise, the amplifier is needed. An RF absorber was placed on both Rx Ant.1 and Tx Ant.2 to attenuate the radiation from Tx Ant.2 to the material under test (MUT). Therefore, there is only reflected wave from MUT (due to Tx Ant.1) to the Rx Ant.2.
In further detail, this architecture would be demonstrated to be effective when the components were installed into the system at the precise locations in the diagram. Other new applications of this design concept may need an investigation into the proper locations for their essential components. For this application, the two COTS modules are placed side-by-side with the oscillator of COTS Module 2 (Osc.2), located close to the mixer of COTS Module 1 (Mixer1). The mutual coupling between the two antennas is S12 12 j e  , where S12 and ϕ12 are the magnitude and phase of the coupling.
The flow of signals in this system requires the oscillators of the COTS modules (Osc.1 and Osc.2) to be tuned to operate with a slightly different frequency, hence we have v1=V1cos(t+) and v2=V2cos(t+). In addition, since the two transmitters start to work simultaneously, we can assume without loss of generality that ϕ1=ϕ2=0. The transmitted signal v1 generated by Osc. 1 is fed into the antenna with a gain of GT. Then, it propagates through the air to the MUT. After arriving at the MUT, the signal is reflected back with a reflection coefficient Γ = |Γ|e jϕ . The free space path losses in the incident and reflected paths are ; the c is velocity, and light; and d is the distance between the sensor and the surface of MUT. The Rx Ant.2 receives the reflected signal. Without loss of generality, it is assumed that the difference between the two frequencies ω1 and ω2 is small (< 2%). It is further assumed that the gains of the transmitting and receiving antenna are identical, i.e., GT = GR = G. Therefore, the down-converted output at Mixer 2 (IF2), derived from the Friis formula [25] is proportional to square root of power, where A is a constant proportional to the conversion loss of Mixer 2. On the other hand, the IF signal from Mixer 1 received by Rx Ant.1 is affected by mutual coupling between the two antennas. Its mathematical expression is below, where B is a constant proportional to the conversion loss of Mixer 1 and is equal to A. The voltage ratio between the IF output of Mixer 2 and Mixer 1 is then where their phase difference is Δϕ=-βd+0.5ϕ -ϕ12 (4) Referring to Fig. 1, the voltage ratio and the phase difference can be measured by the magnitude and phase detector equipped with a microcontroller circuitry. Let Gm and Δϕm denote the measured voltage ratio and phase difference, respectively. Then, the reflection coefficient can be estimated as and the phase estimation as The S-parameter S12 and its associated phase parameter ϕ12 can be evaluated as follows. A conducting plane with |Γ| = 1 and ϕ=180 o is employed during the initial calibration of the sensor system. Thus from (5) and (6), S12 and ϕ12 are as follows, and ϕ12 = 0.5π -Δϕm -2βd , where Gm and Δϕm are the measured voltage ratio and phase difference at the receiving antenna, respectively. Substituting S12 and ϕ12 in (5) and (6), both |Г| and ϕ can be finally calculated.

B. DIELECTRIC PROPERTY DETERMINATION
Estimates of magnitude |Г| and phase ϕ of the reflection coefficient are calculated into dielectric properties. For lossy dielectric with permeability ,  permittivity  and conductivity ,  the intrinsic impedance η expressed by Eq. (9) [26] below, where ω is the angular frequency. Consequently, the reflection coefficient can be expressed as Where  0 and d are the intrinsic impedance of free space and the dielectric, respectively.
Using algebraic manipulation, it can be shown that the relationship between dielectric properties and reflection coefficient is With the measured IF signals from the two mixers, it is possible to characterize the dielectric properties of MUT from the estimates of magnitude |Г| and phase ϕ of the reflection coefficient. The corresponding real and imaginary part are shown in (12) and (13), ( ) Straight forward derivation, the value of εr and σ can be expressed as follows, Substituting |Г| and ϕ from (5) and (6) in (12)- (15), one can simply evaluate and  of dielectric material.

III. DESIGN AND IMPLEMENTATION
The architecture of the proposed sensor system is illustrated in Fig.1. The architecture was a construction design for a fully functional, in-situ, dielectric property sensor system from the readily available, low-cost, off-the-shelf, electronic components, at the time of the study. The main component that provided the sensing capability was dual HB100 COTS microwave sensor modules, widely used for motion detection based on Doppler effect [22]. Essential supporting components were a commercial magnitude and phase detector AD8302 [27], two microcontroller unit (MCU) modules, and associated electronic circuits.
Since an MCU had only one analog-to-digital converter (ADC), it could not capture both the magnitude and phase data simultaneously. To overcome this limitation, two Arduino UNO MCU modules were employed for processing both the magnitude and phase data outputted from the AD8302. In addition, one MCU module controlled the relays at the power supply units for both COTS microwave sensor modules. By switching on all of these units at the same time, phase synchronization could be attained. Each HB100 module consisted of a local oscillator, a transmitting antenna, a receiving antenna, and a mixer circuit. The factory-default radio frequency of HB100 was 10.525GHz, at which the second COTS module was set. To attain the IF of 138 MHz, the first COTS module was tuned to operate at 10.387 GHz by just simply turning the metallic screw on the DRO device. After the signals were filtered by the low-cost bandpass filters, IF1 and IF2, they were fed into the AD8302 magnitude and phase detector. The outputs of AD8302 were two DC voltage values representing the magnitude ratio (VGm) and phase difference (VΔϕm) of the two IF signals, where  Further processing is required to obtain the magnitude and phase components of the reflection coefficient j e   =  based on (5) - (8). Finally, the calculation of the dielectric constant and conductivity  of the MUT is performed at MCU B based on (12) - (15). Then, the results are displayed on the light-emitting diodes (OLEDs). The fabricated system is shown in Fig. 3. It should be noted that the proposed sensor system relies on adoption of Friisformula [25], with the assumption that the receiving antenna is in the far-field region of the transmitting antenna. As the lowest operating frequency was 10.387 GHz, the far field condition was guaranteed if the distance d > 5 cm. It was found from experiments that the sensor system could operate in the range of distance from the sample of 5-10 cm. Beyond 10 cm, the signal strength was too low. The depth of penetration of materials with dielectric properties of 1.8 ≤ εr ≤4.0 and 0.05 ≤ σ ≤ 0.3 (soil with moisture content of 0 o -20 o ) for this operating frequency is in the range of 7 mm to 2.9 cm. Hence, the sensor could determine dielectric properties for the depth of around 2 cm.

A. VERIFICATION OF THE PROPOSED SENSOR
To verify the performance of the proposed microwave sensor, we used it to detect various kinds of materials and compared the detected values with the values obtained directly from a dielectric probe and a network analyzer [28]. In our experiments, the dielectric probe was placed at ten different positions on the sample, then measurement was conducted. The average value of the measurement results was used as reference values. The materials included polystyrene, paper, wood, cement, and distilled water. The fabricated sensor system depicted in Fig. 3 was initially calibrated with an aluminum plate at the room temperature of 25 o C. The corresponding S-parameter was measured and   (14) and (15). The thickness of the sample was 4.5 cm. Each measurement was replicated ten times, and the statistical parameters (mean and standard deviation: SD) were calculated. We made the surface of the sample materials flat so that the surface of the probe kept good contact with the surface of the samples. Table 1 shows the dielectric constant obtained from our contactless system and those obtained by a direct-contact dielectric probe with a network analyzer. As can be observed in the table, the outputs from the proposed non-contact sensor were only slightly different from those directly measured by a contact dielectric probe and network analyzer setup. Moreover, the sensor was verified to be stable by the relatively low standard deviation (SD) of the dielectric constant and conductivity over ten replicates, even though the DRO of the COTS module might not be expected to be as stable as a network analyzer. On the contrary, the SD of every type of material tested was extremely low, the lowest was in the case of polystyrene detection, at 0.098. As can be observed in comparison Table 1, the proposed sensor provided an accurate result as the direct-contact measurement with a dielectric probe and network analyzer setup. The average error from various material measurements εr is 4.83% while those for σ ( Table 2) are 39.83%. The detected value of conductivity of water was significantly lower than the reference value. This will be discussed later in the subsequent Discussion section.

B. DETERMINATION OF SOIL DIELECTRIC PROPERTIES VERSUS MOISTURE CONTENT
Soil for growing Bonsai was used because its grain sizes were relatively uniform (see Fig.4). Soil sample was contained in a sample holder, a rectangular plastic box of size 21.5×29×6 cm 3 . The height of the soil sample in the sample holder was 4.5 cm. The width and length were approximately 7λ and 10λ. Thus, the edge diffraction was negligible. We used this size of MUT in our experiments because dielectric properties determination in (14) and (15) The soil samples were filled in glass beakers and pressed into a flat surface. Then, the dielectric probe was put in contact with the surface of each sample to directly measure the dielectric constant and conductivity of the soil sample. Fig. 5(a) shows the relationships between dielectric constant and percentage moisture content, obtained by the contact and contactless systems. It can be observed that the data points of each coincided almost perfectly up to 35% moisture content while those representing the relationship between conductivity (see Fig. 5 (b)) and moisture content coincided almost perfectly up to 20% moisture content. Some data points at higher moisture content did not coincide perfectly like those at lower moisture content. The reason for this discrepancy, for water material, is discussed in the Discussion section below. The average error for r  versus moisture content in the range of 0-20% was 5.85%. For the average error for σ versus moisture content, it was found to be 22.74%. For sensitivity of the sensor, it was determined from the slope of the response of the sensor ( r  ) versus moisture content. The sensitivity of 0.26/% moisture content was obtained from the average value from every point of moisture content in Fig. 5(a).

C. DETERMINATION OF DIELECTRIC PROPERTIES OF SOIL VERSUS FERTILIZER CONCENTRATION
Soil samples with a varied amount of Urea fertilizer and fixed moisture content of 20% were prepared. Six concentrations of fertilizer were tested, from 2.5% to 15% in 2.5% step. Each sample weighed two kilograms with 20% moisture content. The mixture was thoroughly kneaded into homogeneous samples.
Showing the same trend as the dielectric constant versus moisture content results discussed in subsection B. Determination of Soil Dielectric Properties versus Moisture Content, the conductivity versus fertilizer concentration data points from our detection system coincided perfectly with the corresponding direct-contact probe detection dielectric constant data points for all fertilizer concentrations tested. A bit less coincidence was exhibited by the conductivity versus fertilizer concentration data points, all data points at lower concentrations were still perfectly coincided, but those at very high concentrations of 12.5 and 15% did not coincide as perfectly.   Fig.6 (a) and (b) show variations of soil dielectric constant and conductivity with fertilizer concentration, respectively, as detected by our contactless system and a contact dielectric probe setup. Very good agreement between the dielectric constant values detected by the two contact and contactless systems was obvious from zero to common low fertilizer concentration to beyond real-world concentration of 15%. Nevertheless, a good agreement but not as good as the one in Fig.6 (b) for conductivity and fertilizer concentration up to 10% fertilizer concentration, which was, as mentioned before, more than adequate for analyzing any real-world soil sample with usually much lower fertilizer concentration. Relative to the excellent dielectric constant versus fertilizer concentration outcomes up to an extremely high 15% fertilizer concentration, the conductivity versus fertilizer concentration outcomes at 12.5 and 15% between the two systems did not agree well. The average error for εr versus fertilizer concentration in the range of 0-10% was 1.75%. The average error for σ versus fertilizer concentration in the range of 0-10% was found to be 7.82%. For sensitivity of the sensor, it was determined from the slope of the response of the sensor (εr) versus fertilizer concentration and averaged the value from every point of fertilizer concentration from Fig. 6(a). The sensitivity of 0.15/% fertilizer concentration was obtained. Table 3 shows the comparison of up-to-date non-invasive soil sensors. The sensors in [18] and [20] provided the lowest measurement error by using an open-ended waveguide along with electronic circuits and a signal processing unit. The non-invasive TDR sensor in [16], the capacitive sensor [19], and the proposed sensor in this work possess higher errors up to 5%. The sensor in [17] operates when the sensor is contacted with the box containing soil and soil characterization can be carried out by transmission measurement. The benefit of a non-contact sensor in the proposed sensor is that it can be installed on a robot for data acquisition of soil information in a large area.

V. DISCUSSION
The comparative measurement results between the proposed contactless sensor system and a contact probe plus network analyzer system shown in Table 1, Table 2, Fig.5, and Fig.6 clearly demonstrated that the proposed sensor system was able to determine the dielectric constant accurately. On the conductivity front, parallel accuracy is guaranteed only if the detected conductivity is less than 0.2 S/m. That phenomenon is likely because of the phase ambiguity of the AD8302 magnitude and phase detector.
AD8302 could accept two inputs with phase differences in the range of 0 to π. When σ < 0.2, the phase response would certainly be in the required [0, π] interval, but as σ > 0.2, the uncertainty in phase difference, the phase ambiguity, made the operation of the AD8302 erratic. A way to solve this problem is to use two AD8302s [27]. They can enhance the range of the input phase response from 0 to 2π, and so can prevent the issue. This will be carried out in our future work.
Finally, the motivation for developing this design was the low cost of the required components, which was around 64 US dollars at the time of this study. On the contrary, a commercial contactless microwave soil sensor system can cost more than 10,000 US dollars. Naturally, that kind of system can operate at multiple frequencies for different kinds of applications, but this proposed design of around 10 GHz frequency can certainly be developed into an effective, contactless, in-situ soil dielectric sensor system for estimating soil moisture content and fertilizer concentration at a potentially much lower cost than the commercial sensor system.

VI. CONCLUSION
In this paper, a cost-effective soil dielectric sensor system based on off-the-shelf (COTS) microwave sensor modules is proposed. It was designed to operate around 10 GHz. This contactless sensor system was successfully verified against a contact dielectric probe plus network analyzer setup on various types of materials. Subsequently, it was employed to measure the dielectric constant and conductivity of soil samples with different moisture content and fertilizer concentration. All experimental results demonstrate that this proposed sensor system can detect the moisture content and fertilizer concentration of real-world soil samples effectively. A fully developed system of this design will cost much less than a general commercial microwave sensor system of today because the cost for all required components of this design was only around 64 US dollars. An immediate improvement that can be made to the system is to use two-phase detectors instead of one, which will be done in future work.