-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Counter debounce #516
Comments
You'll have to find some kind of debounce on your magnet as I'm already using only the falling edge of the signal as interrupt. I have no means to select another option. |
Thanks for the explanation, |
I can confirm the issue. P.S. not always, only if my electricity meter rotates slower then X. if i turn on eg. water boiler it rotate faster and counter increments by 1. |
@arendst any chance you can look at this option? |
@off14 try to fiddle around with the counter interrupt routine in file
Change FALLING to another nice Arduino supported value and experiment. Make sure your counter input is ESP8266 compatible (3V3 NOT 5V). |
my counter is a reed switch between GPIO14 and GND (magnetic) hall sensor is another option - but will experiment later, not works perfectly with 3.3V |
I think i have fixed my issue with a hardware capacitor debouncing. |
do i need any resistor (pullup or pull down) if i use standard GPIO14 ? and connect it to ground via REED switch |
I have a similar problem with a sensor. On my water meter I measure the reflection. If the water meter stops at the wrong position the sensor goes mad: it keeps pulsing like mad. Now I would like to ignore the pulses if they are not X msec apart. With a classic debounce option set to 1000ms I will get a incorrectly measured pulse every second. |
@neographikal now with 3.3V no Problem |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
This issue will be auto-closed because there hasn't been any activity for a few months. Feel free to open a new one if you still experience this problem. |
I have still the same issue on Slow rotations on my Gasmeter with the reed contact. And what means Counter1n? Its actually running on a USB adapter 550mA through a FTDI on 3.3v. |
Hi, if i configure debounce for counter let say 50 or 100,
it works ok, when my gas meter is fast enough. but when the consumption is super low, magnet can close the contact for half second and even for one second (slow rolling), or even stop at "closed" state. in this case every such event is treated AS TWO events - first when the proximity sensor closes, and the second when it opens.
making debounce too high is not an option - it can miss two events in this case.
can you build a counter option to treat only CLOSING as event (not both, closing and opening).
thanks
The text was updated successfully, but these errors were encountered: