Skip to main content

Reply to "Using an optocoupler to connect insulated rail to input pin of shift register"

If you debounce in software, you should think about an integrating algorithm rather than a simple timed debounce.

I found that response time was too long when I relied on a simple debounce algorithm, which is why I reverted to analog.  (I originally went analog because my first microcontroller was a Basic Stamp, which had something like 20 bytes of RAM.)

An RC debounce can effectively discriminate between a momentary loss of contact due to dirty track, versus when the last little bit of wheel has left the sensor rail. An integrating algorithm can emulate that effect.

Last edited by Professor Chaos

OGR Publishing, Inc., 1310 Eastside Centre Ct, Suite 6, Mountain Home, AR 72653
800-980-OGRR (6477)
www.ogaugerr.com

×
×
×
×
×