Open-Source Wireless Cloud-Connected Agricultural Sensor Network

Agricultural research involves study of the complex soil–plant–atmosphere–water system, and data relating to this system must be collected under often-harsh outdoor conditions in agricultural environments. Rapid advancements in electronic technologies in the last few decades, as well as more recent widespread proliferation and adoption of electronic sensing and communications, have created many options to address the needs of professional, as well as amateur, researchers. In this study, an agricultural research project was undertaken to collect data and examine the effects of different agronomic practices on yield, with the objectives being to develop a monitoring system to measure soil moisture and temperature conditions in field plots and to upload the data to an internet website. The developed system included sensor nodes consisting of sensors and electronic circuitry to read and transmit sensor data via radio and a cellular gateway to receive node data and forward the data to an internet website via cellular infrastructure. Microcontroller programs were written to control the nodes and gateway, and an internet website was configured to receive and display sensor data. The battery-powered sensor nodes cost $170 each, including electronic circuitry and sensors, and they were operated throughout the cropping season with little maintenance on a single set of batteries. The solar-powered gateway cost $163 to fabricate, plus an additional cost of $2 per month for cellular network access. Wireless and cellular data transmissions were reliable, successfully transferring 95% of sensor data to the internet website. Application of open-source hardware, wireless data transfer, and internet-based data access therefore offers many options and advantages for agricultural sensing and monitoring efforts.


Introduction
Experimental research relies on observation, collection, and interpretation of data and information in order to better understand or quantify the subject under study.Agricultural research involves study of the complex soil-plant-atmosphere-water system, and data relating to this system must be collected under often-harsh outdoor conditions in agricultural environments.In the past, sensing and monitoring instrumentation was often limited to proprietary equipment and systems, sometimes developed for different markets and perhaps unaffordable for widespread deployment.Rapid advancements in electronic technologies in the last few decades, as well as more recent widespread proliferation and adoption of electronic sensing and communications, have created many options to address the needs of professional, as well as amateur, researchers.
New generations of solid-state digital sensors, microcontrollers, and power supplies have become readily available and much more affordable.Sensing and data collection, which often required manual and time-consuming efforts, can now be automated to collect more measurements more

Materials and Methods
The open-source wireless cloud-connected sensor network consists of hardware and software components to collect, transmit, and access sensor data.The hardware component includes sensor nodes consisting of sensors and electronic circuitry to read and transmit sensor data via radio installed in different field locations and a cellular gateway installed adjacent to the field that receives node data and forwards the data to an internet website via cellular infrastructure.The software component consists of microcontroller programs written to control the nodes and gateway and configuration of an internet website for receiving and viewing of sensor data.

