<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE article  PUBLIC "-//NLM//DTD Journal Publishing DTD v3.0 20080202//EN" "http://dtd.nlm.nih.gov/publishing/3.0/journalpublishing3.dtd"><article xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink" dtd-version="3.0" xml:lang="en" article-type="research article"><front><journal-meta><journal-id journal-id-type="publisher-id">OJSS</journal-id><journal-title-group><journal-title>Open Journal of Soil Science</journal-title></journal-title-group><issn pub-type="epub">2162-5360</issn><publisher><publisher-name>Scientific Research Publishing</publisher-name></publisher></journal-meta><article-meta><article-id pub-id-type="doi">10.4236/ojss.2017.710021</article-id><article-id pub-id-type="publisher-id">OJSS-79962</article-id><article-categories><subj-group subj-group-type="heading"><subject>Articles</subject></subj-group><subj-group subj-group-type="Discipline-v2"><subject>Earth&amp;Environmental Sciences</subject></subj-group></article-categories><title-group><article-title>
 
 
  An Arduino-Based Wireless Sensor Network for Soil Moisture Monitoring Using Decagon EC-5 Sensors
 
</article-title></title-group><contrib-group><contrib contrib-type="author" xlink:type="simple"><name name-style="western"><surname>José</surname><given-names>O. Payero</given-names></name><xref ref-type="aff" rid="aff1"><sup>1</sup></xref><xref ref-type="corresp" rid="cor1"><sup>*</sup></xref></contrib><contrib contrib-type="author" xlink:type="simple"><name name-style="western"><surname>Ali</surname><given-names>Mirzakhani Nafchi</given-names></name><xref ref-type="aff" rid="aff2"><sup>2</sup></xref></contrib><contrib contrib-type="author" xlink:type="simple"><name name-style="western"><surname>Rebecca</surname><given-names>Davis</given-names></name><xref ref-type="aff" rid="aff1"><sup>1</sup></xref></contrib><contrib contrib-type="author" xlink:type="simple"><name name-style="western"><surname>Ahmad</surname><given-names>Khalilian</given-names></name><xref ref-type="aff" rid="aff2"><sup>2</sup></xref></contrib></contrib-group><aff id="aff1"><addr-line>Edisto Research and Education Center, Clemson University, Blackville, SC, USA</addr-line></aff><aff id="aff2"><addr-line>Department of Agricultural Sciences, Clemson University, Clemson, SC, USA</addr-line></aff><author-notes><corresp id="cor1">* E-mail:<email>jpayero@clemson.edu(JOP)</email>;</corresp></author-notes><pub-date pub-type="epub"><day>21</day><month>09</month><year>2017</year></pub-date><volume>07</volume><issue>10</issue><fpage>288</fpage><lpage>300</lpage><history><date date-type="received"><day>8,</day>	<month>September</month>	<year>2017</year></date><date date-type="rev-recd"><day>27,</day>	<month>October</month>	<year>2017</year>	</date><date date-type="accepted"><day>30,</day>	<month>October</month>	<year>2017</year></date></history><permissions><copyright-statement>&#169; Copyright  2014 by authors and Scientific Research Publishing Inc. </copyright-statement><copyright-year>2014</copyright-year><license><license-p>This work is licensed under the Creative Commons Attribution International License (CC BY). http://creativecommons.org/licenses/by/4.0/</license-p></license></permissions><abstract><p>
 
 
  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.
 
</p></abstract><kwd-group><kwd>Wireless Communication</kwd><kwd> Soil Moisture Sensors</kwd><kwd> Arduino</kwd><kwd> Decagon EC-5</kwd><kwd> Calibration</kwd><kwd> Irrigation Scheduling</kwd><kwd> Internet-Of-Things</kwd></kwd-group></article-meta></front>

<body>
  
<sec id="s1"><title>1. Introduction</title><p>According to a recent report by the United Nations [<xref ref-type="bibr" rid="scirp.79962-ref1">1</xref>] , 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 [<xref ref-type="bibr" rid="scirp.79962-ref1">1</xref>] . 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 21<sup>st</sup> century. It is estimated that agricultural production will have to increase by 60% by 2050 to satisfy the expected demands for food and feed [<xref ref-type="bibr" rid="scirp.79962-ref2">2</xref>] . 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.</p><p>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 [<xref ref-type="bibr" rid="scirp.79962-ref2">2</xref>] .</p><p>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 [<xref ref-type="bibr" rid="scirp.79962-ref3">3</xref>] . Although many systems are commercially available for soil moisture monitoring, a number of factors still limit their adoption for irrigation scheduling among commercial growers [<xref ref-type="bibr" rid="scirp.79962-ref4">4</xref>] . Consequently, irrigation scheduling decisions in most commercial farming operations are still based on “the condition of the crop”. For example, [<xref ref-type="bibr" rid="scirp.79962-ref5">5</xref>] 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.</p><p>In recent years, however, there has been considerable development in open-source electronics [<xref ref-type="bibr" rid="scirp.79962-ref6">6</xref>] , wireless data communication [<xref ref-type="bibr" rid="scirp.79962-ref7">7</xref>] [<xref ref-type="bibr" rid="scirp.79962-ref8">8</xref>] and Internet-Of-Things technologies [<xref ref-type="bibr" rid="scirp.79962-ref4">4</xref>] [<xref ref-type="bibr" rid="scirp.79962-ref9">9</xref>] [<xref ref-type="bibr" rid="scirp.79962-ref10">10</xref>] 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.</p></sec>
<sec id="s2"><title>2. Methods</title></sec>
<sec id="s2_1"><title>2.1. The Decagon EC-5 Sensor</title><p>The new system was developed to measure soil volumetric water content (VWC) from four depths using Decagon EC-5 sensors (Decagon Devices, Pulman, WA) (<xref ref-type="fig" rid="fig1">Figure 1</xref>(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 [<xref ref-type="bibr" rid="scirp.79962-ref11">11</xref>] . The EC-5 sensors measure VWC by measuring the dielectric constant of the media using capacitance/frequency domain technology [<xref ref-type="bibr" rid="scirp.79962-ref12">12</xref>] . 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 [<xref ref-type="bibr" rid="scirp.79962-ref12">12</xref>] . The sensors were designed to work in the temperature range of −40˚C to +50˚C, requiring a measurement time of 10 ms [<xref ref-type="bibr" rid="scirp.79962-ref12">12</xref>] . 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 (<xref ref-type="fig" rid="fig1">Figure 1</xref>(b)).</p></sec>
<sec id="s2_2"><title>2.2. Data Sampling and Communication System</title><p>The data sampling and communication system includes a Coordinator and several End Nodes following a Star Topology (<xref ref-type="fig" rid="fig2">Figure 2</xref>), similar to that described by [<xref ref-type="bibr" rid="scirp.79962-ref4">4</xref>] , 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 [<xref ref-type="bibr" rid="scirp.79962-ref4">4</xref>] . The Coordinator then sends the received data to a website to be permanently stored in a Cloud server and visually displayed [<xref ref-type="bibr" rid="scirp.79962-ref4">4</xref>] .</p><p>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 [<xref ref-type="bibr" rid="scirp.79962-ref4">4</xref>] . 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 [<xref ref-type="bibr" rid="scirp.79962-ref4">4</xref>] . 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&quot;, 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 <xref ref-type="fig" rid="fig3">Figure 3</xref>(a).</p><p>Similar to the system described by [<xref ref-type="bibr" rid="scirp.79962-ref4">4</xref>] , the Coordinator (<xref ref-type="fig" rid="fig3">Figure 3</xref>(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 [<xref ref-type="bibr" rid="scirp.79962-ref4">4</xref>] . The microcontrollers of the two Feather devices communicate with each other using I<sup>2</sup>C [<xref ref-type="bibr" rid="scirp.79962-ref4">4</xref>] , 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.</p></sec>
<sec id="s2_3"><title>2.3. Reading the EC-5 Sensors with the Microcontroller</title><p>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).</p></sec>
<sec id="s2_4"><title>2.4. EC-5 Sensor Calibration</title><p>A laboratory calibration experiment was conducted to be able to convert the output of the Decagon EC-5 sensors to VWC (m<sup>3</sup>・m<sup>−3</sup>). Calibrations equations were derived by correlating the outputs of the sensors measured using the microcontroller against the readings measured with the ProCheck readout (<xref ref-type="fig" rid="fig1">Figure 1</xref>(b)). Measurements were taken with four Decagon EC-5 sensors covering a wide range of VWC, from air-dried to saturated soil.</p><p>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 (<xref ref-type="fig" rid="fig4">Figure 4</xref>). 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 [<xref ref-type="bibr" rid="scirp.79962-ref11">11</xref>] . 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.</p></sec>
<sec id="s2_5"><title>2.5. Data Storage and Visualization</title><p>There are many Internet-Of-Things (IoT) platforms available for data storage and visualization in The Cloud [<xref ref-type="bibr" rid="scirp.79962-ref4">4</xref>] . The ThingSpeak (http://www.thingspeak.com/) 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 [<xref ref-type="bibr" rid="scirp.79962-ref4">4</xref>] , and allows the user to remotely visualize the data in real time via a web page interface.</p></sec>
<sec id="s2_6"><title>2.6. Testing the System in the Field</title><p>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) (<xref ref-type="fig" rid="fig5">Figure 5</xref>). 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 (<xref ref-type="fig" rid="fig5">Figure 5</xref>(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.</p><p>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 (<xref ref-type="fig" rid="fig5">Figure 5</xref>(b)) [<xref ref-type="bibr" rid="scirp.79962-ref4">4</xref>] . 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 [<xref ref-type="bibr" rid="scirp.79962-ref4">4</xref>] .</p></sec>
<sec id="s2_7"><title>2.7. Cost of the System</title><p>The list and purchase price ($US) of components needed to build the Coordinator and End Node (excluding shipping, taxes, and labor) are shown in <xref ref-type="table" rid="table1">Table 1</xref>.</p></sec>
<sec id="s3"><title>3. Results and Discussion</title></sec>
<sec id="s3_1"><title>3.1. Results of Calibration of the Decagon EC-5 Sensors</title><p>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 <xref ref-type="fig" rid="fig6">Figure 6</xref>. 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</p><table-wrap id="table1" ><label><xref ref-type="table" rid="table1">Table 1</xref></label><caption><title> List and price ($US) of components needed to build the coordinator and end node</title></caption>

</table-wrap>
</sec>
</body>
<back><ref-list><title>References</title><ref id="scirp.79962-ref1"><label>1</label><mixed-citation publication-type="other" xlink:type="simple">United Nations (2017) World Population Prospects: Key Findings &amp; Advance Tables, 2017 Revision. UN Department of Economic and Social Affairs, Population Division, New York, 46.</mixed-citation></ref><ref id="scirp.79962-ref2"><label>2</label><mixed-citation publication-type="other" xlink:type="simple">FAO (2013) Climate-Smart Agriculture: Sourcebook. Food and Agriculture Organization of the United Nations, Rome, 557 p.</mixed-citation></ref><ref id="scirp.79962-ref3"><label>3</label><mixed-citation publication-type="other" xlink:type="simple">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. https://doi.org/10.13031/2013.41521</mixed-citation></ref><ref id="scirp.79962-ref4"><label>4</label><mixed-citation publication-type="other" xlink:type="simple">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. https://doi.org/10.4236/ait.2017.73005</mixed-citation></ref><ref id="scirp.79962-ref5"><label>5</label><mixed-citation publication-type="other" xlink:type="simple">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.</mixed-citation></ref><ref id="scirp.79962-ref6"><label>6</label><mixed-citation publication-type="other" xlink:type="simple">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.</mixed-citation></ref><ref id="scirp.79962-ref7"><label>7</label><mixed-citation publication-type="book" xlink:type="simple">Lewis, F.L. (2004) Wireless Sensor Networks. In: Cook, D.J. and Das, S.K., Eds., Smart Environments: Technologies, Protocols, and Applications, John Wiley &amp; Sons, Inc., Hoboken. https://doi.org/10.1002/047168659X.ch2</mixed-citation></ref><ref id="scirp.79962-ref8"><label>8</label><mixed-citation publication-type="other" xlink:type="simple">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. https://doi.org/10.1016/j.compag.2007.05.009</mixed-citation></ref><ref id="scirp.79962-ref9"><label>9</label><mixed-citation publication-type="other" xlink:type="simple">Fisher, D.K. (2014) Rapid Deployment of Internet-Connected Environmental Monitoring Devices. Advances in Internet of Things, 4, 46-54. https://doi.org/10.4236/ait.2014.44007</mixed-citation></ref><ref id="scirp.79962-ref10"><label>10</label><mixed-citation publication-type="other" xlink:type="simple">Schwartz, M. (2014) Internet of Things with Arduino: Built Internet of Things Projects With the Arduino Platform. Marc-Oliver Schwartz, Middletown, 64 p.</mixed-citation></ref><ref id="scirp.79962-ref11"><label>11</label><mixed-citation publication-type="other" xlink:type="simple">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. https://doi.org/10.4236/jwarp.2017.96037</mixed-citation></ref><ref id="scirp.79962-ref12"><label>12</label><mixed-citation publication-type="other" xlink:type="simple">Decagon Devices, Inc. (2014) EC-5 Soil Moisture Sensor: Operator’s Manual. Decagon Devices, Inc., Pullman, 19 p.</mixed-citation></ref></ref-list></back></article>