Unrealistic counts Hobby-boards dual counter

periklast

Member
I have a dual counter connected with a relay that can "click" with a maximum speed of 10/second (http://rainsensors.com/ in "drop detection" mode). However, when I see the history of the counter, I see usually more than 50counts/second.
What can be the reason of this unrealistic values of the HB-counter?

Dataset: Col1=Counter.B current- Counter.B previous; Col2=php time in seconds
1449 1322713263
799 1322713278
871 1322713294
1017 1322713309
1330 1322713324
761 1322713339
761 1322713354
771 1322713369
 
If you can replace the relay you could use a solid state relay but if you can't replace the relay I'm not sure how you would get rid of chatter.
 
Another suggestion would be to use a 'one-shot' from something like a 555 chip. The only problem is if you are running into a high frequency of pulses you would have to make sure the pulse width is shorter than the next occurring pulse.

If your max rate is 1/10th of a second (100 milliseconds) then maybe design for a pulse width of 50 milliseconds. Hopefully, the relay chatter has settled down before this time (width) frame.

http://www.national.com/ds/LM/LM555.pdf (monostable mode)
 
See the image for my connection with the sensor. When count with a low frequency, there is no problem. When the frequency becomes higher, then the problem occured.
untitled.JPG
 
Hmmm, just some guesses; but, I just noticed from your first post that you have this in drop detection mode instead of a tipping bucket emulation mode.

Per their instructions:

The RG-11 may also provide drop detection. Use this if you want to
do your own, external data interpretation. The output will pulse
once with each detected drop. Normally, it will produce longer
pulses (in multiples of 200 mS) for larger drops. If set to multiple
pulses per drop (SW 3 ON), each detected drop will generate one
or more 100 mS pulses, depending on drop size.
In sensitive mode, the threshold for drop detection is lowered to
below the normal level. This makes the system more sensitive, but
raises the possibility of false detections. It is up to the system
designer to determine the proper tradeoff. Similarly, the Hi drop
threshold will provide an output only for large drops, making false
detections unlikely, for installations were a false detection is
especially objectionable.

So you can only generate 100 milliseconds maximum intervals from the sensor and you are experiencing 20 millisecond readings. What is the maximum rate those counters can handle (I could not see this spec on the Hobby Board's site)? Also, this 'only' happens during fast pulse counts?

I'm wondering if the pulses are happening at to fast a rate for the counter to count properly.

Why the drop detection mode instead of the 0.01" tipping bucket mode? Do you need to see a 'first instance' of rain?
 
You have an open condition to counter A when the sensor relay isn't signaling a count.

Since the DS2423 counts on a low going pulse, I would try connecting

COM(sensor) to GND (counter)
NO(sensor) to A(counter)
+5V(counter) to a 1K resistor to A(counter)

This will keep the counter A terminal at 5V (avoiding the open condition) and when the sensor relay closes it will transition to 0V incrementing the counter.
 
Good point sda, but if the open condition was causing the error, wouldn't it be prevalent during a low count frequency as well as a high? Reason I bring this up is OP stated:

When count with a low frequency, there is no problem. When the frequency becomes higher, then the problem occurred.
 
BSR - I agree, but just trying to eliminate some stuff. As the count increases maybe there's a weird feedback.

I'm not even sure the sensor has a mechanical relay. The relay is only rated 1A, and the pictures on the website only show the top of the sensor with the connectors. The website picture (which has a 4 terminal block) doesn't match the instructions (which has a 5 terminal block). There must be some circuitry on the bottom. Maybe periklast can provide some actual pics of the sensor.

I figure the DS2423 can count a max of 5000hz+, an average of 3333hz and a minimum of 2000hz based on a the debounce time. More than fast enough to count a dirty transition.

Tdeb min = 190ms; 1,000,000us / 200us = 5000hz+
Tdeb typ = 290ms; 1,000,000us / 300us = 3333hz+
Tdeb max = 460us; 1,000,000us / 500us = 2000hz+
"Each low-going edge on a counter input resets the channel’s debounce timer. The debounce time
starts as the input voltage rises beyond the trip point. In order for the next pulse to be counted the
debounce time must have expired."
 
I will make some pictures when it stops raining and connect the sensor like sda said.

another dataseries:
Code:
1050 1322783518
1200 1322783533
899 1322783549
1120 1322783564
1132 1322783579
1042 1322783594
762 1322783609
778 1322783625
763 1322783640
754 1322783655
492 1322783670
1 1322783730 <-- sudden drop in count-frequency -->
2 1322783745
1 1322783806
1 1322783851
5 1322783866
3 1322783881
1 1322783911
1 1322783927
2 1322783972
4 1322783987
1 1322784032
4 1322784047
7 1322784123
6 1322784153
1 1322784168
5 1322784198
3 1322784213
1 1322784228
2 1322784259
2 1322784319
1 1322784334
2 1322784349
1 1322784364
1 1322784485
1 1322784605
2 1322784651
1 1322784666
8 1322784681
1 1322784726
1 1322784741
1 1322784772
4 1322784787
3 1322784802
3 1322784833
2 1322784848
2 1322784863
4 1322784878
2 1322784893
6 1322784923
4 1322784939
1 1322784954
2 1322784984
12 1322784999
18 1322785014
7 1322785029
46 1322785045
69 1322785060
37 1322785075 <-- still normal rain -->
316 1322785090 <- sudden increase of frequency when rain intensified - 316 count in 15 seconds -->
263 1322785105
603 1322785120
718 1322785135
930 1322785151
930 1322785166 <-- 930 counts in 15 seconds -->
747 1322785181
726 1322785196
756 1322785211
715 1322785226
750 1322785241
 
If I put a low pass filter (RC) between the relay and counter, should it help? What values of R and C do I have to use for a relay with a frequency of 50ms open? I've used R=330ohm and C=4.7µF (cur-off=102hz) but the counter counts less than the relay-pulses.
 
Back
Top