Jump to content

Software debounce for encoders?


wackazong
 Share

Recommended Posts

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.

Thanks!

Ander.

Link to comment
Share on other sites

  • 1 month later...

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.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...