Forums

Protecting a CMOS gate input

Started by Pimpom May 15, 2020
I'm going to use a CMOS bistable chip (not a uP) that's to be 
manually triggered from time to time by a mechanical switch. It 
has a debouncing circuit but since the switch is to be connected 
by a removable jack-and-cable set and operated by non-techno 
savvy users, I thought I'd include a few extra components as a 
precaution.

The input will have a series resistor followed by a capacitor to 
ground and schottky diodes to Vdd and Vss. Do you think any of 
this is superfluous since the chip already has similar protection 
built-in?
On Friday, May 15, 2020 at 6:54:08 AM UTC-4, Pimpom wrote:
> I'm going to use a CMOS bistable chip (not a uP) that's to be > manually triggered from time to time by a mechanical switch. It > has a debouncing circuit but since the switch is to be connected > by a removable jack-and-cable set and operated by non-techno > savvy users, I thought I'd include a few extra components as a > precaution. > > The input will have a series resistor followed by a capacitor to > ground and schottky diodes to Vdd and Vss. Do you think any of > this is superfluous since the chip already has similar protection > built-in?
If you are connecting this to the external world nothing is superfluous. You might add a front end bipolar transistor, a zener diode or TVS or maybe even a gas discharge tube depending on the environment. I'm curious about what a "CMOS bistable chip" is exactly. I assume you are not talking about an SR FF? If so, you don't really need debouncing. Why use CMOS rather than something more static resistant like relays or fluidics? -- Rick C. - Get 1,000 miles of free Supercharging - Tesla referral code - https://ts.la/richard11209
Not sure I know what a bistable chip is, but I often use optocouplers when connecting microcontroller port pins to the outside world.  Of course, that approach limits you to one-way in or out of the chip.  (And the de-bounce can usually be done in software.)

