Buffer as switch debounce.

G

George Herold

Guest
So this is from AoE3, pg 730. To switch debounce they just use a buffer
(or later an AND gate with the inputs tied together.) with feedback from the
output. I tired it (only on a piece of white protoboard) and.....


So here is the transition from low to high
https://www.dropbox.com/s/mlzq33kl3xg9pko/DSCN9304.JPG?dl=0
(74HC08)

It's got this long time constant.. a few milli seconds... Basically
independent of the feedback R that I use.
From where does it come? The white proto-board?

On the falling edge I get this sometimes... which looks a bit close
to the edge.
https://www.dropbox.com/s/w12y0exyc6cnzwj/DSCN9305.JPG?dl=0

(I'm going to use an 74HC02 and some RC's so this is only
curiosity.)

George H.
 
On Monday, February 22, 2016 at 1:35:30 PM UTC-5, Tim Wescott wrote:
On Mon, 22 Feb 2016 09:47:40 -0800, George Herold wrote:

So this is from AoE3, pg 730. To switch debounce they just use a buffer
(or later an AND gate with the inputs tied together.) with feedback from
the output. I tired it (only on a piece of white protoboard) and.....


So here is the transition from low to high
https://www.dropbox.com/s/mlzq33kl3xg9pko/DSCN9304.JPG?dl=0 (74HC08)

It's got this long time constant.. a few milli seconds... Basically
independent of the feedback R that I use.
From where does it come? The white proto-board?

On the falling edge I get this sometimes... which looks a bit close to
the edge.
https://www.dropbox.com/s/w12y0exyc6cnzwj/DSCN9305.JPG?dl=0

(I'm going to use an 74HC02 and some RC's so this is only curiosity.)

It's not from the white protoboard -- those add something like 5pF
between rows, which shouldn't phase a 74HC part much at all.

That circuit assumes a break-before-make switch. I'm not sure what would
happen if it's make-before-break, other than lots of drain on your +5V
line. Perhaps the switch is break-before-make, but it's managing to
bounce between ground and +5V as it settles? Looking at the input to the
gate might be instructive.

Hi Tim, Well the gate looks just like the output... the two are tied
together. This is a standard C&K toggle... I assume it's break before make.

It might be something to do with the logic family?
But mostly I'm not liking this debounce idea. Hey, even H&H get to make a mistake
sometimes.
Note that the 74xx02 is an inverting gate, and the circuit assumes a non-
inverting buffer.
Yeah.. I'll do the "standard" trick of charging the
Schmitt trigger input through a ~10 ms RC.
The above w/o any RC's looked simpler.

George H.
--

Tim Wescott
Wescott Design Services
http://www.wescottdesign.com
 
On Monday, February 22, 2016 at 2:26:15 PM UTC-5, Tim Wescott wrote:
On Mon, 22 Feb 2016 11:08:22 -0800, George Herold wrote:

On Monday, February 22, 2016 at 1:35:30 PM UTC-5, Tim Wescott wrote:
On Mon, 22 Feb 2016 09:47:40 -0800, George Herold wrote:

So this is from AoE3, pg 730. To switch debounce they just use a
buffer (or later an AND gate with the inputs tied together.) with
feedback from the output. I tired it (only on a piece of white
protoboard) and.....


So here is the transition from low to high
https://www.dropbox.com/s/mlzq33kl3xg9pko/DSCN9304.JPG?dl=0 (74HC08)

It's got this long time constant.. a few milli seconds... Basically
independent of the feedback R that I use.
From where does it come? The white proto-board?

On the falling edge I get this sometimes... which looks a bit close
to the edge.
https://www.dropbox.com/s/w12y0exyc6cnzwj/DSCN9305.JPG?dl=0

(I'm going to use an 74HC02 and some RC's so this is only curiosity.)

It's not from the white protoboard -- those add something like 5pF
between rows, which shouldn't phase a 74HC part much at all.

That circuit assumes a break-before-make switch. I'm not sure what
would happen if it's make-before-break, other than lots of drain on
your +5V line. Perhaps the switch is break-before-make, but it's
managing to bounce between ground and +5V as it settles? Looking at
the input to the gate might be instructive.

Hi Tim, Well the gate looks just like the output... the two are tied
together. This is a standard C&K toggle... I assume it's break before
make.

snip

The input and output are tied together through a resistor. The switch
should easily overcome that if it's turning on or off firmly. You should
NOT see the input tracking the output if the switch is working as
expected.

Oops... operator error. (the IC wasn't grounded... I had ground tied to +5v!
only one slot away....)
I must have been getting ground through the input pins...

Sorry..

George
--

Tim Wescott
Wescott Design Services
http://www.wescottdesign.com
 
On Mon, 22 Feb 2016 09:47:40 -0800, George Herold wrote:

So this is from AoE3, pg 730. To switch debounce they just use a buffer
(or later an AND gate with the inputs tied together.) with feedback from
the output. I tired it (only on a piece of white protoboard) and.....


So here is the transition from low to high
https://www.dropbox.com/s/mlzq33kl3xg9pko/DSCN9304.JPG?dl=0 (74HC08)

It's got this long time constant.. a few milli seconds... Basically
independent of the feedback R that I use.
From where does it come? The white proto-board?

On the falling edge I get this sometimes... which looks a bit close to
the edge.
https://www.dropbox.com/s/w12y0exyc6cnzwj/DSCN9305.JPG?dl=0

(I'm going to use an 74HC02 and some RC's so this is only curiosity.)

It's not from the white protoboard -- those add something like 5pF
between rows, which shouldn't phase a 74HC part much at all.

That circuit assumes a break-before-make switch. I'm not sure what would
happen if it's make-before-break, other than lots of drain on your +5V
line. Perhaps the switch is break-before-make, but it's managing to
bounce between ground and +5V as it settles? Looking at the input to the
gate might be instructive.

Note that the 74xx02 is an inverting gate, and the circuit assumes a non-
inverting buffer.

--

Tim Wescott
Wescott Design Services
http://www.wescottdesign.com
 
On Mon, 22 Feb 2016 11:08:22 -0800, George Herold wrote:

On Monday, February 22, 2016 at 1:35:30 PM UTC-5, Tim Wescott wrote:
On Mon, 22 Feb 2016 09:47:40 -0800, George Herold wrote:

So this is from AoE3, pg 730. To switch debounce they just use a
buffer (or later an AND gate with the inputs tied together.) with
feedback from the output. I tired it (only on a piece of white
protoboard) and.....


So here is the transition from low to high
https://www.dropbox.com/s/mlzq33kl3xg9pko/DSCN9304.JPG?dl=0 (74HC08)

It's got this long time constant.. a few milli seconds... Basically
independent of the feedback R that I use.
From where does it come? The white proto-board?

On the falling edge I get this sometimes... which looks a bit close
to the edge.
https://www.dropbox.com/s/w12y0exyc6cnzwj/DSCN9305.JPG?dl=0

(I'm going to use an 74HC02 and some RC's so this is only curiosity.)

It's not from the white protoboard -- those add something like 5pF
between rows, which shouldn't phase a 74HC part much at all.

That circuit assumes a break-before-make switch. I'm not sure what
would happen if it's make-before-break, other than lots of drain on
your +5V line. Perhaps the switch is break-before-make, but it's
managing to bounce between ground and +5V as it settles? Looking at
the input to the gate might be instructive.

Hi Tim, Well the gate looks just like the output... the two are tied
together. This is a standard C&K toggle... I assume it's break before
make.

<snip>

The input and output are tied together through a resistor. The switch
should easily overcome that if it's turning on or off firmly. You should
NOT see the input tracking the output if the switch is working as
expected.

--

Tim Wescott
Wescott Design Services
http://www.wescottdesign.com
 
