Working with mechanical rotary encoders (source, pics and vid)

Status
Not open for further replies.

Pavius

New Member
I finished writing up a project I've been working on - a simple cooking timer controlled only by a rotary encoder. Since the encoder is both noisy and has a 12 step clicky rotation, there were some interesting challenges writing software allowing for a good user experience.

I found that available grey code decoding code (working on two bit pairs) did not fit the bill, since I had to filter out mechanical noise without ignoring movement. In addition, I did not want to count "half rotations" as you can see towards the end of the vid.

You can check out the project page **broken link removed** - it has all the explanations about what I did and how I did it. Perhaps someone can find this useful or point out a better implementation.

Click the vid for glorious HD.
 
Last edited by a moderator:
Can you tell me if the Sparkfun Rotary Encoder goes through all four transistions between the detent positions, please?

<added>
I beg your pardon. I see in the description on your web page that all four transistions do occur between detents.
 
Last edited:
Indeed it does. If you plan on working with it you should pay attention to the half cycles generated by slightly overshooting the detent position (my code takes care of that and also debounces the signals).
 
Indeed, I have been using Rotary Encoders with detent and built-in push-button switch on the shaft as a user interface for some years now and so I appreciate the research and effort you have put into it. Thank you for sharing.

Kind regards, Mike
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…