Debouncing SPDT with R/C in parallel?

Hello all, first-time poster here :slight_smile:

I am following an educational kit and I find myself stumped by this debouncing circuit.

I did a lot of research on the topic and even for a supposedly "minimal" debouncing solution it doesn't make sense to me. Can a resistor and capacitor be wired in parallel like that? What is the initial current through the capacitor when I plug in the Arduino? Could this not potentially damage the board? I am probably missing something but this circuit looks incorrect to me. Even when I try replicating it in Falstad's Circuit JS I get an error message that reads "Capacitor loop with no resistance!"

Thank you in advance. :pray:

I can't say I have ever used that method.

I would go with either a pull up style or Pull down

1 Like

Thank you for your response. I agree, it looks questionable. It is at least missing a pull-up resistor.

This is an often used circuit.

1 Like

Thank you, yes that looks much more reasonable with the R and C in series...
I'm still wondering: What does the circuit from that "educational" kit accomplish exactly? And can it potentially cause damage by drawing too much current when it is first switched on? :thinking:

  • With the component values shown, switch contact damage won’t be a problem, i.e. 0.1uF

  • For debounce, there is not time constant, the circuit makes little sense, use cct. in post 4.

  • The SPDT switch is a reasonable way to wire the input, the transited time and pin level may be stabilized by the capacitor.

1 Like

Nothing :wink:

If you draw the schematic slightly different you get the below and I think that you will forget about the "in parallel:.

Supposedly the resistor will keep the input of the processor (would be at the left) in a LOW state if the switch is not connected to 5V. But in that scenario the switch is connected to GND so the resistor is redundant; the resistor will only be useful if you remove the switch.

The capacitor is useless for debounce because it charges with a hard 5V in no time and discharges in no time via GND if the switch is thrown to GND.

1 Like

In addition to what everyone else has said.

Each time you move the switch from 0V to 5V or vice versa the capacitor charges or discharges through very little resistance, which will just be the internal resistance of the power supply, the resistance of the connecting wires and the switch. This will result in a very short spike of current to the capacitor and a matching voltage spike on the power supply. Voltage spikes on the power supply can cause weird problems, and is what decoupling capacitors are there to suppress. That alone makes this a bad design.

A current spike could in principle damage the switch contacts, but I suspect there isn't enough energy involved in charging a 0u1 capacitor by 5V to damage anything.

1 Like

Thank you @PerryBebbington and @sterretje . I learned a lot from your explanations.
I must say my first experience with this forum has left a very positive impression. I look forward to engaging more with the community and in time, giving back.

1 Like

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.