On Monday, February 22, 2016 at 2:53:52 PM UTC-5, Tim Wescott wrote:
On Mon, 22 Feb 2016 11:42:31 -0800, George Herold wrote:

On Monday, February 22, 2016 at 2:26:15 PM UTC-5, Tim Wescott wrote:
On Mon, 22 Feb 2016 11:08:22 -0800, George Herold wrote:

On Monday, February 22, 2016 at 1:35:30 PM UTC-5, Tim Wescott wrote:
On Mon, 22 Feb 2016 09:47:40 -0800, George Herold wrote:

So this is from AoE3, pg 730. To switch debounce they just use a
buffer (or later an AND gate with the inputs tied together.) with
feedback from the output. I tired it (only on a piece of white
protoboard) and.....


So here is the transition from low to high
https://www.dropbox.com/s/mlzq33kl3xg9pko/DSCN9304.JPG?dl=0
(74HC08)

It's got this long time constant.. a few milli seconds...
Basically independent of the feedback R that I use.
From where does it come? The white proto-board?

On the falling edge I get this sometimes... which looks a bit
close to the edge.
https://www.dropbox.com/s/w12y0exyc6cnzwj/DSCN9305.JPG?dl=0

(I'm going to use an 74HC02 and some RC's so this is only
curiosity.)

It's not from the white protoboard -- those add something like 5pF
between rows, which shouldn't phase a 74HC part much at all.

That circuit assumes a break-before-make switch. I'm not sure what
would happen if it's make-before-break, other than lots of drain on
your +5V line. Perhaps the switch is break-before-make, but it's
managing to bounce between ground and +5V as it settles? Looking at
the input to the gate might be instructive.

Hi Tim, Well the gate looks just like the output... the two are tied
together. This is a standard C&K toggle... I assume it's break
before make.

snip

The input and output are tied together through a resistor. The switch
should easily overcome that if it's turning on or off firmly. You
should NOT see the input tracking the output if the switch is working
as expected.

Oops... operator error. (the IC wasn't grounded... I had ground tied to
+5v!
only one slot away....)
I must have been getting ground through the input pins...

DAMN that Win Hill guy! How dare he design a circuit that won't stand up
to little boo-boos like that?

--
Yeah sorry about that. I make mistakes every day,
it's better not to do them in public... :^)

Now that it's wired right it does seem like a perfect deboune,
saving four R,C,D's. I guess the idea is that the switch
contact is bouncing off the terminal, but not all the
way to the other contact... so you are just debouncing the
difference between ground and open....

George H.




Tim Wescott
Wescott Design Services
http://www.wescottdesign.com
 
On Mon, 22 Feb 2016 11:42:31 -0800, George Herold wrote:

On Monday, February 22, 2016 at 2:26:15 PM UTC-5, Tim Wescott wrote:
On Mon, 22 Feb 2016 11:08:22 -0800, George Herold wrote:

On Monday, February 22, 2016 at 1:35:30 PM UTC-5, Tim Wescott wrote:
On Mon, 22 Feb 2016 09:47:40 -0800, George Herold wrote:

So this is from AoE3, pg 730. To switch debounce they just use a
buffer (or later an AND gate with the inputs tied together.) with
feedback from the output. I tired it (only on a piece of white
protoboard) and.....


So here is the transition from low to high
https://www.dropbox.com/s/mlzq33kl3xg9pko/DSCN9304.JPG?dl=0
(74HC08)

It's got this long time constant.. a few milli seconds...
Basically independent of the feedback R that I use.
From where does it come? The white proto-board?

On the falling edge I get this sometimes... which looks a bit
close to the edge.
https://www.dropbox.com/s/w12y0exyc6cnzwj/DSCN9305.JPG?dl=0

(I'm going to use an 74HC02 and some RC's so this is only
curiosity.)

It's not from the white protoboard -- those add something like 5pF
between rows, which shouldn't phase a 74HC part much at all.

