Software Encoder Debouncing Solution

Rotary encoders are input devices that use a series of two alternating pulses to tell which way they are turned and how far. While this…

Hackster Staff
7 years ago

Rotary encoders are input devices that use a series of two alternating pulses to tell which way they are turned and how far. While this works well in theory, one potential problem is that instead of the signals going on and off as planned, they experience a short on-off bounce pulse when switching, potentially skewing readings.

As demonstrated by David Johnson-Davies, one interesting solution involves using each alternating pulse to “silence” the bounce of the other signal. Since one signal is stable when the other experiences this effect, this can be a great way to keep readings in order.

Check it out implemented on an ATtiny85 here, with a 7-segment display used to output rotation information.

Hackster Staff
Projects and articles from the Hackster Staff!
Latest articles
Sponsored articles
Related articles
Get our weekly newsletter when you join Hackster.
Latest articles
Read more
Related articles