Skip to main content
25 votes
Accepted

Hardware debouncing of key matrix with minimum passive components

Let's be clear about this. If you have a keypad matrix you are already using processing power to apply sequential logic voltages to the rows or columns then reading the columns or rows back in order ...
Andy aka's user avatar
  • 467k
21 votes

Does this mechanical switch really have no bounce?

Not every electromechanical contact exhibits bounces, and if it does, not always every single time you activate it. Moreover, some switches bounce only on one "edge" of the signal, i.e. only ...
LorenzoDonati4Ukraine-OnStrike's user avatar
17 votes

Why can't I see bouncing of a switch on an oscilloscope?

The oscilloscope is only remembering enough points to display the trace at the original resolution. If you capture a trace and then zoom in, it "spreads out" the dots, then connects them with straight ...
bitsmack's user avatar
  • 17k
16 votes

Can multiple Schmitt triggers in series fully debounce a switch?

Can multiple Schmitt triggers in series fully debounce a switch? A single Schmitt trigger with a analog filter in front of it can be used for debouncing. However, after that Schmitt trigger, the ...
Olin Lathrop's user avatar
15 votes
Accepted

Software Debouncing to detect if switch has been pressed for T seconds

I have managed to complete the aforementioned task using timers, however, since then, I have used all timer registers (and match resisters that are available) for more important tasks within the same ...
Dave Tweed's user avatar
  • 177k
14 votes

Why can't I see bouncing of a switch on an oscilloscope?

This is an issue with scope setup and misunderstanding of how to interpret scope captures. You must capture the rising edge of a single pulse at a reasonably small resolution by using a single trigger....
crasic's user avatar
  • 5,888
13 votes

Why does the voltage of the photodiode "bounce"?

Semiconductor laser effect is described by two coupled partial differential equations of carrier density and photon density, the rate equations. The solution of these equations result in a non linear ...
Curd's user avatar
  • 16.4k
13 votes
Accepted

Can multiple Schmitt triggers in series fully debounce a switch?

Using Schmitt triggers in series would not further reduce bounce. Consider the filter: The input is (U). The red line is a 50% threshold, the output of which is seen as signal (A). It bounces each ...
Bort's user avatar
  • 5,192
13 votes
Accepted

Why can't I see bouncing of a switch on an oscilloscope?

Here is a test I did with my 200MHz Tek scope. You should be able to get similar results with the Rigol, this is an older scope with a modest 2Gs/s capture frequency. My circuit is just a standard ...
Spehro 'speff' Pefhany's user avatar
13 votes
Accepted

Should I debounce everything?

We de-bounce when the extra transitions might trigger something unwanted. You have identified one of those cases: A microcontroller reading a pushbutton. In most cases, we don't care if there is a ...
evildemonic's user avatar
  • 9,474
11 votes

Is it possible to use just a capacitor to debounce a button?

I think the accepted answer said that you can only use an RC trick to de-bounce a switch that is tied to low, but I think that is not true. You can do it for high as well. Here is the schematics. ...
Gunther Schadow's user avatar
11 votes

Why does the voltage of the photodiode "bounce"?

It could be motion. Probably at the laser source, but it could also be at the photodiode end, even a fan somewhere can cause sensitivity. However, if you have no aperture, or the wrong aperture, it ...
Trevor_G's user avatar
  • 46.9k
10 votes
Accepted

Button debounce ringing

The ringing is caused by poor layout (possibly breadboarding is the worst culprit) AND the fact that your button's switch-contact is shorting out a charged capacitor - the instantaneous current flow ...
Andy aka's user avatar
  • 467k
9 votes

Minimizing signal delay when debouncing

The best way to handle this is to debounce the signal in software with your microcontroller. This is cheap, simple, and gives you maximum versatility in terms of your debounce algorithm. Here's an ...
Drew's user avatar
  • 7,184
9 votes
Accepted

Buttons that do not bounce or scopes that pretend to be 100 MHz but actually aren't?

