Open Journal of Soil Science
Vol.07 No.10(2017), Article ID:79962,13 pages

An Arduino-Based Wireless Sensor Network for Soil Moisture Monitoring Using Decagon EC-5 Sensors

José O. Payero1*, Ali Mirzakhani Nafchi2, Rebecca Davis1, Ahmad Khalilian2

1Edisto Research and Education Center, Clemson University, Blackville, SC, USA

2Department of Agricultural Sciences, Clemson University, Clemson, SC, USA

Copyright © 2017 by authors and Scientific Research Publishing Inc.

This work is licensed under the Creative Commons Attribution International License (CC BY 4.0).

Received: September 8, 2017; Accepted: October 27, 2017; Published: October 30, 2017


It is undeniable that wireless communication technology has become a very important component of modern society. One aspect of modern society in which application of wireless communication technologies has tremendous potential is in agricultural production. This is especially true in the area of sensing and transmission of relevant farming information such as weather, crop development, water quantity and quality, among others, which would allow farmers to make more accurate and timely farming decisions. A good example would be the application of wireless communication technology to transmit soil moisture data in real time to help farmers make irrigation scheduling decisions. Although many systems are commercially available for soil moisture monitoring, there are still many important factors, such as cost, limiting widespread adoption of this technology among growers. Our objective in this study was, therefore, to develop and test an affordable wireless communication system for monitoring soil moisture using Decagon EC-5 sensors. The new system uses Arduino-compatible microcontrollers and communication systems to sample and transmit values from four Decagon EC-5 soil moisture sensors. Developing the system required conducting lab calibrations for the EC-5 sensors for the microcontroller operating in either 10-bit or 12-bit analog-to-digital converter (ADC) resolution. The system was successfully tested in the field and reliably collected and transmitted data from a wheat field for more than two months.


Wireless Communication, Soil Moisture Sensors, Arduino, Decagon EC-5, Calibration, Irrigation Scheduling, Internet-Of-Things

1. Introduction

According to a recent report by the United Nations [1] , the world’s population continues to increase, reaching nearly 7.6 billion in mid-2017, adding one billion people since 2005 and two billion since 1993. The global population is growing by around 83 million per year and is expected to reach 8.6 billion in 2030, 9.8 billion in 2050 and 11.2 billion in 2100 [1] . Ensuring that agricultural production can satisfy the needs of a growing population, not only globally but also locally, presents a tremendous challenge for farmers, scientists, and governments in the 21st century. It is estimated that agricultural production will have to increase by 60% by 2050 to satisfy the expected demands for food and feed [2] . During the Green Revolution of the 1960’s, the world was able to meet the demand of the growing population for food and fiber by predominantly developing new high-yielding crop hybrids, increasing the application of farm inputs (such as water, fertilizers, pesticides, herbicides), and improving mechanization of farming operations. At that time, however, the potential environmental impacts of considerably increasing application of farm inputs was not a major concern as it is today.

Nowadays, the impact of agricultural inputs on the environment, especially in surface and groundwater resources is a critical aspect of current and future agricultural practices. At the same time, the economic sustainability of modern farming demands an ever more efficient use of agricultural inputs. In addition, the potential challenges imposed by climate change on agricultural production are also a major concern. As a consequence, in recent years, many organizations such as The United Nations are promoting the concept of Climate-Smart Agriculture as agriculture that sustainably increases productivity, enhances adaptation through increasing resilience, enhances mitigation through reducing or removing greenhouse gases (mitigation) where and when possible, and enhances achievement of national food security and development goals [2] .

In order to achieve agricultural systems that are socially, environmentally, and economically sustainable, it is imperative that water resources and other agricultural inputs are used efficiently. This will require the development and adoption among growers of affordable and effective precision agricultural and irrigation technologies to enable farmers to apply water and other inputs when, where, and in the amount needed to increase profits and protect the environment. Soil moisture sensing is one of the technologies farmers can adopt to properly schedule irrigation, which has been shown to potentially increase profits while protecting the environment [3] . Although many systems are commercially available for soil moisture monitoring, a number of factors still limit their adoption for irrigation scheduling among commercial growers [4] . Consequently, irrigation scheduling decisions in most commercial farming operations are still based on “the condition of the crop”. For example, [5] found that around 95% of growers in South Carolina used “the condition of the crop” to decide when to irrigate, which exceeded the national average of around 80%. The fact that most farmers are basing irrigation scheduling decisions mainly on “the condition of the crop” could potentially create considerable production, profitability, and environmental problems.

In recent years, however, there has been considerable development in open-source electronics [6] , wireless data communication [7] [8] and Internet-Of-Things technologies [4] [9] [10] that provide opportunities for making soil moisture sensing technologies more accessible and more affordable for commercial growers. Our objective in this study was, therefore, to develop and test an affordable wireless communication system for monitoring soil moisture using Decagon EC-5 sensors.

2. Methods

2.1. The Decagon EC-5 Sensor

The new system was developed to measure soil volumetric water content (VWC) from four depths using Decagon EC-5 sensors (Decagon Devices, Pulman, WA) (Figure 1(a)). The EC-5 sensors were selected for this study because of their affordability and because they had been tested in previous lab and field studies and have been shown to have a fast response that linearly relates to VWC [11] . The EC-5 sensors measure VWC by measuring the dielectric constant of the media using capacitance/frequency domain technology [12] . They need 2.5 - 3.6 VDC (10 mA) as input and their output voltage is proportional to the VWC and to the input voltage [12] . The sensors were designed to work in the temperature range of −40˚C to +50˚C, requiring a measurement time of 10 ms [12] . Several commercial data loggers are capable of sampling and recording data from the Decagon EC-5 sensors. A portable manual readout (ProCheck) is also available from the manufacturer to manually read the EC-5 sensors (Figure 1(b)).

Figure 1. (a) Decagon EC-5 sensor, and (b) ProCheck manual readout device.

2.2. Data Sampling and Communication System

The data sampling and communication system includes a Coordinator and several End Nodes following a Star Topology (Figure 2), similar to that described by [4] , except that the End Node does not require a voltage divider to read the EC-5 sensors. Each End Node is identified by a unique address and is hardwired to the EC-5 moisture sensors. The End Nodes periodically sample the four EC-5 sensors and the data from the sensors is transmitted wirelessly to the Coordinator via radio communication [4] . The Coordinator then sends the received data to a website to be permanently stored in a Cloud server and visually displayed [4] .

