Saturday, May 7, 2011

Virtual Rain Sensor

A little side project this weekend... the wife left the sprinkler on all day for our garden by mistake so she asked me to automate it.  We already have the X10 CK11A Computer Control Active Home System, an X10 PUM01 Pro Universal Module, and a Rain Bird JTV075-ASV 3/4-Inch Jar Top Anti-Siphon Valve.  The only thing missing was a rain sensor like the Rain Bird RSD Rain Sensor which we have used in the past.  Then it hit me!  There are shortcomings of these hard-wired rain sensors...
  • Mounted to the house they won't be accurate from all directions
  • No output of dryness level (only a water or don't water switch)
  • No input of sprinkler water received (unless you mount it where it gets hit)
  • They will allow the sprinkler to run even during rainfall 
  • No input of weather forecast data (percentage) or per-storm rainfall totals
  • Decent brand with freeze sensor and adjustable soil permeability is over $30.
So I set out to create a Virtual Rain Sensor.  A program that gathers information from a database regarding the weather observations for the past 3-7 days (configurable interval and weather location).  It then runs the CIMIS algorithm to calculate losses through transpiration and evaporation based on sunlight, wind, temperature, relative humidity, barometric pressure, and elevation.  We then apply the gains through rainfall from mother nature.  It also pulls the forecast for the next day and the average per-storm rainfall total for the current day and calculates a predicted rainfall total for the next day. 

Taking all this into consideration (and whether the current observation or forecast low is at or below freezing) we calculate the duration of our watering based on our inches per hour calibration (using a coffee can in your garden you run the sprinklers for an hour and then measure how many inches of water you collected).

The application runs as a service on any Windows operating system (XP or 2003 Server minimum).  Every 3 to 7 days it will download a small packet of weather data from our servers and make a decision.  The details of this decision will be recorded and viewable on a dedicated website.

Holler if you are interested in trying this out.  I will send you an application customized to your location.

No comments:

Post a Comment