Skip to content
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

Enhanced counter debouncing #8021

Merged
merged 1 commit into from
Mar 31, 2020
Merged

Enhanced counter debouncing #8021

merged 1 commit into from
Mar 31, 2020

Conversation

to-scho
Copy link

@to-scho to-scho commented Mar 29, 2020

New commands CounterDebounceLow and CounterDebounceHigh to allow individual debounce times for low and high pulse widths to discard non valid falling edges. These are checked before legacy CounterDebounce checks distance between to valid falling edges.
Useful to have robust counter results when using e.g. an TCRT5000 optical sensor to count electromechanical "Ferraris" electricity meters.

Description:

Related issue (if applicable): fixes #7488, fixes #516

Checklist:

  • The pull request is done against the latest dev branch
  • Only relevant files were touched
  • Only one feature/fix was added per PR.
  • The code change is tested and works on core Tasmota_core_stage
  • The code change pass travis tests. Your PR cannot be merged unless tests pass
  • I accept the CLA.

New commands CounterDebounceLow and CounterDebounceHigh to allow individual debounce times for low and high pulse widths to discard non valid falling edges. These are checked before legacy CounterDebounce checks distance between to valid falling edges.
Useful to have robust counter results when using e.g. an TCRT5000 optical sensor to count electromechanical "Ferraris" electricity meters.
@arendst arendst merged commit bd34db8 into arendst:development Mar 31, 2020
@arendst
Copy link
Owner

arendst commented Mar 31, 2020

What a simple capacitor could have solved...

arendst added a commit that referenced this pull request Mar 31, 2020
Add commands ``CounterDebounceLow`` and ``CounterDebounceHigh`` to control debouncing (#8021)
@to-scho
Copy link
Author

to-scho commented Mar 31, 2020

What a simple capacitor could have solved...

don't forget about the resistor and a 2nd resistor + a diode if you need it asymmetrical ...

@to-scho to-scho deleted the feature/counter_debounce_low_high branch March 31, 2020 14:47
@blakadder
Copy link
Collaborator

Any hints on how these commands are supposed to work?

@arendst
Copy link
Owner

arendst commented Apr 1, 2020

@to-scho pls provide info to @blakadder

@to-scho
Copy link
Author

to-scho commented Apr 2, 2020

I added further description in PR #236 of the docs

@fluppie
Copy link

fluppie commented Feb 9, 2021

So actually this link :-) tasmota/docs#236

https://tasmota.github.io/docs/Commands/ and look for CounterDebounceLow and CounterDebounceHigh

@schejbity
Copy link

What a simple capacitor could have solved...

What capacitor I can use?
Could you upload some schema?

Thx.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Counter increments by 2 for every pulse Counter debounce
5 participants