Вы находитесь на странице: 1из 5

2016 International Symposium on Electronics and Smart Devices (ISESD) November 29-30, 2016

Development of Economical Microcontroller-based


Soil Moisture Sensor Using Time Domain
Reflectometry
Muhammad Amin Sulthoni, Bagas Prima Anugrah, Ndaru Anggit Wicaksono.
School of Electrical Engineering and Informatics
Institut Teknologi Bandung
Bandung, Indonesia
mamiens@stei.itb.ac.id

Abstract—Time-domain reflectometry (TDR) is a accurate electronic sensor to detect a quality factor of


proven and popular measurement principle for soil moisture. With this tool, the time used to analyze
evaluating frequency-dependent electric and dielectric the condition of the soil becomes shorter so that it will
properties of various materials including soil. However, reduce costs and time spent. Therefore the
the high price for TDR measurement equipment and development of the soil moisture sensor system is
complex laboratory setups is often a limiting factor for intended to be:
cost-sensitive applications such as in farming. This
paper reports on the development of a low cost soil • Cheap and economical, compared to existing
moisture sensor based on TDR. Equivalent time accurate soil moisture sensor.
sampling was utilized to extent measurement frequency
range. The developed sensor system is based on ARM • Acceptable accuracy for farming utility, with
Cortex M-4 microcontroller which working on a 25- minimum accuracy of 5% of relative humidity.
KHz signal and virtual sampling resolution within 5 ns.
While implemented using relatively cheap II. THEORETICAL BACKGROUND
microcontroller, special approaches are used to
eliminate systematic error, so that the sensor system One accurate method that can be used to measure
had good accuracy in measurement range 0-100% Rh, soil moisture is Time Domain Reflectometry (TDR),
error 3,49% and measurement time around 2,5 which is a well-known and common method for
minutes. obtaining dielectric properties of materials including
soil [1-3]. TDR measurements based on the
Keywords—soil moisture sensor; time-domain transmission and reflection of the signal caused by
reflectometry (TDR); equivalent time sampling. impedance mismatch of the medium through which it
passes. As described in Fig. 1, the signal is passed
I. INTRODUCTION through an application-specific waveguide probe such
as open-ended coaxial lines, a metal probe that is
In Indonesia, agriculture is a main livelihood cylindrical or plate, or a flat ribbon cables and
sectors of society so-called agrarian country. However dispersion occur along the probe or at the end of the
development and implementation of agricultural probe where changes in dielectric constant take place.
technology is still considerably low, so that farming
equipment implementing newer technology tend to be The resulting waveform of the signal as a sum of
expensive. To determine the quality of the farm, the generated signal and the reflected signal from probe is
farmer must bring soil samples to be tested in captured and then analyzed and interpreted for
laboratories. Of course this will take time and cost specific application. Depending on the electric and
more. dielectric properties of the material under test, partial
reflections and
One of the factors that influence agricultural
production is determined by the quality of the soil
moisture, pH, temperature and nutrient content. The III. SENSOR DESIGN
price of most well-known time domain reflectometry-
based soil moisture meters such as the Tektronix A. Theory
1502C, the Mohr Scientific CT100, or the Sympuls Fig. 2 described a typical wave observed at
TDR 3000 typically is in the range of several oscilloscope as a sum of the generated signal and
thousand dollars in international market, or exceeds a reflected signal from probe, while the input of the
hundred of million rupiahs in Indonesia. This project system is a repetitive rectangular pulses with a duty
intended to develop a cheap and economical but cycle of 50%.

978-1-5090-3840-4/16/$31.00 ©2016 IEEE 360


Fig. 2. Typical signal observed as a sum of input and reflected
signal in TDR.

In equation (2) Ka is a constant related to Rh,


