Project in progress
Precision Agriculture – A Prototype Solution

Precision Agriculture – A Prototype Solution © CC BY-NC

A low cost network of weather and soil sensors streaming real time data to Microsoft Azure for analysis.

  • 75 respects

Components and supplies

Apps and online services

About this project


Without doubt, water is the most precious resource we have on this planet.  In agriculture, management of this resource has become extremely important as we recognize the impacts of climate change on our ability to feed everyone equitably.  Precision agriculture is an area of study that has rapidly expanded in the last decade to tackle this problem.  In the United States, ongoing research in precision agriculture has been effectively applied to large agri-businesses at scale.  But what about the small farmer?  These businesses do not have the capital resources to invest in expensive monitoring systems.

One piece of this puzzle is maintaining adequate soil moisture for a given crop.  Many of these small farms operate in microclimates that defy standard weather prediction models.  What if we could bring the analytical capabilities of the cloud right into their fields at low cost?  My prototype project consists of a small network of weather and soil sensors that stream data to the Azure cloud for analysis.  The overarching goals for low cost and ease of deployment factor heavily into the choice of hardware and software.

Each sensor station consists of several sensors tied to a low power micro-controller that is capable of wirelessly streaming data at low bandwidth and long range (hundreds to several thousands of meters).  These stations will be solar powered and designed to withstand environmental conditions of a typical growing season. 

The base station will act as the data collector and gateway to the backhaul network.  In addition to the RF hardware needed to communicate with the remote stations, it will include a WiFi connection to an access point with an internet connection.

Weather Station:

  • Arduino Uno R3
  • Sparkfun Weather Shield
  • Electric Imp
  • Weather Meter

Weather Station measures:

  • Air Temperature
  • Relative Humidity
  • Wind Direction, Gusts, and Average Speed
  • Rainfall amounts
  • Solar radiation

The weather station has been uploading data to Wunderground for quite some time. You can take a look at about ten months of data here.

Remote Station Hardware:

  • Solar panel
  • Battery and charging circuitry
  • RF communication (XBee)
  • Microcontroller – Arduino Pro Mini 
  • Weatherproof enclosure

Remote Station measures:

  • Air temperature
  • Humidity
  • Barometric pressure
  • Solar radiation (light sensor)
  • Soil temperature
  • Soil moisture

Base Station Gateway:

  • Raspberry Pi 2 running Windows IoT Core with 7" touch display
  • RF communication (XBee, WiFi)
  • 7" touch display
  • FEZ Cream Gadgeteer Hat for Pi

Base Station Measures:

  • Air Temperature
  • Relative Humidity
  • Solar Radiation

Data Flow

The remote stations send data serially via XBee to the base station.  The base station is the Windows IoT device registered with the IoT Hub.  Data collection is performed using Microsoft Azure IoT Hub, Stream Analytics, and Table Storage.  The Azure Stream Analytics job monitors the Iot Hub queue for messages and persists the data to the appropriate Table Storage. No custom code was required to create this data flow!  All of the configuration was done through the Azure portal.  A fabulous jumping off point for learning all things Azure IoT can be found at the Azure IoT Hub Learning Path.

Bill of Materials

In addition to the hardware and software listed elsewhere in this project, these items were used to construct the stations:


  • 1 AM2315 - Encased I2C Temperature/Humidity Sensor[ID:1293]
  • 1 Soil Temperature/Moisture Sensor (SHT10) [ID:1298]
  • 2 Cable Gland PG-9 size - 0.158" to 0.252" Cable Diameter (PG-9) [ID:761]
  • 2 Waterproof DC Power Cable Set - 5.5/2.1mm[ID:743]
  • 2 Waterproof Polarized 4-Wire Cable Set[ID:744]
  • 2 Cable Gland PG-7 size - 0.118" to 0.169" Cable Diameter (PG-7) [ID:762]
  • 2 Adafruit Perma-Proto Quarter-sized Breadboard PCB - Single[ID:1608]
  • 1 Mintyboost v3 v[ID:14]
  • 1 USB / DC / Solar Lithium Ion/Polymer charger - v2[ID:390]
  • 1 Large 6V 3.4W Solar panel - 3.4 Watt[ID:500]


  • 1 Big Red Box – Enclosure, PRT-11366
  • 1 FTDI Basic Breakout - 5V, DEV-09716
  • 2 XBee 1mW Wire Antenna - Series 1 (802.15.4), WRL-08665
  • 1 XBee Explorer USB WRL-11812
  • 1 XBee Explorer Regulated, WRL-11373

Lesson's Learned

I had originally intended to use the new MKR1000 as the micro for the remote station.  Because the board is built on SAMD instead of AVR, two of the arduino libraries I had intended to use were not compatible.  I spent some time trying to refactor the libraries without success.  This time sink put me behind schedule and I was just barely able to submit this project for the World's Largest Arduino Maker Challenge with only a few hours to spare. Consequently, additional project details , such as wiring diagrams and code snippets, will be added as time permits. The lesson - don't try to rewrite open source libraries for a new board when you have a hard deadline!

Next Steps

It's now time to laser cut and 3D print some weather proofing parts.  A modified DIY version of a Stevenson enclosure will protect the weather station from the elements. A Davis radiation shield will be used for the remote station air sensors.  These enclosures prevent sensor readings from being skewed by direct sunlight, while allowing adequate air flow.  They also obviously protect the hardware from the weather itself! Stay tuned for pictures!

Future Development

This iteration of the project is for data collection only.  A future iteration will include incorporation of additional remote stations to directly control irrigation systems. Web services for alerting and analytics will be added, in addition to a monitoring user interface.


UWP, Sketch, and Squirrel code




Eric Hall
  • 1 project

Additional contributors

Published on

April 1, 2016

Members who respect this project

JoepDefaultAndrearichettaDefaultEnd 2014 profileDefaultDefaultDefault

and 66 others

See similar projects
you might like

Similar projects you might like


Project in progress by Ryan Michaud

  • 40 respects

AggroFox: Large-Scale and Urban Agriculture IoT Solution

Project tutorial by EdOliver and Victor Altamirano

  • 1 comment
  • 50 respects

GPS Datalogger, Spatial Analysis, and Azure IoT Hub.

Project tutorial by Shawn Cruise

  • 98 respects

Arduino Environmental Monitoring

Project showcase by Prajay Basu

  • 1 comment
  • 33 respects

Windows IOT - Automate your power outlets

Project tutorial by Syed Sanoor

  • 56 respects


Project tutorial by Peyton Casper

  • 8 respects
Add projectSign up / Login