The effective and efficient use of irrigation water in agricultural production is vital to the long-term economic and environmental sustainability of irrigated farming operations. It is, therefore, important to develop and promote affordable and effective precision irrigation technologies for farmers to allow them to apply irrigation water when, where, and in the amount needed to maximize profits while protecting the environment. Over the years, a number of sensing technologies have been developed to help farmers properly schedule irrigation. These technologies usually rely on either sensing the weather conditions, sensing the plant itself, or sensing the soil.
Weather-based irrigation scheduling uses weather information and other ancillary inputs to model crop development and soil water status  . Although much effort has been devoted to making this method available to growers through the development of local weather station networks and the creation of software and Apps to automatically download and analyze the collected weather data   , its practical application among commercial farmers is still limited.
The use of plant sensors for irrigation scheduling, especially in arid areas, has focused on the use of infrared thermometers to sense canopy temperature    . This approach has been based on the fact that water-stressed crops tend to have a higher canopy temperature than non-stressed crops, which has long been proposed as a way of scheduling irrigation      . Despite some success, the use of canopy temperature for irrigation scheduling can have significant limitations   , especially for incomplete crop canopies and for humid environments. Therefore, its practical application among commercial farmers is also still very limited.
Sensing the soil using soil moisture sensors is the other major technology that farmers can use to decide when to irrigate their crops and how much water to apply. A recent study with large-scale commercial corn farmers in Nebraska  showed that irrigation scheduling based on sensors saved 33% of the water and reduced pumping cost by $28.5/acre/year, with no significant reduction in yield compared with the Farmer’s irrigation scheduling strategy. But, although a large variety of sensors and data logging systems for soil moisture monitoring are currently commercially available, the use of soil moisture sensors to make irrigation scheduling decisions among commercial farmers is also still limited. Factors affecting the limited adoption of this technology among farmers include the lack of information, high cost, difficulty in installing and maintaining equipment, and difficulties of communicating data from sensors in the field to the farmer in real time.
The development of low-cost and open-source microcontroller devices and software, and their ability to integrate wireless communication technologies, such as radio, cell-phone, and WiFi  provide opportunities for more affordable and effective soil moisture monitoring systems  and their integration into irrigation scheduling  and irrigation automation systems  . In addition, recent developments in the Internet-of-Things (IoT) technologies are being used in a wide variety of applications, including smart wearables, smart home, smart city, smart environment, and smart enterprise  . The application of these technologies in commercial agriculture is still very limited, but could provide opportunities for improving irrigation scheduling based on soil moisture monitoring by making data more accessible to farmers in real time. Therefore, the objective of this study was to develop and test a low-cost IoT system for soil moisture monitoring using Watermark 200SS sensors. The overall goal of this project was to make soil moisture monitoring more affordable and effective in order to promote adoption of irrigation scheduling technologies among commercial farmers.
2.1. Sensor Description
The system described in this paper was created to monitor soil water status from four depths using Watermark 200SS soil moisture sensors (Irrometer Company, Inc., Riverside, CA) (Figure 1(a)). This type of sensor was selected for its relatively low cost, which makes the sensors affordable for most growers. In addition, this type of sensors has been used in many field applications for several decades and has proven to be durable and reliable when properly used. The Watermark 200SS sensor is a solid-state electrical device that senses electrical resistance and is commonly used to measure soil water potential (SWP), rather than soil moisture. The sensor has a pair of corrosion-resistant electrodes in the shape of two concentric rings. The space between the two rings is filled with a gypsum material (to provide a buffer against changes in salinity). The electrodes are installed inside a granular matrix (similar to very fine sand), which creates the bulk of the instrument. The granular matrix is enclosed in two layers. The inner layer is a filter-like material that allows water exchange between the granular
Figure 1. (a) Watermark 200SS sensor; (b) Watermark 200SS manual readout.
matrix and the soil. The outer layer is a perforated stainless steel frame that provides rigidity and maintains the shape and physical integrity of the sensor. Two ABS plastic green caps are installed at each end of the sensor. The electrodes are connected to two AWG 20 lead wires that connect to the data acquisition system.
When installed in the soil, water is exchanged between the soil and the granular matrix until equilibrium is reached. Since water is an electrical conductor, the resistance between the electrodes is inversely related to soil moisture. Sampling the sensor involves powering it with an electrical current (AC rather than DC) and reading the electrical resistance output. The electrical resistance correlates to SWP (negative pressure), which is usually expressed in units of centibars (cb) or kilopascal (kPa) (cb = kPa). According to the manufacturer’s sensor specifications, the rated range of measurement of the Watermark 200SS sensors is from 0 to −239 kPa, although the normal usable range is from 0 to −200 kPa, where a reading around 0 kPa would indicate that the soil is at or near saturation and a reading at or near −200 would indicate a very dry soil with little or no plant available water. There are several types of commercial loggers that can automatically read the Watermark 200SS sensors at specified time intervals and store the collected data, and a device to manually read these sensors is also available (Figure 1(b)).
2.2. System Design
The design of the data sampling and data communication system for four Watermark 200SS sensors consisted of a Coordinator and a number of End Nodes arranged in a star topology  . The start topology basically has one or several End Nodes sending data to a central node, which acts as a Coordinator. The End Nodes are hardwired to the moisture sensors and periodically sample the sensors and transmit the data wirelessly using radio communication to the Coordinator. The Coordinator receives the data from the End Nodes (each End Node has a unique address) and sends the data to a website, where the data points are plotted and can be viewed and further processed by the user.
The End Nodes were created using the Adafruit Feather 32u4 RFM95 LoRa Radio (RFM9x) device (Adafruit Industries, New York, NY, adafruit.com), which combines an Arduino-based microcontroller with a Long Range (LoRa) packet radio transceiver. The microcontroller is based on the ATmega32u4 chip, clocked at 8MHz and using 3.3V logic. The radio transceiver can transmit or receive radio signals at a frequency of either 868 or 915 MHz, which can be specified in software. The Adafruit website (adafruit.com) claims that these radios can have a range of over 2 km (1.2 mi) line-of-sight using a wire quarter-wave antenna and that a range of around 20 km is possible by tweaking settings and using a directional antenna. Feather 0.1’’ Pitch Terminal Blocks (Adafruit Industries, New York, NY, adafruit.com) were soldered to the End Nodes to allow attaching wires from sensors and power supplies.
Since the output of the Watermark sensor is an electrical resistance, which cannot be directly measured by the microcontroller, a voltage divider circuit was created between the microcontroller and the sensor, as described by Fisher and Gould  and Fisher  . For this project, a voltage divider printed circuit board (PCB) to accommodate four Watermark 200SS sensors was designed and fabricated using the Pad2Pad online system (Pad2Pad.com). The electronic diagram for the voltage divider circuit is shown in Figure 2(a), where A1 to A4 are analog input pins, D1 and D2 are digital output pins, and WM1 to WM4 represent the four Watermark sensors. A sample End Node for the Watermark 200SS sensors, showing the microcontroller and the voltage divider circuit PCB, is shown in Figure 2(b).
The Coordinator, on the other hand, was created by combining a Feather 32u4 RFM95 LoRa Radio (RFM9x) with a Feather M0 WiFi w/ATWINC1500 (Adafruit Industries, New York, NY, adafruit.com) (Figure 3). The Feather M0 WiFi w/ATWINC1500 has an ATSAMD21G18 ARM Cortex M0 processor, clocked at 48 MHz, using 3.3V logic. This device also has a WiFi module from Atmel that allows it to connect to the Internet using 802.11bgn networks, supporting WEP, WPA and WPA2 encryption. The two microcontrollers communicate with each other via I2C communication protocol using the wiring shown in Table 1. In this arrangement, the Feather 32u4 RFM95 LoRa acts as a server, which receives data from the LoRa clients (End Nodes) and transmits the received data to the Feather MO WINC1500. The Feather MO WINC1500 then connects to the Internet via WiFi and sends the data to the open-source ThingSpeak website.
2.3. Reading the Watermark 200SS Sensors
The Watermark 200SS sensors were read with the microcontroller using a process similar to that described by Fisher and Gould (2012), except that the Feather microcontroller uses an excitation voltage of 3.2 VDC instead of 5 VDC. In short, each sensor was read by alternating the polarity of the DC voltage used to power the sensor between the two wires of the sensor. The sensor was first
Figure 2. (a) Voltage divider circuit; (b) End Node.
Figure 3. Coordinator.
Table 1. Wiring between the two feather microcontrollers that make up the Coordinator.
powered (excited) by setting HIGH one of the two digital channels connected to the voltage divider while the other was set LOW. Then, a 1000 ms delay was allowed before taking a reading to allow for capacitance effects to stabilize. An analog reading was then taken on the analog channel connected to the sensor, using the analog to digital converter (ADC) to produce an integer output. The range of the integer output depends on the resolution (number of bits) of the ADC. Since the Feather device has a 10-bit ADC, the output will be in the range of 0 to 1023 (=2bits =210 =1024 values). Another reading was taken by reversing the polarity of excitation and the two readings were averaged. This process was repeated ten times, resulting in an average reading. The average reading was then converted to a voltage output (Vout), based on the input or excitation voltage (Vin = 3.2 V) as:
Then, the resistance of the Watermark sensor (Rwm, KOhm) was calculated as:
where, res = resistance used in the voltage divider (10 KOhm).
Fisher et al.  used the equation of Shock et al.  to convert the Rwm values to soil water potential (SWP) (in Kpa), which can be written as:
where, Tsoil = soil temperature (˚C). However, this equation was originally developed with data in the range of only 0 to −80 kPa, which is less than half of the normal range of the Watermark 200SS sensors. Therefore, a calibration was developed in this study (see below) to convert Rwm to SWP that would be applicable to the whole response range of the Watermark 200SS sensors.
A lab test was also conducted to evaluate the voltage divider circuit and the software used to sample the Watermark 200SS sensor during a complete soil drying cycle. The test was conducted using and Arduino UNO and a data logging shield (Adafruit Industries, New York, NY, adafruit.com), which allowed recording the collected data in a SD card. The software for this test was developed using Equation 3 to calculate SWP. A Watermark 200SS sensor was submerged in water for 24 hours and was then installed in a 600 mL glass beaker filled with saturated soil. The soil was allowed to dry at room temperature for 21 days (Dec. 16, 2016 to Jan. 6, 2017) and the SWP was recorded every minute.
2.4. Sensor Calibration
It was necessary to develop functions to convert the resistance output of the Watermark 200SS sensors into soil water potential, which required conducting sensor calibration experiments in the lab. The sensor calibrations were developed by comparing the outputs of the sensors taken using the microcontroller with their readings taken using the manual readouts (shown in Figure 1(b)), under a range of soil moisture contents ranging from saturated soil to totally air dried soil. The calibrations experiments were conducted using four Watermark 200SS sensors. Calibration of the Watermark 200SS sensors requires starting with a saturated sensor and equilibrium needs to be established between the soil and the sensor to obtain a representative an accurate reading that would represent the moisture condition of the soil. Because of the need to establish equilibrium, there would be a time delay between changes in soil moisture and a corresponding change in the Watermark 200SS reading.
For calibrating the Watermark sensors, the four sensors were first totally submerged in water for 24 hours to allow for their granular matrix to saturate. The sensors were then installed vertically in a 600 mL glass beaker filled with saturated soil, making sure that there was good contact between the soil and the sensors (Figure 4). The soil container was then allowed to dry for some time and readings were taken with the sensors attached to the microcontroller and with the manufacturer manual readout. To dry the soil faster, the container was intermittently placed inside a Fisher ISOTEMP oven (200 Series Model 230F) at a
Figure 4. Watermark sensors in soil container.
temperature of 60˚C. The soil container was normally placed in the oven for about 30 minutes and was then allowed to cool at room temperature before the readings were taken. A fan was used to blow air to the soil sample and accelerate the cooling process. Since the calibration procedure took several days, readings were also taken at the end of the work day (around 5:00 pm) and at the start of the next work day (around 8:30 am), after allowing the soil sample to sit overnight at room temperature.
2.5. Hosting Data in the Cloud
The idea behind the Internet-of-Things (IoT) is to have objects from our daily lives connected to the Internet, which allows these objects to periodically send data to the web, where they can then be accessible in real-time from remote locations  . This usually requires for a web server to be available to receive and host the data. This web server can either be built or customized for a specific application, or a general purpose IoT platform can be utilized. In recent years, a number of these general purpose IoT platforms have become available, either as free open-source or for-profit entities. Examples of these IoT platforms include The Weather Underground (http://www.wunderground.com), Carriots (http://www.carriots.com), ThingSpeak (http://www.thingspeak.com), Meshify (meshify.com), EasyIOT (http://iot-playground.com/), Adafruit IO (https://io.adafruit.com), Xively (https://www.xively.com/), and Thinger.io (https://thinger.io), among others.
For the soil moisture monitoring application, the ThingSpeak (http://www.thingspeak.com) IoT platform was used, mostly because it was free of charge and was set up to receive data from Arduino-based microcontrollers and from other microcontrollers such as Raspberry Pi, and BeagleBone Black. The ThingSpeak platform allows users to create a number of channels. Each channel contains data fields, location fields, and a status field. After a ThingSpeak channel is created, it can be used to write data to the channel, process and view the data with MATLAB® code, and react to the data with tweets and other alerts. The system assigns a unique code (key) to each channel. The Arduino-based microcontroller utilizes this key to direct the data to the specific ThingSpeak channel. The system is able to receive data as often as every 20 seconds, but our soil moisture monitoring system was programmed to update each channel every 20 minutes.
2.6. Field Test
For testing the performance of the system in a real production field situation, the system was installed on February 1, 2017 to monitor soil moisture of a wheat field located at the Clemson University Edisto Research and Education Center near Blackville, SC. The field installation consisted of several End Nodes, each collecting data from different moisture sensor types, including the Watermark 200SS sensors. The Watermark 200SS sensors were installed at four depths (15, 30, 45, and 60 cm). Each Watermark 200SS sensor was glued to the end of a pvc pipe of appropriate length depending on installation depth, following the guidelines recommended by the manufacturer, in order to facilitate installation and eventual removal from the field at the end of the crop growing season   . The End Node for the Watermark 200SS sensors was housed in a waterproof enclosure and was powered using a 12 VDC car battery, which was recharged with a 10 Watt solar panel via a solar charge controller (Model CMP12). Since the End Node required a regulated 5 VDC power supply, rather than the 12 VDC provided by the battery, a linear voltage regulator was used to regulate and bring the voltage down to 5 VDC.
The Coordinator was installed inside a waterproof enclosure attached to the outside wall of a field shed located around 200 m away from the End Node. The Coordinator was powered from a USB port, which provided a regulated 5 VDC output. The USB port was attached to a 120 VAC wall power outlet located inside the shed. The Coordinator connected to the Internet via WIFI provided by a mobile hotspot (Verizon Wireless Jetpack 6620L, 4G LTE) located inside the shed.
Table 2 shows the itemized list price ($US) of the components used to develop the Coordinator and the End Nodes, excluding shipping, taxes, and labor.
3. Results and Discussion
3.1. Calibration Results for Watermark 200SS Sensors
Results of initial lab testing to evaluate the voltage divider circuit and the software used to sample the Watermark 200SS sensors during a complete soil drying cycle are shown in Figure 5. The system performed as expected, but Figure 5 shows a few interesting results. First, the Watermark 200SS sensor responded to soil conditions much dryer than the −199 kPa limit imposed by the manufactur
Figure 5. Watermark readings from drying soil.
Table 2. List price ($US in 2017) of components for Coordinator and End Nodes.
er of the manual readout and loggers. In fact, the system recorded SWP values in the range of 0 to −39,779 kPa (full range not shown in Figure 5). The other interesting observation from Figure 5 is that for very dry soil, at some point the SWP response became positive, which seems to be a problem of using Equation 3 outside the original intended SWP range of 0 to −80 kPa. However, the system worked well within the SWP range of 0 to −199 kPa, which is the relevant range for irrigation scheduling applications.
Results of calibration of the Watermark 200SS sensor are shown in Figure 6 and Figure 7. As stated earlier, during the calibration process it was apparent that while the Irrometer readout device had a limited output range of 0 to −199 kPa, the Watermark 200SS with the arduino-based Feather microcontroller continued to be sensitive at dryer SWP values. Figure 6 shows the measured SWP for each of the sensors (Watermark 1 to Watermark 4) taken using the Irrometer readout device, after consecutive soil drying events, going from saturated soil (Reading # R1) to very dry soil (Reading # R19).
It was oftentimes observed that the Watermark 200SS readings taken a short time after taking the soil out of the oven (measured after allowing the soil sample to cool down to room temperature), tended to show wetter soil conditions compared to readings taken prior to putting the soil sample in the oven. This was contrary to what was expected, since water was supposed to evaporate from the soil sample, which would consequently decrease the soil water content. However, this unexpected behavior could be due to the fact that water evaporated from the top of the soil sample, which is likely to have moved water upwards buy capillary rise from the bottom of the container, which would be expected to be wetter than the top. Since the sensors were installed in the middle of the soil sample, the sensors would detect this temporary and localized increase in soil water content, although the average soil water content of the sample would actually be lower due to the evaporated water.
It was also noticed that allowing the soil to sit overnight after taking it out of the oven normally resulted in considerably lower soil water content (more negative SWP) compared to the readings taken shortly after taking the sample out of the oven. The behavior observed in this study can create problems and inaccuracies when trying to develop sensor calibrations by comparing sensor readings to gravimetric soil water content determined by weighing the soil sample. Another observation from Figure 6 is that one of the watermark sensors (Watermark 1) showed a considerable higher moisture content (less negative SWP) compared with the other three sensors, even thought they were all installed in a small soil container. This difference was likely due to uneven water distribution within the
Figure 6. Watermark readings taken after each soil drying event.
soil sample, which could be a significant problem when only one sensor is used to represent the water status of an entire agricultural field.
Figure 7 shows the relationship between the resistance (measured with the Feather microcontroller) and the SWP (measured with the Irrometer manual readout) for the four Watermark 200SS sensors (Watermark 1 to 4) as well as the combined data for the four Watermarks 200SS sensors. The filled circles in Figure 7 represent SWP values greater than −199 kPa and open circles represent SWP values of less or equal to −199 kPa.
Figure 7. Calibration results for four Watermark 200SS sensors.
Each of the four sensors showed a good linear relationship (r2 > 0.97) between resistance and SWP in the range of SWP of 0 to −199 kPa. As stated earlier, the microcontroller was able to measure resistance values that would correspond to SWP values outside this range (represented by the open circles in Figure 7), a wider SWP range could not be tested since the Irrometer manual readout is limited to this range. The combined data for the four sensors also shows that the four sensors had a similar linear relationship between SWP (kPa) and resistance (kOhm) (r2 > 0.95) that could be represented as:
It is important to notice that the Watermark 1 sensor, which tended to be wetter than the other three sensors, also followed Equation (4), which seems to indicate that the sensor was not malfunctioning and that the observed higher (less negative) SWP values were in fact due to the sensor being wetter due to uneven water distribution within the soil sample. Equations (1) through (5) were, therefore, programmed into the microcontroller firmware to convert the readings taken with the Feather microcontroller to SWP.
3.2. Field Test Results
The system reliably collected data every 20 minutes from a wheat field for more than three months (Feb. 1 to May 8, 2017). Sample results of the four Watermark 200SS sensors installed at four soil depths (15, 30, 45 and 60 cm) during April 22 to May 8, 2017 are shown in Figure 8. It shows the Watermark 200SS data as displayed by the ThingSpeak website, which by default shows separate plots for each sensor. It shows that the system worked as expected, responding to changes
Figure 8. Data from four Watermark 200SS sensors displayed on the ThingSpeak website.
in soil moisture conditions. The peaks in the curves indicate the quick response of the sensors to an increase in soil moisture due to rainfall events, followed by progressive drying of the soil profile, indicated by more negative soil water potential values. The smooth nature of the data shown in Figure 8 indicates that the 10-bit resolution of the ADC chip of the microcontrollers was accurate enough to represent the range of values of the Watermark 200SS sensor output. Also, the wireless and WiFi communication systems proved to be very reliable and never failed to report data to the ThingSpeak website.
Showing data for each sensor in a separate graph, using the default ThingSpeak settings, would hinder data interpretation. But, the ThingSpeak website provides access to Matlab, which allows writing scripts for creating customized displays and conducting additional analysis using the collected data. Therefore, a Matlab script was created to show the data from the four sensors in the same plot (Figure 9).
In this study, a system was developed to periodically collect data from four Watermark 200SS soil moisture sensors installed in a farm and automatically send the data to a website using radio and WiFi wireless communication. The system was developed using open-source electronics and software (Arduino-based devices) and using an open-source Internet of Things platform (ThingSpeak.com) to host and display the data. Prior to deploying the system in the field, laboratory tests were conducted to develop calibration functions to be able to use the Watermark 200SS sensors with the Arduino-based microcontroller. The system was installed in a production wheat field and data were collected successfully under real field conditions. The system described here can be built at an affordable price for growers. Potential future improvements for the system, however, could
Figure 9. Results of Matlab script showing data from four sensors in the same plot.
include integrating the Coordinator into a printed circuit board and making the End Node more power efficient to conserve battery, so that a solar panel is not needed for field installation. Making the system more power efficient can be accomplished by taking advantage of the sleep-mode capabilities of the microcontroller or by using external hardware to only turn the system on when data collection is required. Our next step is to demonstrate and promote the use of the system to improve irrigation scheduling among commercial growers.
Technical contribution No. 6555 of the Clemson University Experiment Station. This material is based upon work supported by USDA/NIFA, under Projects Number SC-1700540, and SC-1700511, and USDA/NRCS under projects Number 69-3A75-13-88, and 69-4639-14-0010.
Mention of trade names does not imply endorsement of products by Clemson University to the exclusion of others that might be available.