Software debounce for encoders?

2 posts in this topic

Hello again, 

I would like to do some kind of software debouncing for my encoders. I have them at DETENTED3 and FAST 2 now, this gives the right frequency and step size of value changes in relation to the turning velocity. However, the introduction of FAST mode brings a problem: when the encoder bounces, the value suddenly moves very fast, as the algorithm notices very rapid value changes in the SRIO chain, then applies acceleration and generates a big value jump. 

Is it possible to debounce the encoders? I can see in the code that only buttons are debounced now. I was wondering whether there is some way to activate it for encoders.



Share this post

Link to post
Share on other sites

I did some tests today on this topic. I had very good success by simply debouncing the encoders with two caps of 0.1uF between the common pin and the output pins. This can even be done on the encoders pins themselves, no need to change the PCB. Now I have not had a single bounce so far during my tests. Seems to work and is simple enough for me to do in hardware.

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now