Using a Rain Gauge with HomeVision


Several companies make rain gauges that can be used with HomeVision and HomeVision-Pro. This article explains how to set up the "Rainew Tipping Bucket Rain Gauge" from RainWise Inc. The same approach can be used with other gauges.

 

Rain Gauge Description

The RainWise rain gauge is a large bucket with a "rocker" in the base that changes position each time 0.01 inches of rain is received. The rocker movement triggers a relay that briefly shorts two wires together. These wires can be connected to a HomeVision input port and used to track the amount of rainfall.

Unfortunately, the wires are only shorted together for a small amount of time, possibly under 20ms. HomeVision could miss such a short pulse if it were performing some other functions at that precise time. This would cause HomeVision to under-measure the amount of rain. This may or may not be a problem, depending on how accurate you want the measurement. This article shows two different setups, the second of which overcomes this problem by the use of a timed relay.

 

Configuration 1

The easiest configuration is to connect the rain gauge wires directly to a HomeVision input port. One wire would go to the desired input, and the other would go to the HomeVision ground.

In this configuration, the wires will normally be "open", allowing them to be pulled high (to 5V) on HomeVision. Thus, the input will be read as a "high". When the rain gauge triggers, the wires will briefly short, causing the HomeVision input to go "low".

Configuration 2

This configuration adds a timed relay from Elk Products (part number ELK-960). This relay will act as a "pulse stretcher", lengthening the rain gauge pulse to ensure that HomeVision detects it.

Connections are as follows:

bulletThe relay must be powered by a 12 or 24 VDC power source (actually, 9VDC will usually work as well). Connect the power lead to the relay's "+" input, and the ground lead to the "-" input.
bulletConnect one of the rain gauge wires to the power supply ground wire, and the other wire to the relay's trigger input.
bulletConnect the relay to HomeVision as follows: connect one wire from the relay's common output to a HomeVision ground point; connect another wire from the relay's "normally open" output to the desired HomeVision input port.

Make the following settings on the relay:

bulletJP1: Seconds
bulletJP2: 1-shot mode
bulletJP3: Begin
bulletJP4: Mode B
bulletJP5: Negative trigger
bulletJP6: 12 or 24 V, depending on your power source
bulletAdjust R3 to a timeout setting of about 5 seconds

Here's how this will work. The rain gauge wires will normally be "open", which causes the relay to be off. Since the "normally open" relay output (which is open when the relay is off) is connected to HomeVision, the open HomeVision input will be pulled high (to 5V) by HomeVision. Thus, the input will be read as a "high".

When the rain gauge triggers, its wires will briefly short. This will cause the timed relay to trigger, and it's "normally open" output will close to ground, in turn causing the HomeVision input to go "low". The rain gauge wires may very quickly open again, but the relay will remain triggered for the duration of it's timeout period. Since we set it to 5 seconds, the relay will remain triggered for 5 seconds. When this time is up, the relay goes off and the HomeVision input port returns high.

With this setup, HomeVision can only detect one pulse within the relay timeout period of 5 seconds. However, it would take a VERY heavy rainstorm to trigger the rain gauge more quickly than this. 0.01 inches of rain every 5 seconds equates to 36 inches per hour!

 

Software Setup

In the HomeVision software, you should put your rain tracking code in the "low" actions for the input port. Each time 0.01 inches of rain occurs, the port will go low, and your actions will be performed.

Let's assume you want to track the total amount of rainfall each day. To do this, create two variables called:

bulletToday's rain: Inches
bulletToday's rain: Hundredths

Put the following commands in the "low" actions for the input port:

   Increment var #1 (Today's rain: Hundredths) [roll over at 255]
   If
      Var #1 (Today's rain: Hundredths) = 100
   Then
      Var #1 (Today's rain: Hundredths) = 0
      Increment var #2 (Today's rain: Inches) [roll over at 255]
   End If      

Each time this runs, the hundredths value will be incremented. When it reaches 100 (meaning it has rained a full inch), we reset the hundredths value to zero and increment the inches value.

You should also create a scheduled event that runs every day at midnight and resets the variables to zero, like this:

   Var #1 (Today's rain: Hundredths) = 0
   Var #2 (Today's rain: Inches) = 0      

You can also display the data on HomeVision's weather conditions TV screen. Add these two weather conditions commands to the end of the input port actions shown previously:

   Today's rainfall (hundredths) = var #1 (Today's rain: Hundredths)
   Today's rainfall (inches) = var #2 (Today's rain: Inches)      

These commands put your variables into the corresponding "weather variables" that are automatically displayed on the TV screen.

 

Conclusion

It's quite easy for HomeVision to track rainfall. You could extend this by tracking weekly, monthly, or annual rain amounts as well, just be adding a few variables and commands. You could also use this information to adjust your lawn watering schedule.

 

Back Up Next

Last updated:
19 June 2012

Copyright © 1996-2012, all rights reserved, by:
Custom Solutions, Inc.
1705 Canterbury Drive, Indialantic, FL 32903

HomeVision® is a registered trademark of Custom Solutions, Inc.

Web Browser Picture Gallery Viewer