A Printed Capacitance Sensor for Soil Moisture Measurement

TDR (Time Domain Reflectometry) has been shown to give a good measurement of soil moisture by measurement of permittivity. However, TDR is expensive and not power efficient. This work describes an alternative approach to designing a soil moisture sensor that is also using the dielectric constant, but tackles some of the drawbacks of TDR. It is designed to infer the water content in soil by obtaining it's permittivity via the measurement of the capacitance of a PCB capacitor. The simple design of the sensor allows mass-manufacturing at a low cost, enabling a large number of the sensors to be deployed networked. This makes it ideal for those requiring soil moisture monitoring over a large area such as farmers, to do so without a large financial cost.


Introduction
The challenge of providing enough food to provide for the growing population will become increasingly more difficult, with the United Nations predicting a world population rise to 9.7 billion people by 2050 [1].This will put additional pressure on existing food supplies, but additionally also on water resources-approximately 80% of water consumption in the United States is due to agriculture [2].
Field capacity (FC) and permanent wilting point (PWP) are two important water content values in soil analysis.Field capacity is the upper limit of soil moisture available to plants, typically obtained after 2-3 days drainage of saturated soil [3].The permanent wilting point is the lower limit of readily available soil moisture [4].The available water capacity (AWC) is the range between these two points [4] and is the condition when the soil water can be absorbed by the plant roots [5].This range is widely used to assess yield potentials of crops and environmental risks [6] with farming the land.Agriculture stands to benefit from the development of the Internet of Things (IoT) [7] but there is still a requirement for suitable sensors.A novel, low-cost soil moisture sensor is presented and briefly evaluated as a tool to assist in the managing of water for agricultural usage.Data reporting is via Bluetooth.A pseudo-dc capacitance measuring technique is used to measure the capacitance of an interdigitated-coplanar sensor.Manufacturing is greatly simplified via the use of PCB tracks and electrodes enabling the sensor and supporting electronics to be included on the same PCB.

Technical Background
The medium surrounding the sensor is used as its partial dielectric via the concept of fringe capacitance.Water has a permittivity of around 80, and soil of around 5 [6] and as a result a small changes in the soil water content will have a large impact on surrounding permittivity.As the capacitance is directly related to the permittivity, measuring the capacitance becomes a sensitive method in which to obtain the dielectric of the surrounding medium.

Measuring Capacitance
There are a range of methods by which capacitance can be measured.For this sensor, a simple method is used that involves timing charge and discharge times through a resistor.With knowledge of the well-known exponential behavior that the capacitors exhibit in terms of the step response, the capacitance can be calculated.A method using these principles can be implemented on a low-cost microcontroller provided a comparator with two thresholds is present, and a timer function.Equations 1 (charging) and 2 (discharging) relates charging/discharging times to the capacitance.A calibration experiment was performed to evaluate the approach.Standard capacitances were used and the microcontroller set to use 10,000 discharge-charge cycles of an increasing number of 68 pF capacitors connected in parallel between 1 V (V l ) and 2 V (V h ), with the applied voltage being 3 V (V).With the resistance (R) in series with the capacitor being known, the capacitance can be calculated using the clear linear relationship demonstrated in Figure 1.Scaling can be achieved by using a different charging resistor.

