Our full technical support staff does not monitor this forum. If you need assistance from a member of our staff, please submit your question from the Ask a Question page.


Log in or register to post/reply in the forum.

flow rate rain gauge


ariffu Nov 3, 2010 10:21 AM

Dear,

I have TB4 hidrologycal tipping bucket 0.2 mm tip and CR1000 to measure it.
How is the CRbasic program for flow rate rain gauge, which is
observer rain rate = amount per tip/time difference between tip
= tip/ (tn - t(n-1))

Thank you

ariffudin


Sam Nov 8, 2010 02:41 AM

Ariffudin,


I believe you'll find there are many approaches you can take.

Remember if the TB4 is a siphoning bucket, the siphoning action attempts to regulate the flow at a steady pace.

Do you need to know the exact time between tips? Or do you need to know how many tips you've received over a period of time?

I think you have two basic methods available -
1) The most common - Execute the PulseCount instruction each scan interval and divide by the length of the scan interval. A very small scan interval would probably be best.
2) Read up on WaitDigTrig. Tie one end of the bucket to the 5V line and the other to a Control Port. I'm not sure, but you might need a pull down resistor between the control port and ground.

1)-----------------------------------------------
Public Rain, RainRate
Const SInt = 5 'seconds. scan interval
BeginProg
Scan(Sint,Sec,0,0)
PulseCount(Rain,1,1,2,0,0.2,0) 'rain in mm
RainRate = Rain / Sint 'rainfall (mm) / sec
NextScan

1 variation)-------------------------------------
Public Rain, RainRA, RainRate
Const Interval = 300 'seconds, should be evenly divisible by Const SInt = 5 'seconds. scan interval
BeginProg
Scan(Sint,Sec,0,0)
PulseCount(Rain,1,1,2,0,0.2,0) 'rain in mm
AvgRun(RainRA,1,Rain,(Interval / Sint)) ' keep a running average of rainfall over a given period - in this case 300 seconds.
RainRate = RainRA * (Interval / SInt) 'rainfall(mm) over Interval
NextScan


2)-----------------------------------------------
Public DeltaT, Rate
Public First as Boolean = TRUE
BeginProg
Scan(1,Sec,0,0)
NextScan
SlowSequence
Do While True
WaitDigTrig(1,0)
If First Then
First = FALSE
Timer(1,mSec,2) 'reset and start timer
Else
DeltaT = Timer(1,mSec,4) 'read timer
Timer(1,mSec,2) 'reset and start timer
Rate = 0.2 / DeltaT 'rain per mSec
Endif
Loop
EndSequence

* Last updated by: Sam on 11/7/2010 @ 10:53 PM *

Log in or register to post/reply in the forum.