where Ka = 0,75 ∆t.Therefore the main target of the
system instrumentation is the extraction of the time
delay resulted from signal reflection. From the
equation, it can be calculated that 0 to 100% relative
Fig. 1. Basic principles and setup of time domain reflectometry
humidity corresponds to time delay of 5ns – 12ns.
It seen that at t0, the observed signal is rising
corresponds to the given input signal. Signal is
recorded under normal conditions until t1 when the B. Equivalent Time Sampling
signal rose again for the second time, resulting in a Equivalent Time Sampling is a signal
different waveform to the given input signal. This reconstruction method that can be used to change a
reflection phenomenon occurs at t1 generated by the periodic signal into a signal that is the same but with a
difference in the permittivity of the medium of larger time scale. Thus, the signal with a very small
propagation, resulting in a positive reflected order that are difficult to observe can be reconstructed
(feedback) signal received by the oscilloscope. At t2, into a signal with larger time scale. This method
the input signal feed dropped to zero (falling edge) so requires the help of a trigger signal as a reference to
that only the readable signal resulted from reflections start sampling. The trigger signal is then cast as the
observed on the oscilloscope. Signal reflections are start of the regular timer ADC signal acquisition.
then discharged at t3, making the value read on the
In Fig. 3, the signal 1 indicates the input signal
oscilloscope to zero. The magnitude of reflected
from the TDR signal, while the second signal is a
signal depends on the impedance mismatch which
trigger signal given to the sampler. Signal 3 is the
occur at the beginning and the end point of the probe.
Depending on the magnitude of probe's impedance, result of reflection TDR signals to be observed, which
the produced signal reflections can be either negative are then reconstructed into a signal 4 in the order of
signals so that the shape of the resulting signal will be time is greater. From this table, it can be seen that the
different. In addition, the impedance of the medium sampling is done every rising edge of the trigger
and soil test will also reduce the value of the signal signal, then the signal is repeated until 3 in the above
voltage as recorded. image can be reconstructed as signal 4. This pattern
can be followed continuously until the fourth signal is
In the implementation of the sensor, TDR method generated form a complete signal 3 during the period.
is using the pause time resulting in signal reflections.
In Fig.2, the pause time is equal to:

∆t = t1 − t2 = t3 − t4 (1)

Soil moisture measured in relative humidity


related to the time delay is calculated as [5]

Rh(%)=(−530+292Ka−5.52Ka2+0.043Ka3)/100 (2)

Fig. 3. Diagram of equivalent time sampling

361
However, the complete period of signal
reconstruction will be done after the n period on the
signal 3. Therefore, the necessary calculations to
determine influence of the trigger signal’s frequency
to the sampling time is needed. There are several
variables that influence in this method, namely: the
input signal frequency (fs), the period of the input
signal (Ts), the frequency trigger signal (ft), the period
of trigger signal (Tt), delay of reflected signal (Δt),
sampling resolution (tres), and the acquisition time
(tacc). The relation between those parameters is Fig. 5. Block diagram of the designed sensor system
described in following equations,
The whole sensor system is then designed
according to the diagram depicted in Fig. 5. The main
tacc = 1 / (fs−ft) (3) module of the sensor system will comprises of sensor
probe, coaxial cable as connector, input signal
module, trigger signal module, data acquisition
tres = Tt − Ts = (fs−ft) / (fs x ft) (4) module, and data processing module. Some push
button and LCD screen are added as input-output
peripherals.
tacc ≈ 1 / (fs2 x tres) (5)

∆τ = fs2 x tres (6)

Fig. 4 shows a plot for three sampling resolutions


tres of 3, 4, and 5 ns versus the ∆f. As lowest
sampling resolution time is required to be below 5ns
(corresponds to 0% Rh), input signal frequency is
selected at 25 KHz, which requires the trigger signal
Fig. 6. Probe and main module of the sensor
must have frequency difference of maximum 3 Hz.
The input signal frequency is selected as low as
possible in order to lower frequency requirement for
the input signal and trigger signal generator.

GPIO Channels

Battery

3 BNC ports
Button Button

Coax cable

User Input

Input Signal
Trigger Signal

Fig. 4. Plot of frequency difference versus input signal frequency


for 3 different resolution time Fig. 7. Detailed diagram of the microcontroller and other featured
parts