Sensor Nodes
The sensor nodes are based on a microcontroller development board featuring a programmable microcontroller and a built-in radio transceiver.The Moteino microcontroller board (LowPowerLab, Canton, MI, USA, http://LowPowerLab.com)consists of an Atmel ATmega328P 8-bit microcontroller and auxiliary electronic components and provides a variety of input/output features, including digital and analog input/output pins, 10-bit analog-to-digital converters (ADCs), and support for serial, I2C (Inter-Integrated Circuit), SPI (Serial Peripheral Interface), and Dallas 1-Wire communications protocols.The Moteino is compatible with the Arduino open-source microcontroller project (http://www.arduino.cc)and is programmed using the Arduino Integrated Development Environment (IDE; http://www.arduino.cc).
The Moteino development board is available with several optional radios that operate in the license-free Industrial, Scientific and Medical (ISM) radio bands.
For the current application, the HopeRF RFM95 radio transceiver (HOPERF Micro-electronics Co., Ltd., Shenzhen, China, http://www.hoperf.com) was selected, which operates at 915 MHz and uses the LoRa (long range) wireless data communication technology (Semtech Corporation, Vienna, Austria, http://www.semtech.com).LoRa is designed for long-range, low-data-rate data transmission with low power consumption.The RFM95 radio communicates with the microcontroller via the SPI protocol.
The sensor nodes monitor conditions in the soil profile using one soil temperature and four soil moisture sensors.The DS18B20 digital temperature sensor (Adafruit Industries, New York, NY, USA, http://www.adafruit.com)consists of a DS18B20 temperature sensor (Maxim Integrated, San Jose, CA, USA, http://maximintegrated.com) encased in a waterproof plastic jacket and a length of electrical cable.The sensor communicates via the Dallas 1-Wire protocol, allowing bidirectional communications with the microcontroller using a single microcontroller input/output pin.A pull-up resistor on the input/output pin holds the pin at a high logic level and allows the microcontroller to send and receive logic pulses to and from the sensor to send commands and read sensor output.
To characterize soil moisture conditions in the soil profile, Watermark soil moisture sensors (Irrometer Company, Inc., Riverside, CA, USA, http://www.irrometer.com)were assembled into a multisensor probe unit.When installed in the soil profile, sensor measurements were desired at four depths: 15, 30, 60, and 90 cm below the soil surface.One model 200SS and three model 200SS-S sensors were assembled into a probe using standard US-specification 1  2 -in Class 315 PVC pipe, which fit tightly onto the recessed shoulders of the moisture sensors.The PVC pipe was cut to appropriate lengths so that, when it is attached to the Watermark sensors, the center of each sensor would be located at the correct spacing and result in the desired sensor depths upon installation.Holes were bored in one wall of each pipe section to allow passage of sensor wires.The model 200SS-S spigot end sensors were used for the shallowest three depths; these sensors had recessed shoulders on both ends, allowing PVC pipe sections to be attached to each end.The single standard model 200SS sensor was used for the deepest depth; this sensor had a recessed shoulder on only one end for connection of one section of the PVC pipe.The final assembled multisensor probe is shown in Figure 1.
http://www.hoperf.com) was selected, which operates at 915 MHz and uses the LoRa (long range) wireless data communication technology (Semtech Corporation, Vienna, Austria, http://www.semtech.com).LoRa is designed for long-range, low-data-rate data transmission with low power consumption.The RFM95 radio communicates with the microcontroller via the SPI protocol.
The sensor nodes monitor conditions in the soil profile using one soil temperature and four soil moisture sensors.The DS18B20 digital temperature sensor (Adafruit Industries, New York, NY, USA, http://www.adafruit.com)consists of a DS18B20 temperature sensor (Maxim Integrated, San Jose, CA, USA, http://maximintegrated.com) encased in a waterproof plastic jacket and a length of electrical cable.The sensor communicates via the Dallas 1-Wire protocol, allowing bidirectional communications with the microcontroller using a single microcontroller input/output pin.A pull-up resistor on the input/output pin holds the pin at a high logic level and allows the microcontroller to send and receive logic pulses to and from the sensor to send commands and read sensor output.
To characterize soil moisture conditions in the soil profile, Watermark soil moisture sensors (Irrometer Company, Inc., Riverside, CA, USA, http://www.irrometer.com)were assembled into a multisensor probe unit.When installed in the soil profile, sensor measurements were desired at four depths: 15, 30, 60, and 90 cm below the soil surface.One model 200SS and three model 200SS-S sensors were assembled into a probe using standard US-specification ½-in Class 315 PVC pipe, which fit tightly onto the recessed shoulders of the moisture sensors.The PVC pipe was cut to appropriate lengths so that, when it is attached to the Watermark sensors, the center of each sensor would be located at the correct spacing and result in the desired sensor depths upon installation.Holes were bored in one wall of each pipe section to allow passage of sensor wires.The model 200SS-S spigot end sensors were used for the shallowest three depths; these sensors had recessed shoulders on both ends, allowing PVC pipe sections to be attached to each end.The single standard model 200SS sensor was used for the deepest depth; this sensor had a recessed shoulder on only one end for connection of one section of the PVC pipe.The final assembled multisensor probe is shown in Figure 1.The four soil moisture sensors interface with the microcontroller via half-bridge (voltage divider) circuits.The sensors behave electrically as variable resistors, with electrical resistance of each sensor proportional to its moisture content.Each sensor forms one leg of a half-bridge circuit, with a fixed, 10 kΩ resistor forming the other leg.The center of the half-bridge, between the two resistors, is connected to one of the microcontroller's input/output pins, with the outer two ends of the half-bridge connected to two other microcontroller input/output pins.
A battery-powered electrical circuit was designed to integrate the microcontroller and sensors and enable sensor measurements.The circuit's electrical schematic, shown in Figure 2, was then used to fabricate a circuit board for the sensor nodes.The circuit board was constructed on a small protoboard (Part Number 21-4600, Newark element14, Chicago, IL, USA, http://www.newark.com)by first soldering female and male headers (Adafruit Industries) to the protoboard and male headers to the Moteino board.Resistors and jumper wires were then added to make physical connections between appropriate microcontroller and sensor pins according to the schematic.Female connectors were crimped to the wires on each sensor, and plastic crimp-connector housings (Pololu Robotics and Electronics, Las Vegas, NV, USA, http://www.pololu.com)were added to complete the sensor cables.The four soil moisture sensors interface with the microcontroller via half-bridge (voltage divider) circuits.The sensors behave electrically as variable resistors, with electrical resistance of each sensor proportional to its moisture content.Each sensor forms one leg of a half-bridge circuit, with a fixed, 10 kΩ resistor forming the other leg.The center of the half-bridge, between the two resistors, is connected to one of the microcontroller's input/output pins, with the outer two ends of the half-bridge connected to two other microcontroller input/output pins.
A battery-powered electrical circuit was designed to integrate the microcontroller and sensors and enable sensor measurements.The circuit's electrical schematic, shown in Figure 2, was then used to fabricate a circuit board for the sensor nodes.The circuit board was constructed on a small protoboard (Part Number 21-4600, Newark element14, Chicago, IL, USA, http://www.newark.com)by first soldering female and male headers (Adafruit Industries) to the protoboard and male headers to the Moteino board.Resistors and jumper wires were then added to make physical connections between appropriate microcontroller and sensor pins according to the schematic.Female connectors were crimped to the wires on each sensor, and plastic crimp-connector housings (Pololu Robotics and Electronics, Las Vegas, NV, USA, http://www.pololu.com)were added to complete the sensor cables.A completed sensor node with microcontroller and one sensor displayed is shown in Figure 3. Components needed to fabricate the sensor node microcontroller circuit and enclosure cost $40.Adding the $130 for the cost of one temperature and four soil moisture sensors resulted in a total cost for a sensor node of $170.A list of materials and approximate costs of the components is provided in Table 1.A completed sensor node with microcontroller and one sensor displayed is shown in Figure 3. Components needed to fabricate the sensor node microcontroller circuit and enclosure cost $40.Adding the $130 for the cost of one temperature and four soil moisture sensors resulted in a total cost for a sensor node of $170.A list of materials and approximate costs of the components is provided in Table 1.
The four soil moisture sensors interface with the microcontroller via half-bridge (voltage divider) circuits.The sensors behave electrically as variable resistors, with electrical resistance of each sensor proportional to its moisture content.Each sensor forms one leg of a half-bridge circuit, with a fixed, 10 kΩ resistor forming the other leg.The center of the half-bridge, between the two resistors, is connected to one of the microcontroller's input/output pins, with the outer two ends of the half-bridge connected to two other microcontroller input/output pins.
A battery-powered electrical circuit was designed to integrate the microcontroller and sensors and enable sensor measurements.The circuit's electrical schematic, shown in Figure 2, was then used to fabricate a circuit board for the sensor nodes.The circuit board was constructed on a small protoboard (Part Number 21-4600, Newark element14, Chicago, IL, USA, http://www.newark.com)by first soldering female and male headers (Adafruit Industries) to the protoboard and male headers to the Moteino board.Resistors and jumper wires were then added to make physical connections between appropriate microcontroller and sensor pins according to the schematic.Female connectors were crimped to the wires on each sensor, and plastic crimp-connector housings (Pololu Robotics and Electronics, Las Vegas, NV, USA, http://www.pololu.com)were added to complete the sensor cables.A completed sensor node with microcontroller and one sensor displayed is shown in Figure 3. Components needed to fabricate the sensor node microcontroller circuit and enclosure cost $40.Adding the $130 for the cost of one temperature and four soil moisture sensors resulted in a total cost for a sensor node of $170.A list of materials and approximate costs of the components is provided in Table 1.The cellular gateway is based on a microcontroller development board similar to that used in the sensor node.The Moteino MEGA (LowPowerLab) microcontroller board consists of a programmable 8-bit microcontroller with input/output and communications features and a HopeRF RFM95 radio transceiver that is similar to those of the Moteino board.The Moteino MEGA board uses a more powerful Atmel ATmega1284P microcontroller and was selected for the additional memory required for storing and executing a larger microcontroller program.The larger Moteino MEGA board features additional input/output capabilities and is also programmed using the Arduino IDE.
The cellular gateway is responsible for receiving data transmitted from sensor nodes via the nodes' LoRa radios.The gateway sends the node data via cellular modem to an internet website, where the data are made available for viewing using an internet web browser.The gateway also has a sensor for collecting weather data, a microSD card for storing weather and sensor node data, and a real-time clock/calendar for timing of data collection and transmission and providing date and time information for stored data.The gateway is powered by a rechargeable battery, which is charged via a solar panel and recharging circuit.
The cellular gateway transmits weather and node data via a FONA cellular modem (Adafruit Industries).The Moteino MEGA microcontroller controls the operation of the cellular modem via several input/output pins and a serial communications connection.To enable cellular operation using the cellular communications infrastructure, a SIM card and cellular data plan are required.Because the amount of data sent is small-consisting mainly of seven data values per sensor node and a few weather parameters-and because data transmission is infrequent, an inexpensive data plan that allows up to 2 MB of data and costs approximately $2 per month (Embedded Works, Santa Clara, CA, USA, http://embeddedworks.net) is sufficient.
The weather sensor consists of a BME280 temperature, humidity, and pressure breakout board, which contains a Bosch BME280 sensor (Bosch Sensortec, Reutlingen, Germany, http://www.boschsensortec.com)and auxiliary electronic components mounted on a single breakout board.The BME280 sensor communicates with the microcontroller via the two-wire I2C communications protocol; the microcontroller sends commands to the sensor, the sensor measures the three weather parameters, and the microcontroller then extracts the readings from the sensor.
The PCF8523 real-time clock/calendar (Adafruit Industries) is similar to the weather sensor in that it consists of a breakout board with clock chip and auxiliary components and communicates via the I2C protocol.The I2C protocol allows multiple I2C devices to be connected to the microcontroller using the same two input/output pins and two-wire interface.Each device has a unique identifying digital address, and the microcontroller communicates with each device individually using that address to access the device's information.The real-time clock/calendar (RTC) provides date and time information and includes a backup battery for uninterrupted timekeeping.
Weather and sensor node data are stored to a microSD card using a Sparkfun level shifting microSD breakout board (Sparkfun Electronics, Niwot, CO, USA, http://www.sparkfun.com).The breakout board contains auxiliary electronic components and a microSD card holder and communicates with the microcontroller via the SPI communications protocol.
The gateway circuit is powered by a rechargeable 3.7 V, 2000 mAh lithium ion battery (Adafruit Industries).A 7.2 V, 100 mA monocrystalline solar cell (Newark element14) and USB/DC/solar lithium ion/polymer charger (Adafruit Industries) recharge the battery continuously.
The electrical schematic for the cellular gateway circuit is shown in Figure 4.A prototype circuit board was fabricated in the same manner as that of the sensor node circuit board using a protoboard and male and female headers.The completed cellular gateway with microcontroller and other boards installed is shown in Figure 5, with a list of materials and approximate costs provided in Table 2.
J. Sens. Actuator Netw.2018, 7, x FOR PEER REVIEW 6 of 13 breakout board contains auxiliary electronic components and a microSD card holder and communicates with the microcontroller via the SPI communications protocol.The gateway circuit is powered by a rechargeable 3.7 V, 2000 mAh lithium ion battery (Adafruit Industries).A 7.2 V, 100 mA monocrystalline solar cell (Newark element14) and USB/DC/solar lithium ion/polymer charger (Adafruit Industries) recharge the battery continuously.
The electrical schematic for the cellular gateway circuit is shown in Figure 4.A prototype circuit board was fabricated in the same manner as that of the sensor node circuit board using a protoboard and male and female headers.The completed cellular gateway with microcontroller and other boards installed is shown in Figure 5, with a list of materials and approximate costs provided in Table 2.   breakout board contains auxiliary electronic components and a microSD card holder and communicates with the microcontroller via the SPI communications protocol.
The gateway circuit is powered by a rechargeable 3.7 V, 2000 mAh lithium ion battery (Adafruit Industries).A 7.2 V, 100 mA monocrystalline solar cell (Newark element14) and USB/DC/solar lithium ion/polymer charger (Adafruit Industries) recharge the battery continuously.
The electrical schematic for the cellular gateway circuit is shown in Figure 4.A prototype circuit board was fabricated in the same manner as that of the sensor node circuit board using a protoboard and male and female headers.The completed cellular gateway with microcontroller and other boards installed is shown in Figure 5, with a list of materials and approximate costs provided in Table 2.   Programming of the microcontrollers for the sensor nodes and cellular gateway was accomplished using the Arduino IDE, version 1.8.5, which was downloaded from the Arduino project website (http://www.arduino.cc)and installed on a personal computer.The Arduino IDE enables the user to develop, debug, and upload microcontroller programs in a language based on C/C++.Two programs were written: one to control the sensor nodes and a second for the cellular gateway.The programs, described below, are open-source and freely available by contacting the authors.
The sensor node program consists of several subroutines to configure the microcontroller and other hardware components, make temperature and soil moisture sensor measurements, and transmit sensor data via radio to the cellular gateway.When the sensor node circuit is first powered on by connecting the batteries to the circuit, program execution begins by importing several external programming libraries, which contain program instructions for performing various hardware functions.Microcontroller input/output pins used in the circuit are specified, and program variables are declared.Communication protocols used to communicate with the sensors and radio, including SPI and 1-Wire protocols, are configured and initiated.
The program then enters the main routine, which runs continuously while the circuit is powered.The main routine begins by calling separate subroutines that read the soil moisture sensors, read the soil temperature sensor, and then transmit sensor data via radio.The sensor node circuit has no clock and therefore cannot synchronize the timing of data transmissions with the gateway, which is programmed for a two-hour measurement collection and cellular upload interval.To ensure that node data are received by the gateway, node radios transmit data at 60-second intervals.When a two-hour measurement collection interval occurs, the gateway radio turns on and remains on to accept node transmissions for a period of 65 seconds.Sensor node data transmissions that occur when the gateway radio is not on are simply transmitted but not received.
Sensor measurement begins by first reading the four soil moisture sensors, with each sensor read sequentially.The microcontroller pin on one leg of the voltage divider circuit is set HIGH (high voltage), the pin on the other leg is set LOW (ground), and the center voltage is measured with the microcontroller's built-in ADC channel.The polarity of the HIGH and LOW pin settings is reversed to avoid polarization of and damage to the moisture sensor over time, and the center voltage is again measured with the ADC.Readings are taken five times at each polarity, and the average value of the readings at each polarity is calculated.The average of the measurements at each polarity is input to the voltage divider equation and the average resistance of the sensor, which is variable and dependent on its moisture content, is calculated.A calibration equation [16] is applied to convert sensor resistance to soil moisture status in terms of soil water potential.
The soil temperature sensor is read using the 1-Wire protocol.The microcontroller sends digital commands to the sensor and receives temperature information as a digital signal.The digital signal is then converted to a temperature value.
Following sensor measurements, the microcontroller turns the RFM95 LoRa radio on and prepares for data transmission.A data packet is assembled consisting of seven values: a number identifying the sensor node's circuit board, four soil moisture sensor readings, and two temperature sensor values.The radio can transmit only byte values (integer values between 0 and 255), so the floating-point temperature measurement consisting of whole and decimal parts is split into two values: one for the whole part and one for the decimal part.The data packet is then transmitted, and the microcontroller turns off power to the sensors and radio and enters a low-power sleep mode to minimize current draw and prolong the life of the batteries.
The microcontroller program for the cellular gateway is similar in construction to that of the sensor node, consisting of configuration, timekeeping, sensor measurement, radio operation, and cellular data transmission subroutines.One difference in the operation of the gateway circuit compared to that of the sensor node relates to the timing of circuit operation.The gateway circuit includes a real-time clock, which is used to determine when the circuit becomes active rather than operating at frequent but unknown times like the sensor nodes.
Following initial powering and configuration routines of the gateway circuit, the program enters the main routine.The routine begins by first reading the RTC to obtain the current time and determine if it is time to collect and transmit sensor data.The circuit is programmed for a two-hour measurement interval; if the measurement interval has not been reached, the circuit remains in a low-power sleep mode for one minute, after which the clock is read again.
If a measurement period is signaled, the microcontroller powers the circuit and begins the data collection and transmission process.The microcontroller reads the BME280 weather sensor, which sends current air temperature, relative humidity, and atmospheric pressure measurements to the microcontroller via the I2C protocol.The microcontroller then turns on the LoRa radio for a period of 65 seconds, receives any incoming radio transmissions, and turns the radio off.Data packets received are then parsed, separating the packets into the original data values sent by the sensor nodes, and the two temperature values are reassembled into the original floating-point values.The weather and sensor node data, along with the current date and time, are stored to the microSD card.
The microcontroller turns power on to the FONA cellular modem and connects with the modem over a two-wire serial port.The modem establishes communications with and registers on the cellular network and enables data transfer and internet access services.Weather sensor and sensor node data are assembled into unique internet webpage addresses (URLs), detailed below, to enable the transfer of sensor data to appropriate webpages for user access.Data for each sensor node and for the weather sensor are sent via the cellular modem and URLs for each individual webpage.
The microcontroller then turns off power to the circuit components and enters a low-power sleep mode.The microcontroller wakes at one-minute intervals, reads the real-time clock, and returns to the sleep mode until the next measurement interval occurs.

Internet Website
To enable remote access to and viewing of weather and sensor node data, an internet website was configured to receive and display data.The ThingSpeak internet service (http://thingspeak.com) is a web application designed to enable users to upload, view, and store sensor data, allowing data from remote locations to be viewed anywhere at any time using an internet web browser.The ThingSpeak service provides free access to enable users to analyze and visualize sensor data and evaluate remote monitoring capabilities.
Data upload and viewing on the ThingSpeak website is accomplished by first creating a user account on the website and logging into the account.The user creates a new incoming data channel, which is configured by specifying the data fields that will be uploaded.Metadata describing the data channel and the incoming data fields can be added, and graphical output for each data field can be configured as desired, showing data type, units, and time period of displayed data.A unique numerical key is then generated for the data channel, which is used to construct a URL for uploading data, and a channel number is assigned for accessing the webpage displaying the data channel.An option is also available for designating the webpage as private, allowing it to be viewed only by the user after logging into the user account, or as public, allowing viewing of the graphical output by anyone.
Each URL for uploading data consists of the ThingSpeak webpage address, numerical upload key, and data values for each data field.An example URL for uploading the gateway's weather data would be of the form http://api.thingspeak.com/update?key=xxxuploadkeyxxx&field1=90.2&field2=77&field3=1013.7&field4=0.32&field5=3977,specifying the data channel's webpage on the Thingspeak.comwebsite and uploading a temperature of 90.2 F, relative humidity of 77%, atmospheric pressure of 1013.7 mb, rainfall amount of 0.32 in, and battery voltage of 3977 mV.

Results and Discussion
The monitoring system was installed in a research field at the USDA Agricultural Research Service's Jamie Whitten Delta States Research Center at Stoneville, MS, USA and operated during the 2018 cropping season.Sensors and sensor nodes were installed at four locations in plots planted to corn, and one cellular gateway was installed outside the field near the plots.
Installation of each multisensor probe was accomplished by creating a borehole in the soil profile using a standard manual screw-type soil auger.A moist slurry was created from water and the extracted soil following the soil moisture sensor manufacturer's installation guidelines.The sensor probe was inserted into the borehole, and the borehole was backfilled with the soil slurry and compacted using a small-diameter rod until the slurry reached a depth of 30 cm.The temperature sensor was then installed in the borehole, and the borehole was backfilled until the slurry reached the soil surface.A wooden stake was driven into the ground near the probe for mounting of the sensor node's protective plastic enclosure.The enclosure was mounted at a height of approximately 30 cm above the soil surface so that it was not impacted or damaged by agricultural equipment during routine field operations throughout the cropping season.Sensor wires were connected to the sensor node circuit board, the battery pack was connected, and the circuit board and batteries were placed in the protective enclosure.
A location for installing the cellular gateway was identified adjacent to the research field such that it would not be damaged by vehicular traffic.A length of aluminum angle stock was driven into the ground, and the protective enclosure was mounted to the aluminum angle at a height of approximately 130 cm above the ground.The solar panel was mounted to the top of the enclosure so that it faced south, and the gateway circuit board, solar charger, and battery were placed inside the enclosure.
The monitoring system operated throughout the entire 2018 season with only minor maintenance required.A sample of data uploaded to the ThingSpeak website from one sensor node showing soil moisture status at four depths and soil temperature at one depth over a seven-day period can be seen in Figure 6.Data were transmitted at two-hour intervals throughout the season, with approximately 95% of the data transmissions received and uploaded successfully.Missing data were due to occasional sensor node radio transmissions, which were either not sent properly by the sensor node or not received properly by the gateway, evidenced by measurement intervals at which data from one node were missing while that from other nodes appeared.On other occasions, node and the gateway's weather data were all missing, indicating that an error occurred during the cellular data transmission process.A sample of weather data from the gateway's weather sensor uploaded to the ThingSpeak website showing air temperature, relative humidity, and atmospheric pressure can be seen in Figure 7.When the ThingSpeak webpage was first created and configured, a data field for rainfall measurements was included.While rainfall "data" are shown in Figure 7, no rain gage was connected and therefore any rainfall values shown are not valid.Data uploaded to the webpage are displayed for viewing on the webpage, but data values can also be downloaded from the website for use elsewhere, for example, input to a spreadsheet for further analysis.If the data channel has been configured to be accessible by the public, anyone can click on the "Data Export" button and all data for the most recent 100 data uploads will be output as a text file.By logging into the ThingSpeak account, the account owner can download all data that have been uploaded since the establishment of the account.A sample of weather data from the gateway's weather sensor uploaded to the ThingSpeak website showing air temperature, relative humidity, and atmospheric pressure can be seen in Figure 7.When the ThingSpeak webpage was first created and configured, a data field for rainfall measurements was included.While rainfall "data" are shown in Figure 7, no rain gage was connected and therefore any rainfall values shown are not valid.Data uploaded to the webpage are displayed for viewing on the webpage, but data values can also be downloaded from the website for use elsewhere, for example, input to a spreadsheet for further analysis.If the data channel has been configured to be accessible by the public, anyone can click on the "Data Export" button and all data for the most recent 100 data uploads will be output as a text file.By logging into the ThingSpeak account, the account owner can download all data that have been uploaded since the establishment of the account.
Minor maintenance was required to address a few hardware problems that occurred during the season.Despite the sensor nodes waking at 60-second intervals to take and transmit sensor readings, this process lasted only about one second, and the node circuits remained in a low-power mode for the remainder of the measurement interval.A current consumption of approximately 0.07 mA during sleep mode resulted in minimal drain on the batteries, enabling the sensor nodes to operate the entire season on a single set of AA alkaline batteries.One sensor node, however, failed early in the season.Examination of the circuit board revealed a faulty solder joint that resulted in an improper connection between two microcontroller pins, causing a voltage leak and excessive current consumption.
The gateway circuit's battery voltage was monitored, shown in Figure 7, to verify that the solar panel and charger were maintaining an adequate charge on the rechargeable battery.For a short period during the season, the battery charge was not being maintained, and a faulty charging circuit had to be replaced.Near the end of the season, the temperature sensor at one of the sensor sites suffered apparent damage from animals and ceased to function properly.J. Sens. Actuator Netw.2018, 7, x FOR PEER REVIEW 11 of 13 Minor maintenance was required to address a few hardware problems that occurred during the season.Despite the sensor nodes waking at 60-second intervals to take and transmit sensor readings, this process lasted only about one second, and the node circuits remained in a low-power mode for the remainder of the measurement interval.A current consumption of approximately 0.07 mA during sleep mode resulted in minimal drain on the batteries, enabling the sensor nodes to operate the entire season on a single set of AA alkaline batteries.One sensor node, however, failed early in the season.Examination of the circuit board revealed a faulty solder joint that resulted in an improper connection between two microcontroller pins, causing a voltage leak and excessive current consumption.
The gateway circuit's battery voltage was monitored, shown in Figure 7, to verify that the solar panel and charger were maintaining an adequate charge on the rechargeable battery.For a short period during the season, the battery charge was not being maintained, and a faulty charging circuit had to be replaced.Near the end of the season, the temperature sensor at one of the sensor sites suffered apparent damage from animals and ceased to function properly.
The monitoring system that was developed and the results presented are specific to this small-plot study.The hardware, software, and internet components could be used to develop similar monitoring systems by incorporating different sensors or by expanding the system to increase the number of sensor nodes, extend the areal coverage, or increase the range of the radio network.Issues such as radio transmission range (affected by factors such as topography and crop canopy The monitoring system that was developed and the results presented are specific to this small-plot study.The hardware, software, and internet components could be used to develop similar monitoring systems by incorporating different sensors or by expanding the system to increase the number of sensor nodes, extend the areal coverage, or increase the range of the radio network.Issues such as radio transmission range (affected by factors such as topography and crop canopy characteristics), the number of nodes and frequency of data transmission allowed (to avoid corrupted or missing data transmissions), and positioning of cellular gateways (to ensure reliable cellular connections) would need to be evaluated.If a monitoring network expanded such that the amount of data transmitted exceeded the 2 MB/month cellular data plan limit, a plan with greater capacity could be purchased at a slightly higher price ($38 per year, 100 MB/month, for example; Embedded Works, http://embeddedworks.net).

Conclusions
Advances in electronic technologies and communication infrastructure and concepts of open-source and open science hardware have increased the availability of and access to improved and affordable sensing and monitoring options.In this study, an open-source monitoring system was developed to support data collection efforts for an agricultural research project, resulting in the fabrication and deployment of sensor nodes to measure soil moisture and temperature conditions in the soil profile.Data from the sensor nodes were transmitted to a gateway, which transferred the data via the cellular network to an internet website for remote access and analysis.The battery-powered sensor nodes cost $170 each, including sensors, and operated throughout the cropping season with little maintenance on a single set of batteries.The solar-powered gateway cost $163 to fabricate, plus an additional cost of $2 per month for cellular network access.Wireless and cellular data transmissions were reliable, successfully transferring 95% of sensor data to the internet website.Application of open-source hardware, wireless data transfer, and internet-based data access therefore offers many options and advantages for agricultural sensing and monitoring efforts.

Figure 6 .
Figure 6.Sample of sensor node data uploaded to a ThingSpeak webpage.

Figure 6 .
Figure 6.Sample of sensor node data uploaded to a ThingSpeak webpage.

Figure 7 .
Figure 7. Sample of gateway weather data uploaded to a ThingSpeak webpage.

Figure 7 .
Figure 7. Sample of gateway weather data uploaded to a ThingSpeak webpage.

Table 1 .
List of materials for soil moisture monitoring system sensor node.

Table 2 .
List of materials for cellular gateway.