That circuit assumes a break-before-make switch. I'm not sure what
would happen if it's make-before-break, other than lots of drain on
your +5V line. Perhaps the switch is break-before-make, but it's
managing to bounce between ground and +5V as it settles? Looking at
the input to the gate might be instructive.

Hi Tim, Well the gate looks just like the output... the two are tied
together. This is a standard C&K toggle... I assume it's break
before make.

snip

The input and output are tied together through a resistor. The switch
should easily overcome that if it's turning on or off firmly. You
should NOT see the input tracking the output if the switch is working
as expected.

Oops... operator error. (the IC wasn't grounded... I had ground tied to
+5v!
only one slot away....)
I must have been getting ground through the input pins...

DAMN that Win Hill guy! How dare he design a circuit that won't stand up
to little boo-boos like that?

--

Tim Wescott
Wescott Design Services
http://www.wescottdesign.com
 
On Mon, 22 Feb 2016 16:47:06 -0800, George Herold wrote:

On Monday, February 22, 2016 at 2:53:52 PM UTC-5, Tim Wescott wrote:
On Mon, 22 Feb 2016 11:42:31 -0800, George Herold wrote:

On Monday, February 22, 2016 at 2:26:15 PM UTC-5, Tim Wescott wrote:
On Mon, 22 Feb 2016 11:08:22 -0800, George Herold wrote:

On Monday, February 22, 2016 at 1:35:30 PM UTC-5, Tim Wescott
wrote:
On Mon, 22 Feb 2016 09:47:40 -0800, George Herold wrote:

So this is from AoE3, pg 730. To switch debounce they just use
a buffer (or later an AND gate with the inputs tied together.)
with feedback from the output. I tired it (only on a piece of
white protoboard) and.....


So here is the transition from low to high
https://www.dropbox.com/s/mlzq33kl3xg9pko/DSCN9304.JPG?dl=0
(74HC08)

It's got this long time constant.. a few milli seconds...
Basically independent of the feedback R that I use.
From where does it come? The white proto-board?

On the falling edge I get this sometimes... which looks a bit
close to the edge.
https://www.dropbox.com/s/w12y0exyc6cnzwj/DSCN9305.JPG?dl=0

(I'm going to use an 74HC02 and some RC's so this is only
curiosity.)

It's not from the white protoboard -- those add something like
5pF between rows, which shouldn't phase a 74HC part much at all.

That circuit assumes a break-before-make switch. I'm not sure
what would happen if it's make-before-break, other than lots of
drain on your +5V line. Perhaps the switch is break-before-make,
but it's managing to bounce between ground and +5V as it settles?
Looking at the input to the gate might be instructive.

Hi Tim, Well the gate looks just like the output... the two are
tied together. This is a standard C&K toggle... I assume it's
break before make.

snip

The input and output are tied together through a resistor. The
switch should easily overcome that if it's turning on or off firmly.
You should NOT see the input tracking the output if the switch is
working as expected.

Oops... operator error. (the IC wasn't grounded... I had ground tied
to +5v!
only one slot away....)
I must have been getting ground through the input pins...

DAMN that Win Hill guy! How dare he design a circuit that won't stand
up to little boo-boos like that?

--

Yeah sorry about that. I make mistakes every day,
it's better not to do them in public... :^)

Now that it's wired right it does seem like a perfect deboune, saving
four R,C,D's. I guess the idea is that the switch contact is bouncing
off the terminal, but not all the way to the other contact... so you are
just debouncing the difference between ground and open....

It's kinda better than that. As long as the input to the gate is high
impedance, the gate holds itself to the right value as firmly as the
resistor lets it. Once the switch makes contact, then the gate follows
the switch.

The downside is that you have to use a dual-throw switch. In a whole lot
of situations that'll add more expense than a few passive components --
particularly if you're feeding a microprocessor pin, in which case you
can almost always debounce in software.

--

Tim Wescott
Wescott Design Services
http://www.wescottdesign.com
 
On Monday, February 22, 2016 at 9:31:54 PM UTC-5, Tim Wescott wrote:
On Mon, 22 Feb 2016 16:47:06 -0800, George Herold wrote:

