Re: switch debouncing



On Mon, 17 Oct 2005 16:56:39 -0700, Mark wrote:

>
> Spehro Pefhany wrote:
>> On Mon, 17 Oct 2005 14:26:30 GMT, the renowned Fred Bloggs
>> <nospam@xxxxxxxxxx> wrote:
>> >>
>> >>
>> >> If it's going into a microcontroller, firmware is almost always the
>> >> best way.
>> >>
>> >>
>> >> Best regards,
>> >> Spehro Pefhany
>> >
>> >Well, if you can arrange things with external hardware so that the
>> >switch input is always valid, that is just that much less the firmware
>> >has to do- especially if the switch input is a very infrequent occurrence.
>>
>> Timer-interrupt driven periodic (in the 100-500Hz range) polling uses
>> negligible bandwidth of a modern processor for any reasonable number
>> of keys. Even if its a frequent occurence. And it can filter out
>> electrical noise and momentary contact breaks due to shock or
>> vibaration as well, if you choose to write it to do so.
>>
>> There is reason to add some external hardware (especially to deal with
>> ESD issues and possibly with the miserably small and variable current
>> that on-board pullups typically deliver) but not for the deboucing.
>> Even a crummy on-board RC clock will yield debouncing times accurate
>> within a few percent at zero additional cost, and les need to test the
>> board for missing parts.
>>
>>
>
>
> ESD protection is a good point... you may also want to put a 1uF cap
> directly across the switch to keep the contacts clean, making a small
> spark...I have a MD player where the switches are all dry contacts i.e.
> very low current, and they are a problem...
>
> Mark

I am not going to put a 1uF cap directly across the switch. That seems
like an exceptionally bad idea to me.

ESD is NOT my thing, but the ESD spike in this case will have to charge
(or discharge) a 1 uF cap through an 18k resistor in order to endanger the
gate. The path to VCC is even more difficult since there is an 82k
resistor there. I am assuming that the 18k will give the protection diodes
on the gate a fighting chance, I guess.

Also, the switch is designed so that the discharge will almost certainly
be to ground, not to the switch contacts.

--Mac

.



Relevant Pages

  • Re: Can I do this with a uProcessor?
    ... Spehro Pefhany wrote: ... > Any kind of ESD through the switch that that doesn't get shunted ... > to ground can cause a CMOS processor to latch up, ... Most of the stuff you do to make the micro immune to RF and ESD also ...
    (sci.electronics.design)
  • Re: Lets talk about input protection against ESD (human body).
    ... The regulator is stable given the loading vs. capacitance used on its ... But when the switch is open you'll see 7mA or so flowing at ... not Freescale. ... Could fry on ESD." ...
    (sci.electronics.design)
  • Re: Can I do this with a uProcessor?
    ... There's no practical path for ESD between say a TACT type switch with its mounded on keytop ... The keytop is located in an aperture in a grounded steel panel. ...
    (sci.electronics.design)
  • Re: Can I do this with a uProcessor?
    ... Spehro Pefhany wrote: ... > Any kind of ESD through the switch that that doesn't get shunted ... 2N2222 inverter between the chip and the outside world. ...
    (sci.electronics.design)
  • Re: 66 Princeton Reverb
    ... all is about the ground switch/death cap. ... on-off-on switch. ... wire gets its own lug and bolt to the chassis, ... Under no circumstances should the amp be powered up without a load on the ...
    (alt.guitar.amps)