Protecting a CMOS gate input

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?

Reply to
Pimpom
Loading thread data ...

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 
 Click to see the full signature
Reply to
Ricky C

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

Reply to
mpm

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.

Reply to
Pimpom

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 
 Click to see the full signature
Reply to
Ricky C

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?

Reply to
Pimpom

us. You might add a front end bipolar transistor, a zener diode or TVS or maybe even a gas discharge tube depending on the environment.

ou 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?

the other state? I'm not following what you are doing at all. I was think ing the PB would connect to one input of the SR and the other input would b e the input that resets it.

choice for connecting to the outside world. There are plenty of TTL FFs o ut there.

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 rese t devices that will do the debouncing for you without an RC. They will acc ept an input and apply a delay after release. They are designed as reset d evices 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 
 Click to see the full signature
Reply to
Ricky C

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.

Reply to
Pimpom

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

Reply to
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

Reply to
jrwalliker

If you expect/experience static discharges, the network might avoid failures. Best to not expose any semiconductor the the outside world.

If you expect ESD zaps to change the state of a cross-coupled gate flop, put a cap on one output to ground.

--
John Larkin         Highland Technology, Inc 

Science teaches us to doubt. 
 Click to see the full signature
Reply to
jlarkin

uous. You might add a front end bipolar transistor, a zener diode or TVS o r maybe even a gas discharge tube depending on the environment.

you are not talking about an SR FF? If so, you don't really need debounci ng. Why use CMOS rather than something more static resistant like relays o r fluidics?

n the other state? I'm not following what you are doing at all. I was thi nking the PB would connect to one input of the SR and the other input would be the input that resets it.

se choice for connecting to the outside world. There are plenty of TTL FFs out there.

be using it on the clk input which means the input does need to be debounc ed, but the FF can't do that.

o or three inputs?

ple triggers from any noise in the circuit as the RC will be rising very sl owly.

e 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 res et 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 f ive minimum.

Care to share how the circuit works? I'm not familiar with any non-Schmitt trigger clock input being able to "debounce" itself. That's why I asked w hat your circuit is. I think it is pretty obvious at this point I'm not on the same page as you.

--
  Rick C. 

  -+ Get 1,000 miles of free Supercharging 
 Click to see the full signature
Reply to
Ricky C

Little resistors can arc over, given a good ESD zap.

Some connectors are a lot better than others, in that they connect ground first.

--
John Larkin         Highland Technology, Inc 

Science teaches us to doubt. 
 Click to see the full signature
Reply to
jlarkin

Yup. 1 uF will turn a 20 kV HBM spark into 2 volts. I use that approach with diode lasers quite a lot.

Cheers

Phil Hobbs

--
Dr Philip C D Hobbs 
Principal Consultant 
 Click to see the full signature
Reply to
Phil Hobbs

Okay, here it is - somewhat simplified and slightly different from my actual circuit, but not in any way that changes the operating principles:

formatting link

C2 & R3 do the debouncing, C1 & R2 set the initial state of the flip-flop.

Reply to
Pimpom

g

'd

d

Yes, but he is talking about plugging in a cable with who knows what potent ial on it. It can be a lot more capacitance than the HBM. The HBM and oth er models are intended to be approximations to some set of conditions that may or may not represent actual conditions of any given use case. If I am not mistaken, the HBM spark is just that, a spark where much of the energy is dissipated into the spark rather than the equipment... or do I have it w rong? The surge from the actual contact with a conductor may well deliver a lot more energy than the HBM.

It has been a while since I worked with this stuff but I seem to recall the peak voltage, peak current and peak power were not all related directly si nce the load responds in a non-linear way. The bottom line is an ounce of prevention is worth a pound of "oh, crap!" I'd rather overdesign than unde r design protection.

I think I would use a series resistor, a Zener diode and a capacitor, possi bly on a separate board or at least an isolated ground region, to prevent g round current surges from disrupting the operation of the circuit. I also would not use a CMOS device as the first active device. Even with their bu ilt in protection they are too easily damaged. Running from one board to a nother in the same cabinet is one thing. From something on the other end o f an external cable is another.

--
  Rick C. 

  ++ Get 1,000 miles of free Supercharging 
 Click to see the full signature
Reply to
Ricky C

Here's some data: Vdd is 12V. Series R is tentatively 10k with a parallel R of 100k which is also the pull-down resistor. Parallel C to be decided.

Reply to
Pimpom

0

I haven't seen that circuit before. It's a good one. I would suggest a co uple of things if you are interested. I don't know the environment this is going in and I don't know anything about the cable, but in general such an external cable can be a source of noise. So I would not reference the swi tch to Vcc. I would use ground. Since you are using a mechanical switch t here *will* be bounces, so the polarity of the clock won't matter. If you are concerned it may be connected to something that doesn't bounce you can find negative edge D FFs although I only know of one, a 74xx72.

Using ground as your connection point will provide less noise and better pr otection. While Vcc is good for higher frequency decoupling, that is only because of the decoupling added to the board. I don't know if this will be significant in your design or not.

I would definitely use a Zener diode and cap with a high value series resis tor.

The world is an ugly place when you are a semiconductor.

--
  Rick C. 

  --- Get 1,000 miles of free Supercharging 
 Click to see the full signature
Reply to
Ricky C

Perhaps I altered the circuit a bit too much in the drawing in an attempt for clarity. As mentioned earlier, my previous uses of the technique usually had a BJT front end which served as both a protective buffer and an inverter. The switch acted between the BJT base and ground.

This one is different in that Vdd is ground and Vss is -12V so that the pull-up is actually to ground. This makes it convenient to connect the switch between the FF input and ground. The cable will be a shielded one.

Your suggestion for input protection is noted and appreciated.

Reply to
Pimpom

=0

a couple of things if you are interested. I don't know the environment thi s is going in and I don't know anything about the cable, but in general suc h an external cable can be a source of noise. So I would not reference the switch to Vcc. I would use ground. Since you are using a mechanical swit ch there *will* be bounces, so the polarity of the clock won't matter. If you are concerned it may be connected to something that doesn't bounce you can find negative edge D FFs although I only know of one, a 74xx72.

r protection. While Vcc is good for higher frequency decoupling, that is o nly because of the decoupling added to the board. I don't know if this wil l be significant in your design or not.

esistor.

OK, if the input is ground referenced that's great. The BJT front end will also be very good or at least better than directly connecting to CMOS.

I know I've had bad experiences with inputs from arbitrary sources. A boar d I'm building now receives a similar input from a push to talk mic button. It goes into an RS-422 receiver through a 4.7K resistor and has all manne r of self protection built into the chip. It is specifically designed for connection to cables. This board goes in a rack of equipment and I literal ly have no idea where the signal comes from. Never had a board returned fo r a bad part. I did have a handful of bad connectors once though. Connect ors... ptooey!

--
  Rick C. 

  --+ Get 1,000 miles of free Supercharging 
 Click to see the full signature
Reply to
Ricky C

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.