Re: slightly off-topic: switch de-bouncing

From: Marc Alexander <marc_at_wolfems.com.au>
Date: Mon Sep 03 2001 - 23:32:05 EDT

> on 03 09 01 18.03, Marc Alexander at marc@wolfems.com.au wrote:
> > There's something up with this, the LS02 is actually a NOR gate, and
> > the LS04 is an inverter. I guess the IC's are labeled backwards?
> >
> Sorry, the inverters are an LS04, and the gate is an AND (LS08).

Ahh. ok. I saw you mentioned this also Rodger, sorry I didn't see it the
first time!

> > You definitely want to change the inverter to an LS14, which is a
> > 'Schmitt trigger' input, it has hysteresis on the input.
> > Meaning that if the output is low, it will take eg. <1V to make it go high,
> > and if the output is high, it will take eg. >3V to make it go low.
> > This dead band gives excellent noise rejection as the input needs
> > to move eg. 2V for the output to change.
> > I've used 1V and 3V as examples, the data sheet for the IC has exact values.
>
> Okay. I replaced the LS04 inverter with an LS14. The results are a little
> better, but not much different.
>
> > As Rodger said, 1uF or maybe more is good for the caps also.
> I'm about to replace the caps, but I don't know how to read the -)|- symbol.
> Which side of the cap should I tie to ground? The existing caps (.1µf) are
> not polarized.

Your caps have a -)|- symbol but no '-' or '+' on them? weird...
The | part of the symbol is generally positive, changes are on the diagram below.

10uF may not hurt either if 1uF is not enough. If you end up sticking big caps
on it, be wary of the load on the 1K and 220R resistors, they may need to be 1/2 Watt.

You could also increase the 1K resistors to 4K7 for example, but that is
 a secondary option to the cap changes as it makes the circuit a little less
 noise immune.

Revised function description:
No buttons pressed, output low
One button pressed, output low
Both buttons pressed, output high for as long as both are pressed

> I'm relying on the data book's statement that the counter only reads a
> rising edge. Right now, the counter pulses on button press *and* release. I
> think that's because of bounce. Hopefully, once the bounce is gone, the
> double triggering will be gone, too.

What counter is this?

> corrected diagram:
> >>> +5v
> >>>
> >>> | |
> >>> \ \
> >>> / / 1K
> >>> \ \
> >>> / / LS14
> >>> | | 220 Ohm (Schmitt triggers) ____
> >>> Start 1 []------+-----/\/\/\/--+--------|>o-------| \
> >>> | | |LS08|-- output
> >>> Start 2 []---------+--/\/\/\/------+----|>o-------|___/
> >>> +| |+ (AND)
> >>> --- ---1µF or greater
> >>> /-\ /-\
> >>> | |
> >>> === ===
> >>> = =
> >>>

Marc

---------------------------------------------------------------------------
** To UNSUBSCRIBE from vectorlist, send a message with "UNSUBSCRIBE" in the
** message body to vectorlist-request@synthcom.com. Please direct other
** questions, comments, or problems to neil@synthcom.com.
Received on Mon Sep 3 20:35:31 2001

This archive was generated by hypermail 2.1.8 : Fri Aug 01 2003 - 00:33:41 EDT