Author Topic: Input protection question  (Read 16284 times)

0 Members and 4 Guests are viewing this topic.

Offline arclightTopic starter

  • Contributor
  • Posts: 15
  • Country: us
Input protection question
« on: June 25, 2012, 11:32:57 pm »
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
 

Offline Baliszoft

  • Frequent Contributor
  • **
  • Posts: 277
  • Country: hu
Re: Input protection question
« Reply #1 on: June 26, 2012, 12:06:28 am »
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.
 

Online Psi

  • Super Contributor
  • ***
  • Posts: 10233
  • Country: nz
Re: Input protection question
« Reply #2 on: June 26, 2012, 01:25:58 am »
Can't you just swap the opto-isolators for a faster version, you can get digital isolator which are very fast.
Greek letter 'Psi' (not Pounds per Square Inch)
 

Offline free_electron

  • Super Contributor
  • ***
  • Posts: 8550
  • Country: us
    • SiliconValleyGarage
Re: Input protection question
« Reply #3 on: June 26, 2012, 03:14:07 am »
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 optocouplers

this 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: [Select]
[font=courier]
              -------------------------------------+-----+---[100r]--|<|--[FB]-- 5v
              |              |       100nf 1kv     |     |
             _|_ bat54      [FB]                  _|_   _|_
             /_\             +----||-- SGND       ---  //_\ 4V3
              |              |   1uf 25v           |     |
              |           ___|___                  |     |
              |          |     _ |                 |     |
in----[10k-]--+---[1k]---| _//   |0---[1k]--      sgnd  sgnd
              |          |_______|          |
             _|_      |   74v1g14     ----------------- > to 'safe' zone
             /_\             |
              |            SGND
              |
              +-------------------------------[FB]------------- GND
              |  
             SGND  
 
[/font]

what'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 )


« Last Edit: June 26, 2012, 03:39:27 am by free_electron »
Professional Electron Wrangler.
Any comments, or points of view expressed, are my own and not endorsed , induced or compensated by my employer(s).
 
The following users thanked this post: riedlse

Offline David_AVD

  • Super Contributor
  • ***
  • Posts: 2863
  • Country: au
Re: Input protection question
« Reply #4 on: June 26, 2012, 03:30:01 am »
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.

The good old 6N137 is fast as it's often used for DMX isolation (250 KHz).
 

Offline arclightTopic starter

  • Contributor
  • Posts: 15
  • Country: us
Re: Input protection question
« Reply #5 on: June 26, 2012, 09:01:10 am »
Hi all,

Here is a PDF of the schematic and board layout.

http://www.accxproducts.com/wiki/images/f/ff/Openaccess_v3.pdf

I 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
 

Offline arclightTopic starter

  • Contributor
  • Posts: 15
  • Country: us
Re: Input protection question
« Reply #6 on: June 26, 2012, 09:19:35 am »
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!

Arclight

what'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 )
 

Offline riedlse

  • Newbie
  • Posts: 1
  • Country: us
Re: Input protection question
« Reply #7 on: May 10, 2018, 10:27:45 am »
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.
 

Offline David Hess

  • Super Contributor
  • ***
  • Posts: 17194
  • Country: us
  • DavidH
Re: Input protection question
« Reply #8 on: May 10, 2018, 05:47:02 pm »
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.
 
The following users thanked this post: BravoV


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf