Buffer as switch debounce, originally posted on S.E.B:
Do it with an SPST pushbutton switch, get debounce AND toggling...
...Jim Thompson
-- | James E.Thompson | mens | | Analog Innovations | et | | Analog/Mixed-Signal ASIC's and Discrete Systems | manus | | San Tan Valley, AZ 85142 Skype: skypeanalog | | | Voice:(480)460-2350 Fax: Available upon request | Brass Rat | | E-mail Icon at
formatting link
| 1962 | I love to cook with wine. Sometimes I even put it in the food.
Didn't find your answer? Ask the community — no account required.
R
Rob
Dave Jones crafted a schematic that is much simpler than that. Of course you need to sit through a 45 minute video on youtube to get it, but you can fast-forward until you see the schematic.
J
Jim Thompson
Link? ...Jim Thompson
-- | James E.Thompson | mens | | Analog Innovations | et | | Analog/Mixed-Signal ASIC's and Discrete Systems | manus | | San Tan Valley, AZ 85142 Skype: skypeanalog | | | Voice:(480)460-2350 Fax: Available upon request | Brass Rat | | E-mail Icon at
formatting link
| 1962 | I love to cook with wine. Sometimes I even put it in the food.
L
legg
Power-on state?
RL
J
Jim Thompson
Found it. I wouldn't call that "simpler". ...Jim Thompson
| James E.Thompson | mens |
| Analog Innovations | et |
| Analog/Mixed-Signal ASIC's and Discrete Systems | manus |
| San Tan Valley, AZ 85142 Skype: skypeanalog | |
| Voice:(480)460-2350 Fax: Available upon request | Brass Rat |
| E-mail Icon at http://www.analog-innovations.com | 1962 |
I love to cook with wine. Sometimes I even put it in the food.
J
John Larkin
Why waste the other half of that flop?
formatting link
John Larkin Highland Technology, Inc
lunatic fringe electronics
J
Jim Thompson
Picky! Picky! Go back to the SPDT approach... or add a POR to the D-FLOP. ...Jim Thompson
-- | James E.Thompson | mens | | Analog Innovations | et | | Analog/Mixed-Signal ASIC's and Discrete Systems | manus | | San Tan Valley, AZ 85142 Skype: skypeanalog | | | Voice:(480)460-2350 Fax: Available upon request | Brass Rat | | E-mail Icon at
formatting link
| 1962 | I love to cook with wine. Sometimes I even put it in the food.
J
John Devereux
I did this one (sorry not been following thread)
It has indeterminate startup I think (did not matter for this).
John Devereux
J
Jim Thompson
It takes a SPDT switch, which the OP opined he's like to be rid of. ...Jim Thompson
| James E.Thompson | mens |
| Analog Innovations | et |
| Analog/Mixed-Signal ASIC's and Discrete Systems | manus |
| San Tan Valley, AZ 85142 Skype: skypeanalog | |
| Voice:(480)460-2350 Fax: Available upon request | Brass Rat |
| E-mail Icon at http://www.analog-innovations.com | 1962 |
I love to cook with wine. Sometimes I even put it in the food.
M
mkr5000
I have something right now that if I mess with it enough I can get a bad contact although most of time it's fine. I'm using an optoisolator with an npn output. The output has a pullup resistor on it and a .1uf cap to ground and that is connected to a pin on a raspberry pi.
99% of the time it's fine but if I let it idle a long time and then give the switch a sloppy hit I can have a problem.
My question is -- maybe I can find an opto that has a smoother output? Don't they make some that have more sophisticated logic outputs? You guys may know. That would be great because I could just plug in a better part.
J
John Larkin
Why not software debounce?
There are opto schmitts. Do you actually need the isolation? I see people use optos grounded on both sides, as if they have some magical filtering properties, which they don't.
John Larkin Highland Technology, Inc
lunatic fringe electronics
J
Joe Chisolm
Does anyone have a PWL or similar that you can plug into LTSpice to model the switch bouncing? I guess one could capture a trace on a digital scope or lab jack.
Chisolm
Republic of Texas
J
Jim Thompson
So add a POR...
...Jim Thompson
-- | James E.Thompson | mens | | Analog Innovations | et | | Analog/Mixed-Signal ASIC's and Discrete Systems | manus | | San Tan Valley, AZ 85142 Skype: skypeanalog | | | Voice:(480)460-2350 Fax: Available upon request | Brass Rat | | E-mail Icon at
formatting link
| 1962 | I love to cook with wine. Sometimes I even put it in the food.
P
Piotr Wyderski
Weird EMP protection? In the worst case the opto dies, not the MCU. A pair of depletion mode FETs would be better.
Best regards, Piotr
J
John Larkin
No, just bad design.
John Larkin Highland Technology, Inc
lunatic fringe electronics
J
John Larkin
What kind of switch is it? Non-snap membranes are the worst; they can bounce (and ooze) for 100 milliseconds.
John Larkin Highland Technology, Inc
lunatic fringe electronics
J
Jim Thompson
Here's the netlist from NoiseBlank.pdf on the S.E.D/Schematics Page of my website. The digital pulses may be difficult to decipher so the PDF has been updated to show the pulse combinations to make a noisy signal.
+50n 1 + ENDREPEAT Q_Q3 N_3 N_3 N_9 Q2N3904 Q_Q4 PROCESS N_3 N_8 Q2N3904 Q_Q2 PROCESS N_1 N_6 Q2N3906 Q_Q1 N_1 N_1 N_5 Q2N3906 C_C2 PROCESS 0 3.3pF ...Jim Thompson
| James E.Thompson | mens |
| Analog Innovations | et |
| Analog/Mixed-Signal ASIC's and Discrete Systems | manus |
| San Tan Valley, AZ 85142 Skype: skypeanalog | |
| Voice:(480)460-2350 Fax: Available upon request | Brass Rat |
| E-mail Icon at http://www.analog-innovations.com | 1962 |
I love to cook with wine. Sometimes I even put it in the food.
R
Rob
Well, 3 transistors, 4 resistors and 1 cap versus your 2 ICs, 2 resistors and 1 cap. And it can source some current at the output. (it is intended to be a power on/off switch)
M
mkr5000
opto schmitt is nice -- that would help a lot. using optos because this could have long cable lengths and maybe in industrial environment. hate to expose the I/O pins of a Raspberry PI to that. thanks.
J
Jim Thompson
Put the NPN of your opto in place of the switch in this drawing...
Depending on your application... if you don't need on/off toggling, just eliminate the D-Flop. ...Jim Thompson
| James E.Thompson | mens |
| Analog Innovations | et |
| Analog/Mixed-Signal ASIC's and Discrete Systems | manus |
| San Tan Valley, AZ 85142 Skype: skypeanalog | |
| Voice:(480)460-2350 Fax: Available upon request | Brass Rat |
| E-mail Icon at http://www.analog-innovations.com | 1962 |
I love to cook with wine. Sometimes I even put it in the food.
Join the Discussion
Have something to add? Share your thoughts — no account required.
Didn't find your answer?
Ask the community — no account required
Report Content
You are reporting this content to the moderators. They will look at it
ASAP.