Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > sci.electronics.design > #400315 > unrolled thread
| Started by | Jim Thompson <To-Email-Use-The-Envelope-Icon@On-My-Web-Site.com> |
|---|---|
| First post | 2016-02-25 08:16 -0700 |
| Last post | 2016-02-26 12:05 -0600 |
| Articles | 8 on this page of 28 — 10 participants |
Back to article view | Back to sci.electronics.design
Buffer as switch debounce Jim Thompson <To-Email-Use-The-Envelope-Icon@On-My-Web-Site.com> - 2016-02-25 08:16 -0700
Re: Buffer as switch debounce Rob <nomail@example.com> - 2016-02-25 15:40 +0000
Re: Buffer as switch debounce Jim Thompson <To-Email-Use-The-Envelope-Icon@On-My-Web-Site.com> - 2016-02-25 09:08 -0700
Re: Buffer as switch debounce Jim Thompson <To-Email-Use-The-Envelope-Icon@On-My-Web-Site.com> - 2016-02-25 09:16 -0700
Re: Buffer as switch debounce Rob <nomail@example.com> - 2016-02-25 19:21 +0000
Re: Buffer as switch debounce "Tim Williams" <tiwill@seventransistorlabs.com> - 2016-02-25 15:44 -0600
Re: Buffer as switch debounce bitrex <bitrex@de.lete.earthlink.net> - 2016-02-26 09:55 -0500
Re: Buffer as switch debounce Jim Thompson <To-Email-Use-The-Envelope-Icon@On-My-Web-Site.com> - 2016-02-26 08:34 -0700
Re: Buffer as switch debounce legg <legg@nospam.magma.ca> - 2016-02-25 11:14 -0500
Re: Buffer as switch debounce Jim Thompson <To-Email-Use-The-Envelope-Icon@On-My-Web-Site.com> - 2016-02-25 09:20 -0700
Re: Buffer as switch debounce Jim Thompson <To-Email-Use-The-Envelope-Icon@On-My-Web-Site.com> - 2016-02-25 10:15 -0700
Re: Buffer as switch debounce John Larkin <jjlarkin@highlandtechnology.com> - 2016-02-25 08:19 -0800
Re: Buffer as switch debounce Jim Thompson <To-Email-Use-The-Envelope-Icon@On-My-Web-Site.com> - 2016-02-25 09:22 -0700
Re: Buffer as switch debounce John Devereux <john@devereux.me.uk> - 2016-02-25 16:22 +0000
Re: Buffer as switch debounce mkr5000 <mikerbgr@gmail.com> - 2016-02-25 08:34 -0800
Re: Buffer as switch debounce John Larkin <jjlarkin@highlandtechnology.com> - 2016-02-25 09:03 -0800
Re: Buffer as switch debounce Piotr Wyderski <peter.pan@neverland.mil> - 2016-02-25 18:19 +0100
Re: Buffer as switch debounce John Larkin <jjlarkin@highlandtechnology.com> - 2016-02-25 09:30 -0800
Re: Buffer as switch debounce mkr5000 <mikerbgr@gmail.com> - 2016-02-25 12:35 -0800
Re: Buffer as switch debounce Jim Thompson <To-Email-Use-The-Envelope-Icon@On-My-Web-Site.com> - 2016-02-25 14:12 -0700
Re: Buffer as switch debounce Jim Thompson <To-Email-Use-The-Envelope-Icon@On-My-Web-Site.com> - 2016-02-25 15:16 -0700
Re: Buffer as switch debounce Joe Chisolm <jchisolm6@earthlink.net> - 2016-02-25 11:14 -0600
Re: Buffer as switch debounce John Larkin <jjlarkin@highlandtechnology.com> - 2016-02-25 09:33 -0800
Re: Buffer as switch debounce Joe Chisolm <jchisolm6@earthlink.net> - 2016-02-26 12:04 -0600
Re: Buffer as switch debounce John Larkin <jjlarkin@highlandtechnology.com> - 2016-02-26 21:53 -0800
Re: Buffer as switch debounce Joe Chisolm <jchisolm6@earthlink.net> - 2016-02-27 13:02 -0600
Re: Buffer as switch debounce Jim Thompson <To-Email-Use-The-Envelope-Icon@On-My-Web-Site.com> - 2016-02-25 10:44 -0700
Re: Buffer as switch debounce Joe Chisolm <jchisolm6@earthlink.net> - 2016-02-26 12:05 -0600
Page 2 of 2 — ← Prev page 1 [2]
| From | Jim Thompson <To-Email-Use-The-Envelope-Icon@On-My-Web-Site.com> |
|---|---|
| Date | 2016-02-25 15:16 -0700 |
| Message-ID | <b7vucbllstvriktrbjv2fpljgni3eu3s56@4ax.com> |
| In reply to | #400378 |
On Thu, 25 Feb 2016 14:12:52 -0700, Jim Thompson
<To-Email-Use-The-Envelope-Icon@On-My-Web-Site.com> wrote:
>On Thu, 25 Feb 2016 08:34:49 -0800 (PST), mkr5000 <mikerbgr@gmail.com>
>wrote:
>
>>On Thursday, February 25, 2016 at 10:16:55 AM UTC-5, Jim Thompson wrote:
>>> Buffer as switch debounce, originally posted on S.E.B:
>>>
>>> Do it with an SPST pushbutton switch, get debounce AND toggling...
>>>
>>> <http://www.analog-innovations.com/SED/SPST_Toggling_Switch_Debounce_2016-02-25.png>
>>>
>>> ...Jim Thompson
>>
>>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.
>
>Put the NPN of your opto in place of the switch in this drawing...
>
><http://www.analog-innovations.com/SED/SPST_Toggling_Switch_Debounce_2016-02-25.png>
>
>Depending on your application... if you don't need on/off toggling,
>just eliminate the D-Flop.
>
> ...Jim Thompson
As in...
<http://www.analog-innovations.com/SED/Debounce_Opto_2016-02-25.png>
...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.
[toc] | [prev] | [next] | [standalone]
| From | Joe Chisolm <jchisolm6@earthlink.net> |
|---|---|
| Date | 2016-02-25 11:14 -0600 |
| Message-ID | <ovidnWAA_M3wq1LLnZ2dnUU7-XednZ2d@earthlink.com> |
| In reply to | #400315 |
On Thu, 25 Feb 2016 08:16:49 -0700, Jim Thompson wrote: > Buffer as switch debounce, originally posted on S.E.B: > > Do it with an SPST pushbutton switch, get debounce AND toggling... > > <http://www.analog-innovations.com/SED/ SPST_Toggling_Switch_Debounce_2016-02-25.png> > > ...Jim Thompson 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
[toc] | [prev] | [next] | [standalone]
| From | John Larkin <jjlarkin@highlandtechnology.com> |
|---|---|
| Date | 2016-02-25 09:33 -0800 |
| Message-ID | <tjeucb97b2io8poaldi4nt1l01bqgi230o@4ax.com> |
| In reply to | #400336 |
On Thu, 25 Feb 2016 11:14:21 -0600, Joe Chisolm <jchisolm6@earthlink.net> wrote: >On Thu, 25 Feb 2016 08:16:49 -0700, Jim Thompson wrote: > >> Buffer as switch debounce, originally posted on S.E.B: >> >> Do it with an SPST pushbutton switch, get debounce AND toggling... >> >> <http://www.analog-innovations.com/SED/ >SPST_Toggling_Switch_Debounce_2016-02-25.png> >> >> ...Jim Thompson > >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. 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
[toc] | [prev] | [next] | [standalone]
| From | Joe Chisolm <jchisolm6@earthlink.net> |
|---|---|
| Date | 2016-02-26 12:04 -0600 |
| Message-ID | <vOqdnbe5L84oDk3LnZ2dnUU7-IudnZ2d@earthlink.com> |
| In reply to | #400346 |
On Thu, 25 Feb 2016 09:33:03 -0800, John Larkin wrote: > On Thu, 25 Feb 2016 11:14:21 -0600, Joe Chisolm > <jchisolm6@earthlink.net> wrote: > >>On Thu, 25 Feb 2016 08:16:49 -0700, Jim Thompson wrote: >> >>> Buffer as switch debounce, originally posted on S.E.B: >>> >>> Do it with an SPST pushbutton switch, get debounce AND toggling... >>> >>> <http://www.analog-innovations.com/SED/ >>SPST_Toggling_Switch_Debounce_2016-02-25.png> >>> >>> ...Jim Thompson >> >>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. > > What kind of switch is it? Non-snap membranes are the worst; they can > bounce (and ooze) for 100 milliseconds. Simple SPST or DPST. I'm using a C&K KMR4 series for one project now ( KMR432NGLFS ). In a previous project we wanted a reset for LPC1769, which I think you have used. But we wanted it such that holding the reset for a couple of seconds would put the device into programming mode. I found an easier way for simple reset was to just use a POR chip like a TPS3809 with a 200ms td window. This reset drives more than just a uC. -- Chisolm Republic of Texas
[toc] | [prev] | [next] | [standalone]
| From | John Larkin <jjlarkin@highlandtechnology.com> |
|---|---|
| Date | 2016-02-26 21:53 -0800 |
| Message-ID | <vce2dbdvvfq7fpcaptjt3sb85uvrv6cuff@4ax.com> |
| In reply to | #400511 |
On Fri, 26 Feb 2016 12:04:37 -0600, Joe Chisolm <jchisolm6@earthlink.net> wrote: >On Thu, 25 Feb 2016 09:33:03 -0800, John Larkin wrote: > >> On Thu, 25 Feb 2016 11:14:21 -0600, Joe Chisolm >> <jchisolm6@earthlink.net> wrote: >> >>>On Thu, 25 Feb 2016 08:16:49 -0700, Jim Thompson wrote: >>> >>>> Buffer as switch debounce, originally posted on S.E.B: >>>> >>>> Do it with an SPST pushbutton switch, get debounce AND toggling... >>>> >>>> <http://www.analog-innovations.com/SED/ >>>SPST_Toggling_Switch_Debounce_2016-02-25.png> >>>> >>>> ...Jim Thompson >>> >>>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. >> >> What kind of switch is it? Non-snap membranes are the worst; they can >> bounce (and ooze) for 100 milliseconds. > >Simple SPST or DPST. I'm using a C&K KMR4 series for one project now >( KMR432NGLFS ). In a previous project we wanted a reset for LPC1769, >which I think you have used. But we wanted it such that holding the >reset for a couple of seconds would put the device into programming mode. > >I found an easier way for simple reset was to just use a POR chip like a >TPS3809 with a 200ms td window. This reset drives more than just a uC. STM1818 is a cute reset chip. 3 pins, cheap. The pushbutton goes from the reset line to ground. -- John Larkin Highland Technology, Inc lunatic fringe electronics
[toc] | [prev] | [next] | [standalone]
| From | Joe Chisolm <jchisolm6@earthlink.net> |
|---|---|
| Date | 2016-02-27 13:02 -0600 |
| Message-ID | <ePCdnXNsLogtb0zLnZ2dnUU7-bWdnZ2d@earthlink.com> |
| In reply to | #400571 |
On Fri, 26 Feb 2016 21:53:50 -0800, John Larkin wrote: > STM1818 is a cute reset chip. 3 pins, cheap. The pushbutton goes from > the reset line to ground. Thanks. I'll have to remember that one. I've used STM voltage monitors before but not their reset chips. This is cleaner than the TPS POR solution. -- Chisolm Republic of Texas
[toc] | [prev] | [next] | [standalone]
| From | Jim Thompson <To-Email-Use-The-Envelope-Icon@On-My-Web-Site.com> |
|---|---|
| Date | 2016-02-25 10:44 -0700 |
| Message-ID | <80fucb1d0l30ncusvgjt0famcllig62dvc@4ax.com> |
| In reply to | #400336 |
On Thu, 25 Feb 2016 11:14:21 -0600, Joe Chisolm
<jchisolm6@earthlink.net> wrote:
>On Thu, 25 Feb 2016 08:16:49 -0700, Jim Thompson wrote:
>
>> Buffer as switch debounce, originally posted on S.E.B:
>>
>> Do it with an SPST pushbutton switch, get debounce AND toggling...
>>
>> <http://www.analog-innovations.com/SED/
>SPST_Toggling_Switch_Debounce_2016-02-25.png>
>>
>> ...Jim Thompson
>
>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.
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.
* Schematics Netlist *
R_R1 V2 0 1K
R_R2 V3 0 1K
U_DSTM3 STIM(1,1) $G_DPWR $G_DGND V1 IO_STM IO_LEVEL=0
+ 0 0
+ +10u 1
+REPEAT FOREVER
+ +10u 0
+ +10u 1
+ ENDREPEAT
R_R3 V1 0 1K
U_DSTM1 STIM(1,1) $G_DPWR $G_DGND V2 IO_STM IO_LEVEL=0
+ 0 1
+ +0.5u 0
+REPEAT FOREVER
+ +4u 1
+ +1u 0
+ ENDREPEAT
R_R4 N_1 N_2 39K
R_R5 N_2 N_3 39K
R_R6 N_4 N_5 5.1K
R_R7 N_4 N_6 5.1K
V_V1 N_4 0 +5V
X_U1A INPUT N_2 $G_DPWR $G_DGND 74HC04 PARAMS:
+ IO_LEVEL=0 MNTYMXDLY=0
R_R13 N_7 0 1K
R_R9 N_8 0 5.1K
R_R8 N_9 0 5.1K
R_R11 N_4 N_10 1K
R_R12 N_10 N_7 3K
X_U5A OUTPUT N_11 N_12 $G_DPWR $G_DGND 74HC00 PARAMS:
+ IO_LEVEL=0 MNTYMXDLY=0
X_U4A N_13 N_12 OUTPUT $G_DPWR $G_DGND 74HC00 PARAMS:
+ IO_LEVEL=0 MNTYMXDLY=0
** Comparator Behavioral **
R1U3 int1U3 0 1G
R2U3 int1U3 int2U3 {SQRT(10n/0.693147)}
C1U3 int2U3 0 {SQRT(10n/0.693147)}
E2U3 N_11 0 VALUE {V(int2U3,0)*(5-0)+0}
E1U3 int1U3 0 VALUE {(tanh(2.197774/5m*V(PROCESS,N_7))+1)/2}
** End Behavioral Comparator **
** Comparator Behavioral **
R1U2 int1U2 0 1G
R2U2 int1U2 int2U2 {SQRT(10n/0.693147)}
C1U2 int2U2 0 {SQRT(10n/0.693147)}
E2U2 N_13 0 VALUE {V(int2U2,0)*(5-0)+0}
E1U2 int1U2 0 VALUE {(tanh(2.197774/5m*V(N_10,PROCESS))+1)/2}
** End Behavioral Comparator **
R_R14 OUTPUT 0 1G
E_E1 INPUT 0 VALUE { V(V1)*(1-V(V2)*V(V3)/25) }
R_R10 INPUT 0 1G
U_DSTM2 STIM(1,1) $G_DPWR $G_DGND V3 IO_STM IO_LEVEL=0
+ 0 0
+ +0 1
+REPEAT FOREVER
+ +150n 0
+ +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.
[toc] | [prev] | [next] | [standalone]
| From | Joe Chisolm <jchisolm6@earthlink.net> |
|---|---|
| Date | 2016-02-26 12:05 -0600 |
| Message-ID | <vOqdnba5L85PDk3LnZ2dnUU7-IsAAAAA@earthlink.com> |
| In reply to | #400347 |
On Thu, 25 Feb 2016 10:44:22 -0700, Jim Thompson wrote:
> On Thu, 25 Feb 2016 11:14:21 -0600, Joe Chisolm
> <jchisolm6@earthlink.net> wrote:
>
>>On Thu, 25 Feb 2016 08:16:49 -0700, Jim Thompson wrote:
>>
>>> Buffer as switch debounce, originally posted on S.E.B:
>>>
>>> Do it with an SPST pushbutton switch, get debounce AND toggling...
>>>
>>> <http://www.analog-innovations.com/SED/
>>SPST_Toggling_Switch_Debounce_2016-02-25.png>
>>>
>>> ...Jim Thompson
>>
>>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.
>
> 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.
>
>
> * Schematics Netlist *
>
>
>
> R_R1 V2 0 1K R_R2 V3 0 1K U_DSTM3 STIM(1,1)
> $G_DPWR $G_DGND V1 IO_STM IO_LEVEL=0 + 0 0 + +10u 1 +REPEAT FOREVER +
> +10u 0 + +10u 1
> + ENDREPEAT
> R_R3 V1 0 1K U_DSTM1 STIM(1,1) $G_DPWR $G_DGND V2
> IO_STM IO_LEVEL=0 + 0 1 + +0.5u 0 +REPEAT FOREVER + +4u 1 + +1u 0
> + ENDREPEAT
> R_R4 N_1 N_2 39K R_R5 N_2 N_3 39K R_R6 N_4 N_5
> 5.1K R_R7 N_4 N_6 5.1K V_V1 N_4 0 +5V X_U1A
> INPUT N_2 $G_DPWR $G_DGND 74HC04 PARAMS:
> + IO_LEVEL=0 MNTYMXDLY=0 R_R13 N_7 0 1K R_R9 N_8 0
> 5.1K R_R8 N_9 0 5.1K R_R11 N_4 N_10 1K R_R12
> N_10 N_7 3K X_U5A OUTPUT N_11 N_12 $G_DPWR $G_DGND 74HC00
> PARAMS:
> + IO_LEVEL=0 MNTYMXDLY=0 X_U4A N_13 N_12 OUTPUT $G_DPWR $G_DGND
> 74HC00 PARAMS:
> + IO_LEVEL=0 MNTYMXDLY=0 ** Comparator Behavioral **
> R1U3 int1U3 0 1G R2U3 int1U3 int2U3 {SQRT(10n/0.693147)}
> C1U3 int2U3 0 {SQRT(10n/0.693147)} E2U3 N_11 0 VALUE
> {V(int2U3,0)*(5-0)+0}
> E1U3 int1U3 0 VALUE {(tanh(2.197774/5m*V(PROCESS,N_7))+1)/2} ** End
> Behavioral Comparator **
> ** Comparator Behavioral **
> R1U2 int1U2 0 1G R2U2 int1U2 int2U2 {SQRT(10n/0.693147)}
> C1U2 int2U2 0 {SQRT(10n/0.693147)} E2U2 N_13 0 VALUE
> {V(int2U2,0)*(5-0)+0}
> E1U2 int1U2 0 VALUE {(tanh(2.197774/5m*V(N_10,PROCESS))+1)/2}
> ** End Behavioral Comparator **
> R_R14 OUTPUT 0 1G E_E1 INPUT 0 VALUE {
> V(V1)*(1-V(V2)*V(V3)/25) }
> R_R10 INPUT 0 1G U_DSTM2 STIM(1,1) $G_DPWR $G_DGND V3
> IO_STM IO_LEVEL=0 + 0 0 + +0 1 +REPEAT FOREVER + +150n 0 + +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
Thanks Jim, I'll try it.
--
Chisolm
Republic of Texas
[toc] | [prev] | [standalone]
Page 2 of 2 — ← Prev page 1 [2]
Back to top | Article view | sci.electronics.design
csiph-web