¿ªÔÆÌåÓý

ctrl + shift + ? for shortcuts
© 2025 Groups.io

Re: #QMX Glitchy encoders? Not any more ? #qmx


 

Hans, this post is why we love and respect you.

Mike Krieger


On Wed, Aug 7, 2024 at 2:48?AM Hans Summers via <hans.summers=[email protected]> wrote:
Hi all

I'm interested to read about this modification.?

In general I don't like hardware debounce of things,?including buttons and rotary encoders which are interfaced to a microcontroller:
  1. Of course it adds parts to the BOM and generally for simplicity?and cost reasons, it's best to optimize as much as possible.?
  2. It's very easy when adding a capacitor to get rid of a bounce but you might?have unintended consequences, the capacitor will slow things down and what can happen then is that fast turning of the rotary encoder misses rotation click events.?
In general where a microcontroller is involved, it ought to be possible to do debouncing in firmware. There's a right way and a wrong way to do this. The wrong way is with timers or filters which effectively emulate what capacitors did in hardware. The right way is with a state machine which eliminates bounce by ignoring repeat state transitions until the next in sequence is seen.

The cost of a few capacitors is very small and certainly much less than the time I will spend on firmware. Adding them to the next PCB revision would be trivially easy and the cheapest solution. But I don't like it because I still think the firmware approach is most elegant. I think I can make improvements to the rotary encoder handling. Most importantly, any firmware solution can be easily applied to all 6,000+ QMX/QMX+ radios already out in the wild. Which after all, is one of the whole points of SDR in the first place.?

Note that the QCX-mini has an RC filter on its rotary encoder signals. However as a point of history, this was NOT done to eliminate encoder glitches. Which is why there are no capacitors on QMX+. It was done for a completely?unrelated reason. There was an audible noise which could not be eliminated, it's something about the PCB layout or compact structure, in QCX-mini. Adding the RC filter eliminated the problem, for which no other solution could be found despite a lot of investigation.?

In summary I think the problem (about debounce) is in my firmware, and the best solution is also in my firmware, not me adding capacitors to future PCB revisions.?

73 Hans G0UPL



On Tue, Aug 6, 2024 at 10:18?PM Daniel Walter via <nm3a=[email protected]> wrote:
Steve,
I found 1206 fits nicely, but so do 0805.?
--
73, Dan? NM3A

Join [email protected] to automatically receive all group messages.