Should I worship the buttons for magically being bounce-free or should I mistrust my scope? The scope did show me 100-nanosecond sized events, so I can't really find evidence of fault with it. On a ...
glen_geek's user avatar
  • 27.1k
8 votes
Accepted

Clarifying an article on switch debouncing - something about leakage current causing trouble

Mr. Ganssle is saying that the worst-case leakage current (if it comes out of the input) multiplied by the R2 resistor value could result in the input voltage not getting close enough to ground when ...
Spehro 'speff' Pefhany's user avatar
8 votes

Does this mechanical switch really have no bounce?

Your buttons aren't magical, though they are good. I tested some push button switches for one of my projects a few months ago. Surprisingly (at least to me,) the bounce is asymmetric. Transition from ...
JRE's user avatar
  • 73.1k
7 votes

Doubt about the real need for R and C on micro-controller inputs

I strongly suspect you're confusing the point of those resistors. My money would be that a lot of it comes from trying to make the board robust under "boneheaded-user" situations. The 1K ...
Connor Wolf's user avatar
  • 32.4k
7 votes
Accepted

Is this an acceptable circuit for debouncing a Raspberrry Pi input pin?

You are correct about R3. However, R2 is not necessary: when the button is released, the capacitor will charge slowly due to the resistance of R1. When the button is pressed, it will discharge slowly ...
nanofarad's user avatar
  • 20.3k
7 votes
Accepted

Minimizing signal delay when debouncing

If you insist on a H/W solution, a diode will make the charging/discharging of the cap asymmetrical. The delay will be a few microseconds. The recovery time will be a few milliseconds. simulate this ...
Mattman944's user avatar
  • 16.6k
6 votes
Accepted

What is masking-time and chattering in rotary encoders?

Chattering is the time during which the output is not stable when a transition from ON to OFF or from OFF to ON occurs. The signal quickly jumps between both states during a few ms. Bounce (you didn'...
dim's user avatar
  • 16.1k
6 votes

Should I consider debouncing my push button?

Yes, you should consider debouncing your push button if the push button does not do this for you.
MathiasE's user avatar
  • 479
6 votes

Software Debouncing to detect if switch has been pressed for T seconds

Your code seems to be a bit off, and is hard to really understand since it is not clear where that while loop sits with respect to the interrupt or whatever sets the DownCount function. You also ...
Trevor_G's user avatar
  • 46.9k
6 votes

Why can't I see bouncing of a switch on an oscilloscope?

Assuming that the pull-down resistor is a reasonable value (1k - 10k), the very next thing that I would check is to see if there is a filter active on that channel. I wouldn't be looking for signal ...
Dwayne Reid's user avatar
6 votes

Question about debouncing - delay of state change

There's absolutely nothing wrong with doing "leading edge" debouncing as you describe it — in fact, it's the method that I prefer in my own projects. As you say, as soon as you see the first ...
Dave Tweed's user avatar
  • 177k
5 votes

Calculating R and C for schmitt trigger debouncer

For filtering, C1 should be at the inverter. R2C2 form the debouncing filter. R2 can be a high value so C1 can be smaller. R2C2 also form a low pass filter to remove RF interference and noise spikes. ...
Henry Crun's user avatar
  • 5,433
5 votes

Why can't I see bouncing of a switch on an oscilloscope?

Figure 1. The guys down at photo-forensics found this. There are several factors: You have a nice new clean switch that bounces very little. Your scope is loading the circuit and the 15 pF is enough ...
Transistor's user avatar
  • 178k
5 votes

Is this an acceptable circuit for debouncing a Raspberrry Pi input pin?

You do not need R2. If you want to include R3, traditionally it is on the other side of the switch, so both the switch and the capacitor are connected directly to GND. Yes, it's a series circuit and ...
AnalogKid's user avatar
  • 22.1k
5 votes
Accepted

Help with a simple debounce program on STM32

Make 2 global variables called tick and previousTick, or whatever you want, and inside the timer ISR increment the ...
Edwin Fairchild's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible