Readers: If you want to build the project featured in today's post, please go to PCBWAY's Community pages--a gerber ready to download and/or fabricate as well as KiCAD files, PDFs, a BOM, etc., are here.
Also please visit PCBWAY's site using the link here--it will help this blog immensely. Thanks.
======
Hidy Ho! Welcome back for more blog fun.
I have been super busy with my day job--correct, I don't blog for a living.
But I've had a tiny bit of time this month to work with Elton at Otter Mods to design a small PCB for debouncing a cheap rotary encoder.
For a background check the post here.
I got a $2USD clone rotary encoder to "work" with an RP2040 and 1306 display, but try as I might I couldn't craft an effective algorithm in C to debounce the cheesy thing.
Sure, there is a takes-no-brains-to-use debounce library for Arduino, but dammit Gil Amelio we are no longer in Kansas--I tried to port the C++ Arduino library into something for RP2040 and so far no dice...not enough time.
Is it a cop out to use hardware for this? Well, maybe, but here it is:
The Encoder hardware debounce board; available from the blog's generous sponsor PCBWAY. Get it from their community site here. |
SE HABLA HARDWARE?
Happiness: unbagging the boards.... |
"SMD ahoy" |
Oops, extra solder bit by the 4011, and note the Sharpee corrected legends, but hey it worked. |
Testing.... |
Scope at 500uS per division--using the PCB the encoder state change produces a clean rising edge--good enough for what I do. |
OUTTRO
I have a Moog hi-pass filter clone on the bench to next blow up; also, I am considering employing the debounce/encoder madness in this post into some sort of simple clock multiplier. Hope you can stay tuned.