362
IV. IMPLEMENTATION AND TEST RESULT
The probe for the sensor system is developed
using a 3-plates coplanar sensor probe, made of
stainless steel. The other module is implemented
using ARM Cortex M4 Microcontroller in the form of
STM32F429I development kit. The main reason for
selecting the microcontroller is that the main clock
frequency was claimed to exceed 168 MHz, and the
minimum ADC sampling frequency according to
datasheet STM32F429 is 62.5 KHz, so that the
minimum sampling requirements at 50 kHz have been
met. In addition, the microcontroller of this type have
also been equipped with an LCD and keypad input so Fig. 9. Measurement result of the developed sensor system. The
that the design of the interface to do more easily. The measurement is calibrated using %VWC
total cost for the implementation of the sensor is less
than USD 50. Moisture calculation performed only after
hundreds of soil measurements, as the data is become
The probe and main module of the implemented convergent to certain value and the fluctuation is less
sensor depicted in Fig. 6. Fig 7 shows the than 5%. Typically, after ~400 times of measurements
interconnection between microcontroller and the other the data become convergent (stable). The average
feature parts. total measurement time for a soil sample is around 2,5
minutes.
In order to achieve resolution time tres much
smaller than 5ns, an ideal sensor system should be The developed sensor system is then tested to
utilizing a signal generator that is capable of measure several soil samples, whose moisture level is
generating high frequency input signal of order determined using volumetric water content methods.
several GHz, as well as generating accurate trigger The result of the soil moisture measurement is
signal whose frequency is differ to the input signal in depicted in Fig. 9. Error of the measurement
order Hz to KHz range. Using microcontroller calculated to be 3.49%.
resulting in low resolution of the sensor system,
therefore systematic errors are introduced to the V. CONCLUSION
extracted data. Two approaches were used to
overcome the problem. We present the development of a cheap-
economical soil moisture sensor system. The sensor
The data extraction is considered valid only in system was developed based on time domain
certain measurement voltage, i.e. several mV below reflectometry. Equivalent time sampling was utilized
the highest voltage reading in the ADC. The to extent measurement frequency range. While
measurement voltage range is determined using the implemented using relatively cheap microcontroller,
result of manual measurement on a soil sample and special approach used to eliminate systematic error, so
careful inspection to the resulted signal on that the sensor system had good accuracy in
oscilloscope. A typical manual measurement result is measurement range 0-100% Rh, error 3,49% and
depicted in Fig. 8. measurement time around 2,5 minutes. The total cost
of the implementation is less than USD 50, so that the
developed soil moisture sensor is a good alternative to
be used for farming soil measurement application.

ACKNOWLEDGMENT
This study is financed under ITB Research and
Research Group Innovation Program (Program Riset
dan Inovasi KK ITB) 2015.
REFERENCES
[1] [1] S. B. Jones, J. M. Wraith, and D. Or, “Time domain
reflectometry measurement principles and applications,”
Hydrol. Process., vol. 16, no. 1, pp. 141–153, Jan. 2002.
[2] [2] R. Becker, “Spatial time domain reflectometry for
monitoring transient soil moisture profiles,” Ph.D.
dissertation, Univ. Karlsruhe, Karlsruhe, Germany, 2004.
Fig. 8. A typical waveform as a result from manual measurement. [3] [3] A. Scheuermann, C. Huebner, H. Wienbroer, D.
Rebstock, and G. Huber, “Fast time domain reflectometry

363
(TDR) measurement approach for investigating the Transactions on Instrumentation and Measurement. VOL. 62,
liquefaction of soils,” Meas. Sci. Technol., vol. 21, no. 2, pp. NO. 7, July 2013
025104-1–025104-11, Feb. 2010. [5] [5] Topp, G.C., Davies, J.L., and Annan, A.P.,
[4] [4] Dennis Trebbels, et al. Miniaturized FPGA-Based Electromagnetic determination of soil water content:
High-Resolution Time-Domain Reflectometer, IEEE measurements in coaxial transmission lines, Water Res.
Research, v. 16, no. 3, p. 574–582. 1980.

364

Вам также может понравиться