Input protection question - Page 1
Forum section: electronics / projects

author: arclight
author_rank: Contributor
timestamp: June 25, 2012, 11:32:57 pm
content: Hi all,I'm a long-time listener, first-time caller. Anyway, I'm working on a new rev of my open-source access control/security system. My previous board used opto-isolators for the alarm sensor (5V loop of normally-closed switches on the sensors) and the door reader inputs.Unfortunately, I realized that the Wiegand26 protocol that the readers use can generate pulses that were too fast for the opto-isolators to handle, unless I cranked the current way up. So I'm now trying to decide between using a TVS diode that shorts over-currents or negative voltages to ground, and a rail-to-rail set of Schottky diodes, such as the BAT54S SMT part.Looking at the spec sheets, it appears that most TVS diodes with a 5V stand-off rating don't clamp until 6-6.8V. Is this standard? The Atmega168/328 parts I'm using are supposed to have some ESD protection, but I'm not sure what sort of current they'll sink.Any suggestions? Here is a link to my project page:http://code.google.com/p/open-access-control/Cheers,Arclight

author: Baliszoft
author_rank: Frequent Contributor
timestamp: June 26, 2012, 12:06:28 am
content: Dont know about avrs, pic30fs can clamp up to 20ma. A common practice is to use a 2-10 nf cap for esd protection and a 33k current limiting resistor before the micro. Optos are too slow for a lot of applications. Using diodes also work, though they may be omitted if the series resistor is high enough. Check the specs of the micro for the maximum clamping current.

author: Psi
author_rank: Super Contributor
timestamp: June 26, 2012, 01:25:58 am
content: Can't you just swap the opto-isolators for a faster version, you can get digital isolator which are very fast.

author: free_electron
author_rank: Super Contributor
timestamp: June 26, 2012, 03:14:07 am
content: judging from the picture on that webpage your input protection is junk , to put it in 'soft words' ...Got a schematic in pdf format ? the zip files look like eagle ... can't read that.Here is a couple of things that are problematic.This is a security system and should be protected- no chassis ground- no ESd ring- no ground plane- inadequate input protection- dirty and clean signals intermixed- fuses ... bad idea... if one pops you'd have to break the door down. use polyfuses.- no isolation gap arounf the optocouplersthis thing is suceptible to esd zaps as well as metallic noise on your signal lines.If you want to make this top-notch i am willing to help. I don't need anything.first of all your input protection circuitry is bad.the idea of a BAT54s is not ba but you can;t blast the excess energy in the power rail. power rails are low impedant for outgoing power only.. you need to give a path for the energy to dissipate.Code:[font=courier]-------------------------------------+-----+-----|<|---- 5v| | 100nf 1kv | |_|_ bat54  _|_ _|_/_\ +----||-- SGND --- //_\ 4V3| | 1uf 25v | || ___|___ | || | _ | | |in----[10k-]--+------| _// |0----- sgnd sgnd| |_______| |_|_| 74v1g14 ----------------- > to 'safe' zone/_\ || SGND|+-------------------------------------------- GND|SGNDwhat's this do :i take the 5 volts , put a 1n4001 diode and 100 resisotr to 'polarize' a 4v3 zener diode. Zener diodes are slow to react and can have troulbe with fast pulse. sending a current through them so they are aloread 'on' speeds them up so they react faster. the diode blocks any energy of flashing into the system power supply possibly upsetting the cpu.the input resistor needs to be a long body : either a 1206 or longer. no routing is permitted underneath this part. the pin distance is used for creep space. the bat54s will divert energy either ot the zener diode loop or to SGND ( safety ground. ) a ferrite bead ( 1KZ @ 100 MHz ) or snubber coil is used to couple the SGND to the normal ground of the system. fast transients cannot travel through the ferrite bead and no energy will be dispersed into the system ground.the SGND needs to be connected to the buildings ground terminal. any shielding of incoming cables needs to connect to SGND as well. no connections are allowed to GND ! if i snip the ferrite bads there should be no galvanic contact between any outward cable and the GND of the system.if this board goes in a metal box the metal box needs connecting to SGND as well.a schmittrigger on the input takes the clipped/clamped signal ( the bat54s and the zener form a (clipper/clamper circuit) through another 1k resistor. any residual energy will be eaten by the intenral protection diodes there. this chip is powered from the same clamped supply through a ferrite bead ( we don;t want any energy zapping in this chips supply either.the 1uf cap needs to be ceramic to absorb fast transients. the cap over the zener better be something that can survive a serious jolt.. use a 1 kilovolt rated safety cap ( Y2K or X2k type )the output of the schmittrigger goes through another 1k resistor to the 'safe' zone.Care needs to be taken in the pcb layout to have adequate 'moats' and crepe zones so nothing can flash over.this kind of circuitry will survive a hard short to 110 or 220 volts without problems. ( the 1k resistor needs to be a fusible type for fire safety )

author: David_AVD
author_rank: Super Contributor
timestamp: June 26, 2012, 03:30:01 am
content: Quote from: arclight on June 25, 2012, 11:32:57 pmThe good old 6N137 is fast as it's often used for DMX isolation (250 KHz).

author: arclight
author_rank: Contributor
timestamp: June 26, 2012, 09:01:10 am
content: Hi all,Here is a PDF of the schematic and board layout.http://www.accxproducts.com/wiki/images/f/ff/Openaccess_v3.pdfI ordered some boards, and put one together for testing. I included a footprint for both the BAT54S and a SOD-123 on the board.Already, it looks like I may have reversed the footprint on the BAT54.Anyway, I look forward to more feedback. I've advanced a bit from the PTH version in the picture, but I'm still a newb.Cheers,Arclight

author: arclight
author_rank: Contributor
timestamp: June 26, 2012, 09:19:35 am
content: Free Electron,This is very helpful. So the safety ground would be the only ground connected to the chassis (including plated-thru mounting holes on the board), correct? How would I deal with this being in an enclosure with a power supply that wants to tie it's GND to the case earth?Thanks!ArclightQuote from: free_electron on June 26, 2012, 03:14:07 am

author: riedlse
author_rank: Newbie
timestamp: May 10, 2018, 10:27:45 am
content: Perfect, the input resistors and diodes are fairly common on how to protect inputs, I have had a few regulators blown as well and the power supply protection was just what I needed. My device has parent volunteers occasionally hooking up an audio amplifier to this input instead of a contact closure.

author: David Hess
author_rank: Super Contributor
timestamp: May 10, 2018, 05:47:02 pm
content: Below are two examples of how a diode bridge can be used for low impedance input (or output!) protection. The current driving the diode bridge limits the input and output current no matter what the input or output voltage is.