Difference between revisions of "Input protection"
(rough draft) |
(oops. fix link.) |
||
(15 intermediate revisions by 5 users not shown) | |||
Line 5: | Line 5: | ||
+ | Most circuits only need to protect up to 6000 V. | ||
+ | "600 V is the arc over voltage of | ||
+ | the standard wall outlet. If it's greater than 600 V, it doesn't get to | ||
+ | your power supply, it arc's over the screws of the oulet." | ||
+ | [http://www.piclist.com/techref/postbot.asp?by=time&id=piclist\2001\02\12\204237a] | ||
+ | "you were probably thinking of 6,000V (peak), which would agree | ||
+ | with IEEE Recommended Practice on Surge Voltages in Low-Voltage | ||
+ | AC Power Circuits (IEEE C62.41-1991, formerly IEEE Standard 587)." | ||
+ | [http://www.piclist.com/techref/postbot.asp?by=time&id=piclist\2001\02\15\132823a&tgt=post] | ||
− | == | + | |
+ | == Signal Input Protection == | ||
Alas, people outside the electronics world live in places that have "low humidity" and "carpeted floors". | Alas, people outside the electronics world live in places that have "low humidity" and "carpeted floors". | ||
Line 16: | Line 26: | ||
A variety of signal input protection circuits: | A variety of signal input protection circuits: | ||
+ | * resistor(s) | ||
+ | |||
+ | * zener diodes | ||
+ | |||
+ | * 2 clamping diodes to plus and minus power rails | ||
+ | |||
+ | * 2 Schottky clamping diodes to plus and minus power rails | ||
+ | |||
+ | * 2 Schottky clamping diodes to plus and minus power rails, and a resistor. (All 3 components directly connected to the microcontroller input pin; the other end of the resistor connected to the outside world). | ||
+ | [http://www.piclist.com/techref/mimedecode.asp?url=piclist%5C2006%5C03%5C06%5C111156a%2Etxt&part=3] | ||
+ | |||
+ | * transistor buffer ([http://www.piclist.com/techref/postbot.asp?by=time&id=piclist\2007\03\22\101919a Matt Pobursky]) | ||
+ | |||
+ | ... | ||
+ | |||
+ | "Some of the old | ||
+ | tube powered TEKs used a combination of fast glass diodes, honking big | ||
+ | zeners and gas discharge tubes. Neat to see the gas discharge tube | ||
+ | light up." | ||
+ | [http://www.piclist.com/techref/postbot.asp?by=time&id=piclist\2006\10\27\190500a.txt] | ||
+ | |||
+ | |||
+ | ---- | ||
− | + | On a PIC input, I like to use a the following : | |
+ | <pre> | ||
+ | 1k 5V1 100nF 220k 15k | ||
+ | PIC<--/\/\/\/----*----*----*----/\/\/\/---- Horrible outside world | ||
+ | | | | | ||
+ | --- --- \ | ||
+ | / \ --- / | ||
+ | | | \ | ||
+ | | | / | ||
+ | | | | | ||
+ | --------------*----*----*-------------- | ||
+ | </pre> | ||
+ | -- Tjaart van der Walt 1999 | ||
+ | [http://www.piclist.com/techref/postbot.asp?by=time&id=piclist\1999\05\01\151255a.txt] | ||
− | |||
− | |||
− | + | ---- | |
− | |||
− | transistor buffer | + | "By adding a transistor buffer to your circuit and reworking it a bit you |
+ | can make a nearly bulletproof input circuit to the outside world." | ||
− | + | <pre> | |
+ | +Vcc +Vcc | ||
+ | | | | ||
+ | / | | ||
+ | \ | | ||
+ | / 2 | ||
+ | 1N4148 1K | |/ | ||
+ | switch --|<|---/\/\/\/--+--+--1| 2N3906 pnp | ||
+ | | |\ | ||
+ | --- 3 | ||
+ | 100 nF --- +------- to PIC input | ||
+ | | / | ||
+ | | \ 10K | ||
+ | | / | ||
+ | ---------------------+--------+--------- | ||
+ | </pre> | ||
+ | -- | ||
+ | Matt Pobursky 2007 | ||
+ | [http://www.piclist.com/techref/postbot.asp?by=time&id=piclist\2007\03\22\101919a&tgt=post] | ||
+ | [http://www.mps-design.com/misc-images/buffer2.gif] | ||
+ | (Lovely circuit drawing converted to ugly ASCII graphics by David Cary) | ||
+ | ---- | ||
Line 40: | Line 105: | ||
[[Reverse Protection Diodes]] (protects against reversed GND and +power) | [[Reverse Protection Diodes]] (protects against reversed GND and +power) | ||
+ | |||
+ | rectifier -- not only protects against reversed GND and +power, but also allows the device to work either way. | ||
fuses | fuses | ||
Line 51: | Line 118: | ||
... or some combination. | ... or some combination. | ||
+ | |||
+ | |||
+ | |||
+ | <blockquote> | ||
+ | I built | ||
+ | a super-zapper that we used to test how long our input | ||
+ | protection would last. We tried tried the trusty 1n4007, | ||
+ | 1N4148 etc. They seemed to work ok, but the fast rising | ||
+ | times of the spikes still cause very sharp 400V spikes | ||
+ | to get through. We tried neon bulbs which worked damned | ||
+ | well for dissipating large transients (into light), but | ||
+ | we were still left with those horrible things. Next up | ||
+ | we tried a 1k5E tranzorb that worked amazingly well. | ||
+ | Zeners don't even see half the spikes, so if you want | ||
+ | to use zeners, make sure you have a series resistor | ||
+ | and a parallel cap (100nF). | ||
+ | |||
+ | If your budget allows, you can use fast recovery diodes, but | ||
+ | I think it would be cheaper to use four different size caps | ||
+ | over the supply with standard diodes. 100uF, 100nF, 1nF, 10pF. | ||
+ | A 1R series resistor between the supply and the PIC can also do | ||
+ | wonders for noise rejection. | ||
+ | |||
+ | </blockquote> | ||
+ | -- Tjaart van der Walt 1999 | ||
+ | [http://www.piclist.com/techref/postbot.asp?by=time&id=piclist\1999\05\01\151255a.txt] | ||
+ | |||
+ | |||
+ | "DESIGNING ELECTRONIC EQUIPMENT FOR ESD IMMUNITY: Annotated Bibliography | ||
+ | http://www.dbicorporation.com/esd-anno.htm | ||
+ | |||
+ | "AP-125 Designing Microcontroller Systems for Electrically Noisy Environments" | ||
+ | http://www.intel.com/design/auto/mcs96/applnots/210313.htm | ||
+ | http://developer.intel.com/design/auto/mcs96/applnots/210313.HTM | ||
+ | |||
+ | |||
+ | [http://focus.ti.com.cn/cn/lit/an/slua460/slua460.pdf "ESD and RF Mitigation in Handheld Battery Pack Electronics"] | ||
+ | by Bill Jackson. | ||
+ | Shows how to design a PCB with spark gaps between the ground and each I/O pin of the connector. | ||
+ | The spark gaps reduce ESD to 2 KV or lower. | ||
+ | |||
+ | ---- | ||
+ | |||
+ | Gary Sutcliffe | ||
+ | [http://www.piclist.com/techref/postbot.asp?by=time&id=piclist\1997\11\13\075559a&tgt=post] | ||
+ | says (slightly paraphrased): | ||
+ | |||
+ | ESD test: Essentially they take a high tech cattle probe and zap it. | ||
+ | The CE requirements required that it be able to take an 8KV zap without affecting operation. | ||
+ | |||
+ | I solved the problem with the following techniques: | ||
+ | |||
+ | 1. Good solid ground plane on the PCB. ... | ||
+ | |||
+ | 2. Current limiting resistors (~100 ohms) and 5.5V MOVs on every input and | ||
+ | output. ... 1206 SMT chip MOVs. | ||
+ | |||
+ | 3. Keep the electronics insulated from the case. Be sure there are no | ||
+ | openings that will allow the zapper to get at components or the PCB. ... | ||
+ | |||
+ | ---- | ||
+ | |||
+ | === Positive Temperature Coefficient fuses (PTC Fuse) === | ||
+ | |||
+ | Also known as '''Polymeric Positive Temperature Coefficient fuses (PPTC fuse)'''. Brand names include '''PolySwitch''', '''Everfuse''', '''Polyfuse''', and '''Multifuse'''. | ||
+ | |||
+ | PTC fuses may be used with SCRs in crowbar circuits for overvoltage protection. | ||
+ | |||
+ | Russell McMahon says | ||
+ | "Polyswitches are extremely useful ... | ||
+ | A Polyswitch (Raychem) / Multifuse (Bournes) / Polyfuse (generic) is a | ||
+ | self resetting thermal fuse used to provide both overcurrent and over | ||
+ | temperature protection." | ||
+ | |||
+ | More polyswitch resources: | ||
+ | |||
+ | * http://www.circuitprotection.com/polyswitch.asp | ||
+ | * http://www.circuitprotection.com/literature.asp | ||
+ | * "Fundamentals of PolySwitch Overcurrent and Overtemperature Devices" http://www.circuitprotection.com/06Databook/fundamentals/PSWFundamentals.pdf | ||
+ | * 4 page overview and selector guide http://www.circuitprotection.com/06Databook/PSWFundamentals(80-83).pdf | ||
+ | |||
+ | Be careful with these devices, they have a long term failure mechanism which means that after some cycles they do not return to their low impedance state. I cycled a device for 1.1 million cycles and all seemed well. However we still get devices back from the field that have failed (6K at room temp rather than 10 ohms). I expect that some are more susceptible. | ||
+ | |||
+ | == Input Protection by Circuit Type == | ||
+ | |||
+ | ( next largely stubs, some covered by material above ) | ||
+ | |||
+ | === Blocking Diode === | ||
+ | |||
+ | === Zener Diode === | ||
+ | |||
+ | === Crowbar Circuits === | ||
+ | |||
+ | Not sure where the term comes from, in some cases it is like throwing a crowbar in a machine, perhaps that is it. Generally a crowbar circuit detects a fault and responds by creating a short of the input voltage. In some cases removal of the input will reset the circuit, in other cases it may go on to blow fuses. | ||
+ | |||
+ | [http://en.wikipedia.org/wiki/Crowbar_circuit Crowbar (circuit) From Wikipedia, the free encyclopedia] | ||
+ | |||
+ | === Filters === | ||
+ | |||
+ | === Buffer Amplifiers === | ||
+ | |||
+ | |||
+ | == Input Protection by what is being Protected == | ||
+ | |||
+ | === Analog to Digital Converter Input Protection === | ||
+ | |||
+ | Input protection for ADC has its own set of issues. The first in input voltage. Often this needs to be within the supply limits of the ADC itself. The ADC may have protection diodes to V+ and Gnd but excess voltage can easily push currents into these diodes that will damage or destroy the chip. First level protection can be as simple as a diode. You can then assume some over voltage on the chip and see what current will result. Some references suggest that a few ma should be ok, check you data sheet perhaps it will have some info. Raise the resistance and get more protection, or use two resistors and add your own diodes after the first diode. A problem with added resistance is that it can effect the accuracy of you converter, so once again check the data sheet. To avoid the problem of input resistance you can use a buffer amplifier. Protect the amplifier, if necessary, with its own input protection then use its output to drive the ADC. If the supply to the amplifier is within the limits of the permissible input to the ADC then it is unlikely that it will overdrive the ADC. A simple amplifier might be an emitter follower. I prefer an operational amplifier. With any amplifier, but particularly most op amps there may be a problem with the output swinging across the whole power supply range, particularly to the positive rail. A way around this is to use the positive reference pin available on most ADCs ( including those on PIC and other microcontrollers ). Lower that input to the range of the amplifier where it has low output impedance. This preserves the full digital range of the ADC. If you do not do it you should consider not using the top of the range. | ||
+ | |||
+ | Filtering the high frequency response of an ADC input can also be useful if there are large variations at a frequency higher that you want to, or the ADC can resolve. | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | === Power Supply Input Protection === | ||
+ | |||
+ | === Speaker Protection === | ||
+ | |||
+ | |||
+ | === Semiconductors and Static Discharge === | ||
+ | |||
+ | Static discharge can damage a wide range of semiconductors, through inputs or any other connection. More discussion would be nice. | ||
+ | |||
+ | [http://sound.westhost.com/impedanc.htm#spkz "Speaker Protection Systems"] | ||
+ | |||
+ | == Further Reading == | ||
+ | |||
+ | * [[Printed Circuit Boards#References]] discusses EMC guidelines | ||
+ | * [http://www.ce-mag.com/99ARG/Bjorklof&Joha124.html CE magazine: "Immunity Testing: Practical Aspects of Basic Standards"] by Dag Björklöf and Lars-Olov Johansson | ||
+ | * The "super reverse protection diode emulator" idea is detailed in [http://www.geofex.com/Article_Folders/mosswitch/mosswitch.htm "Advanced Power Switching and Polarity Protection for Effects"] and [http://www.irf.com/technical-info/designtp/dt94-8.pdf IRF: "Reverse battery protection with HEXFETs doubles battery life"]; a BJT version that works almost as well is described in [http://www.geofex.com/Article_Folders/cheapgoodprot.htm "A cheap - and good - polarity protector"]. | ||
+ | * [http://electronics.stackexchange.com/questions/14609/reverse-polarity-protection-on-model-rc-aircraft "Reverse polarity protection on model RC aircraft"] discussion |
Latest revision as of 17:33, 14 October 2016
There are a wide variety of input protection circuits.
Most of these protection circuits have historically been built out of discrete components. Some of them are now integrated into some "ESD resistant input" integrated circuits.
Most circuits only need to protect up to 6000 V.
"600 V is the arc over voltage of
the standard wall outlet. If it's greater than 600 V, it doesn't get to
your power supply, it arc's over the screws of the oulet."
[1]
"you were probably thinking of 6,000V (peak), which would agree
with IEEE Recommended Practice on Surge Voltages in Low-Voltage
AC Power Circuits (IEEE C62.41-1991, formerly IEEE Standard 587)."
[2]
Contents
Signal Input Protection[edit]
Alas, people outside the electronics world live in places that have "low humidity" and "carpeted floors".
Typically microcontrollers are placed in a box to protect them from such a hostile environment.
Alas, that box does no good if we directly run wires from the pins on the microcontroller to connectors on the outside of the box.
A variety of signal input protection circuits:
- resistor(s)
- zener diodes
- 2 clamping diodes to plus and minus power rails
- 2 Schottky clamping diodes to plus and minus power rails
- 2 Schottky clamping diodes to plus and minus power rails, and a resistor. (All 3 components directly connected to the microcontroller input pin; the other end of the resistor connected to the outside world).
- transistor buffer (Matt Pobursky)
...
"Some of the old tube powered TEKs used a combination of fast glass diodes, honking big zeners and gas discharge tubes. Neat to see the gas discharge tube light up." [4]
On a PIC input, I like to use a the following :
1k 5V1 100nF 220k 15k PIC<--/\/\/\/----*----*----*----/\/\/\/---- Horrible outside world | | | --- --- \ / \ --- / | | \ | | / | | | --------------*----*----*--------------
-- Tjaart van der Walt 1999 [5]
"By adding a transistor buffer to your circuit and reworking it a bit you
can make a nearly bulletproof input circuit to the outside world."
+Vcc +Vcc | | / | \ | / 2 1N4148 1K | |/ switch --|<|---/\/\/\/--+--+--1| 2N3906 pnp | |\ --- 3 100 nF --- +------- to PIC input | / | \ 10K | / ---------------------+--------+---------
-- Matt Pobursky 2007 [6] [7] (Lovely circuit drawing converted to ugly ASCII graphics by David Cary)
power input protection[edit]
diode pointing from GND to +power input (protects against reversed GND and +power)
Reverse Protection Diodes (protects against reversed GND and +power)
rectifier -- not only protects against reversed GND and +power, but also allows the device to work either way.
fuses
resettable fuses (polyswitch)
5.1 V zener diode pointing from GND to +5V ("crowbar protection", protects against power supply failing or something else pushing input power too high)
"super reverse protection diode emulator" -- a circuit composed of a MOSFET, a zener, and a resistor.
... or some combination.
I built a super-zapper that we used to test how long our input protection would last. We tried tried the trusty 1n4007, 1N4148 etc. They seemed to work ok, but the fast rising times of the spikes still cause very sharp 400V spikes to get through. We tried neon bulbs which worked damned well for dissipating large transients (into light), but we were still left with those horrible things. Next up we tried a 1k5E tranzorb that worked amazingly well. Zeners don't even see half the spikes, so if you want to use zeners, make sure you have a series resistor and a parallel cap (100nF).
If your budget allows, you can use fast recovery diodes, but I think it would be cheaper to use four different size caps over the supply with standard diodes. 100uF, 100nF, 1nF, 10pF. A 1R series resistor between the supply and the PIC can also do wonders for noise rejection.
-- Tjaart van der Walt 1999 [8]
"DESIGNING ELECTRONIC EQUIPMENT FOR ESD IMMUNITY: Annotated Bibliography
http://www.dbicorporation.com/esd-anno.htm
"AP-125 Designing Microcontroller Systems for Electrically Noisy Environments" http://www.intel.com/design/auto/mcs96/applnots/210313.htm http://developer.intel.com/design/auto/mcs96/applnots/210313.HTM
"ESD and RF Mitigation in Handheld Battery Pack Electronics"
by Bill Jackson.
Shows how to design a PCB with spark gaps between the ground and each I/O pin of the connector.
The spark gaps reduce ESD to 2 KV or lower.
Gary Sutcliffe [9] says (slightly paraphrased):
ESD test: Essentially they take a high tech cattle probe and zap it. The CE requirements required that it be able to take an 8KV zap without affecting operation.
I solved the problem with the following techniques:
1. Good solid ground plane on the PCB. ...
2. Current limiting resistors (~100 ohms) and 5.5V MOVs on every input and output. ... 1206 SMT chip MOVs.
3. Keep the electronics insulated from the case. Be sure there are no openings that will allow the zapper to get at components or the PCB. ...
Positive Temperature Coefficient fuses (PTC Fuse)[edit]
Also known as Polymeric Positive Temperature Coefficient fuses (PPTC fuse). Brand names include PolySwitch, Everfuse, Polyfuse, and Multifuse.
PTC fuses may be used with SCRs in crowbar circuits for overvoltage protection.
Russell McMahon says "Polyswitches are extremely useful ... A Polyswitch (Raychem) / Multifuse (Bournes) / Polyfuse (generic) is a self resetting thermal fuse used to provide both overcurrent and over temperature protection."
More polyswitch resources:
- http://www.circuitprotection.com/polyswitch.asp
- http://www.circuitprotection.com/literature.asp
- "Fundamentals of PolySwitch Overcurrent and Overtemperature Devices" http://www.circuitprotection.com/06Databook/fundamentals/PSWFundamentals.pdf
- 4 page overview and selector guide http://www.circuitprotection.com/06Databook/PSWFundamentals(80-83).pdf
Be careful with these devices, they have a long term failure mechanism which means that after some cycles they do not return to their low impedance state. I cycled a device for 1.1 million cycles and all seemed well. However we still get devices back from the field that have failed (6K at room temp rather than 10 ohms). I expect that some are more susceptible.
Input Protection by Circuit Type[edit]
( next largely stubs, some covered by material above )
Blocking Diode[edit]
Zener Diode[edit]
Crowbar Circuits[edit]
Not sure where the term comes from, in some cases it is like throwing a crowbar in a machine, perhaps that is it. Generally a crowbar circuit detects a fault and responds by creating a short of the input voltage. In some cases removal of the input will reset the circuit, in other cases it may go on to blow fuses.
Crowbar (circuit) From Wikipedia, the free encyclopedia
Filters[edit]
Buffer Amplifiers[edit]
Input Protection by what is being Protected[edit]
Analog to Digital Converter Input Protection[edit]
Input protection for ADC has its own set of issues. The first in input voltage. Often this needs to be within the supply limits of the ADC itself. The ADC may have protection diodes to V+ and Gnd but excess voltage can easily push currents into these diodes that will damage or destroy the chip. First level protection can be as simple as a diode. You can then assume some over voltage on the chip and see what current will result. Some references suggest that a few ma should be ok, check you data sheet perhaps it will have some info. Raise the resistance and get more protection, or use two resistors and add your own diodes after the first diode. A problem with added resistance is that it can effect the accuracy of you converter, so once again check the data sheet. To avoid the problem of input resistance you can use a buffer amplifier. Protect the amplifier, if necessary, with its own input protection then use its output to drive the ADC. If the supply to the amplifier is within the limits of the permissible input to the ADC then it is unlikely that it will overdrive the ADC. A simple amplifier might be an emitter follower. I prefer an operational amplifier. With any amplifier, but particularly most op amps there may be a problem with the output swinging across the whole power supply range, particularly to the positive rail. A way around this is to use the positive reference pin available on most ADCs ( including those on PIC and other microcontrollers ). Lower that input to the range of the amplifier where it has low output impedance. This preserves the full digital range of the ADC. If you do not do it you should consider not using the top of the range.
Filtering the high frequency response of an ADC input can also be useful if there are large variations at a frequency higher that you want to, or the ADC can resolve.
Power Supply Input Protection[edit]
Speaker Protection[edit]
Semiconductors and Static Discharge[edit]
Static discharge can damage a wide range of semiconductors, through inputs or any other connection. More discussion would be nice.
Further Reading[edit]
- Printed Circuit Boards#References discusses EMC guidelines
- CE magazine: "Immunity Testing: Practical Aspects of Basic Standards" by Dag Björklöf and Lars-Olov Johansson
- The "super reverse protection diode emulator" idea is detailed in "Advanced Power Switching and Polarity Protection for Effects" and IRF: "Reverse battery protection with HEXFETs doubles battery life"; a BJT version that works almost as well is described in "A cheap - and good - polarity protector".
- "Reverse polarity protection on model RC aircraft" discussion