Each End Node was built using a Feather 32u4 RFM95 LoRa Radio (RFM9x) (Adafruit Industries, New York, NY), which integrates an ATmega 32u4 microcontroller (Arduino-compatible), which uses 3.3 V logic at 8 MHz, and a Long Range (LoRa) packet radio transceiver [4] . The transceiver transmits or receives radio signals at 868 or 915 MHz frequencies, which can be specified in software. The 915 MHz frequency was used in this study. The line-of-sight distance range of the radio is over 2 km, using a wire quarter-wave antenna [4] . Wires from the moisture sensors and from the battery were connected to the microcontroller of the End Node via pitch terminal blocks (Feather 0.1", Adafruit Industries, New York, NY). Since the Decagon EC-5 sensor produces a voltage output, it can be directly read by the microcontroller without any additional electronic interface. A sample End Node for the Decagon EC-5 sensors is shown in Figure 3(a).

Figure 2. Star Topology arrangement.

Figure 3. (a) End Node, and (b) coordinator with WiFi(left) and radio (right) devices.

Similar to the system described by [4] , the Coordinator (Figure 3(b)) had two Feather devices. Both of the devices had a microcontroller, but one of the devices had a radio transceiver to receive data from the End Nodes [Feather 32u4 RFM95 LoRa Radio (RFM9x)] while the other device had a WiFi chip [Feather M0 WiFi w/ATWINC1500] to send data to the Internet (Adafruit Industries, New York, NY). The WiFi device had an ATSAMD21G18 ARM Cortex M0 processor, which uses 3.3 V logic at 48 MHz. This device has an Atmel WiFi module, which supports 802.11 bgn networks using WEP, WPA and WPA2 encryption [4] . The microcontrollers of the two Feather devices communicate with each other using I2C [4] , in which the device with the radio transceiver is the Server, which gets data from the End Nodes (Clients) and then transfers the data received to the device with the WiFi chip, which is the Master. The Master then uses the Internet connection to post the data to a Cloud server.

2.3. Reading the EC-5 Sensors with the Microcontroller

The Decagon EC-5 sensors were read by the End Node microcontroller by first powering the sensor with 3.2 V excitation, using a separate digital pin for each sensor, and waiting for 15 ms before reading the sensor output in the corresponding analog pin. The anolog output of the sensor (voltage) was converted to a digital output (ADC output) ranging from 0 to 1023 (for the 10-bit ADC) by the internal analog-to-digital converter. After taking the reading, the digital pin powering the sensor was set low. Ten readings were taken each time to calculate an average ADC output, which was converted to VWC using the calibration equation developed in this study (see below).

2.4. EC-5 Sensor Calibration

A laboratory calibration experiment was conducted to be able to convert the output of the Decagon EC-5 sensors to VWC (m3・m−3). Calibrations equations were derived by correlating the outputs of the sensors measured using the microcontroller against the readings measured with the ProCheck readout (Figure 1(b)). Measurements were taken with four Decagon EC-5 sensors covering a wide range of VWC, from air-dried to saturated soil.

The sensors were read using both the microcontroller and ProCheck, with the sensors exposed to six different media. These media included air, water, and four soil samples with different water contents. The soil samples included an air-dried soil, a saturated soil, and two moist soils with different water contents. Each of the four soil samples was first placed in a large container, water was added as needed, the sample was vigorously mixed to obtain a uniform water content, and placed in a 400 mL beaker (Figure 4). In this process, knowing the amount of water added to the soil was not critical, since the target was just to create a range of water contents among the four soil samples, and it was already known from previous work that the sensor’s output was linearly related to changes in VWC [11] . The four sensors were first connected to the microcontroller and readings were taken by alternatively immersing each sensor into the appropriate media. The sensors were then disconnected from the microcontroller and readings were taken using the ProCheck manual readout. This calibration process was possible since the Decagon EC-5 sensors respond almost instantaneously to changes in soil water status in contact with the sensor, and there is no need to allow for the readings to stabilize for a long time.

2.5. Data Storage and Visualization

There are many Internet-Of-Things (IoT) platforms available for data storage and visualization in The Cloud [4] . The ThingSpeak ( platform was used in this study, which is free of charge under certain conditions, and can receive data from a variety of Internet-connected devices (such as Arduino, Raspberry Pi, Beagle Bone Black, Particle Electron, Particle Photon, etc.). The ThingSpeak platform was setup to receive the soil water content data collected, as described by [4] , and allows the user to remotely visualize the data in real time via a web page interface.

Figure 4. Soil and water containers used to calibrate the Decagon EC-5 sensors.

2.6. Testing the System in the Field

On February 13, 2017, the system, which included one EC-5 End Node, was installed in a rainfed wheat field at the Clemson University, Edisto Research and Education Center, in South Carolina (33.3642˚N, 81.3294˚W) (Figure 5). Four EC-5 sensors were installed at depths of 15, 30, 45, and 60 cm. The End Node was inside a waterproof enclosure and power was taken from a car battery (12 VDC). A 10-Watt solar panel was used to recharge the battery using a model CMP12 Solar Charge Controller (Y-Solar, Shenzhen, China) to make sure that the battery was not over-charged (Figure 5(a)). A linear voltage regulator was used to bring the voltage down from the 12 VDC provided by the battery to the 5 VDC required by the microcontroller.

The Coordinator was housed in a waterproof enclosure and was attached to the outside wall of a field shed located 200 m from the End Node (Figure 5(b)) [4] . It was powered from a USB port connected to a 120 VAC power outlet and connected to the Internet via WiFi from a Verizon Wireless Jetpack 6620L (4G LTE) mobile hotspot that was installed in the shed [4] .

2.7. Cost of the System

The list and purchase price ($US) of components needed to build the Coordinator and End Node (excluding shipping, taxes, and labor) are shown in Table 1.

3. Results and Discussion

3.1. Results of Calibration of the Decagon EC-5 Sensors

The VWC measured with ProCheck with each Decagon EC-5 sensor (EC-5/1 to EC-5/4) in air, water, saturated soil, dry soil, and unsaturated soil with different water contents are shown in Figure 6. All four EC-5 sensors had similar response when exposed to each the different media. For example, readings taken with the sensors exposed to air or with the sensors installed in very dry soil resulted in negative VWC readings for all the four Decagon EC-5 sensors. The

Figure 5. (a) End Node installed in a wheat field, and (b) Coordinator.

Table 1. List and price ($US) of components needed to build the coordinator and end node.

Figure 6. Volumetric water content (VWC) measured with each Decagon EC5 sensor (EC-5/1 to EC-5/4) in different media, taken with the ProCheck manual readout.

sensors exposed to air resulted in an average reading of −0.14 m3・m−3, and installed in air-dried soil averaged -0.02 m3・m−3. As expected, when installed in soil, increasing soil water content increased the measured VWC. The highest VWC readings were obtained when the sensors were submerged in water, which averaged 0.61 m3・m−3, followed by saturated soil, which averaged a VWC = 0.39 m3・m−3.

The relationship between the readings (ADC output) taken with the Feather 32u4 microcontroller and the VWC measured with ProCheck for the four Decagon EC-5 sensors (EC-5/1 to EC-5/4) and the relationship for all four sensors combined are shown in Figure 7. Data from all the sensors resulted in a good linear relationship (r2 > 0.99), which still persisted when data for all four sensors were combined (r2 > 0.99). Therefore, the following equation was programmed into the Feather 32u4 microcontroller (10-bit resolution) firmware to convert the the microcontroller ADC output to VWC (m3・m−3):

VWC = 0.00 41 ( ADCoutput ) 0. 4895 (1)

3.2. Field Test Results

Data collected using the Feather 32u4 microcontroller during the period of Feb 13 to March 8 using the four EC-5 sensors were downloaded from the website and are plotted in Figure 8. It shows that during this period, the wheat crop was using water from only the first two depths (15 and 30 cm). It also shows that the EC-5 data collected with the Feather 32u4 microcontroller had a poor resolution, which was due to the narrow output range of the EC-5 sensors combined with the limited 10-bit resolution of the Feather 32u4

Figure 7. Relationships between the Feather 32u4 reading and the volumetric water content (measured with ProCheck).

Figure 8. Volumetric water content measured every 30 minutes with Decagon EC-5 sensors using a Feather 32u4 microcontroller in a wheat field at 15, 30, 45, and 60-cm depths during Feb. 13 to March 8, 2017.

microcontroller. Although this poor data resolution significantly impacts the quality of data display, it could be expected to have little impact on practical irrigation scheduling decisions. However, a better resolution would certainly be desirable.

Therefore, the low-resolution issue was easily addressed in this study by replacing the Feather 32u4 RFM95 LoRa Radio (RFM9x) device with a Feather MO RFM95 LoRa Radio (RFM9x), which was obtained from the same supplier ( at similar cost. The MO microcontroller included in the Feather MO RFM95 LoRa Radio (RFM9x) can be configured in software for 12-bit resolution instead of the default 10-bit resolution. The 12-bit resolution would produce a wider output in the range of 0 to 4095 instead of the 0 to 1023 obtained with the 10-bit resolution.

Switching to a MO microcontroller configured for 12-bit resolution, however, required developing a new calibration equation. Therefore, a calibration for the Feather MO microcontroller configured for 12-bit resolution was conducted following the same procedure described above, resulting in the following calibration equation (Figure 9).

VWC = 0.00 14 ( ADCoutput ) 0. 4697 (2)

The MO microcontroller was used to replace the 32u4 microcontroller and field data collection from the wheat field was continued from 10 March until 16 May, 2017. Data for the four depths as displayed in are shown in Figure 10. The top two sensors showed good sensitivity to normal changes in VWC caused by rain and soil drying. There was little change in VWC for the two deeper soil depths during this period, which seems to indicate a shallow root system of the wheat crop. Figure 10 also shows no missing data, which indicates

Figure 9. Calibration of decagon EC-5 sensor using a feather MO device configured for 12-bit resolution.

Figure 10. Data from four Decagon EC-5 sensors as displayed in ThingSpeak.

that the wireless data communication system was very robust and reliable.

4. Conclusions

In this study, an Arduino-based wireless sensor network system was developed and tested to monitor volumetric soil water content using Decagon EC-5 sensors. The system uses a start topology in which a variable number of sensor field nodes, each with a unique address, can send data to a central receiver. The soil moisture data from the EC-5 sensors installed in the field are wirelessly transmitted from each sensor End Node to the receiver using a long-range package radio (LoRa) transceiver. The receiver is able to connect to the Internet using WiFi and can transmit the received data to an open-source Cloud server in real time, where the information is hosted and can be easily accessible to the user. The development of the system required conducting a lab calibration for the EC-5 sensors.

From the lab calibration experiment, a good linear calibration equation was obtained to convert the EC-5 sensor reading to VWC. From a field test of the system conducted in a wheat field we found that for the End Nodes, the microcontroller with 10-bit resolution (Feather 32u4) was not accurate enough to properly capture the small changes in VWC that are normally observed in a production field. Therefore, a Feather MO, which can be programmed for 12-bit resolution was used instead and proved to be adequate to accurately read the EC-5 sensors. Since we used open-source hardware and software platforms, the cost of the system is minimal compared to commercially available systems. The cost was $108 for each End Node (excluding the cost of the sensors) and $104 for the Coordinator. We are now looking at options for lowering power usage to eliminate the need for a big battery and solar panel to facilitate field installation and further lower cost of each End Node. For non-commercial users, a free account can be obtained at, so there is no cost associated with hosting the data in the Cloud server. The field test conducted in the wheat field showed that the soil moisture sensors properly responded to changes in soil water contents due to rain and soil drying. The field test also showed that the wireless communication system was very reliable and worked without any problems for more than 2 months. We are now working on integrating this wireless system into an irrigation automation and control system.


Technical Contribution No. 6589 of the Clemson University Experiment Station. This material is based upon work supported by NIFA/USDA, under projects number SC-1700540 and SC-1700511. The authors would also like to acknowledge the financial support provided by Clemson University, USDA-NRCS, the South Carolina Cotton Board, and the South Carolina Peanut Board.

Cite this paper

Payero, J.O., Nafchi, A.M., Davis, R. and Khalilian, A. (2017) An Arduino-Based Wireless Sensor Network for Soil Moisture Monitoring Using Decagon EC-5 Sensors. Open Journal of Soil Science, 7, 288-300.


  1. 1. United Nations (2017) World Population Prospects: Key Findings & Advance Tables, 2017 Revision. UN Department of Economic and Social Affairs, Population Division, New York, 46.

  2. 2. FAO (2013) Climate-Smart Agriculture: Sourcebook. Food and Agriculture Organization of the United Nations, Rome, 557 p.

  3. 3. Irmak, S., Burgert, M.J., Yang, H.S., Cassman, K.G., Walters, D.T., Rathje, W.R., Payero, J.O., Grassini, P., Kuzila, M.S., Brunkhorst, K.J., et al. (2012) Large-Scale On-Farm Implementation of Soil Moisture-Based Irrigation Management Strategies for Increasing Maize Water Productivity. Transactions of the ASABE, 55, 881-894.

  4. 4. Payero, J.O., Mirzakhani-Nafchi, A., Khalilian, A., Qiao, X. and Davis, R. (2017) Development of a Low-Cost Internet-Of-Things (IoT) System for Monitoring Soil Water Potential Using Watermark 200SS Sensors. Advances in Internet of Things, 7, 71-86.

  5. 5. USDA (2010) 2007 Census of Agriculture: Farm and Ranch Irrigation Survey (2008). Vol. 3, Special Studies, Part 1 (AC-07-SS-1). United State Department of Agriculture, National Agricultural Statistics Service. 268 p.

  6. 6. Fisher, D.K. and Gould, P.J. (2012) Open-Source Hardware Is a Low-Cost Alternative for Scientific Instrumentation and Research. Modern Instrumentation, 1, 8-20.

  7. 7. Lewis, F.L. (2004) Wireless Sensor Networks. In: Cook, D.J. and Das, S.K., Eds., Smart Environments: Technologies, Protocols, and Applications, John Wiley & Sons, Inc., Hoboken.

  8. 8. Vellidis, G., Tucker, M., Perry, C., Kvien, C. and Bednarz, C. (2008) A Real-Time Wireless Smart Sensor Array for Scheduling Irrigation. Computers and Electronics in Agriculture, 61, 44–50.

  9. 9. Fisher, D.K. (2014) Rapid Deployment of Internet-Connected Environmental Monitoring Devices. Advances in Internet of Things, 4, 46-54.

  10. 10. Schwartz, M. (2014) Internet of Things with Arduino: Built Internet of Things Projects With the Arduino Platform. Marc-Oliver Schwartz, Middletown, 64 p.

  11. 11. Payero, J., Qiao, X., Khalilian, A., Mirzakhani-Nafchi, A. and Davis, R. (2017) Evaluating the Effect of Soil Texture on the Response of Three Types of Sensors Used to Monitor Soil Water Status. Journal of Water Resource and Protection, 9, 566-577.

  12. 12. Decagon Devices, Inc. (2014) EC-5 Soil Moisture Sensor: Operator’s Manual. Decagon Devices, Inc., Pullman, 19 p.