On 5/15/2020 4:37 PM, Ricky C wrote:
> On Friday, May 15, 2020 at 6:54:08 AM UTC-4, Pimpom wrote: >> I'm going to use a CMOS bistable chip (not a uP) that's to be >> manually triggered from time to time by a mechanical switch. It >> has a debouncing circuit but since the switch is to be connected >> by a removable jack-and-cable set and operated by non-techno >> savvy users, I thought I'd include a few extra components as a >> precaution. >> >> The input will have a series resistor followed by a capacitor to >> ground and schottky diodes to Vdd and Vss. Do you think any of >> this is superfluous since the chip already has similar protection >> built-in? > > If you are connecting this to the external world nothing is superfluous. You might add a front end bipolar transistor, a zener diode or TVS or maybe even a gas discharge tube depending on the environment. > > I'm curious about what a "CMOS bistable chip" is exactly. I assume you are not talking about an SR FF? If so, you don't really need debouncing. Why use CMOS rather than something more static resistant like relays or fluidics? >
It's a good old 4013. I used one in a similar sub-circuit years ago but in a completely different product. I used a BJT front end which also served as an inverter. The present design works correctly without inversion so I thought I'd do away with the BJT. I did consider using a relay but it would take up too much PCB real estate. I have a very limited choice of relay types I can get. Same with the external switch. I can use only an SPST type, so an S-R FF is out.
On Friday, May 15, 2020 at 7:35:54 AM UTC-4, Pimpom wrote:
> On 5/15/2020 4:37 PM, Ricky C wrote: > > On Friday, May 15, 2020 at 6:54:08 AM UTC-4, Pimpom wrote: > >> I'm going to use a CMOS bistable chip (not a uP) that's to be > >> manually triggered from time to time by a mechanical switch. It > >> has a debouncing circuit but since the switch is to be connected > >> by a removable jack-and-cable set and operated by non-techno > >> savvy users, I thought I'd include a few extra components as a > >> precaution. > >> > >> The input will have a series resistor followed by a capacitor to > >> ground and schottky diodes to Vdd and Vss. Do you think any of > >> this is superfluous since the chip already has similar protection > >> built-in? > > > > If you are connecting this to the external world nothing is superfluous. You might add a front end bipolar transistor, a zener diode or TVS or maybe even a gas discharge tube depending on the environment. > > > > I'm curious about what a "CMOS bistable chip" is exactly. I assume you are not talking about an SR FF? If so, you don't really need debouncing. Why use CMOS rather than something more static resistant like relays or fluidics? > > > > It's a good old 4013. I used one in a similar sub-circuit years > ago but in a completely different product. I used a BJT front end > which also served as an inverter. The present design works > correctly without inversion so I thought I'd do away with the BJT. > > I did consider using a relay but it would take up too much PCB > real estate. I have a very limited choice of relay types I can > get. Same with the external switch. I can use only an SPST type, > so an S-R FF is out.
Huh? Is the FF only to debounce your PB? What puts your CMOS chip in the other state? I'm not following what you are doing at all. I was thinking the PB would connect to one input of the SR and the other input would be the input that resets it. I wasn't really serious about the relay. But CMOS is likely your worse choice for connecting to the outside world. There are plenty of TTL FFs out there. -- Rick C. + Get 1,000 miles of free Supercharging + Tesla referral code - https://ts.la/richard11209
On 5/15/2020 5:20 PM, Ricky C wrote:
> On Friday, May 15, 2020 at 7:35:54 AM UTC-4, Pimpom wrote: >> On 5/15/2020 4:37 PM, Ricky C wrote: >>> On Friday, May 15, 2020 at 6:54:08 AM UTC-4, Pimpom wrote: >>>> I'm going to use a CMOS bistable chip (not a uP) that's to be >>>> manually triggered from time to time by a mechanical switch. It >>>> has a debouncing circuit but since the switch is to be connected >>>> by a removable jack-and-cable set and operated by non-techno >>>> savvy users, I thought I'd include a few extra components as a >>>> precaution. >>>> >>>> The input will have a series resistor followed by a capacitor to >>>> ground and schottky diodes to Vdd and Vss. Do you think any of >>>> this is superfluous since the chip already has similar protection >>>> built-in? >>> >>> If you are connecting this to the external world nothing is superfluous. You might add a front end bipolar transistor, a zener diode or TVS or maybe even a gas discharge tube depending on the environment. >>> >>> I'm curious about what a "CMOS bistable chip" is exactly. I assume you are not talking about an SR FF? If so, you don't really need debouncing. Why use CMOS rather than something more static resistant like relays or fluidics? >>> >> >> It's a good old 4013. I used one in a similar sub-circuit years >> ago but in a completely different product. I used a BJT front end >> which also served as an inverter. The present design works >> correctly without inversion so I thought I'd do away with the BJT. >> >> I did consider using a relay but it would take up too much PCB >> real estate. I have a very limited choice of relay types I can >> get. Same with the external switch. I can use only an SPST type, >> so an S-R FF is out. > > Huh? Is the FF only to debounce your PB? What puts your CMOS chip in the other state? I'm not following what you are doing at all. I was thinking the PB would connect to one input of the SR and the other input would be the input that resets it. > > I wasn't really serious about the relay. But CMOS is likely your worse choice for connecting to the outside world. There are plenty of TTL FFs out there. >
The FF switches two other sub-circuits alternately on and off. The external switch triggers the FF. The debouncing is done in the FF itself (although that may not be needed with the series resistor and cap at the input). Is that clearer?
On Friday, May 15, 2020 at 8:02:16 AM UTC-4, Pimpom wrote:
> On 5/15/2020 5:20 PM, Ricky C wrote: > > On Friday, May 15, 2020 at 7:35:54 AM UTC-4, Pimpom wrote: > >> On 5/15/2020 4:37 PM, Ricky C wrote: > >>> On Friday, May 15, 2020 at 6:54:08 AM UTC-4, Pimpom wrote: > >>>> I'm going to use a CMOS bistable chip (not a uP) that's to be > >>>> manually triggered from time to time by a mechanical switch. It > >>>> has a debouncing circuit but since the switch is to be connected > >>>> by a removable jack-and-cable set and operated by non-techno > >>>> savvy users, I thought I'd include a few extra components as a > >>>> precaution. > >>>> > >>>> The input will have a series resistor followed by a capacitor to > >>>> ground and schottky diodes to Vdd and Vss. Do you think any of > >>>> this is superfluous since the chip already has similar protection > >>>> built-in? > >>> > >>> If you are connecting this to the external world nothing is superfluous. You might add a front end bipolar transistor, a zener diode or TVS or maybe even a gas discharge tube depending on the environment. > >>> > >>> I'm curious about what a "CMOS bistable chip" is exactly. I assume you are not talking about an SR FF? If so, you don't really need debouncing. Why use CMOS rather than something more static resistant like relays or fluidics? > >>> > >> > >> It's a good old 4013. I used one in a similar sub-circuit years > >> ago but in a completely different product. I used a BJT front end > >> which also served as an inverter. The present design works > >> correctly without inversion so I thought I'd do away with the BJT. > >> > >> I did consider using a relay but it would take up too much PCB > >> real estate. I have a very limited choice of relay types I can > >> get. Same with the external switch. I can use only an SPST type, > >> so an S-R FF is out. > > > > Huh? Is the FF only to debounce your PB? What puts your CMOS chip in the other state? I'm not following what you are doing at all. I was thinking the PB would connect to one input of the SR and the other input would be the input that resets it. > > > > I wasn't really serious about the relay. But CMOS is likely your worse choice for connecting to the outside world. There are plenty of TTL FFs out there. > > > > The FF switches two other sub-circuits alternately on and off. > The external switch triggers the FF. The debouncing is done in > the FF itself (although that may not be needed with the series > resistor and cap at the input). Is that clearer?
Not really. Does the switch both set and reset the FF? If so you must be using it on the clk input which means the input does need to be debounced, but the FF can't do that. What pin of the FF is the switch connected to? What is on the other two or three inputs? BTW, if you are using an RC to drive the clock input, you can get multiple triggers from any noise in the circuit as the RC will be rising very slowly. If you are using the clock input with the switch, I suggest you debounce it with the RC and a Schmitt trigger buffer. There are some inexpensive reset devices that will do the debouncing for you without an RC. They will accept an input and apply a delay after release. They are designed as reset devices for MCUs. Essentially they act as retriggerable one shots. Or you could use a 555 timer if you like lots of passives. I think they use five minimum. -- Rick C. -- Get 1,000 miles of free Supercharging -- Tesla referral code - https://ts.la/richard11209
On 5/15/2020 5:54 PM, Ricky C wrote:
> On Friday, May 15, 2020 at 8:02:16 AM UTC-4, Pimpom wrote: >> On 5/15/2020 5:20 PM, Ricky C wrote: >>> On Friday, May 15, 2020 at 7:35:54 AM UTC-4, Pimpom wrote: >>>> On 5/15/2020 4:37 PM, Ricky C wrote: >>>>> On Friday, May 15, 2020 at 6:54:08 AM UTC-4, Pimpom wrote: >>>>>> I'm going to use a CMOS bistable chip (not a uP) that's to be >>>>>> manually triggered from time to time by a mechanical switch. It >>>>>> has a debouncing circuit but since the switch is to be connected >>>>>> by a removable jack-and-cable set and operated by non-techno >>>>>> savvy users, I thought I'd include a few extra components as a >>>>>> precaution. >>>>>> >>>>>> The input will have a series resistor followed by a capacitor to >>>>>> ground and schottky diodes to Vdd and Vss. Do you think any of >>>>>> this is superfluous since the chip already has similar protection >>>>>> built-in? >>>>> >>>>> If you are connecting this to the external world nothing is superfluous. You might add a front end bipolar transistor, a zener diode or TVS or maybe even a gas discharge tube depending on the environment. >>>>> >>>>> I'm curious about what a "CMOS bistable chip" is exactly. I assume you are not talking about an SR FF? If so, you don't really need debouncing. Why use CMOS rather than something more static resistant like relays or fluidics? >>>>> >>>> >>>> It's a good old 4013. I used one in a similar sub-circuit years >>>> ago but in a completely different product. I used a BJT front end >>>> which also served as an inverter. The present design works >>>> correctly without inversion so I thought I'd do away with the BJT. >>>> >>>> I did consider using a relay but it would take up too much PCB >>>> real estate. I have a very limited choice of relay types I can >>>> get. Same with the external switch. I can use only an SPST type, >>>> so an S-R FF is out. >>> >>> Huh? Is the FF only to debounce your PB? What puts your CMOS chip in the other state? I'm not following what you are doing at all. I was thinking the PB would connect to one input of the SR and the other input would be the input that resets it. >>> >>> I wasn't really serious about the relay. But CMOS is likely your worse choice for connecting to the outside world. There are plenty of TTL FFs out there. >>> >> >> The FF switches two other sub-circuits alternately on and off. >> The external switch triggers the FF. The debouncing is done in >> the FF itself (although that may not be needed with the series >> resistor and cap at the input). Is that clearer? > > Not really. Does the switch both set and reset the FF? If so you must be using it on the clk input which means the input does need to be debounced, but the FF can't do that. > > What pin of the FF is the switch connected to? What is on the other two or three inputs? > > BTW, if you are using an RC to drive the clock input, you can get multiple triggers from any noise in the circuit as the RC will be rising very slowly. > > If you are using the clock input with the switch, I suggest you debounce it with the RC and a Schmitt trigger buffer. There are some inexpensive reset devices that will do the debouncing for you without an RC. They will accept an input and apply a delay after release. They are designed as reset devices for MCUs. Essentially they act as retriggerable one shots. Or you could use a 555 timer if you like lots of passives. I think they use five minimum. >
Debouncing is not an issue. And the 4013 FF *can* debounce itself with a single R-C combination. The technique is well known and I've used it a number of times.
On 15/05/2020 11:53, Pimpom wrote:
> I'm going to use a CMOS bistable chip (not a uP) that's to be manually > triggered from time to time by a mechanical switch. It has a debouncing > circuit but since the switch is to be connected by a removable > jack-and-cable set and operated by non-techno savvy users, I thought I'd > include a few extra components as a precaution. > > The input will have a series resistor followed by a capacitor to ground > and schottky diodes to Vdd and Vss. Do you think any of this is > superfluous since the chip already has similar protection built-in?
The schottky diodes may well be superfluous depending on the value of series resistance. If R is high enough to keep highest expected surge voltage well below input ESD diode latch-up trigger current. The parallel C has to be large enough to limit rise time to least many ns for the diodes to begin forward conduction. Since the input is from a push button and the input is not edge rate critical you can afford to massively overdo the series R and shunt C. You haven't mentioned having a pullup or pull down resistor, generally pushbutton contacts need at least 100uA "wetting" current to ensure reliable operation. piglet
On Friday, 15 May 2020 14:26:16 UTC+1, piglet  wrote:
> On 15/05/2020 11:53, Pimpom wrote: > > I'm going to use a CMOS bistable chip (not a uP) that's to be manually > > triggered from time to time by a mechanical switch. It has a debouncing > > circuit but since the switch is to be connected by a removable > > jack-and-cable set and operated by non-techno savvy users, I thought I'd > > include a few extra components as a precaution. > > > > The input will have a series resistor followed by a capacitor to ground > > and schottky diodes to Vdd and Vss. Do you think any of this is > > superfluous since the chip already has similar protection built-in? > > The schottky diodes may well be superfluous depending on the value of > series resistance. If R is high enough to keep highest expected surge > voltage well below input ESD diode latch-up trigger current. The > parallel C has to be large enough to limit rise time to least many ns > for the diodes to begin forward conduction. Since the input is from a > push button and the input is not edge rate critical you can afford to > massively overdo the series R and shunt C. You haven't mentioned having > a pullup or pull down resistor, generally pushbutton contacts need at > least 100uA "wetting" current to ensure reliable operation. > > piglet
If you prefer to avoid schottky diodes then BAV99 or BAV99W dual silicon diodes work well in this sort of application (with some resistance between the diodes and the gate input as well as the input series resistor before the diodes. John