So I’ve just set up a proximity sensor for monitoring water consumption.
I’ve added a debounce filter to avoid pulse outliers which can occur in some circumstances.
My config for the according sensor looks like this:
Now my question according to the debounce filter is:
Do I only need the debounce filter on the main sensor or would it be best to add it to the additional “total” sensor too so that it would look like this?
I’m asking this because I’m not sur if the “total” sensor sums up its values based on the main sensor or not.
Hi. The concept behind debounce as you may already know is that you eliminate ‘chattering’ from switch contacts which are closing which register as open and closed signals for some milliseconds after a switch is manually closed. But on a proximity sensor I would have guessed that the secondary and tertiary echo off the signal should be automatically suppressed after the initial return? I’m not sure how this normally works as I have not played with an ultrasonic sensor.
Edit: Is this even an ultrasonic sensor at all - are you measuring at the meter with a hall-effect device?
What are the circumstances where you are seeing outliers as perhaps these aren’t bounces, but the debounce filter will suffice anyway.
If you have a link to the manual for the proximity sensor, it will help us to understand the function.
It definitely a Hall effect sensor or voltage free contact on gpio 23. Ultrasonic requires more config than that and returns a distance, not a pulse to count.
Pretty sure the filter needs to be applied to both. I had a look at the source code but am still only 90% sure.
@RonnieLast I don’t really have an evidence for a case where it actually happened, but I just want to prevent that it ever happens as good as possible. Because I think it will be hard to find out when such a case ever happens and sophisticates the results.
@tom_l Thank you for thinking it over, I set the filter on both sensors now. If I’ll ever find out that it will cause troubles, I will report back here.
Thanks to both of you guys, your help is very appreciated!