noninverting logic gate with feedback for debounce?

GroupDIY Audio Forum

Help Support GroupDIY Audio Forum:

This site may earn a commission from merchant affiliate links, including eBay, Amazon, and others.
Perhaps the original poster's question was a theoretical exercise, but if you want a simple hardware debouncer, have you considered using a simple RC circuit like the one attached?  Cheap, easy, and gets the job done so you can move on to more exciting things.
 

Attachments

  • debouncer.png
    debouncer.png
    9.2 KB · Views: 5
Ethan, that's what done on a surprising number of eval boards we develop during the day job.

but assuming that your going to drive that signal into a processor of some kind, I don't understand why people can't simply debounce in software. it's 3 or 4 lines of code... along the lines of:

10 Receive first bounce
20 wait 50mS
30 Is it still low? Then the button has finished bouncing and is now pressed.
 
[EDIT: Sorry Rochey, I meant to quote your post but accidentally hit the edit button and edited your post with mine. reverted...]

Agreed. I would be far more inclined to debounce in code--UNLESS the design was very switch-intensive and I was using a low-end micro that requires squeezing every last drop of performance from each processing cycle.  Debouncing in code also saves board real estate.
 
Modern manufacturing math makes it far cheaper to deal with this in software than even simple hardware. It costs the same to machine place a penny R and Penny C, as more expensive parts, plus they consume PCB real estate. Processor power is cheap and getting cheaper.

JR

PS: I don't even use single resistors any more, I use 4x arrays so I get four resistors for every machine placement. Admittedly I am not doing high end audio paths these days.
 
JohnRoberts said:
PS: I don't even use single resistors any more, I use 4x arrays so I get four resistors for every machine placement. Admittedly I am not doing high end audio paths these days.

I'm doing exactly the same in my new designs. especially for pull ups and biasing. Heck, for some of my designs, my circuit requires 200K and 100K resistors, I simply loop through two 100K's in the array ;)

 
Rochey said:
JohnRoberts said:
PS: I don't even use single resistors any more, I use 4x arrays so I get four resistors for every machine placement. Admittedly I am not doing high end audio paths these days.

I'm doing exactly the same in my new designs. especially for pull ups and biasing. Heck, for some of my designs, my circuit requires 200K and 100K resistors, I simply loop through two 100K's in the array ;)

Yup, been doing that for years..

One warning, I still have painful memories of one product I was called in to support, after the fact, that used x8 resistor arrays, that were apparently too fine pitch for the CM and PCB fab capability. These were a bear to get all 8 resistors making good contact in production. Put a bunch of these X8 arrays on a DSP board and you have a challenge to debug. Even when you determine the problem, not easy for me to fix without creating new solder bridges, etc (for me at least, and that was with a decade younger eyes, but no hot air station back then. )

Perhaps a personal problem for me, but I find x4 arrays a good trade off for cost, reworking ease, and resistor value utilization. I've had a few minor issues with the x4s on hand built prototypes, but nothing like the evil x8 arrays.

For premium audio paths only a fraction of the Rs in the design will affect measurable performance (input/feedback networks and the like).

JR
 

Latest posts

Back
Top