Many agricultural applications, including improved crop production, precision agriculture, and phenotyping, rely on detailed field and crop information to detect and react to spatial variabilities. Plant characteristics of interest often include plant canopy temperature and plant height. Canopy temperature has been studied for decades as an indicator of stress   , to evaluate drought tolerance  , and for scheduling irrigations  . Plant height is of interest due to its role in determining a variety of plant traits  , and as an indicator of yield and biomass     .
Modern mobile farm vehicles, such as tractors and sprayers, are being designed with more electronic features and have potential for interfacing sensors, enabling the collection of large amounts of data while working  . Advancing sensing technologies are enhancing monitoring capabilities over a range of spatial scales, from small plot to field to whole farm. Agricultural vehicles have been evaluated as mobile platforms for mounting external non-contact sensing systems for a variety of crop characteristic and crop production applications      .
Advances in electronic technologies continue to bring about new and more powerful and accessible sensing and monitoring capabilities. There is growing interest in the research community in the open-source concept of free and collaborative sharing of ideas and technologies   , which “aims to foster technological knowledge and encourage research that is accessible, collaborative and respects user freedom” (https://www.oshwa.org/about/). A growing number of open-source projects have been undertaken to provide accessible tools and resources for developing sensing and monitoring capabilities  , and to address specific research needs, especially in agricultural and environmental disciplines       .
The objective of this project was to develop a mobile monitoring system for collecting plant-canopy data using inexpensive open-source hardware and software components. Design requirements included the ability of the system to be mounted on an agricultural vehicle and the capability to collect and store plant height and canopy temperature measurements along with concurrent geographic coordinates as the vehicle travelled across agricultural fields.
2. Materials and Methods
The mobile monitoring system consists of hardware and software components. The hardware component includes a microcontroller-based data collection and storage circuit, electronic sensors, and frame and mounting platform. The software component includes microcontroller programming to direct and control sensor measurements and data collection and storage.
2.1. Hardware Component
The monitoring system is based on a programmable microcontroller which manages all measurement and data-collection functions. The Feather M0 Bluefruit LE microcontroller development board (Adafruit Industries, New York, NY USA; https://www.adafruit.com) was selected based on its microcontroller features, built-in Bluetooth wireless capabilities, and connectivity with peripheral hardware components. The microcontroller consists of an ATSAMD21G18 ARM Cortex M0 32-bit processor which operates at 48 MHz and 3.3 V supply. Internal memory includes 256 Kbytes of Flash memory for user-written programming and 32 Kbytes of RAM for temporary data storage during program execution. The development board features access to 20 input/output pins for interfacing with external components, dedicated ports for communicating with external devices via standardized serial, I2C, and SPI communications protocols, and 12-bit analog-to-digital (ADC) channels for measuring external analog input signals. A built-in USB connection allows interfacing with a computer for bidirectional communications and programming of the microcontroller.
The Feather M0 development board features a built-in Bluetooth LE (Low Energy) radio module for communication with external devices via the Bluetooth wireless communications standard (https://www.bluetooth.com). This feature allows the output of sensor data in real time, enabling the user to ensure that the system and sensors are operating properly while in the field. Data can be viewed on a smartphone or tablet using the Adafruit Bluefruit LE Connect app downloaded and installed on the Android (https://play.google.com) or iOS (https://itunes.apple.com) operating systems.
An additional feature of the Feather M0 development board is the ease of connectivity with peripheral hardware components. The form-factor of the microcontroller board, that is, the physical size and arrangement of power and input/output pins, is standardized to match that of other boards offered by the manufacturer (Adafruit Industries). These boards, called FeatherWings, provide additional functions, such as timekeeping, data storage, information display, and sensing capabilities, and are deigned to interconnect by simply stacking one board upon another via mating power and input/output pins, with no additional circuitry required. The stacking FeatherWing feature was utilized to simplify the fabrication of the mobile monitoring system’s control circuitry. A GPS (Global Positioning System) receiver, the Adafruit Ultimate GPS FeatherWing (Adafruit Industries), provides a low-power source for collecting geographic location information, including latitude and longitude, for spatially locating sensor measurements as the monitoring system travels through the field. The GPS FeatherWing is capable of updating location information at 10 Hz, and outputs standard GPS data streams to the microcontroller via a serial connection.
GPS and sensor data are stored to an Adalogger FeatherWing (Adafruit Industries) which provides data-storage capability via a micro SD card. The SD card interfaces with the microcontroller via the built-in SPI (Serial Peripheral Interface) port and communications protocol. The Adalogger FeatherWing also contains a Real-Time Clock (RTC) with battery backup, enabling date and time-keeping functions and timestamping for datalogging applications, but this capability was not used in the current application.
Canopy measurements are obtained from two different sensor types: an ultrasonic distance sensor for obtaining plant height, and an infrared temperature (IRT) sensor for measuring plant canopy temperature. The ultrasonic sensor, model HC-SR04 (LowPowerLab, Canton, MI USA; https://www.lowpowerlab.com), operates at a 5 V level, and connects to the microcontroller via two digital pins. The IRT sensor, Melexis model MLX90614ESF-ACF (Mouser Electronics, Mansfield, TX USA; https://www.mouser.com) operates at a 5 V level and connects to the microcontroller via the I2C (Inter Integrated Circuit) port. This version of the MLX90614 IRT sensor has a narrow (10˚) field of view, compared with the standard version’s 90˚ field of view.
Electrical power is supplied to the circuit through a rechargeable lithium polymer battery and two voltage-regulating components. The 3.7 V battery provides power directly to the microcontroller board, whose on-board voltage regulator converts the 3.7 V input to the 3.3 V level required by the microcontroller and FeatherWing components. The sensors operate at a 5 V level, however, and will not operate properly if powered directly from the 3.7 V battery or the microcontroller’s 3.3 V output. A Miniboost 5 V Boost Regulator (LowPowerLab) increases the 3.7 V battery supply to provide a regulated 5 V source to power both sensors. The IRT sensor requires an additional component to communicate properly with the microcontroller using the I2C protocol to account for the different operating voltages. A Bi-directional Logic Level Converter (Adafruit Industries) converts the digital signals passing between the two components (microcontroller and sensor) so that each component is exposed to the proper voltage-level signals.
The mobile monitoring system was designed to collect data from four crop rows simultaneously. The electrical schematic of the monitoring system with four ultrasonic and four IRT sensors is shown in Figure 1. Since the Feather M0 microcontroller/Bluetooth development board and micro SD FeatherWing and GPS FeatherWing boards interconnect, they operate essentially, and are depicted in the schematic, as a single component.
Following development of the electrical schematic, a circuit board, shown in Figure 2, was fabricated from a prototyping board, headers, and jumper wires. The prototyping board (3-1/8 X 4-1/4 Prototype PCB Board, MCM Electronics;
Figure 1. Electrical schematic of the mobile monitoring system.
Figure 2. Prototype circuit board layout.
https://www.mcmelectronics.com) consists of a fiberglass board with an array of predrilled solder pads at 0.10-in (2.54-mm) spacings. Stacking headers (Feather Stacking Headers, Adafruit Industries), consisting of female sockets and extra-long male pins, and male headers (Break-apart Male Headers, Adafruit Industries), as well as the pins on each of the electronic components, match the 0.10-in spacing of the prototyping board. Stacking headers were soldered to the Feather M0 and FeatherWing boards, and male headers to the voltage regulation components, which mated with headers on the prototyping board.
Ultrasonic and IRT sensors were connected to the circuit board via custom-made cables. The cables could be constructed using basically any type of electrical wiring (standard 4-conductor home telephone cable was used in the current application), with female headers on both ends of the cables. The headers consisted of female crimp connectors (Female Crimp Pins, Pololu Robotics & Electronics, https://www.pololu.com) and 4-pin plastic housings (Crimp Connector Housing, Pololu Robotics & Electronics), and mated with male headers on the prototyping board.
To reduce the number of jumper wires needed to connect components, components were arranged such that connections between components were made as much as possible using the extra-long male pins on the stacking headers. The headers were first located on the prototyping board and soldered to the board. The extra-long male pins were then bent over to make contact with appropriate pins on mating components and soldered together. These connections, shown in green on the circuit board in Figure 2, greatly simplified the fabrication of the circuit board. Where this was not possible, jumper wires, shown in red and blue in Figure 2, were cut to length and soldered in the appropriate locations.
A listing of electronic hardware components used to fabricate the monitoring system, along with sources and approximate costs, is provided in Table 1. A completed circuit board, along with electronic components, is shown in Figure 3. To assemble the circuit, the microcontroller board is inserted into female headers in the center of the prototyping board, and the two FeatherWings are stacked together atop the microcontroller board. The voltage regulation components
Table 1. List of materials for soil-moisture monitoring system.
Figure 3. Completed prototype circuit board and electronic components.
are then inserted into their respective female headers.
The ultrasonic and IRT sensors were installed in protective plastic enclosures (part number NBF-32002, Mouser Electronics) as shown in Figure 4. Holes were bored in the bottom of the enclosure to accept the two cylindrical ultrasonic transducers and the cylindrical IRT sensor. Common household caulk was used to seal the holes around the sensors, and hold the sensors securely in place. A narrow slot in one side of the enclosure allowed passage of the two sensor cables.
Sets of sensors were mounted in four enclosures and attached to a length of aluminum angle stock with self-tapping screws. The enclosures were mounted at 38-in (96-cm) intervals to match the crop row spacing in the fields to be monitored. The monitoring system circuit board and electronic monitoring components were installed in the same type of enclosure, as shown in Figure 5, and mounted at the center of the aluminum angle. Cables were installed on the sensors in each box and connected to the appropriate headers on the system circuit board.
Construction of the monitoring system was accomplished using simple hand tools and commonly found materials. Fabrication of the circuit board and cables, modification of the protective enclosures, and attachment of the enclosures to
Figure 4. Ultrasonic and IRT sensors installed in protective enclosure; (left) top view, (right) bottom view.
Figure 5. Assembled monitoring circuit installed in protective enclosure.
the angle stock frame was accomplished in approximately three hours. An additional hour was required to install the frame-mounted system to the agricultural vehicle for deployment in the field.
2.2. Software Component
A microcontroller program was written to manage sensor measurement, GPS location, data storage, and Bluetooth communication functions of the mobile monitoring system. The program was written using the open-source Arduino Integrated Development Environment (IDE), which was downloaded (https://www.arduino.cc) and installed on a personal computer. The IDE enables programming in a language based on C/C++, compiling and error checking of the program, and uploading of the compiled program to the microcontroller. The microcontroller program is freely available by contacting the corresponding author.
The program consists of a series of subroutines that control the various functions of the circuit. When the circuit is first powered up, program execution begins with a setup routine in which the Bluetooth radio and serial, I2C, and SPI communications services are initialized. Variables and pins used by the various components are identified, and the update rate (1 Hz) and specific data streams to be output by the GPS receiver are configured.
The program then enters the main routine, which loops and repeats continuously as long as the microcontroller is powered. The routine begins by reading the latest data stream from the GPS receiver and parsing the data stream into its individual data values, which include latitude and longitude, date and time, speed and direction heading, and number of satellites in view and quality of the GPS signal. Subroutines are then called to read the IRT sensors, read the ultrasonic sensors, store the GPS and sensor data to the micro SD card, and output the data via Bluetooth radio. Program execution then returns to the beginning of the main routine and repeats.
The four IRT sensors are read sequentially using the I2C communications protocol. The four sensors are connected to and communicate over the same two I2C-port pins on the microcontroller. Each sensor has a unique address, which allows the microcontroller to specify which sensor is to be read. Upon being specified, the sensor’s internal electronics perform a temperature measurement of objects within its field of view, and store the measurement value in internal memory registers. The microcontroller sends a request to the sensor, retrieves the values from the registers, and calculates the temperature based on the register values and the sensor manufacturer’s calibration equation. The sensor also measures its own body temperature, which the microcontroller collects as a measure of the ambient air temperature. Previous testing and experience with this IRT sensor  have shown the sensor to return measurements with an accuracy within ±0.3˚C and repeatability among multiple sensors with a standard deviation of ±0.04˚C.
The four ultrasonic sensors are next read sequentially. Each sensor makes distance measurements using two pins, labeled Trigger and Echo, which are connected to two digital microcontroller pins. The microcontroller initiates a distance measurement by sending a signal to the Trigger pin, which instructs the sensor to emit an ultrasonic pulse. An internal timer in the microcontroller begins measuring the time that elapses until the pulse strikes an object and the return pulse is detected on the Echo pin. Distance is calculated based on the elapsed time and the speed of sound. The speed of sound, which varies with air temperature, is first calculated based on the ambient air temperature measured with the IRT sensor. The elapsed time is divided by two to determine the one-way travel time of the pulse from the sensor to the object, and this time is then multiplied by the speed of sound to determine distance. Plant height is calculated later by subtracting this distance from the height above ground of the sensor. Previous testing and experience with this ultrasonic sensor  have shown the sensor to return measurements with errors of less than 3 mm.
GPS and sensor data are stored to the micro SD card in space-delimited, plain text format. The data are then output via the Bluetooth radio for viewing in real time in the field at an update rate of approximately 2 seconds. The output can be viewed to ensure that the GPS receiver has a fix and is receiving reliable location data, and that all sensors are properly connected and sending reliable measurements.
3. Field Trial
The plant-canopy monitoring system was deployed and tested during the 2017 growing season at one of the USDA Agricultural Research Service’s Crop Production Systems Research Unit farms at Stoneville, MS USA. The complete monitoring system, consisting of four sensing units and the main electronics circuit mounted on aluminum angle stock, was installed on an agricultural spray vehicle. Two interconnected aluminum-angle braces were fixed to the front of the spray vehicle, and the monitoring system was attached to the braces. The mounted system is shown prior to field monitoring in Figure 6.
The monitoring system was operated in a field planted to soybean. The system was powered up and allowed time for the GPS receiver to obtain a location fix, with a fix occurring within two to three minutes. The Bluetooth output was viewed on a smartphone, and measurements from each sensor were examined to ensure proper functioning of the sensor. With the spray vehicle stationary on a flat surface and the monitoring system operating, the heights of each ultrasonic sensor were recorded, to be used later for subtracting distance measurements to determine plant height.
When the monitoring system is powered up and data are written to the micro SD card for the first time, a header is written to the data file describing the data format and measurement units that will be written. This ensures that the user is certain of the exact ordering of the data, and need not rely on memory or consult the microcontroller program to ascertain the identity of each data value. An excerpt from a data file written to the micro SD card, showing header information and data collected, is displayed in Figure 7.
Figure 6. Plant canopy monitoring system mounted on agricultural spray vehicle.
Figure 7. Excerpt from data file showing header information and stored data.
Following field data collection, the data were downloaded from the micro SD card and imported and viewed on a personal computer using a spreadsheet program. Ultrasonic sensor height was first determined from the early time period of the test when the spray vehicle was stationary. Sensor distances were then subtracted from the appropriate sensor height to calculate plant heights. An example of plant height data is shown in Figure 8 for one trip of the monitoring system, moving from the left side of the graph to right, across the field. The spray vehicle reached the end of the field and drove out of the soybean planting, showing plant heights of zero.
Slight differences in plant heights among the four rows can be observed at all locations in the field. Plant heights were fairly consistent, averaging approximately 90 cm, during the first two-thirds of the distance across the field, after which an area of noticeably shorter plants was detected. While the reason for this occurrence cannot be determined from these measurements, the measurements suggest that there might be agronomic conditions in this area effecting crop growth. The user could then visit this part of the field to try to determine the reason for the occurrence.
Plant canopy temperature data during the same trip across the field are shown in Figure 9. Very slight differences in canopy temperature are observed among the four rows at all locations across the field. Canopy temperatures decreased steadily in the first two-thirds of the field, then rose markedly in the area of shorter plants detected with the plant-height sensors. Again, reasons for these behaviors are unknown, but the information could be of use by pointing to an area of the field where anomalous growing conditions may exist.
Figure 8. Canopy height measurements from one trip across the field.
Figure 9. Canopy temperature measurements from one trip across the field.
Open-source hardware and software components were integrated to develop a mobile plant-canopy sensing and monitoring system. The microcontroller-based system incorporated a Bluetooth radio, GPS receiver, infrared temperature and ultrasonic distance sensors, micro SD card storage, and voltage regulation components into a battery-powered, self-contained monitoring instrument. Fabrication of the monitoring system was accomplished with approximately four hours labor, at a cost of US$292.
The system was installed on an agricultural vehicle and tested in a soybean field. The Bluetooth radio allowed real-time viewing of system operation to ensure proper collection of GPS location information and sensor measurements. Data were stored reliably to a micro SD card for later analysis.
The monitoring system demonstrates an application of open-source hardware to agricultural research and provides a framework for similar or additional sensing applications. The monitoring system could be expanded to collect additional plant-canopy measurements by incorporating other sensors, such as multispectral or color sensors or imaging systems. Monitoring these and other plant canopy characteristics across the field throughout the growing season can provide detailed information for improved crop production, precision agriculture, and phenotyping applications.
Mention of a trade name, proprietary product, or specific equipment does not constitute a guarantee or warranty by the United States Department of Agriculture, and does not imply approval of the product to the exclusion of others that may be available.