Debounce... To ReSchmitt or not to ReSchmitt....

Thread Starter

2DrTahoe

Joined Dec 14, 2016
40
That is the question! Actually that is not the question but it is related.

OK, so here goes. I'm a novice and am trying to get this through my thick skull. Below is the Debounce circuit I want to use. I understand the need of the components and the outcome. In short, the Schmitt trigger (a CD40106 hex inverting Schmitt trigger IC) smooths out the signal and inverts the input. So with the switch open, the output is Negative (low) , when closed the output is Positive (high).

upload_2019-9-6_18-55-15.png



In my case, I do not need the output pin to be held neither high or low. Off is just fine.. But, according to the schematic it requires a 5v+ feed and if its not there, there will be a LOW signal going to the Schmitt via the Capacitor causing a HIGH output from the Schmitt.... I think. I think this because the IC has its own supply of power to perform the logic function.

Here is my problem. I will be switching a HIGH signal, 5v+ via a SPST switch. Since the "trigger", "switch", "connection" has to be a negative input to close the Debounce circuit, then I would need to invert the signal through another Schmitt to make it LOW going into the Debounce circuit. This would provide what the Schmitt in the Debounce circuit needs thus resulting in the circuit being closed LOW, the Schmitt inverting the signal AND providing a HIGH output which is the result I need.

I thought that maybe I could just switch "on" the original 5v+ feeding the Debounce circuit and make the LOW "switch" in the circuit permanent and all would work. However, I go back to that LOW connection through the Capacitor that the Schmitt see's.

So my question is, can I just use the switch to provide the 5v+ to the Debounce circuit with the LOW side of the circuit permanently closed to ground and get the desired HIGH output from the Schmitt OR do I really need to blindly provide an inverted signal to the Debounce circuit and keep things to the original schematic?

I hope I was clear on this.

Thanks.
 

danadak

Joined Mar 10, 2018
4,057
Large C connected directly to a CMOS input not a good idea.

When power supply collapses the parasitic diode will take all the discharge
current, can create a hot spot in that area of die, and hose the parts overall
operation. You can put a R in series with input to limit current. There is typically
a spec in datasheet that specifies max current into an input. Use that to calc
your R value.

Regards, Dana.
 

RPLaJeunesse

Joined Jul 29, 2018
262
I would add the diode is un-necessary. Use a lower value resistor for R1, and raise R2. Make sure R1 provides proper current to the switch, some need "wetting" to burn off oxides during use, some have a maximum in the mA range. All depends... With those changes C1 can probably be dropped to 100nF. And don't forget the resistor from C1 to the CMOS part, for a 5V supply 1K is often enough.
 

jpanhalt

Joined Jan 18, 2008
11,087
These seem to be the circuits on the AAC link:

upload_2019-9-7_6-17-21.png

Those are consistent with the recommendations above. The diode is optional and some people consider it to be non-beneficial.
 

MrChips

Joined Oct 2, 2009
34,758
There are many ways to debounce a switch, via software or hardware. Don't let the signal inversion deter you.

To begin, does the switch have to be SPST contacts or can you replace it with a switch that has double-throw contacts?
 

Thread Starter

2DrTahoe

Joined Dec 14, 2016
40
Thanks jpanhalt for the backup.

Hi Mr. Chips, i'm I going with a hardware denounce. Sorry it has to be a SPST.
 

MrChips

Joined Oct 2, 2009
34,758
To be honest, I am not clear on what you are trying to to. You said what you want is the switch to be off.

What are you trying to do? Here are two ways to power a circuit using a SPST switch.

 

Thread Starter

2DrTahoe

Joined Dec 14, 2016
40
It will be a highside switch. My concern is the inverted signal. So I'm thinking I need to "pre-schmitt" the high signal to satisfy The low signal requiredreq the denounce circuit.
 

MrChips

Joined Oct 2, 2009
34,758
I think you ought to back up for a moment since it is not clear to me what is your situation.
Ignore the debounce circuit that you have in mind for the moment.

Your SPST switch supplies +5V power to a circuit.

What is the current draw of the circuit?
What does the circuit do?
Why do you need to debounce the switch?
 

Thread Starter

2DrTahoe

Joined Dec 14, 2016
40
The switch is going to control a Form C optical relay. The reason for the denounce is because everything I have read says to denounce your switches. As anovice, frankly, I'm just being cautious but don't know for sure if it's absolutely needed.
 

MrChips

Joined Oct 2, 2009
34,758
The switch is going to control a Form C optical relay. The reason for the denounce is because everything I have read says to denounce your switches. As anovice, frankly, I'm just being cautious but don't know for sure if it's absolutely needed.
That is what I suspected. Don't believe everything you read.

Your SPST switch is going to control a Form C optical relay.
What does the relay control?
 

Thread Starter

2DrTahoe

Joined Dec 14, 2016
40
The relay controls the input of two separate pwm circuits for cooling fans. All of that is figured out. This was the gray area.

So you think that a denounce is not needed? I know I need to knock down the 5v to approximately 1.2v for the control side of the relay via a voltage divider circuit.
 

MrChips

Joined Oct 2, 2009
34,758
When one position of the switch means OFF and the opposite position means ON a debounce circuit is unnecessary.

Think, there are billions ON/OFF switches installed in the world that do not use debounce circuitry and they all work fine.

You do not need a debounced switch!
 

eetech00

Joined Jun 8, 2013
4,705
The relay controls the input of two separate pwm circuits for cooling fans. All of that is figured out. This was the gray area.

So you think that a denounce is not needed? I know I need to knock down the 5v to approximately 1.2v for the control side of the relay via a voltage divider circuit.
Hi

So your “optical relay” is really an opto isolator configured to drive an electromechanical relay that has a Form C contact?

Please confirm.

eT
 

ci139

Joined Jul 11, 2016
1,982
1K is often enough.
1kΩ for CMOS input is likely the Upper limit to use not to compromise speed (which is likely not an issue with manual control)
10kΩ may mean to start having an input loss in case of short pulses (non-manual input)
especially the 74HC14 is "slower" (than cain of '04-s or Nx '04 + Kx '14) because the greater input change required to affect the OUTP
 

Thread Starter

2DrTahoe

Joined Dec 14, 2016
40
Negative. The ssr is LCC110. It is a Form C relay the will control the "on" function of the pwm's. This is a manual switch.
 
Last edited:
Top