Author Topic: Robust Microcontroller Input Protection  (Read 98239 times)

0 Members and 5 Guests are viewing this topic.

Offline Rufus

  • Super Contributor
  • ***
  • Posts: 2095
Re: Robust Microcontroller Input Protection
« Reply #75 on: July 10, 2012, 05:29:10 pm »
Those diodes are are not really intended as primary ESD protection on chip.  They are more for mitigating ESD during (proper) handling.  Those diodes are just too tiny.


For 74HC series logic the limit is not the diodes being tiny but dissipation in the resistance deliberately built in series with them.

Almost all PIC devices have a 20mA abs max current rating. Combine that with your external series resistance and you get an abs max voltage capability (not even transient, could be dc if your resistor can take it). Considering 1uA worst case pin leakage series resistance of 100k is practical for slow signals giving a 2kV input rating. For slower signals (<1kHz) adding some capacitance can average the peak from transients giving a much higher voltage rating for fast transients.

20mA clamp diodes can give very respectable input voltage capabilities, it is up to the designer to decide how much is required and how much he needs to de-rate the abs max.

Claiming the 20mA abs max rating in black and white in every datasheet doesn't really mean 20mA or is only 20mA of esd electrons or something is shit. In the case of 74HC which also has 20mA abs max ratings the material I already quoted shows it is a very conservative rating.

The problem with using PIC clamp diodes is I have yet to see a PIC datasheet which specifies correct operation of the processor with any level of clamp diode current flowing which is unlike a couple of Infineion C166 series processor datasheets I recently looked at and why I have already told Baliszoft he is winging it.

Personally have not and will not use PIC clamp diodes at more than a few 10's of uA and only in non-critical applications. If/when Microchip provides better specification I will reconsider. I have and will continue to use 74HC series gate clamp diodes up to the 20mA abs max rating with confidence and an expectation they can take a lot more.
 

Offline Baliszoft

  • Frequent Contributor
  • **
  • Posts: 277
  • Country: hu
Re: Robust Microcontroller Input Protection
« Reply #76 on: July 10, 2012, 06:25:28 pm »
To whom it may interest (as a not that robust, but some kind of input protection).

A dspic30f was used (with specified max 20mA input clamping capability). The input was "protected" with a 43k 1206 resistor, there was a 2.2k pulldown resistor and a 10nF cap before the current limiting resistor. I just soldered a wire before the resistor, and touched it with ~61VDC (thats the highest psu i got here), which resulted in some ringing too. I repeated the same with 8 pins at the same time with more than 10mA overall clamping current. Pull down resistors were smoking after ca. 30 secs.

The clamping can also be noticed (of course) on the VDD (+ on MCLR if fed from VDD!!!) and VSS pins of the micro too, so care has to be taken to properly route (decouple, buffer) these. A sensitive brown out reset setting or even the MCLR could be triggered by the supply disturbance.

The micro survived this without any problems, no latchup or anything. The signal did not "leaked" to adjacent pins. The precision of the ADC (11 channels have been monitored meanwhile) remained within spec, though values got lower with ca. 0.4% during clamping 8 pins (11mA overall).

I still have to destroy it, but i will leave that for tomorrow.

(The green on last pic is VDD at the micro.)
« Last Edit: July 10, 2012, 06:29:27 pm by Baliszoft »
 

Offline dfnr2

  • Regular Contributor
  • *
  • Posts: 241
  • Country: us
Re: Robust Microcontroller Input Protection
« Reply #77 on: July 10, 2012, 06:29:37 pm »

Almost all PIC devices have a 20mA abs max current rating. Combine that with your external series resistance and you get an abs max voltage capability (not even transient, could be dc if your resistor can take it). Considering 1uA worst case pin leakage series resistance of 100k is practical for slow signals giving a 2kV input rating. For slower signals (<1kHz) adding some capacitance can average the peak from transients giving a much higher voltage rating for fast transients.
To whom it may interest (as a not that robust, but some kind of input protection).

A dspic30f was used (with specified max 20mA input clamping capability). The input was "protected" with a 43k 1206 resistor, there was a 2.2k pulldown resistor and a 10nF cap before the current limiting resistor. I just soldered a wire before the resistor, and touched it with ~61VDC (thats the highest psu i got here), which resulted in some ringing too. I repeated the same with 8 pins at the same time with more than 10mA overall clamping current. Pull down resistors were smoking after ca. 30 secs.
I think there is a fundamental miscommunication happening here.  There's over-voltage/over-current protection, and there's ESD/fast-transient protection.  Overcurrent/overvoltage can be approached with various topologies, but basically an input impedance (we're talking low frequencies, so resistance) and clamping after the impedance is reasonable.  Clamping or shunting before the impedance can result in the protection devices getting hot, so in that case, a fuse or PTC device would be indicated.  In either case, a robust design would specify the impedance and clamping devices, in order to provide reliable input specs.  If the input is part of the engineered system, then this circuitry may or may not be needed separately from the ESD protection.

The ESD/fast-transient protection on each pin has little to do with protecting the *pin* itself.  For a fast transient or ESD event, there is a huge potential present.  It has to go *somewhere*.  It will not stay put.  Successful design involves managing that potential and shunting the current safely away from the circuit.  If you don't manage that energy, then it will jump anywhere along the lowest available impedance path, until it is capacitively dissipated in free space.  You need to provide that lowest-impedance path to the chassis, rather than having a path through your circuit randomly selected for you.

That means the shunting of the majority of the energy has to occur BEFORE the inline impedance.  The essence of ESD and fast transient protection is: 

  1) Provide a chassis capable of capacitively dissipating a large potential in free space.  This can be a metal case, or simply a piece of foil.
  2) Provide low impedance to the chassis for fast potentials.
  3) Provide higher impedance to the circuit for those same fast potentials.
  4) Ensure that during operating conditions, the impedance to the pin is within spec.
  5) Ensure that during operating conditions, the impedance to ground is within spec.

That is why your step (2) devices go before your step (3) devices in the path from outside the board to the chip.  The pin clamping diodes are not part of any of those steps.  Even if you have a device with a battery and only 1 input pin, protected with a series resistor or inductor alone, the and ESD potential can discharge from the input entrance to the nearest available trace, or even across the resistor, if the resistor is less than 1 cm or so long, and take any random path through your circuit until it hits the biggest confluent metal structure.  And then, even that "protected" pin is not protected, since there's nothing preventing the rogue potential from hitting any other part of the chip, including the protected pin.

That's a simplification, but you get the point.  the protection circuitry protects the DEVICE, not just the pin. 

Overvoltage/overcurrent protection protects the pin, but is more variable, and must be determined on a pin-by-pin basis.  Clamping diodes can be part of this, but in a robust design, if you really anticipate the need for clamping, better to control that by specifying the devices yourself.

A golden rule of engineering:  Maximize the effectiveness of anything that your ARE able to control, and minimize the effects of anything your ARE NOT able to control.
« Last Edit: July 10, 2012, 07:01:05 pm by dfnr2 »
 

Offline free_electron

  • Super Contributor
  • ***
  • Posts: 9053
  • Country: us
    • SiliconValleyGarage
Re: Robust Microcontroller Input Protection
« Reply #78 on: July 10, 2012, 07:09:25 pm »
@dfnr2 : well said. that is the idea.

Now, touching 61 volts is one thing.. spark it with an ESD gun and see what happens then... most likely the energy will simply jump over the resistor and fry the input.
In a car large esd discharges can happen ( several tens of kilovolts ) and there is energy behind it. ( 10 kilovolt coming form a 2pF cap is not a lot of energy. 10
kilovolt coming from 1 uf or more is a lot of energy.

A simple resistor will not hold that. Which is why i stated : use long body resistors (1206 ) , cut a moat under them and put protection to chassis ground right there. if it jumps , it hits the protection device and is deviated to chassis ground. it doesn't enter system ground.

There is a thing to be said about selecting the right kind of resistor as well. Problem is smd resistors are laser trimmed. This 'slit' is very narrow and voltages will easily jump this gap. Your 40K resistor turns out to be only 10 ohm at 200 volts... simply becasue it jumps the gap. There are specially designed smd resistors to hold high voltages. These do not use the classical r or l-cut but cut a meander. This gives a higher standoff voltage. Typically thin film sputtered parts as opposed to thick film carbon printed. They have an additional ( mostly blue , but can be other colors ) coating on top of the resistive element to avoid moisture absorption and to stabilize the element. These are also flame-proof and some have other properties.


Professional Electron Wrangler.
Any comments, or points of view expressed, are my own and not endorsed , induced or compensated by my employer(s).
 

Offline Rufus

  • Super Contributor
  • ***
  • Posts: 2095
Re: Robust Microcontroller Input Protection
« Reply #79 on: July 10, 2012, 07:33:39 pm »
For 74HC series logic the limit is not the diodes being tiny but dissipation in the resistance deliberately built in series with them.
Any built-in resistance would be detrimental to the protection of the pin.

Built in resistance slows transient edges to reduce the possibility of dv/dt turn on of the parasitic SCRS. In 74HC series it is about 100 ohms and is indicated by abs max input voltage specifications being around 1.7v outside the supply rails, not a diode drop at 20mA.

Almost all PIC devices have a 20mA abs max current rating. Combine that with your external series resistance and you get an abs max voltage capability (not even transient, could be dc if your resistor can take it). Considering 1uA worst case pin leakage series resistance of 100k is practical for slow signals giving a 2kV input rating. For slower signals (<1kHz) adding some capacitance can average the peak from transients giving a much higher voltage rating for fast transients.
However, for a fast transient or ESD event, there is a huge potential present.  It has to go *somewhere*.  It will not stay put.  Successful design involves managing that potential and shunting the current safely away from the circuit.

When you have 100k in series the majority of that energy is dissipated in the resistor, when you follow it with a capacitor to ground anything fast goes through the capacitor giving you a well defined point from which to route fast transient currents to where they want to go. With a big resistance the currents are not that big anyway.

If the fast currents are going though clamp diodes what is the difference between absorbing/routing them away from the supply pins of a gate or from a bunch of discreet diodes? The only reason for FE's biased zener diode thing is to avoid using the VDD clamps in the gate (which the low voltage with 5v tolerant inputs gate he chose doesn't actually have). What 5v tolerant inputs actually have for +ve 'static' protection seems to be a secret (although I haven't extensively looked for the answers).
 

Offline Rufus

  • Super Contributor
  • ***
  • Posts: 2095
Re: Robust Microcontroller Input Protection
« Reply #80 on: July 10, 2012, 07:53:00 pm »
( 10 kilovolt coming form a 2pF cap is not a lot of energy. 10
kilovolt coming from 1 uf or more is a lot of energy.

More shit again. Tell me where to find these 1uF or more 10kv capacitors in a car.

Tell me where these capacitors with 5 times more stored energy than is considered lethal to humans are and how they are going to be connected to signal inputs read by a microcontroller.

 

Offline dfnr2

  • Regular Contributor
  • *
  • Posts: 241
  • Country: us
Re: Robust Microcontroller Input Protection
« Reply #81 on: July 10, 2012, 08:03:44 pm »
For 74HC series logic the limit is not the diodes being tiny but dissipation in the resistance deliberately built in series with them.
Any built-in resistance would be detrimental to the protection of the pin.
Built in resistance slows transient edges to reduce the possibility of dv/dt turn on of the parasitic SCRS. In 74HC series it is about 100 ohms and is indicated by abs max input voltage specifications being around 1.7v outside the supply rails, not a diode drop at 20mA.
Fair enough.  I put that sentence in before I realized that we were talking about different things.  I reorganized my post to address that, and removed the sentence, apparently while you were typing the reply.
 

Offline Baliszoft

  • Frequent Contributor
  • **
  • Posts: 277
  • Country: hu
Re: Robust Microcontroller Input Protection
« Reply #82 on: July 10, 2012, 08:31:16 pm »
10kV or even more can be found in cars, yes. I guess you meant the ignition coil discharge. Their output stage are already separated from the main ECU for quite some time (15+ years). Here are some pics of the current limiting resistors from the ECUs i got lying here (the big ones are pulldown resistors in both cases). The first is from siemens, the second is from bosch. Do these comply?
 

Offline dfnr2

  • Regular Contributor
  • *
  • Posts: 241
  • Country: us
Re: Robust Microcontroller Input Protection
« Reply #83 on: July 10, 2012, 08:32:34 pm »

When you have 100k in series the majority of that energy is dissipated in the resistor, when you follow it with a capacitor to ground anything fast goes through the capacitor giving you a well defined point from which to route fast transient currents to where they want to go. With a big resistance the currents are not that big anyway.

If the fast currents are going though clamp diodes what is the difference between absorbing/routing them away from the supply pins of a gate or from a bunch of discreet diodes? The only reason for FE's biased zener diode thing is to avoid using the VDD clamps in the gate (which the low voltage with 5v tolerant inputs gate he chose doesn't actually have). What 5v tolerant inputs actually have for +ve 'static' protection seems to be a secret (although I haven't extensively looked for the answers).

That is what the schematic may look like, but what happens if you put a 1 ohm resistor in parallel with the 100k resistor?  How much energy will the 100k resistor dissipate?  Not much.  Now suppose you put that 1 ohm resistor between the input terminal and the GND plane.  Now, how much energy is dissipated by the 100k resistor?  again, not much.  In both cases, you may damage your circuit.  Now, what happens if that 1-ohm resistor shunts from the input to chassis?  Your circuit is protected, and again, not much energy in the 100k.

That is why, when you treat your copper planes in your input section like an extension of the chassis ground, connected to the chassis with fat strap, screw, or fingerstock, you can get by with a much thinner copper-free moat than when you are trying to achieve true isolation (for example, an isolated USB section may require a 1-cm moat, while the ESD protection at the input section a few cm away may require a 2mm moat.)  Because the pathway to ground via the free-space capacitance of your chassis is much lower than the pathway through your circuit.

That what is really happening with an ESD event.  The current will follow each path according to the impedance.  So, not much in your resistor, especially if you guarantee a shunt away from.

Without managing the ESD at the input, you don't know where it ends up.  A proper design placing the shunts before the resistor can ensure it ends up dissipating through the chassis, doing no damage.  A design placing the shunts after the resistor is less effective because (1) The energy as already gone elsewhere, unheeding of your plans, and you have minimal energy left to shunt after the resistor, and (2) even if the energy skips across to your post-resistor shunt, it's geometrically harder to guarantee the lowest impedance path to chassis from there.  You are talking about shunting onto your power rails.

That being said, one actual ESD scheme does involve placing a resistor between the input (which must be isolated, meaning 1cm clearance) and the signal line, followed by fast symmetrical clamping diodes to Vcc and GND, with large Vcc and GND planes close together, and large discrete capacitors between VCC and ground as well.  This can be made to work in cases where a proper chassis ground is out of the question, but it does require careful design, and is inferior to a real chassis ground.
 

Offline Short Circuit

  • Frequent Contributor
  • **
  • Posts: 440
  • Country: nl
    • White Bream electronics R&D
Re: Robust Microcontroller Input Protection
« Reply #84 on: July 10, 2012, 08:49:47 pm »
( 10 kilovolt coming form a 2pF cap is not a lot of energy. 10
kilovolt coming from 1 uf or more is a lot of energy.

More shit again. Tell me where to find these 1uF or more 10kv capacitors in a car.

Tell me where these capacitors with 5 times more stored energy than is considered lethal to humans are and how they are going to be connected to signal inputs read by a microcontroller.
Well, no shit actually. It IS a lot more energy  :o But you won't encounter that in a car, except in the UK perhaps, when mr Photon has a field day  ;D

Realistic values are only like 8kV contact discharge, and maybe 15kV air discharge from 330p/2k,
and 25kV air discharge from 150p/2k only for electronics that is accessible from outside the vehicle (through open doors or windows).

Ford EMC specification http://www.fordemc.com/docs/download/EMC_CS_2009rev1.pdf
 

Offline Baliszoft

  • Frequent Contributor
  • **
  • Posts: 277
  • Country: hu
Re: Robust Microcontroller Input Protection
« Reply #85 on: July 10, 2012, 09:33:58 pm »
Personally have not and will not use PIC clamp diodes at more than a few 10's of uA and only in non-critical applications. If/when Microchip provides better specification I will reconsider. I have and will continue to use 74HC series gate clamp diodes up to the 20mA abs max rating with confidence and an expectation they can take a lot more.

Microchip's technical bulletin TB3013 has all info on using the ESD diodes for dspics. Anyone who wants to use them (overload these microcontrollers) should read this and be aware of the possible problems.

Quote
CONCLUSION
Exceeding the absolute maximum voltage ratio for the
device I/O pins may not cause physical damage unless
the maximum current specification is also violated.
These conditions can be minimized by following the
techniques described in this document. Even if the
silicon is not damaged, the out-of-specification voltage
can cause unexpected application problems. The
techniques shown in this application note are not
guaranteed to be appropriate for all situations and
operating the device outside of the data sheet
specification is not supported by Microchip without
written documentation.
« Last Edit: July 10, 2012, 09:56:58 pm by Baliszoft »
 

Offline dfnr2

  • Regular Contributor
  • *
  • Posts: 241
  • Country: us
Re: Robust Microcontroller Input Protection
« Reply #86 on: July 10, 2012, 11:14:58 pm »
That microchip note is saying to use the input within its rated specs.

Here's another link from a Maxim tutorial that's relevant to the thread: Oops...Practical ESD Protection vs. Foolhardy Placebos.  It's short, and the internet is evanescent, so I'll quote it parts of it here:

Introduction
Electrical overstress (EOS) and electrostatic discharge (ESD) present real dangers to electronic circuits. In fact, EOS and ESD are the top causes of preventable IC failures. Some people discount the seriousness of the damage that EOS and ESD can cause. We have heard many excuses about why it is not necessary to take proper precautions:

  • "I don't believe in all that hocus pocus (i.e., sleight of hand)."
  • "I am an engineer, have been doing this years without problems."
  • "The humidity is high here."
  • "We already built ESD protection into the printed circuit board (PCB)."
  • "All ICs have built-in ESD protection."
  • "Statistically the odds are that nothing will happen."

This application note exposes the folly of this misguided thinking and suggests practical ways to protect electronic systems.

The Laws of Physics and EOS/ESD

We begin by revisiting these familiar excuses for the absence of proper EOS and ESD protection.

  • Unfortunately, a belief—even a firm belief—usually has little or nothing to do with the laws of physics. Placebos can work in medicine because the human brain has more control than we expect. All the believing that gravity would stop, does not keep us from stumbling and falling. However one thinks about "hocus pocus," when it comes to engineering, the laws of physics will always apply.
  • The laws of physics exist regardless of a person's occupation. Consequently, if a part does not instantly burn up in a cloud of smoke, it does not mean that there was no EOS or ESD present. Nor does apparent functionality mean that the parts were not damaged and will not die later.
  • High humidity does, indeed, reduce the ESD voltage. However, remember that the building's air-conditioning system is removing humidity to make us comfortable. It is simply quite true that humans are not very good at guessing relative humidity levels.
  • Board ESD protection is like air bags in our cars—they are there for accidents not for daily use. Built-in ESD protection reduces the chances of damage but does not totally remove the possibility for injury.
  • While most ICs integrate ESD protection, the ESD structures are made of tiny components. Again they are for accidents not daily use.
  • "Statistically, it will not happen to me." If it is true that statistically most automobile accidents occur within 25 miles of home, will there be no accidents farther away? Remember that numbers do not lie and will not subvert the laws of physics

. . .

EOS/ESD Protection in an IC
How do we protect electronics from ESD and EOS?

The ESD structures inside an IC are designed to protect the part before the customer mounts it on his products PC board. Because the ICs are limited in size, they cannot withstand system ESD events. At the board level, however, inputs and outputs can have more robust ESD structures. These external discrete components tend to be physically larger and carry larger currents than the ICs' internal ESD protection.

PC boards are protected from ESD by a combination of discrete silicon (small signal or reference), Schottky diodes, avalanche (zener) diodes, transient voltage suppression (TVS) diodes, gas-tube discharge devices, resistors, inductors, and metal oxide varistors (MOVs). Series resistors and inductors along with capacitors to ground can act as a lowpass filter. The rise time of a spark is very fast, so any way that we can slow it down will reduce the peak voltage.

. . .

In addition to the ESD protection build into most Maxim products, Maxim makes specialized ESD-protection and other fault-protected devices (www.maxim-ic.com/products/protection/) which include ESD protection diodes, analog switches and multiplexers, switch debouncer/protectors, overvoltage protection (OVP) controllers, signal-line protectors, lithium-ion (Li+) battery protectors, and current-limit and USB power switches.
 

Offline Rufus

  • Super Contributor
  • ***
  • Posts: 2095
Re: Robust Microcontroller Input Protection
« Reply #87 on: July 10, 2012, 11:20:47 pm »
That is what the schematic may look like, but what happens if you put a 1 ohm resistor in parallel with the 100k resistor?  How much energy will the 100k resistor dissipate?  Not much.  Now suppose you put that 1 ohm resistor between the input terminal and the GND plane.  Now, how much energy is dissipated by the 100k resistor?  again, not much.  In both cases, you may damage your circuit.  Now, what happens if that 1-ohm resistor shunts from the input to chassis?  Your circuit is protected, and again, not much energy in the 100k.

Stray capacitance across say a 1206 resistor doesn't get to be 1 ohm till around 3THz, it doesn't get to be 100k till around 30MHz . You are beginning to sound like FE putting up straw men.

If you route stray capacitance across the series element you are trying to make as high impedance as you can you are dumb.

If you bypass some of the transient before the series element there is less dissipation in it because there is less of a transient and less of a problem preventing it damaging anything on the other side.

Anyhow I don't see any of this invalidates what I said or validates what FE said about not using internal clamp diodes because they are not designed for it and will cause latch up and destroy parts. If parts are specced with a clamp diode current limit you can de-rate it from abs max as you see fit and use it.

There are 3 engineers in a bar. A guy walks up to them and says I'm sick of getting wet in the rain design me an umbrella. The first engineer says sure I'll make it out of tissue paper, it will be really light and cheap to manufacture. The second engineer says I'll make it out of Nylon fabric it will be more expensive than his and a bit heavier. The third engineer says I am much more experienced than those two. I have seen it all. I have seen it rain hailstones the size of golf balls. My umbrella shall be constructed from 1/8" steel plate. It will be expensive and I'm not sure you will be able to lift it, but, believe me I know what you need.......

edit: fixed miscalculation.
« Last Edit: July 10, 2012, 11:27:30 pm by Rufus »
 

Offline dfnr2

  • Regular Contributor
  • *
  • Posts: 241
  • Country: us
Re: Robust Microcontroller Input Protection
« Reply #88 on: July 11, 2012, 02:54:57 am »
Stray capacitance across say a 1206 resistor doesn't get to be 1 ohm till around 3THz, it doesn't get to be 100k till around 30MHz . You are beginning to sound like FE putting up straw men.

If you route stray capacitance across the series element you are trying to make as high impedance as you can you are dumb.

If you bypass some of the transient before the series element there is less dissipation in it because there is less of a transient and less of a problem preventing it damaging anything on the other side.

Anyhow I don't see any of this invalidates what I said or validates what FE said about not using internal clamp diodes because they are not designed for it and will cause latch up and destroy parts. If parts are specced with a clamp diode current limit you can de-rate it from abs max as you see fit and use it.

I think you and some others here are talking about IC input stage protection, and others are talking about ESD and transient protection, in addition to input stage protection.  Input stage protection is pretty straightforward--you can cover it in a half an app-note.  ESD/fast transient protection can be tricky, to say the least.

The 1 ohm was for illustration to make the point easier to see.  In that scenario--your 100k input resistor--there is no management of the ESD because you have left it out.  So replace the 1 ohm resistor with a ~100-200 ohm, conservative ballpark) resistor, representing the instantaneous peak plasma current during a spark or "flash over", then reread.  The resistor shunting to various places is the spark.  A 10 kV potential can or course jump across a 2mm resistor, sometimes up to 10mm, depending on geometry and pressure.  And, as you pointed out, the energy can also couple capacitively to unwanted places.  Once the spark occurs, the flowing current can also inductively couple in to even more unwanted places.
« Last Edit: July 11, 2012, 05:28:16 am by dfnr2 »
 

Offline free_electron

  • Super Contributor
  • ***
  • Posts: 9053
  • Country: us
    • SiliconValleyGarage
Re: Robust Microcontroller Input Protection
« Reply #89 on: July 11, 2012, 03:50:00 am »
More shit again. Tell me where to find these 1uF or more 10kv capacitors in a car.

Tell me where these capacitors with 5 times more stored energy than is considered lethal to humans are and how they are going to be connected to signal inputs read by a microcontroller.

wow, you are really analy focused :)
How come you completely misunderstand anything that is said ?

The capacitor/resistor i give is an example. Ever had an electrostatic shock from a car when you touch it ? you guess how much energy there is ...
There is no way of knowing how much energy is stored. your circuit may survive a small discharge , but not a large one. that is the example i gave.
The same goes for the schmitttriger i put in the my example circuit. that is NOT part of the protection system. it is there to clean up the incoming signal and improve noise margin. The protection circuit is the zener clamp. That shunt surge energy to chassis ground. If the surge is high enough the input resistors will fry. you do not want to send surge energy into a power rail . So there is a ferrite bead ( both on power and in the system to chassis ground ) to keep the transients out. a small capacitor across the zener shorts the crest of the energy pulse. the zener eats the bulk.


Car are moving objects with a lot of vibration. Where there is vibration there is friction. Where there is friction there is possibility for charge accumulation. Where there is charge accumulation there will be a discharge if the voltage is high enough. And the discharge will take the path of least resistance. Laws of physics. can't be changed.

And if you want to know where you can find massive discharges in a car ( besides the sparkplugs ). The engine is mounted on rubber silencers and the engine block is connected with a big ground strap to the chassis. Cars drive in wet environment. If anything happens to that electrical connection over the years... the electrons will seek a different path. If they happen to find your unprotected input in their way they will strike there. So if your engine controller is bolted to the chassis and has wires going to the engine bloack , and the engine block ground goes bad ... foom. byebye electronics.

Current will flow in the most crazy pathways imaginable in a car. the whole engine bay is quasi exposed to the elements. things rust , contact resistances go up and because there are large currents involved in some of the stuff going on you get large voltage drops. The backlash from the startermotor alone can fry your system.

@baliszoft : i cannot judge from the pictures. i would need to see both the pcb layout and know the exact part number. One thing i do see : they use long bodies to have some standoff voltage. One is even using MELF packages becasue those are spiral cut and have a higher rated working voltage than regular smd. The other picture has a big fat trace under the resistors. I speculate that will be ground. Done on purpose to create something for the spark to fly to if needed. But again , without having all layers of the layout and knowing the exact part number there is no telling. By just looking at a resistor you cannot tell if it is a safety class of high voltage resistor. In some instances you can tell but you really need to have the schematics and bill of material. There is more than meets the eye in these things.

I Had a little chat over lunch with one of our automotive people. Almost 50% of field failures that are analyzed have blown bondwires.  The protection structures survived the pulse current perfectly fine.. because the bondwires gave out ... resulting in an equally dead chip for the user.

My collegue pointed me to this reading material :

http://www.sjsu.edu/faculty/selvaduray/page/engr242/Lecture%204.pdf
http://www.dbicorporation.com/esd-art1.htm
Read for your enjoyment.

Professional Electron Wrangler.
Any comments, or points of view expressed, are my own and not endorsed , induced or compensated by my employer(s).
 

Offline Rufus

  • Super Contributor
  • ***
  • Posts: 2095
Re: Robust Microcontroller Input Protection
« Reply #90 on: July 11, 2012, 05:23:18 am »
I think you and some others here are talking about IC input stage protection, and others are talking about ESD and transient protection, in addition to input stage protection.

The thread can cover everything but the disputed bit is about using internal clamp diodes and damaging parts and specifically for microcontroller inputs per the thread subject not op-amps or the whole of the Maxim product range. I said some of what FE posts is shit, he twisted that into "labelled full of shit". Baliszoft was already annoyed by a thread on signal integrity (and me but I don't think I bothered commenting).

More shit again. Tell me where to find these 1uF or more 10kv capacitors in a car.

Tell me where these capacitors with 5 times more stored energy than is considered lethal to humans are and how they are going to be connected to signal inputs read by a microcontroller.

wow, you are really analy focused :)
How come you completely misunderstand anything that is said ?

The capacitor/resistor i give is an example. Ever had an electrostatic shock from a car when you touch it ? you guess how much energy there is ...
There is no way of knowing how much energy is stored.

10J in less than 0.3 seconds is considered to be a potentially lethal electrical discharge. 1uF at 10kV is 50J of stored energy.

Not seeing car parks littered with dead bodies clutching car keys is a great way of knowing the stored energy isn't nearly as much as the "1uF or more at 10kV" example you gave.
 

Offline Baliszoft

  • Frequent Contributor
  • **
  • Posts: 277
  • Country: hu
Re: Robust Microcontroller Input Protection
« Reply #91 on: July 11, 2012, 09:24:23 am »
Now, touching 61 volts is one thing.. spark it with an ESD gun and see what happens then... most likely the energy will simply jump over the resistor and fry the input.

A simple resistor will not hold that. Which is why i stated : use long body resistors (1206 ) , cut a moat under them and put protection to chassis ground right there. if it jumps , it hits the protection device and is deviated to chassis ground. it doesn't enter system ground.

You are right, yes probably that would happen. But do not forget, that the "protection" begins with a 10nf cap right at the connector, and you arent firing the middle of the board (like i did). If you discharge lets say a 8kv 100pf charge into a 10nf cap that would yield a lot less voltage at the end. The difference in the charge and its "reservoir" is in the magnitude of 100, and even if the resulting voltage wont be attenuated by this factor, it wont be in the kv range anymore.
 

Offline Baliszoft

  • Frequent Contributor
  • **
  • Posts: 277
  • Country: hu
Re: Robust Microcontroller Input Protection
« Reply #92 on: July 11, 2012, 10:30:39 am »
ESD caps from siemens and bosch. All caps are 0603 ceramic ones in the range of 2-10nF (mostly), they are connected to the main ground plane. No caps on CAN lines at all with bosch (did not check siemens, did not desolter the 131 pin connector), its protection is handled solely by the transciever (a choke is used in both cases, making it even worse).
 

Offline free_electron

  • Super Contributor
  • ***
  • Posts: 9053
  • Country: us
    • SiliconValleyGarage
Re: Robust Microcontroller Input Protection
« Reply #93 on: July 13, 2012, 10:17:52 pm »
ho.... you never mentioned that ! (  or i missed that completely . )

If you start adding caps on every input pin that is another way to get rid of transients. For a transient this capacitor is virtually a short ... So these dampen ESD discharges and surges.
Most of the energy shoots straight into that ground. ( notice that the caps ground is on the outer rim of the pcb. the current will flow straight into the chassis connections. )

CAN transceivers already have a robust protection built in as it is part of the electrical specs of the standard.
Professional Electron Wrangler.
Any comments, or points of view expressed, are my own and not endorsed , induced or compensated by my employer(s).
 

Offline Baliszoft

  • Frequent Contributor
  • **
  • Posts: 277
  • Country: hu
Re: Robust Microcontroller Input Protection
« Reply #94 on: July 13, 2012, 10:42:32 pm »
As i always say, for slow digital signals, a cap for esd and a high series resistor do the trick. They dont really use more complicated way in high volume production. They shave off every possible cents.
 

Offline free_electron

  • Super Contributor
  • ***
  • Posts: 9053
  • Country: us
    • SiliconValleyGarage
Re: Robust Microcontroller Input Protection
« Reply #95 on: July 14, 2012, 01:54:20 pm »
Ah, i interpreted that as . Commector to resistor , resistor to capacitor , capacitor to ground. R/c node to input of chip.

But still, the layout of such an approach is s
Critical. Any energy must be sent in the ground terminal and not run across the plane. If you look at the layout , the caps are placed in such a way that the energy runs locally in the plane and either goes to chassis ground or to a ground return pin on the connnector.

Still, just using a cap alone with standard chips is not good design practice. This may work with parts in 'old technologies' like 700 nanometer. Don't try this with a modern part. The structures there are smaller. Silicon cost is calculated per square inch. The cost of masksets is so high that we want to cram as much parts on a wafer as possible to spread this cost per part. Protection structures are gigantic compared to the actual logic. So it makes more sense to place these at the boundary of the system as opposed to at the boundary of the chip.
Professional Electron Wrangler.
Any comments, or points of view expressed, are my own and not endorsed , induced or compensated by my employer(s).
 

Offline Baliszoft

  • Frequent Contributor
  • **
  • Posts: 277
  • Country: hu
Re: Robust Microcontroller Input Protection
« Reply #96 on: July 14, 2012, 02:41:48 pm »
Okay, did some tests which i believe are quite unbelievable. If i did not see it i would not believe it myself, but heck, they are true. Actually it would be nice of someone else could do similar tests and back me up on this.

I have tortured a dspic30f, which is properly fed on all of its power rails with a powerful regulated supply (5V max 1A +a 6.8V TVS diode), buffered with a 100uF cap and decoupled with 100nF on all of its power pins, MCLR is pulled up with 1.5k. The microprocessor is running a complete engine management software, and is supplied with all the singals required to let it think that it is connected to a working engine. I was monitoring all the ADC and digital input channels and all output drivers (lamp, relay, ignition, injection) meanwhile the test. I set a 2.50V reference voltage to (nearly) all of the ADC inputs. The processor was running various tasks, including I2C and SPI communication, accessing internal EEPROM even RTSP (run time self programming) and of course "managing a fake engine". It was running on 20mips with an external 5mhz crystal (with 4X PLL).

I have overloaded only one pin, because i wanted to find out the current when a pin actually fries. The pin i chose was VREF+/RA10 which is a digital IO line multiplexed with the ADC Voltage Reference+, it was just configured to be a digital input. The pin was connected to a current limiting resistor (which varied during the test) and a variable voltage power supply (no pulldown resistor used). I measured the current with an agilent u1252b in mA and then A mode. The test took a lot longer than i initially expected, so at the end i lost my patience and cranked up the current in larger steps.

I did not blow the pin at the end. I started with 20mA overload which got slowly increased (as it is shown in my attached log). After every step, i verified if the actual pin is still working. The overall duration of my test was more than two days with the pin being countinuously overdriven. When i reached 150mA i tested four other pins too, to see if it was just a blind luck that this pin is still alive. The others were fine, too. After 270mA the ADC values got quite funky, they had random error in it (in the +-15% range). At 500mA one of my RTSP writes has failed. At 650mA, the input began to toggle between the on and off state. At 700 mA the outputs were slowly getting disabled (after ca 15-20 sec) and then the processor finally locked up itself in a state where it consumed 1A+ current. I am sure if i did not shut the power off, it would have destroyed itself. After removing the excess current from the pin and restarting the stuff, it was working OK again. With 800mA everything happened the same, except a bit faster. I have decided to stop the experiment here. I could not fry the pin even with 800mA (though the processor locked up and entered into a "self destruct mode").

I experienced no lock ups other than that, or no other funky behavior (btw i would not bet on it, maybe i just havent noticed them :P).
When i overloaded a pin with no ADC features on it it did not affect the ADC.... mmm actually it did, but not much, at 150mA the 2.50V reference readed 2.49V. When i had no pullups or pulldowns (so the micro pins were floating), the state of the overloaded pin was leaked to the adjacent pin over 5mA overload. With pulldowns installed (4k7 this time), this did not happen.

These do surely can take some abuse.
« Last Edit: July 14, 2012, 03:10:05 pm by Baliszoft »
 

Offline Baliszoft

  • Frequent Contributor
  • **
  • Posts: 277
  • Country: hu
Re: Robust Microcontroller Input Protection
« Reply #97 on: July 14, 2012, 02:51:06 pm »
Still, just using a cap alone with standard chips is not good design practice. This may work with parts in 'old technologies' like 700 nanometer. Don't try this with a modern part. The structures there are smaller. Silicon cost is calculated per square inch. The cost of masksets is so high that we want to cram as much parts on a wafer as possible to spread this cost per part. Protection structures are gigantic compared to the actual logic. So it makes more sense to place these at the boundary of the system as opposed to at the boundary of the chip.

I do understand your concern and i also agree that high voltage may not enter the middle of the board (thats why the lack of protection on CAN is strange to me) and enter any microprocessor or other chip. I am however keen to believe to the documentation of a device, and when it says 20ma is allowed to go into a pin, i am not concerned about using the hundredth of that value.
 

Offline Baliszoft

  • Frequent Contributor
  • **
  • Posts: 277
  • Country: hu
Re: Robust Microcontroller Input Protection
« Reply #98 on: July 14, 2012, 03:24:38 pm »
the outputs were slowly getting disabled (after ca 15-20 sec).
Actually my output drivers are inverting ones, so the output pins may have been saturated instead.
 

Offline Mechatrommer

  • Super Contributor
  • ***
  • Posts: 11725
  • Country: my
  • reassessing directives...
Re: Robust Microcontroller Input Protection
« Reply #99 on: July 15, 2012, 04:12:06 am »
Quote
and of course "managing a fake engine".
well done on "first" stage of testing. now to the second. do it again on "real" engine, on the "real" road for a "real" one year or more. add some extra abuses during that space and time (maybe KV spike) to be more fun.


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf

 

-->