Sidebar – A shiny penny that turns

My definition of a shiny penny moment follows:

joyous exploration” is define as “the recognition and desire to seek out new knowledge and information, and the subsequent joy of learning and growing.” – Todd B. Kashdan

In the course of this project like many, I find myself posed with a question and the quest for an answer brings upon another project. In the process of putting together and testing the BAM hardware, I was looking for a hardware solution to de-bounce the rotary encoders. Yes, it can be done in software, but as I have confessed I find the hardware bit more fun. And it just seems to me a more logical solution. I can change my software platform and not have to worry about it.

Basic de-bouncing with 10k Ohm resistors

It started off simple enough as the KY-040 rotary encoder module has 10k Ohm resistors to the data pins to help mitigate the noise; but then I found a little more complex solution. And it has better results.

Updated version of de-bounce with capacitors

In the updated version, capacitors are used in conjunction with the pull-up resistors. The help further crisp up the signal. I only have one bare rotary encoder right now, so it is just on a temp rig.

https://swharden.com

I found additional components to really smooth things out, the Schmitt Trigger, but the cost of all the parts and space on the board was going up pretty quick.

I not only need to use rotary encoders for the BAM project; but there is also my OSMC media project I am putting together. One of the last parts is the hardware volume control for the HiFiBerry Amp2+. So while I am building and testing circuits, I am really planning for 2. Wednesday I forgot to bring my hardware to work so I could work on the software. Well, heck, I need a break from the FAA Part 107 test, so start on quick PCB board was born.

While looking for passive parts I was sucked into a rabbit hole of hardware debounce solutions. For any beginner in the electronics DIY arena reading this, datasheets are your friends and want to tell you everything. Some of the chips are made for some very generic situations, in which case they were slow to respond. Others just for sliders. And then by chance I came upon a little chip called the ELM401. It was specifically designed for rotary encoder de-bouncing. It is 8-pin DIP package. 3 pins in for A, B, and Sw and 3 pins out for A out, B out, and Sw out. Can’t get too much easier.

Their reference design is very straight forward, so what the heck. I scrapped the original board for now and whipped up one for the chip and components. If this works well in testing, I will be putting them incorporating them on the BAM board. I have prototype boards out to manufacturing and parts ordered. In about a week there should be a post just about the new modules.

Now that that excursion is over I can get back to the BAM proper project. Look for an update next week. And as always you can check the BAM project page as this is where I keep copy of my notes, ideas, and the such while working.

© 2020, wrightmac. All rights reserved.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.