Sensor Design
The PCB is mainly made up of the interdigitated tracks (Figure 2a,b) producing the capacitive effect being measured.The tracks are printed on both sides of the PCB to both maximize effects of the permittivity changes of the surrounding materials and provide coverage in all immediate areas near the sensor.Tracks on opposite sides are connected as the same electrode to minimize capacitance internal to the PCB.
An opamp is included on the PCB to act as a buffer (gain of 1) between the charge pin of the capacitor and the input pin of the microcontroller.This significantly reduced parasitic capacitance produced by the leads when measuring capacitance.For charging and discharging the capacitor, a 1 MΩ resistor was included on the sensor in series-increasing the charge and discharge times enough to allow easy measurement by the microcontroller.A temperature sensor (Microchip MCP9700) was also placed on the PCB to provide another data point from the sensor.The hydrophobic properties of the PCB surface are also not known.Therefore, the surface was coated with a Teflon-based solution.Teflon has a known hydrophobic property of repelling water, allowing a defined surface characteristic independent of the PCB material.
An NRF52832 Bluetooth enabled microcontroller by Nordic Semiconductors was programmed to periodically take and store measurements from the microcontroller.Its internal comparator was set to interrupt when crossing V l and V h thresholds and either start charging or discharging the capacitor respectively.Each return to the V h threshold indicated one cycle.The microcontroller could be connected, as an example, over Bluetooth to an Android mobile phone and using a custom application (Figure 2c) the data could be downloaded and viewed graphically.Data is stored locally and transmitted when the Bluetooth connection is available, allowing for data harvesting.Data can then be forwarded to the cloud, enabling gathering of data from multiple sensors, allowing distributed sensors systems to be implemented.

Sensor Model
The interdigitated tracks of the sensor on either side of the PCB are modeled as a system of capacitors, rather than a single one (see Figures 3 and 4).The capacitor of interest is C, due to its capacitance value changing as the surrounding permittivity changes (the soil is its dielectric)-all other capacitors remain fixed.The capacitances of each capacitor in the system can be calculated by measuring overall capacitance when the sensor is in air, water and a very high conductivity solution.The capacitance of the capacitor we are interested in is small when in air-suggesting the range of its electric fields is limited.The printing of tracks on either side of the sensor (the capacitor electrodes) partially mitigates this by maximizing the surrounding sensor coverage.There is also possibility of future iterations being able to fine-tune the sensor design to increase its sensitivity by adjusting the sizes of the fixed capacitors.

Experimental
Clay loam was used in the experiment and it has a PWP of around 10-20% [2,3], and a FC of around 30-35% [2,5].The experiment thus measured a range of volumetric water contents up to around 41% to identify if the sensor was able to measure within this range, with an 8 second timeout.
The clay-loam soil was oven dried at 105 °C until its weight became constant over time (no more evaporation thus no water content).The sensor was coated in water-repellant Teflon to reduce its sensitivity at lower water contents (test experiments suggested water was attracted to the PCB causing a very high response at low water contents).The sensor was then placed in soil which was compacted to keep its volume constant.Readings were taken with increasing amounts of water in the soil.As we are primarily measuring time, then translating this to capacitance, the results are given as time recorded by the microcontroller-shown in Figure 5.
The response of the sensor demonstrates a clear albeit not straightforward relationship.It is clear that there is a flat-line response between 15% VWC and 25% VWC.The cause of this is currently unknown but may be due to surface effects or to conductive components in the dielectric.Although this requires further investigation, it can be seen that the sensor is able to measure values up to the PWP and above FC, with limited sensitivity between the PWP and just before reaching FC.

Discussions and Conclusions
The experimental results demonstrate that the sensor design has potential as a soil moisture sensor with a clear connection between water content and its response.The shape of the curve produced requires further investigation, and possible refinement of the sensor based on the model is required to make it more sensitive over its entire range.When coupled with an Android Bluetooth application and a low-power microcontroller, it can provide a cost-effective package to measuring moisture contents of soils over long periods of time.There are also further refinements that can be made to the sensor design.Investigating the relationship between the capacitances in the model may lead to better sensitivity.Changes in surrounding material salinity need to be investigated to identify if these will affect the response of the sensor.Calibrations for different soil types and temperatures are required.To conclude, the presented sensor has potential and could be a viable design for a low cost distributed moisture sensor. ln

Figure 1 .
Figure 1.Capacitance calibration plot for fixed values of capacitance.

Figure 2 .
Figure 2. Details of the sensor, its hardware interface and the software interface.(a) Sensor layout; (b) Sensor circuit; (c) Android App screen 3 equations can be produced with 3 unknowns using these capacitance values and the model.Typical values are (from calculation and measurement): C in air (for water multiply by 80.1) = 8.6pF CA + CB + CB = 87.3pFCC = 662.7pF

Figure 5 .
Figure 5. Experimental results showing 1000 cycle measurement time against VWC.