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.
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.
-- | 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.
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.
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.
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.
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.
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
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.
-- | 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.
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.
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)
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.
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.
ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here.
All logos and trade names are the property of their respective owners.