On Monday, February 22, 2016 at 2:53:52 PM UTC-5, Tim Wescott wrote:
On Mon, 22 Feb 2016 11:42:31 -0800, George Herold wrote:

On Monday, February 22, 2016 at 2:26:15 PM UTC-5, Tim Wescott wrote:
On Mon, 22 Feb 2016 11:08:22 -0800, George Herold wrote:

On Monday, February 22, 2016 at 1:35:30 PM UTC-5, Tim Wescott
wrote:
On Mon, 22 Feb 2016 09:47:40 -0800, George Herold wrote:

So this is from AoE3, pg 730. To switch debounce they just use
a buffer (or later an AND gate with the inputs tied together.)
with feedback from the output. I tired it (only on a piece of
white protoboard) and.....


So here is the transition from low to high
https://www.dropbox.com/s/mlzq33kl3xg9pko/DSCN9304.JPG?dl=0
(74HC08)

It's got this long time constant.. a few milli seconds...
Basically independent of the feedback R that I use.
From where does it come? The white proto-board?

On the falling edge I get this sometimes... which looks a bit
close to the edge.
https://www.dropbox.com/s/w12y0exyc6cnzwj/DSCN9305.JPG?dl=0

(I'm going to use an 74HC02 and some RC's so this is only
curiosity.)

It's not from the white protoboard -- those add something like
5pF between rows, which shouldn't phase a 74HC part much at all.

That circuit assumes a break-before-make switch. I'm not sure
what would happen if it's make-before-break, other than lots of
drain on your +5V line. Perhaps the switch is break-before-make,
but it's managing to bounce between ground and +5V as it settles?
Looking at the input to the gate might be instructive.

Hi Tim, Well the gate looks just like the output... the two are
tied together. This is a standard C&K toggle... I assume it's
break before make.

snip

The input and output are tied together through a resistor. The
switch should easily overcome that if it's turning on or off firmly.
You should NOT see the input tracking the output if the switch is
working as expected.

Oops... operator error. (the IC wasn't grounded... I had ground tied
to +5v!
only one slot away....)
I must have been getting ground through the input pins...

DAMN that Win Hill guy! How dare he design a circuit that won't stand
up to little boo-boos like that?

--

Yeah sorry about that. I make mistakes every day,
it's better not to do them in public... :^)

Now that it's wired right it does seem like a perfect deboune, saving
four R,C,D's. I guess the idea is that the switch contact is bouncing
off the terminal, but not all the way to the other contact... so you are
just debouncing the difference between ground and open....

It's kinda better than that. As long as the input to the gate is high
impedance, the gate holds itself to the right value as firmly as the
resistor lets it. Once the switch makes contact, then the gate follows
the switch.

The downside is that you have to use a dual-throw switch. In a whole lot
of situations that'll add more expense than a few passive components --
particularly if you're feeding a microprocessor pin, in which case you
can almost always debounce in software.
Yeah, no uC. I was thinking I could do it with a SPST and some R's...
but then I'd also need a C to hold the gate charge.. and I'm back where
I started.... Oh well.

George H.
--

Tim Wescott
Wescott Design Services
http://www.wescottdesign.com
 
On Mon, 22 Feb 2016 09:47:40 -0800 (PST), George Herold
<gherold@teachspin.com> wrote:

So this is from AoE3, pg 730. To switch debounce they just use a buffer
(or later an AND gate with the inputs tied together.) with feedback from the
output. I tired it (only on a piece of white protoboard) and.....


So here is the transition from low to high
https://www.dropbox.com/s/mlzq33kl3xg9pko/DSCN9304.JPG?dl=0
(74HC08)

It's got this long time constant.. a few milli seconds... Basically
independent of the feedback R that I use.
From where does it come? The white proto-board?

On the falling edge I get this sometimes... which looks a bit close
to the edge.
https://www.dropbox.com/s/w12y0exyc6cnzwj/DSCN9305.JPG?dl=0

(I'm going to use an 74HC02 and some RC's so this is only
curiosity.)

George H.

It's acting as if the resistor is not connected.


--

John Larkin Highland Technology, Inc

lunatic fringe electronics
 
On 2/23/2016 9:17 PM, amdx wrote:
On 2/23/2016 8:11 PM, amdx wrote:
Debounce it with an SCR.
Hint: series cathode capacitor.



Found the drawing.
http://s395.photobucket.com/user/Qmavam/media/Debouncejpg.jpg.html

Since this is s.e.BASICS, I think that I can ask this naive question
without being humiliated <G>:

What is the purpose of the 1k, 270R, & .047uf in the gate circuit?

Thanks,
Bob
 
On Wed, 24 Feb 2016 17:12:17 -0500, Bob Engelhardt wrote:

On 2/23/2016 9:17 PM, amdx wrote:
On 2/23/2016 8:11 PM, amdx wrote:
Debounce it with an SCR.
Hint: series cathode capacitor.



Found the drawing.
http://s395.photobucket.com/user/Qmavam/media/Debouncejpg.jpg.html

Since this is s.e.BASICS, I think that I can ask this naive question
without being humiliated <G>:

What is the purpose of the 1k, 270R, & .047uf in the gate circuit?

Thanks,
Bob

The two R's limit the voltage on the gate (probably to aid turn-off),
while the cap slows things down (probably to aid debounce).

I don't think I like the circuit, personally (I don't like the tail on
the turn-off), but it might be good for a "useful things to do with an
SCR" contest.

--

Tim Wescott
Wescott Design Services
http://www.wescottdesign.com
 
On 2/24/2016 4:17 PM, Tim Wescott wrote:
On Wed, 24 Feb 2016 17:12:17 -0500, Bob Engelhardt wrote:

On 2/23/2016 9:17 PM, amdx wrote:
On 2/23/2016 8:11 PM, amdx wrote:
Debounce it with an SCR.
Hint: series cathode capacitor.



Found the drawing.
http://s395.photobucket.com/user/Qmavam/media/Debouncejpg.jpg.html

Since this is s.e.BASICS, I think that I can ask this naive question
without being humiliated <G>:

What is the purpose of the 1k, 270R, & .047uf in the gate circuit?

Thanks,
Bob

The two R's limit the voltage on the gate (probably to aid turn-off),
while the cap slows things down (probably to aid debounce).

I don't think I like the circuit, personally (I don't like the tail on
the turn-off), but it might be good for a "useful things to do with an
SCR" contest.

The 0.047uf cap and 240 ohm to ground were to prevent false
triggering, it was used in a noisy environment. The 1k is pullup
resistor to fire the SCR when the button is pushed.
The 120 ohm is current limit, the cap on the cathode charges up and
when the current is to small the SCR opens, then the 39k discharges the
cap. The circuit served it's purpose, but timing was not critical, turn
it on and it was on for an hour or four, then turn it off.

Mikek
 
On Mon, 22 Feb 2016 09:47:40 -0800 (PST), George Herold
<gherold@teachspin.com> wrote:

So this is from AoE3, pg 730. To switch debounce they just use a buffer
(or later an AND gate with the inputs tied together.) with feedback from the
output. I tired it (only on a piece of white protoboard) and.....


So here is the transition from low to high
https://www.dropbox.com/s/mlzq33kl3xg9pko/DSCN9304.JPG?dl=0
(74HC08)

It's got this long time constant.. a few milli seconds... Basically
independent of the feedback R that I use.
From where does it come? The white proto-board?

On the falling edge I get this sometimes... which looks a bit close
to the edge.
https://www.dropbox.com/s/w12y0exyc6cnzwj/DSCN9305.JPG?dl=0

(I'm going to use an 74HC02 and some RC's so this is only
curiosity.)

George H.

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
--
| 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.
 

Welcome to EDABoard.com

Sponsor

Back
Top