Robust Microcontroller Input Protection - Page 1
Forum section: electronics / general

author: JayDee
author_rank: Contributor
timestamp: July 03, 2012, 12:26:08 pm
content: Hi,I'm re-visiting a project and want to design in robust input protection.The inputs are mostly for slow digital switched inputs in an automotive environment.As ever..dont want to go crazy and over the top of parts (cost, board space and time of assembly) but dont see the point in making something that will be poorly protected.The basic starting point is.Microcontroller with a Capacitor to ground, series current limiter resistor and pull up resistor to 5V supply.I would like to clamp both constant and transient/ESD over voltages, thus looked at adding a TVS and/or Zener.Do I need both? Looking at a 5V TVS specs ( for microcontroller inputs) they have a breakdown voltage (start of voltage clamp) at 5.6V and full voltage clamping at nearer 8V. This is obviously way over the Max voltage limit of the microcontroller inputs @ Vcc+0.3V (so around 5.29V)If I want to do this properly, do I need to run the TVS to deal with the high voltage short duration spikes/ESD, then use a Zener to bleed of any constant DC voltage over ~5.2V.Any help appreciated.Regards,J.

author: free_electron
author_rank: Super Contributor
timestamp: July 03, 2012, 03:30:21 pm
content: Search on the forum. I posted a whole page on this subject.All you need is two resistors and a double-diode per pin connected to a hard reference made with a properly biased power zener.Make sure to use long body resistors, create a moat under them, provide a shield ground that is only coupled with a ferrite bead to system ground and you will be good.If you cpu does not have schmittrigger inputs you can add a schmittriger inbetween and feed that of as separate rail.High energy , short pulses are best shunted using small caps to ground...Someone needs to make an article about this stuff. This comes up ever so often and many people have no clue how to do this kind of basic thing..If i have time i will whip one up... It's usefull since i'm preparing to write a book on practical PCB layout where this kind of stuff will be covered...

author: TerminalJack505
author_rank: Super Contributor
timestamp: July 03, 2012, 05:10:00 pm
content: I thinkthisis the post free_electron is referring to.I'm doing an automotive circuit too so I'm looking at input protection circuits as well. I wasn't going to do anything quite as extensive as free_electron's circuit, however.That circuit is meant for fast signals so you might be able to get by with something simpler.

author: free_electron
author_rank: Super Contributor
timestamp: July 03, 2012, 05:13:06 pm
content: jep. that's the post allright. i'll whip up a sample layout later today so you can see more clearly how things are split.

author: codeboy2k
author_rank: Super Contributor
timestamp: July 03, 2012, 07:44:06 pm
content: Quote from: free_electron on July 03, 2012, 05:13:06 pmI'd like to see the layout you do, but here's the circuit you drew up. I did this to keep a reference for myself too.I hope there's no mistakes. Let me know if there are any changes to make, I'll update it.Cheers!EDIT: schematic diagram removed. See Version 2here

author: TerminalJack505
author_rank: Super Contributor
timestamp: July 03, 2012, 09:05:34 pm
content: Quote from: codeboy2k on July 03, 2012, 07:44:06 pmNice!You might add a note about "the 1k resistor needs to be a fusible type for fire safety." I assume he is referring to the 1k at the inverter's input. Or did he mean the 10K resistor since it will be absorbing the bulk of the energy?What kind of ESD voltages should this circuit be able to withstand?

author: free_electron
author_rank: Super Contributor
timestamp: July 03, 2012, 09:28:53 pm
content: It's the 10k input resistor that needs to be long body. You don't want any flashovers there.Note : this ONLY works if you have CMOS input schmittriggers. it will NOT work if you use TTL as you cannot make the input low enough to trip the circuit.TTL chips source current from their inputs and all this series resistance prevents it from being pulled low.-EDIT- I went back to my notes. the ground of the schmittrigger needs to be system ground. the supply of the schmittrigger is taken between ferrite bead and diode . i will adapt ascii schematics in a momentThe safety moats are imaginary lines. Think of it as the barbarians trying to raid the castle...They have to hop over the body of the first resistor body ( which is a moat filled with water the barbarians have to get over ) 1206 - long body , i removed the step model so you could see clearly , then they hit the defense formed by the double diode trying to suck their energy to either chassis ground ( if they are negative) or the clamp voltage ( if they are positive ).If they make it pass the second moat in the form of the ditch formed by the body of the second resistor . They will be all pooped-out by now and whatever 'oomph' they had is now a mere sliver that will be eaten by the clamp diodes in the schmittrigger chip.The capacitors between CLAMP and SAFETY ground need to be able to handle a punch... it may be necessary to repeat that cap ever so often to shunt fast transients effieciently.The same for the zener diode. if you have a long group of these inputs ( like a 32 input block ) repeat the cap and zener every 8 inputs and stagger them.zener , 4 inputs , cap , 4 inputs , zener , 4 inputs , cap , 4 inputs etc ... If the zener or caps sits on the other side of the world , so to speak ( meaning far from where the strike occurs ) the inductance in the traces can still cause a large whop to appear.As for how much this can withstand ... hard to say. depends on humidity and other factors. But it can pack a serious punch. we hade these in big telecoms racks. zero field failures... given that some of these racks get lightning strikes coming in ... ( ok , theres gas surge arresters along the way but still )

author: Baliszoft
author_rank: Frequent Contributor
timestamp: July 03, 2012, 10:40:46 pm
content: 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.

author: free_electron
author_rank: Super Contributor
timestamp: July 03, 2012, 11:02:28 pm
content: That depends. For consumer stuff yes.For telecoms stuff .... no.. there it needs to be bulletproof.Here's a board i did years ago ( 2001 )48 line ADSL 2+ line card. There is 48 houses connected to this board. each getting up to 24 Megabit /s second ADSL2+ a chassis holds 16 of these blades , 4 chassis per rack , that are housed in arrays of 8 racks side by side in a column... in buildings holding hundreds of these columns ...Knowing that each blade costs about 400$ ... you don't mess around with "a resistor and a cap will be good enough..."The first lightning strike closeby would fry the whole room and i would by on my ass in the gutter flat out broke and without a job and no prospect of ever finding one again ... i would be burned , literally and figuratively speaking...I have never had to design consumer crap , and i refuse to. I know it is endless penny pinching and i can't work that way. If i make something it needs to as good as can be , be robust and work for 30 years +. If i make something for myself i still abide to those standards. If someone else doesn't like it , it is their prerogative to strip it down , but i take my hands off at that point. If it's worth doing, it's worth doing it right. In all other cases : buy it from wingpangpong..

author: JayDee
author_rank: Contributor
timestamp: July 03, 2012, 11:07:27 pm
content: Excellent, thanks for the info guy, I'll have a look through in more detail tomorrow,Thanks, J.

author: TerminalJack505
author_rank: Super Contributor
timestamp: July 04, 2012, 12:41:03 am
content: free_electron, good to see that this was used in an actual high-end product.Was this circuit tested for compliance against IEC61000-4-2 (ESD) and IEC61000-4-5 (surge/lightning)? With the circuit powered-up and powered-down?I'm just curious if it can meet the ESD requirements when powered-down since the rise time is so fast.

author: codeboy2k
author_rank: Super Contributor
timestamp: July 04, 2012, 02:16:24 am
content: Quote from: TerminalJack505 on July 03, 2012, 09:05:34 pmok, but I'll note the 10k that way. We wouldn't expect a lot of current there, just high voltage transient spikes, but it would certainly help to protect against someone putting the mains onto the input pins. (more reasonably, a long run of the cable fraying in the plenum after a mouse eats away at the insulation and causes the input to be shunted to the mains cable beside it in the same plenum tray)Quote from: TerminalJack505 on July 03, 2012, 09:05:34 pmit's the 10k, as FE has already pointed out,Quote from: free_electron on July 03, 2012, 09:28:53 pmbut maybe, when money is no object and protection is highest priority, then perhaps even the 1k can be a long body resistor, for that little bit of extra protection.Quote from: free_electron on July 03, 2012, 09:28:53 pmI'll add a note to the schmitt trigger.QuoteYes, that makes sense actually, since the safety ground will carry large transients, you don't want those near the pins of the schmitt trigger, I'll update the drawing I made. What about the bypass cap on the schmitt trigger power pin, you had it going to safety ground, I suppose it now goes to system ground too? And the supply of the schmitt trigger doesn't need it's own ferrite bead anymore, since it's taken between the diode and the existing ferrite. It won't hurt, but I think it's not necessary anymore.Quotebasically give the spike lots of places to dissipate quickly. I'll note it on my diagram too for reference here.EDIT: updated schematic, v2 here now.

author: SeanB
author_rank: Super Contributor
timestamp: July 04, 2012, 05:08:12 am
content: FE, that did not help where I used to live. Lighning hit 40km away in the mountains, travelled along the overhead wiring ( blew them to vapour at the nodes along the way as well), hopped over the incoming gas dischargers and surge arrestors, landed in the frame and fried everything. Only survivor was the backup lead acid battery, the rest had to be cut out as it was literally welded into the frames. Everyy phobne rang once, then died. Took a week to replace the exchange, they literally went to a town with a similar unit being commissioned, but not cut in, and pulled it out and trucked the whole lot over to replace it. 1 week of 24/7 shifts by the technical staff and they were runing again. The donor town had to wait 4 months for the new one to be built again, so they still had service and the operators had a job for 4 months.

author: free_electron
author_rank: Super Contributor
timestamp: July 04, 2012, 06:14:34 am
content: ah.. overhead wiring. yes , that is a direct strike .. hard to stop that one.i'm talking underground trunks. lightning heats ground about 2 meters above where the cable sits. this still induces a massive jolt in the cable.All i know is this stuff was tested according to CISPR and ITU. and it lives. We shot it many times with esd guns at 15 kilovolts. no problemo. ( i don't rememeber what the energy setting was though. 15 kilovolts doesn't say a lot. 15 kiovolts from 15 pf is different than 15 kilovolts from 1 uf .. ) By the way , this is not my design. i learned this from the telecom guru's at alcatel. they had a dedicated lab for this kind of stuff. They explained the moatign system , how to make sure there is enough crep , how to open up the soldermask for the esd guard ring ( drat , i forgot to do that in my quickly-slapped-together-layout : there should be NO soldermask around the testpins , nor underneath the first resistor. you need bare pcb. the reason is high-voltage creep.long body resistor : 1206 is fine. that gives you enough creep.Try to use thin film and not thick films. thin film is metal sputered and laser cut. thick film is printed ink and laser cut. thick film flashes over quicker than thin film.there are 1206 resistors with high standoff voltages. they are typically blue in color ( as opposed ot a black strip , they have a blue strip on the alox base ) vishay and others make those. the blue material is an extra isolation layer to shield the resistive element. it is applied AFTER the laser trimming to seal the element from humidity.you can omit the schmittrigger if you know the processor or whatever digital chip you use has these in the input stage. i just added those for completeness. if you omit the extra chip then the processor or chip is powere BEFORE the ferrite ( and not from between ferrite and resistor to the diode )the ferrites are high-impedances for the pulses. there too you want long-bodies.any connector shield needs to be plugged to the safety ground as well.like a usb connector. it has 4 wings connected to the metal body and 4 pins : vbus d+ d- and gnd. the wings go to safety ground , the gnd pin goes to system ground ! try to route this connection (gnd pin) on in an inner layer. and create another bare copper ring around the pins.the whole idea of creating bare copper is so the esd zap is attracted there and doesn't shoot into system groundOnce you are past the 10k moat there isn't much energy anymore. then you cross the 1k moat and the esd protection devices will eat the rest.it is important the capacitors at the double diode can handle large voltages. you can get away with 10nf to 100nf but grab 250 volts . whatever spike goes rthrough the diode needs to be absorbed by these ( the zener will react , but the very narrow spikes will be shunted mainly by the capacitors. ) thos caps will probably be 1206 as well. in telecoms we used 2512 bodies ans some other weird number 32-something ( can't remeber , i have to look it up. we used wide electrode caps as well.just like you have a 1206 capacitor ( 12 long 6 wide ) there is an 0612 cap ( 6 long , 12 wide , so the electrodes are wider but the distance between is shorter. this is for pulse currents.)there is a lot to say about selecting the correct kind of parts .. most egnineers and hobbyists pick whatever they find in the drawer.. there is a reason for having all these different kinds of constructions , materials , body shapes , laser cutting differences ( l -cut , r-cut , modifed r-cut , meander-cut and plenty others )someone ought to write a book about selecting passive components for function... you can easily fill a 500 page book on resistors and caps alone ..

author: notsob
author_rank: Frequent Contributor
timestamp: July 04, 2012, 06:20:03 am
content: I once viewed a microwave repeater station that had a direct lightning hit. The copper 'lightning' bars inside the room had been vapourised and had coated everything inside like a spray paint job

author: free_electron
author_rank: Super Contributor
timestamp: July 04, 2012, 06:27:43 am
content: nothing will stop a direct hit. that is for sure.but an induced hit can be stopped.

author: TerminalJack505
author_rank: Super Contributor
timestamp: July 04, 2012, 07:18:13 am
content: Thanks for the circuit, free_electron. I might base my automotive input protection circuit on it.So far, the attached schematic is what I've come up with. The MLV is $1.50 in one-off quantities so doing something like you've done might be cheaper. The nice thing about your circuit is that it easily handles the one condition that is the cause of the most expense in my circuit--the load dump condition.So far as my circuit goes, the MLV is going to clip or shunt the majority of transient conditions and absorb most of the energy. The 4k7 resistor, the zener and the 100n cap should catch the rest. The zener and the 4k7 will clamp negative voltages (negative transients left after the MLV and reverse battery condition.) The 5V zener will clip to the MCU's input voltage with the 4k7 limiting current into the zener. The 4k7 and the cap will also act as a lowpass filter. (My signals are very low speed. Basically DC.)The 10k is a pull-down. My inputs will either be +12V or hi-z. Finally, the 1k will limit current through the MCU's protection diodes when the input is negative.

author: free_electron
author_rank: Super Contributor
timestamp: July 04, 2012, 07:35:51 am
content: keep in mind that with the 10k pull down and the 4k7 input resistor you can never make more than 2/3 of the input voltge ..if you need a pull down or pull up it should be pace BEFORE the 4k7 ( where the transil sits )apart from that your circuitry is also a good approach. use a 4v7 or 4v3 zener and not a 5v1 .. you don;t wan tot trip the top diode in the mcu. i see a lot of designs where they abuse the esd diodes as clip/clamp diodes. that is NOT their intended purpose unless they are specifically designed for that ( ATMEL for instance does that , they even have an appnote about it , but don't expect that from all parts ! 99% are note designed or spec'd, or have never been tested for that ! )Keep in mind that zeners are slow to turnon. ( that's why i bias them in my circuit. they are already conducting weakly ) i only need 1 zener that can be shared amongst inputs. i can have one big fat zener protect 4 or 8 inputs. saves board space and cost.There's different ways to skin this cat. the key to protection is to control where the current flows. at all cost keep it OUT of your actual system. shoot it in the shield groudn , burn it in the transil , whatever .. but do not send it into the input pin of the chip , nor shoot it in the power or ground pin of the chip. that is the only rule that needs abiding. if you keep in mind that you are dealing with fast transients : give them a low impedance path. they contain high frequency components so they don't like coils , but do like small caps. make ample room and creep area and you are golden.for esd : bare the copper ring so it has something to zap to.

author: free_electron
author_rank: Super Contributor
timestamp: July 04, 2012, 08:01:03 am
content: one thing that maybe needs some more clarificationthe circuitry, principles, layout philisophy i presented here does several things.- ESD protection- absorb zaps and pulsed overloads wihtout destruction- avoid brown-outs or system resets to load dumps , spikes or whateverthe circuitry will survive this undamaged.in case of a hard overvoltage somethgin will give ... let's say a rodent is attracted to a bunch of yummy isolation , makes a feast of it and ends up frying itself and in the process creating a hard short between power rail and the input. 220 volts or 380 volts at the pin.something will give ! and it needs to be the first resisotr ( that 10k)even at 1 kilovolt the current will only be 100mA. (1 kilovolt / 10k) the zener or diode has no problem holding that. even if 10 inputs were shorted to 1 kilovolt. it's a friggin 1 or 3 watt zener ins SMA body. it won't even heat up fast enough since something wil give...The power dissipation in the 10k will be remendously high. 100 watts. for a 1206 .. that's going to fry .. almost instantaneous, so that is why you need safety resistors there. (sometimes called fusable resistors) these will open , will not catch fire , will not arc and they will hold their rated voltage when fused open.just want ed to make that aspect clear... as to the why how and what of having safety resistors there. of course if you don't expect anything over 50 volts continuous ... for 50 volts you dissiapte 250mW in the 1206. no problem. it won't fry. if you want to hold 100 volts: use 47k ...P = IxIxr .. doubling the voltage is quadrupling resistance.. don't get caught by that one !

author: TerminalJack505
author_rank: Super Contributor
timestamp: July 04, 2012, 08:05:34 am
content: I appreciate all the advice, free_electron. If I use my circuit then I'll make the changes you suggested.I'll look into using yours as well. I shouldn't need the Schmitt trigger and I'm not going to have an earth ground, obviously. Other than that it should be usable pretty much as-is.

author: Baliszoft
author_rank: Frequent Contributor
timestamp: July 04, 2012, 10:54:52 am
content: Quote from: free_electron on July 03, 2012, 11:02:28 pmThats a different story i admit. I thought it was just a plain (and local) input signal.

author: codeboy2k
author_rank: Super Contributor
timestamp: July 05, 2012, 03:20:14 am
content: There's lots of good safety porn in this thread

author: TerminalJack505
author_rank: Super Contributor
timestamp: July 05, 2012, 04:05:06 pm
content: Any thoughts on using the attached circuit as automotive input protection?It uses a cheaper TransGuard MLV and now has a 8k2 resistor to help absorb a big chunk of the energy.

author: free_electron
author_rank: Super Contributor
timestamp: July 05, 2012, 05:08:08 pm
content: get rid of the 8k2 and change the 1k to a 10k.i don;lt know about putting series resisors before transil type devices... it may make these slow to react...the idea if these protection devices is that they form a thyristor that ignites when a certain voltage thereshold is crossed. the problem with a thryistor is that you need to send CURRENT into the gate to kick it into action. so if you put a series resistor there the voltage to trigger will be reaached but that resistor may limit the current enough that the thyristor doesn't fire properly ...the other thing is that those devices are designed to go in hard short. when the pulse decays the current through them drops and once the current is low enough they come out of conduction.so there you have anothe rproblem. the series resistance may limit the current enough that the transil never stays in conduction do it doesnt really drain the energy.. it just sits there ding nothing at all , you might as well remove it..just my quick thoughts.. i'd need to try this on a curve tracer and see how those things react under current limited conditions.

author: TerminalJack505
author_rank: Super Contributor
timestamp: July 05, 2012, 05:33:34 pm
content: So like the attached circuit then?Do you think I could get away with using a resistor up front like that if I use TVS diodes?I'm really just trying to take some stress off of the part for load dump situations where the voltage can spike to 100V for 400ms. The MLV (even the 0.3J part) according to the datasheet can handle automotive load dumps so I should be okay with the circuit as attached.

author: Baliszoft
author_rank: Frequent Contributor
timestamp: July 05, 2012, 06:08:04 pm
content: I know i may be boring :-).But i still would like to ask you to do the math.100v/33000ohms = ~3ma100v/100000ohms = 1maLook up the specs of your processor for maximum input clamping current.I bet it will be min 10ma..... And you could even use a 1Mohms current limiting resistor if you are worried

author: Rufus
author_rank: Super Contributor
timestamp: July 05, 2012, 06:30:45 pm
content: Quote from: Baliszoft on July 05, 2012, 06:08:04 pmIf you are only concerned about the processor not sustaining permanent damage look at the clamp diode ratings. Most processors are not specified to operate correctly with any clamp diode current flowing. You can't use 1M either because you would loose a volt of noise margin with typical processor pin leakage specifications.Using maybe 100k is practical and there is not much to screw up with clamp diode current in a 74HC gate for example.

author: Baliszoft
author_rank: Frequent Contributor
timestamp: July 05, 2012, 06:55:22 pm
content: This is a common practice, not theoretical discussion.Many automotive ECUs are running with the clamping diodes flowing current (intentionally).Btw i would not use 1M either, but one could do it and because we are talking about slow digital signals (f.eg on off switch), noise would not be a big problem. BOSCH for example uses a low value cap (max 10nf) for esd protection, a 1-2k pulldown resistor followed by a 33k current limiting resistor. And that is all. Millions of ecus are running this way.Please do not over engineer, just because you can.

author: TerminalJack505
author_rank: Super Contributor
timestamp: July 05, 2012, 07:11:48 pm
content: Quote from: Baliszoft on July 05, 2012, 06:08:04 pmAh! This is good info. I'm going to use an AVR. Probably the ATtiny 261 Automotive. I found anapp. notewhere they did basically what you mention. This might be the app. note free_electron mentioned earlier in the thread. They use a 1M resistor to implement a zero-crossing detector on mains (110 - 240 VAC) voltage.They recommend no more than 1mA through the clamping diodes. They say this will work for spikes but not surges. By surges they probably mean something like IEC-61000-4-5 specifies (mains AC lightning strike.) This is probably unlikely for an automotive application.So, in theory, I should be able to use a 100K resistor and a pull-down and maybe add a cap for filtering.

author: TerminalJack505
author_rank: Super Contributor
timestamp: July 05, 2012, 07:26:58 pm
content: Quote from: Baliszoft on July 05, 2012, 06:55:22 pmSomething like the attached, then? What kind of voltage rating should the cap have?

author: free_electron
author_rank: Super Contributor
timestamp: July 05, 2012, 07:28:10 pm
content: correct, and if you remeber what isaid in that paragrpah it says :SOME processrs and IC's have actrually factory specified that you are allowed to use the clamping diodes for that purpose.SOME <- note the usage of the word 'SOME' and the usage of the word 'FACTORY SPECIFIED'. that means they tested it , and it was designed for that ...Automotive qiualified devices have more robust protection circuitry. it's not just extended temp range... there's other differences too.Do not try this with a simply cmos gate like a 4011. there the protection structures are for ESD only... they protect the chip when powered off. send any kind of constant current in them when powered on an there is NO guarantee that you will not turn on some parasitic element that could fry the chip.the way protection structures work is by deliberately turning on a parasite to shunt the energy. as the energy disperses the shunt turns off all by itself ( just like a thyristor self-extinguishes on zero cross )if the chip is powered up this becomes a whole other can of worms.. the protection structure kicks in but current keeps flowing after the disruptive pulse has disappeard. current coming from the power supply.. the protection shunt is made for pulse operation and pulse operation only. it can handle a massive overload for a few microseconds. keep feeding it energy for longer than that and it will auto-destruct.Note that in that appnote from atmel they use a resistor to detect zero cross... so the clamp will extinguish at one point due to the current becoming low enough...connect that pin to 220 volts DC .... my guess is as good as yours... it could very well be that the parasite remains on and that when powering on or off the system you cause a massive short that fries the thing.there is indeed no point to over-engineer, but, if you want to make something automotoive or industrial that has to be reliable a minimum of brain activity and protection is required ... just winging it by slapping on whatever resistor happens to by laying in the junkdrawer on it is 'duct-tape' engineering.As for common practice... it is common practice for lemmings to commit mass suicide... just because the whole world does it wrong does not mean you should follow the leader.

author: TerminalJack505
author_rank: Super Contributor
timestamp: July 05, 2012, 08:03:03 pm
content: Those are good points, free_electron. That app. note is the only place I've ever seen mention of allowable current through the protection diodes so, who knows just how good of an idea it might be.How about the attached as a compromise? The 1k is to limit current through the protection diodes in the case of a reverse battery condition. (Unlikely, but one of the many cases to consider for automotive circuits.)

author: Baliszoft
author_rank: Frequent Contributor
timestamp: July 05, 2012, 09:14:43 pm
content: There is an app note (cant recall its number) from microchip, which deals with connecting the ac mains to a uC pin thru a 2M resistor (1+1M favourably) directly, and they claim it is safe. Some say it is unsafe, but i do believe the manufacturers recommendations. Where it is possible, internal clamping diodes may be used (not exceeding the specs of course).

author: Baliszoft
author_rank: Frequent Contributor
timestamp: July 05, 2012, 09:26:18 pm
content: Quote from: free_electron on July 05, 2012, 07:28:10 pmfree_electron,You are getting quite annoying by now, and i bet it is not just with me.Im not doing any "duct-tape" engineering, the method i just suggested is how they do it at bosch. You called THEM, duct tape engineers.You'd better go and find yourself a job instead of being the local smart ass here.

author: Rufus
author_rank: Super Contributor
timestamp: July 05, 2012, 11:18:28 pm
content: Quote from: Baliszoft on July 05, 2012, 09:26:18 pmKinda. He knows a lot but some of what he posts is shit. If you don't already know as much or more about a subject than he does you can't tell which bits are shit. Anything he posts that I didn't already know I have to ignore or independently research and verify - annoying.

author: TerminalJack505
author_rank: Super Contributor
timestamp: July 05, 2012, 11:59:11 pm
content: Here's what I'm thinking about doing now. Use a relatively cheaper bidirectional TVS diode to handle ESD strikes and handle load dumps with the 10k series resistor and zener. The two 10k resistors should probably be 1W but load dumps are infrequent and relatively short in duration so 0.5W should survive.By the way, I should apologize to the original poster for hijacking his thread. Hopefully you can use the same or a similar circuit.

author: free_electron
author_rank: Super Contributor
timestamp: July 06, 2012, 12:23:23 am
content: Quote from: Baliszoft on July 05, 2012, 09:26:18 pmYes, and what kind of IC's do they use ? Bosh is an automotive/industrial vendor. Those devices ARE characterized for such usage. The input clamps are larger than in commercial stuff.I happen to have worked on several automotive chips for Bosh ECU's and body control electronics. I did one of the first common rail injection chips for them. I've also done devices for ABS systems of Wabco as well as other automitve stuff for Valeo and Magneti Marelli. The specifications for these devices explicitly call for clamps that can handle automotive environments. Those are NOT the standard ESD clamps you find in a dumb TTL or CMOS chip or off the shelf non-automotive CPU. Go look it up. And then come back calling my post shit.I am not saying my solution is the end-all of protections There is others out there that may work better. I do know it protects well. It has passed all kinds of tests and has been in the field for ten years +.There may aslo be simpler protection scemes that work.I am also saying that you cannot use the esd diodes in a common chip as protection using a simple series resistance. They are not designed, tested or qualified for that.You base your comments on something you have 'seen' on a pcb from people who know what they are doing. But your observations are incomplete as You have no idea how the chips inside are built ( see my comment above. They most certainly are specced for such usage ).You cannot generalize such an approach. I call such generalizations duct-tape engineering. Slap a piece of tape on it and see if it holds. If not, apply more tape.... There's too many people out there that will blindly clone this approach that are even more clueless.. And pretty soon all stuff ends up being wonky... Because it is a bad copy of a half understood system that is underspecced, underrated and will fail prematurely. But that seems to be the norm now. Cheap crap that dies after a year.If someone tries to explain the perils and pitfalls he apparently gets wristslapped. You're making it too hard, it's overengineered, you talk shit... That also seems to be the modern way of things. I don't care. You have your opinion, i have mine. I try to do things the right way , no cutting corners. I'm not forcing anyone to use my approach. I am just warning people that using a simple series resistor and 'blindly trusting' that the esd diodes will hold it is not the right way to work. It is a duct-tape approach. Let's wing it and see what happens. If someone loses an eye, so be it ... I don't subscribe to that methodology.

author: Baliszoft
author_rank: Frequent Contributor
timestamp: July 06, 2012, 06:36:07 am
content: Electron,Let me apologize, i cant read your whole post right now as it is too long and i dont have the time at the moment.Yes, bosch is using automotive stuff (even manufacture such things) but in this particular example (i was referring to) they are feeding a simple on off switch to an infineon c167 uC exactly this way. Nobody was talking about measuring analog signals with an adc, nobody asked the protection for anopamp, nobody was talking about an adsl modem, it was just about a plain digital switch. If you download the datasheet of the c167 the clamping current is 10mA, which is not that quite high (being an automotive uC), even a fecking dspic has got twice of this value (max 200ma for vdd/vss). Get yourself an ecu and reverse engineer it. Modern ecus got at least 20 digital inputs (often they are multiplexed with an asic), but they do simply connect them directly to the uC via a current limiting resistor quite often. And not just switches, even freq counters and hall phase sensors (pin is pulled up to vbatt, hall sender pulls it down, excess is clamped by uC).Dont get me wrong, i do acknowledge your knowledge. I've read many of your posts, which i've found informative, but when you are trying to be smarter than everybody (especially when you are not 100% right), and when you do provoke people (with duct tapes and such), that pisses me off.

author: Baliszoft
author_rank: Frequent Contributor
timestamp: July 06, 2012, 06:38:46 am
content: Quote from: Rufus on July 05, 2012, 11:18:28 pmLots uf useful info he shares, no doubt. Lots of knowledge, no doubt. Problem with his personality, no doubt. ;-)

author: Baliszoft
author_rank: Frequent Contributor
timestamp: July 06, 2012, 06:48:42 am
content: An idea: maybe Dave should do some research in this topic for a vblog.

author: free_electron
author_rank: Super Contributor
timestamp: July 06, 2012, 02:59:23 pm
content: Quote from: Baliszoft on July 06, 2012, 06:36:07 amthat is an AUTOMOTIVE cpu that has beefed up protections !This is my whole point. Automotive parts are specced for such usage. There you can use the input protection. But please, DO NOT try this with commercial parts.I have stated that already like 10 posts ago !Standard ( commercial, non-automotive) parts use esd protection structures. To be ised only for esd , not parametrized, designed, scaled , not tested , not approved for anything else. Use at own perilAutomotive parts are more expensive for the imple reason that the I/O ring is altered. Its the same internal guts but the bondpads and protection structure is altered. This structure is larger , takes more silicon which makes the chip more expensive. The difference between a commercial and auto otive grade part is not just the temperature... The guts are different. It is also possible they use a different technology. Commercial stuff may be in 90 nanometer whule the automotive may run in 120 nanometer.QuoteI'm the first to acknowledge i'm a pretty dumb guy. I can't type very well, i can't calculate an integral, suck at math , i just happen to know a lot of stuff.Quotei' m not attacking you or cali g you a duct tape engineer. The term duct-tape engineer means : someone who blindly applies somethign without knowing or understanding how it works. If it fails they try the same approach again but slap more un-understood or misunderstood stuff on i. The hope it will hold now.The reason i am 'growling' here is because- i know you work on ECU's- i know they use automotive parts- those have specified clamp currents becuase they are true clamps and not simple esd protection.- and you can get away with a simple resistor and cap there.- i have designed chips for automotive and know what is inside.But you can not apply that input technique to devices that are not specced for that.. And those form 99% of whatis out there.Knowing how on the internet 99.99% is beeing duct-tape engineered .. ( blindly copied ) the risk is that everyone starts using a single resistor for their project and design. And before you know it .. Crap design everywhere. The original was workin in spec , designed in spec , but it was misunderstood and blindly copied...That's what i'm trying to prevent.

author: Chasm
author_rank: Regular Contributor
timestamp: July 06, 2012, 04:41:18 pm
content: If you do stuff for money you better know WTF you are doing.It's that simple.Bosch did not arrive at their minimalist input protection by accident. (Relatively minimalist!) They knew what they were doing. What to expect on the input side, the complete environment, the price point they had to reach and a billion other things that influence the design decisions.They also did extensive testing! Not only in nice environments and also to destruction.If you can't test as much or don't need to squeeze out the last cents because it is low volume or high price equipment it may be easier to use too much input protection (including layout!) - as long as you know that it meets your requirements.

author: Baliszoft
author_rank: Frequent Contributor
timestamp: July 06, 2012, 05:01:53 pm
content: Im not arguing with you, because you are always smarter (in any topic).I only believe to the facts.If my datasheet says a processor can contiuously clamp 20mA on a pin (more than the 16+ years old automotive uC) without any damage, i will believe it, then test it, and use the hundredth of that value (without any worries).F.eg in my ecu in which i am using a dspic, 14V is fed to the controller via a 1206 43k resistor. Most of the times (excluding load dumps and transients), the resistor is dropping 8.5 volts. That is roughly 0.19 mA going into the pin. Never had any problems in the past 2 years with this setup. Take a load dump situation, nearly 100v goes into the resistor which drops 94.5v and results in 2.2mA. Still, nine times below maximum clamping current. Cannot see where the problem is. And it still works and will be working even if you cannot believe it.

author: Baliszoft
author_rank: Frequent Contributor
timestamp: July 06, 2012, 05:48:50 pm
content: Btw, dspic33 hi temp versions are getting aec qualified.

author: Rufus
author_rank: Super Contributor
timestamp: July 06, 2012, 06:52:07 pm
content: Quote from: Baliszoft on July 06, 2012, 05:01:53 pmIt will also sayQuote from: Microchip dsPIC33F datasheetI have yet to see a Microchip data sheet with with clamp diode current ratings where functional operation of the device is implied - so you are winging it. I remember reading somewhere they were going to start characterising and adding specifications for some parts.If you look at an Infineon C166 series datasheet (the one I looked at today anyway and it wasn't an 'automotive part') you will find lots of specification of allowed clamp diode current where functional operation is guaranteed which they call overload. Limits of both polarities, different limits for analog and digital pins, multiple pin combined overload current limits, and coupling factors indicating what proportion of overload current might leak into adjacent pins.An ATMega datasheet I looked at didn't even specify an abs max clamp diode current rating.From abs max ratings Infineon parts would appear to be less robust than Microchip parts but as far as tolerance of clamp diode current with Microchip I have no idea. I know for sure that clamp diode current does affect the operation of some Microchip parts, starting with analog functions such as ADC, comparators and RC oscillators, PLLs are probably sensitive. How much current on which pins has how much affect on which functions is unknown and a 20mA abs max rating tells you nothing, you are left to guess or test and hope the next batch of parts isn't any worse - in other words wing it.

author: free_electron
author_rank: Super Contributor
timestamp: July 06, 2012, 07:00:05 pm
content: Quote from: Baliszoft on July 06, 2012, 05:01:53 pmAnd it may still work for another 5 years.. and then all of a sudden something will fry it.One sample , 2 years is not a representative.. Take 1 million cars 5 year spread and we'll talk.One of (many) things i did in the past is fault analysis. I have seen many an esd protection shot to pieces because of incorrect usage. Customer returns with abnormally high failures. Cut the thing open and investigate . Chip dead, esd diodes are shot and the entire input structure is fried.What did you do ? Do you guys use transils externally ? Customer : (sheepishly) eh... no , we trust the esd diode to hold it... Manufacturer : Sorry, no refund as this is abnormal usage. Here is the catalog with transient suppressors, we'll happily sell ...There's catalogs full of transils ,tranzorbs ,tvs and other devices. There is a reason these things exist... they don't make these for fun to store them on a shelf , unsold because they serve no purpose.Yes, you may get away with it ,yes it may work for a long time , it may even never fail on bench. Put it in production and Murphy will lash out like a wild animal...There are governing standard like ISO7637 and others specifically for automotive. ISO7637 outlines the test methods , what the impulses look like and how you can perform the test.So, here's the million dollar question ... did you go through those certifications ?

author: Chasm
author_rank: Regular Contributor
timestamp: July 06, 2012, 09:19:13 pm
content: Quote from: Baliszoft on July 06, 2012, 06:48:42 amNo, this one is definitely for Mike. Much more high voltage induced flames that way.I suppose that Mike, in the name of science, can use something a bit less energetic than the Destruct-o-tron.Really, it would be interesting to see how different protection circuits react to (repeated) misuse. Also which potential problems like delay or bandwidth limits they come with.

author: Baliszoft
author_rank: Frequent Contributor
timestamp: July 06, 2012, 10:11:15 pm
content: You wish it was a million dollar question. The answer is no of course. Why would i do that with a fun project?! It is being abused just enough to make sure these wont let me and my friends (who are already using it) down.Go and design your own, and put it full with diodes!

author: Baliszoft
author_rank: Frequent Contributor
timestamp: July 06, 2012, 10:15:07 pm
content: Quote from: Rufus on July 06, 2012, 06:52:07 pmIm on holiday at the moment, but as i will be back at home again, i will overload and destruct a dspic to find out this limit.

author: free_electron
author_rank: Super Contributor
timestamp: July 09, 2012, 02:03:09 am
content: (puts pinkie in mouth a-la dr-evil) riiight ....So you have built 2 or three of these hobby thingies, which have not gone through any kind of (automotive or other) certification and industry standard testing as per the relevant specs. The design is based on something you saw other people do without knowing the details...You also claim that this is perfectly fine and the way it should be done.Someone who raises questions to, and warns about the problems with, this approach is labeled 'full of shit' ...riiight .... have a great holiday... don't step in any ...

author: Rufus
author_rank: Super Contributor
timestamp: July 09, 2012, 02:54:46 am
content: Quote from: free_electron on July 09, 2012, 02:03:09 amI am the only one that bought up shit in this thread and lets be exact I said"He knows a lot but some of what he posts is shit"and some of what you post is shit, and you just provided another example.

author: free_electron
author_rank: Super Contributor
timestamp: July 09, 2012, 03:42:24 am
content: So, doing things the right was is 'shit' then... Please enlighten me as to what portion is shit so i can learn something .

author: Rufus
author_rank: Super Contributor
timestamp: July 09, 2012, 04:52:56 am
content: Quote from: free_electron on July 09, 2012, 03:42:24 amThisQuote from: free_electronis some shit you posted in this thread. Telling people not to use simple gate clamp diodes citing ancient 4000 series CMOS which is well known to be prone to latch up. The 'protection structures' do not work by turning on anything they are diodes to the supply rails. Coincidentally and unfortunately the are also part of PNPN structures which form parasitic SCRs shorting the supply rails. Designers went to great lengths to ensure the gain of theses SCRs is less than unity to avoid latchup in slightly less ancient parts.Quote from: 28 year old Fairchild app noteQuote from: 19 year old NXP HCMOS app note

author: free_electron
author_rank: Super Contributor
timestamp: July 09, 2012, 06:41:47 am
content: Quote from: Rufus on July 09, 2012, 04:52:56 amIf you pull that input UNDER or ABOVE the ground rail you can and will kick in the parasitic element. A negative or positive transient can activate that element. Has happened, will happen. If the chip is powered up at that time it will fry itself (if the power supply does not go into short circuit protection). Yes chips are designed to try to avoid this kind of latchup but if the spike is hard enough it will still go in latchup. And it's not only cmos that has this problem. There is many an opamp that ,when powered symetrically , has its input pulled below the rail will fry itself. AD811 are a prime example of such an opamp... The protection diodes to have a turn-on time. Any pulse with substantial energy , faster than that may trigger the scr.. I have seen many a board go 'poof' when subjected to ESD discharges when it was powered up... simply because there were no external protection devices installed. You cannot trust a complex system built from many chips to be fully self protecting. Put the damn protection circuit ! Put a moat of blank chasses connected copper around it. Slap a shield on it.Put a surge arrester on it , or transil or transzorb or MOv or any other of the myriad of protection devices. do NOT blindly trust !There is a reason we still have to employ things like proper power sequencing and external input clamping / clipping and it is just for this reason. Something sooner or later will give if it is not done properly.QuoteThis needs clarification. This mechanism works when the chip is powered off. The incoming energy will trigger the scr , which will go in conduction , dissipate the energy and go back out of conduction once the spike has passed. This is a technique used in many SLIC for POTS ( the chip that is hooked up to the phone line in a Plain-Old-Telephone-System). Actually slics also have a crowbar circuit. When powered up they can short their inputs and let the energy decay. Principle of crowbar is used in many automotive devices as well in the input structure.QuoteIt's not only the old 4000 seires that has this problem. Plenty of opamps have this as well. Same with analog mulitplexers . What do you want me to do ? list all the devices susceptible to this ? it'll be a long list. Analog devices has some appnotes about opamps and analog switches and latchup...Quote from: 28 year old Fairchild app noteJust because the fairchild 74Hc series has this, does not mean you can extrapolate this to all chips. Every manufacturer does it different. Besides ... 28 years ago they were messing around in 15 micrometer. Don't try this in 45 nanometer .... Silicon area costs money an stuff is designed way tighter no than then. They will still be protected against latchup but i would not use that 20 to 100mA as 'truth' with a modern device... check the datsheet. Do not blindly trust ...Quote from: 19 year old NXP HCMOS app noteThere is many different JEDEC standards and subchapters for this kind of stuff. And not only JEDEC has this. There's others too. Just because there is a standard does not mean that every device adheres to it. It is still up to the manufacturers discretion to subject the device to a particular standard or set of standards. Do not assume that every devices has gone through this. Unless it is explicitly mentioned that a device is compliant to xyz ... do not assume ... call them and ask. If in doubt : apply external protection circuitry.This is not shit. This is reality. Call me a pessimist if you want to. I've seen too much stuff fry itself already in my 20 years+

author: Baliszoft
author_rank: Frequent Contributor
timestamp: July 09, 2012, 08:26:03 am
content: Quote from: free_electron on July 09, 2012, 02:03:09 amDont worry about me or about my product. If i will need to make this project to go through any certification (some are planned though) in the future and if fails, then it will be my problem and not yours. I have already tested my device to withstand the circumstances it has to withstand.Your suggestion (to put external clamping or zener or tvs) diodes before the device is of course right, i am not stating anything else either. It is just not practical (lots of board space, we arent talking about only 1 pin, but at least 6-8-10-20), it is excess cost, and furthermore it is unneccesary if the device has got input clamping diodes and the possible maximum current is safe for that device. I dont know what is so difficult for you to undestand in this?It may not work on any devices and may not be good for every type of device, but as a digital input of a uC it is a "common practice" to do this. You are just discrediting yourself stating that it is bullshit, because anybody who has seen an automotive ecu disassembled (preferably from the current century) can verify this.

author: Baliszoft
author_rank: Frequent Contributor
timestamp: July 09, 2012, 08:28:04 am
content: Dont bother Rufus, you wont/cant be right.Im sorry that this five star thread turned (again) into a flame war.

author: dfnr2
author_rank: Regular Contributor
timestamp: July 09, 2012, 02:24:47 pm
content: Guys, why are you beating up on Free_Electron? I have to post in his support here. I have not read his every post, but at least in this thread (and the one linked near the beginning), he has been spot on, and his posts are constructive. He has given an example. He has critiqued a design. That's actual money in the bank value. The problem is, there's so much BS and puffery and ego on the net, it's hard to tell when someone knows what they are talking about. Pulling signal from noise is an engineer's job. So let me set you straight. In this thread, free_electron's posts are the signal.His advised technique is standard and sound for high-speed single-ended signals, when the case and chassis are also attended to. I have learned this from experience (by actually having my devices tested, and also by experimenting in the lab, blowing up and bulletproofing my circuits until they don't blow up any more; and also by reading and talking with consultants--I wasn't lucky enough to have a mentor in this area.) If you look at one of my boards, you will see more in common with free_electron's description than differences. That is because some things are just good design.EMC/ESD is a whole-system problem. A schematic doesn't paint the whole picture (unless it's lacking.) Even the board layout (unless it's deficient) doesn't tell the whole picture without seeing how it fits in the case, and how the case is treated. If you have an idea of case and chassis scheme, and your board layout, with the board sitting in the case, then you can start to evaluate the system. You need to be thinking about that from the start.In every productive engineering environment I've been in, "productive" discussions can at times look to outsiders like arguments, with each participant excitedly propounding his viewpoint. However, at some point, you will have to look it up and admit if you are wrong. That's how you learn.By the way, if you think this thread is not worth five stars, read it again, minus the griping.

author: free_electron
author_rank: Super Contributor
timestamp: July 09, 2012, 03:18:33 pm
content: Quote from: Baliszoft on July 09, 2012, 08:26:03 amlet me try to put it in other words :Let's say your system is commercial and millions are made. You buy parts with ppm failure rates. You get field returns (destroyed devices) that are well above what is normal. The standard procedure is to go whine to the semiconductor manufacturer that their devices fail prematurely. The Semi fab will launch a fault analysis. They will go over your design , test it , cut the damaged devices apart and look what has actually fried. If they detect that you rely for protection on the esd structure : hands-off. sorry no refund. It's that simple.Now, your system may be a hobby project. Why would you want to cut corners ? Protection devices are avaialble in arrays . 4 or 8 per package. I looked at the pcb of your ECU. half the board is empty. So it's very easy to add these things. Cost ? negligible. It'll be 2 or 3$ on your entire system.It's like someone who has woodworking as hobby (i'm channeling Steve Jobs here) and makes the most beautiful cabinet , but its nailed together with rusty nails , and he used flower and water as glue ... just don't put anything on the top shelf huh .... It's like a museum showing Rembrandt or Van Gogh paintings hung, crooked, on a wall with a staple gun or with thumb tacks ... a frame is not not needed. You can look at the painting anyway.. if it gets damage ? .. ah who cares, we'll ask him to paint another one ( or we'll put a photocopy in place )That is the message i am trying to convey. The world is already full of crummy , corner cutting designs. Tv's and dvd players that fail 1 month after out of warranty. Let's not make more...Have some pride in what you build ! Do it the right way. Even if it's only for hobby. It ain't that hard or expensive.So there you have it. That's the part i don't understand.Now, what you do is your decision and, frankly, i don't care if you put protection devices or not. It's your problem if it goes kablooie. What i do have a problem with is pushing this approach as 'the standard' . you don't need to make it better. What was on Bart Simpsons t-shirt again ?

author: robrenz
author_rank: Super Contributor
timestamp: July 09, 2012, 03:55:24 pm
content: Well said!

author: Baliszoft
author_rank: Frequent Contributor
timestamp: July 09, 2012, 06:40:29 pm
content: Electron,I agree in most of your statements in your last post. My board has lots of space, i could put those diodes in, but i think i will just do it on the simple way and leave them out. Why? As i already said my uC is capable of handling the excess current. Why am i so sure in this? Microchip actually has an app note about this (mentioned earlier), and because i have tested it. I admit that i did not go until destruction, but will do as promised. If i can damage my uC i will put your diodes in, but if i cant, they wont have place on my board for sure.

author: free_electron
author_rank: Super Contributor
timestamp: July 09, 2012, 06:54:57 pm
content: Fine with me. It's your design after all. You control it.I wouldn't do it , but that's just me being prudent.

author: codeboy2k
author_rank: Super Contributor
timestamp: July 09, 2012, 10:18:49 pm
content: Quote from: free_electron on July 09, 2012, 06:54:57 pmI like prudent.

author: Mechatrommer
author_rank: Super Contributor
timestamp: July 10, 2012, 01:06:33 am
content: the problem are...1) the newbie hobbiests meeting up with seasoned professionals, and they cant distinguish the knowledge level, field of discipline and target area, budget and specification etc to one another.2) seasoned professionals, they are well... "highly professional" no doubt. but i believe their knowledge are doomed to obsolesence, esp most to people who stick so hard with what they are used to, my 2cnt... for me, i believe visual basic is still the way to make a PC application todayi know free_electron's circuit earlier must be it, the bulletproof input protection for digital IO. but (1) since i'm not expert so i dont know which one is shit or not, in the end maybe i should do my own research based on circumtances that i'm expecting (150% torture test etc) or maybe back refering to those standard and no blindfold duck tape "not engineering" approach. and (2) if i'm thinking of making a "handheld" device with 16 - 64 IOs, then adding beefed protection like free_electron did may end up my device sized larger than a PC motherboard. "chest sized held" not "handheld sized", so its quite a dilemma.anyway, bookmarked this informative thread, i trust it'll become usefull later. i just wonder why this thread keep bumped, no wonder... soon it'll become proving "does god exist" threadhave a nice day people. but still my kudos to free_electron for willingness to share information "boldly". good (righteous) peoples get hits hard! history proved! just to let u know. cheers.

author: codeboy2k
author_rank: Super Contributor
timestamp: July 10, 2012, 01:40:50 am
content: Quote from: Mechatrommer on July 10, 2012, 01:06:33 amIf He exists, I am sure He would use input protection.He has to keep the nasties out of His kingdom with multiple levels of protection.

author: Mechatrommer
author_rank: Super Contributor
timestamp: July 10, 2012, 02:20:55 am
content: and leaving us "loosly" protected... but, its a "freedom" if you think about it

author: free_electron
author_rank: Super Contributor
timestamp: July 10, 2012, 02:55:46 am
content: The 11th commandmend might as well have read :"Thou shallt use input protection for i might smite thee !"

author: Baliszoft
author_rank: Frequent Contributor
timestamp: July 10, 2012, 12:35:34 pm
content: QuoteJust a minor remark (advise) here; please don't fall into the mistake and measure "experience level" by the number of posts.QuoteWatch out! You will be called duck taper too, no doubt. I am using 1% of the rated dc clamping current in my design and i have been called everything.

author: Baliszoft
author_rank: Frequent Contributor
timestamp: July 10, 2012, 12:36:44 pm
content: Quote from: free_electron on July 10, 2012, 02:55:46 amNo need for this. You are already being treated as the god.

author: Baliszoft
author_rank: Frequent Contributor
timestamp: July 10, 2012, 12:39:08 pm
content: Quote from: Microchip AN521

author: dfnr2
author_rank: Regular Contributor
timestamp: July 10, 2012, 03:18:03 pm
content: Quote from: Baliszoft on July 10, 2012, 12:39:08 pmThose 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. They can also handle the residual energy after your real ESD protection shunts off the majority.Whether you actually put ESD protection at each pin is a trade-off, weighing the inconvenience/expense of putting it in against the consequences of a failure. However, the built-in ESD diodes in a regular commercial chip do not significantly affect that equation.

author: robrenz
author_rank: Super Contributor
timestamp: July 10, 2012, 03:36:37 pm
content: Quote from: Baliszoft on July 10, 2012, 12:39:08 pm"Several" does sound like a spec you can take to the bank.

author: SeanB
author_rank: Super Contributor
timestamp: July 10, 2012, 04:03:19 pm
content: Weasel words, means - we tested it and they did not fail until we hit 10mA , and then only one in 10 chips died from it.

author: Mechatrommer
author_rank: Super Contributor
timestamp: July 10, 2012, 04:40:20 pm
content: Quote from: Baliszoft on July 10, 2012, 12:35:34 pmdude you dont teach me that! i got one example of a person with great great number of posts but knows pretty much nothing.... myself! and i hung around much much more than anybody else here (i need a life!) so i know what free_electron had posted for so long, albeit he's newer than i am, and sure (didnt i tell you?) i dont know which part of his posts are shit.Quoteright! and god get bashed! LOL ohh i love this kind of part when things get offtopic and as usual... i'll get easily... trolled, LOL.

author: free_electron
author_rank: Super Contributor
timestamp: July 10, 2012, 04:41:47 pm
content: Call their bluff . Pick up phone and ask microchip : i have an application here. Volume 10 million devices. I want to send 110 volt in the chip using only a series resistor and use clamp diodes as limiter. Can you give me some hard numbers of what works ? I need 1ppm over 10 years? Watch em scramble...... They will not give you anything. They will tell you : you do the work. We will not back such a design as the chip is not designed nor specced for that.It may work, but you need to test your application. We cannot and will not do the test nor guarantee anything. We can custom build you something that we can guarantee, but not the off the shelf part.No sane semiconductor manufacturer will back that. Besides, UL would have a field day for safety ...And drop the god stuff right ? I'm not god. There's more stuff about electronics that i don't know than i do know. God ? No. Buddha ? Pot-belly wise yes, otherwise no either. ( working on it. Pot-belly that is)What i post here comes out of my experience and what i have learned over the years. I have the luxury of having been involved in lots of different designs from automotive over dsl over wireless over mechatronics, industrial. Ive seen and done a lot of crazy things. ( like a chip to control the speed of a vacuum cleaner motor. A microphone was used to pick up the sound of dust in the intake. This signal got filtered , integrated and if no dust was deteced speed went down... So the person vacuum cleaning had feedback if a spot was clean. This was pre- arbitrary waveform generators .. So to generate this signal we had a bucked of calibrated dirt and a carpet in the lab..... I spend weeks vacuuming that patch of carpet..)I've done design kit testing as well .( new silicon process. All parts need full qualification and characterisation and spice models need to be made).One of those tests is esd. Human body model 1,2 and 3. Machine model 1 and 2 and a whole bunch of other models. This included the io structures with esd diodes. But those structures get 2 or three zaps and they pass. They are not tested for 1 million zaps. The esd structure in achip reasonably will get zapped while the chip is being manipulated and put on a board. If esd procedures are followed it should get zero zaps. But well accomodate a number ( the spec called for 10 zaps at one second interval with a certain model and energy). Anything beyond that is uncharted territory.Once the chip is in an end product, it is the design of the entire system that needs to hold the overload. Semiconductor manufacturers do not think outside of the box. Outside meaning 'beyond the pins of the package'. That is the end users domain and he needs to do his testing.This is different for protection devices. These are tested at a million or more strikes. A lot of protection devices are even underwritten by individual labs like vde and ul. They set the standards and stick out their necks. And such devices will carry the logo on them. That still does not mean your product will pass. It just means that one component is approved for its described usage of protection as per its specifications. The specifications have been independently verified and other tests like flammability, self extinguishing and others all pass as well.Long story short : you do not use the esd structure as clamp. Can you get away with it. Yes . But it is not tested and not specced for such usage. And no manufacturer will guarantee anything hard on paper. Sure they will write vague app notes that you can do this , but in the end you will be responsible.There is such a thing as due-dilignece and prudence. Murphy states that any expensive transistor protected by a fast acting fuse will protect the fuse by blowing first. And that is still the truth.Some people are more adventurous. Fine with me. I'm a coward. If my circuit fries it will show due diligence and no fingers will be pointing at me. I did everything i could with the best practices around.

author: Mechatrommer
author_rank: Super Contributor
timestamp: July 10, 2012, 05:21:15 pm
content: Quote from: Baliszoft on July 10, 2012, 12:35:34 pmand also please dont fall into the mistake that being "professional" or being "experienced" or "knowledgable" is a "good" thing. it can be bad and "no fun"... my friendQuoteis this for infinite amount of time? or only for very short duration? because i know one simple conductor that can take few amps (depending on the size), but if its too long say than a second, it will die. any clear cut to this? if its for infinite time, then i can trust using limiting resistor alone is sufficient, for any kind of high voltage torture/shape.

author: Rufus
author_rank: Super Contributor
timestamp: July 10, 2012, 05:29:10 pm
content: Quote from: dfnr2 on July 10, 2012, 03:18:03 pmFor 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.

author: Baliszoft
author_rank: Frequent Contributor
timestamp: July 10, 2012, 06:25:28 pm
content: To whom it may interest (as anot that robust, but some kind ofinput 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.)

author: dfnr2
author_rank: Regular Contributor
timestamp: July 10, 2012, 06:29:37 pm
content: Quote from: Rufus on July 10, 2012, 05:29:10 pmQuote from: Baliszoft on July 10, 2012, 06:25:28 pmI 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.

author: free_electron
author_rank: Super Contributor
timestamp: July 10, 2012, 07:09:25 pm
content: @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. 10kilovolt 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.

author: Rufus
author_rank: Super Contributor
timestamp: July 10, 2012, 07:33:39 pm
content: Quote from: dfnr2 on July 10, 2012, 06:29:37 pmBuilt 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.Quote from: dfnr2 on July 10, 2012, 06:29:37 pmWhen 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).

author: Rufus
author_rank: Super Contributor
timestamp: July 10, 2012, 07:53:00 pm
content: Quote from: free_electron on July 10, 2012, 07:09:25 pmMore 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.

author: dfnr2
author_rank: Regular Contributor
timestamp: July 10, 2012, 08:03:44 pm
content: Quote from: Rufus on July 10, 2012, 07:33:39 pmFair 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.

author: Baliszoft
author_rank: Frequent Contributor
timestamp: July 10, 2012, 08:31:16 pm
content: 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?

author: dfnr2
author_rank: Regular Contributor
timestamp: July 10, 2012, 08:32:34 pm
content: Quote from: Rufus on July 10, 2012, 07:33:39 pmThat 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.

author: Short Circuit
author_rank: Frequent Contributor
timestamp: July 10, 2012, 08:49:47 pm
content: Quote from: Rufus on July 10, 2012, 07:53:00 pmWell, no shit actually. It IS a lot more energyBut you won't encounter that in a car, except in the UK perhaps, when mr Photon has a field dayRealistic 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 specificationhttp://www.fordemc.com/docs/download/EMC_CS_2009rev1.pdf

author: Baliszoft
author_rank: Frequent Contributor
timestamp: July 10, 2012, 09:33:58 pm
content: Quote from: Rufus on July 10, 2012, 05:29:10 pmMicrochip'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

author: dfnr2
author_rank: Regular Contributor
timestamp: July 10, 2012, 11:14:58 pm
content: 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:IntroductionElectrical 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/ESDWe 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 ICHow 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.

author: Rufus
author_rank: Super Contributor
timestamp: July 10, 2012, 11:20:47 pm
content: Quote from: dfnr2 on July 10, 2012, 08:32:34 pmStray 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.

author: dfnr2
author_rank: Regular Contributor
timestamp: July 11, 2012, 02:54:57 am
content: Quote from: Rufus on July 10, 2012, 11:20:47 pmI 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.

author: free_electron
author_rank: Super Contributor
timestamp: July 11, 2012, 03:50:00 am
content: Quote from: Rufus on July 10, 2012, 07:53:00 pmwow, you are really analy focusedHow 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.pdfhttp://www.dbicorporation.com/esd-art1.htmRead for your enjoyment.

author: Rufus
author_rank: Super Contributor
timestamp: July 11, 2012, 05:23:18 am
content: Quote from: dfnr2 on July 11, 2012, 02:54:57 amThe 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).Quote from: free_electron on July 11, 2012, 03:50:00 am10J 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.

author: Baliszoft
author_rank: Frequent Contributor
timestamp: July 11, 2012, 09:24:23 am
content: Quote from: free_electron on July 10, 2012, 07:09:25 pmYou 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.

author: Baliszoft
author_rank: Frequent Contributor
timestamp: July 11, 2012, 10:30:39 am
content: 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).

author: free_electron
author_rank: Super Contributor
timestamp: July 13, 2012, 10:17:52 pm
content: 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.

author: Baliszoft
author_rank: Frequent Contributor
timestamp: July 13, 2012, 10:42:32 pm
content: Quote from: Baliszoft on July 03, 2012, 10:40:46 pm

author: free_electron
author_rank: Super Contributor
timestamp: July 14, 2012, 01:54:20 pm
content: 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 sCritical. 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.

author: Baliszoft
author_rank: Frequent Contributor
timestamp: July 14, 2012, 02:41:48 pm
content: 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).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.

author: Baliszoft
author_rank: Frequent Contributor
timestamp: July 14, 2012, 02:51:06 pm
content: Quote from: free_electron on July 14, 2012, 01:54:20 pmI 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.

author: Baliszoft
author_rank: Frequent Contributor
timestamp: July 14, 2012, 03:24:38 pm
content: Quote from: Baliszoft on July 14, 2012, 02:41:48 pmActually my output drivers are inverting ones, so the output pins may have been saturated instead.

author: Mechatrommer
author_rank: Super Contributor
timestamp: July 15, 2012, 04:12:06 am
content: Quotewell 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.

author: Baliszoft
author_rank: Frequent Contributor
timestamp: July 15, 2012, 08:54:58 am
content: Quote from: Mechatrommer on July 15, 2012, 04:12:06 amIt is already in some cars (including my own one) for testing. The engine simulator is used on the bench mainly for software development.

author: SeanB
author_rank: Super Contributor
timestamp: July 15, 2012, 09:06:38 am
content: Don't forget to high pressure clean the engine with it running as well, this makes for some interesting stray voltage inputs.

author: Baliszoft
author_rank: Frequent Contributor
timestamp: July 15, 2012, 09:08:14 am
content: Quote from: SeanB on July 15, 2012, 09:06:38 amOk, thanks! Will do.

author: SeanB
author_rank: Super Contributor
timestamp: July 15, 2012, 09:10:42 am
content: Hope it survives, many do not.

author: Baliszoft
author_rank: Frequent Contributor
timestamp: July 15, 2012, 09:23:42 am
content: We'll find out soon, though i gotta get a pressure cleaner first :-). Would not do such a test at the petrol station (where engine wash is prohibited here).Btw: i got a distributorless ignition system, so no hv is directly exposed. This ecu cant fire other systems either.

author: SeanB
author_rank: Super Contributor
timestamp: July 15, 2012, 09:36:07 am
content: They are cheap enough now.

author: Rufus
author_rank: Super Contributor
timestamp: July 15, 2012, 02:39:01 pm
content: Quote from: Baliszoft on July 14, 2012, 02:41:48 pmYes impressively robust, but, remember dsPIC30s are old clunkers. 100mA @5v to run a simple 16 bit processor at 30 MIPs is far from bleeding edge.

author: Baliszoft
author_rank: Frequent Contributor
timestamp: July 15, 2012, 07:52:23 pm
content: Quote from: Rufus on July 15, 2012, 02:39:01 pmNo doubt. I have actually measured about 120mA 5V @ 20mips with the peripherials i needed. Not that impressive, but in this case this "chunkiness" comes handy. I was about to use the dspic33f (now AEC qualified) but i did not want to go 3.3V.

author: Baliszoft
author_rank: Frequent Contributor
timestamp: July 17, 2012, 10:38:58 am
content: By the way, what is your opinion about using spark gaps?Or spark gaps combined with capacitors?

author: Niklas
author_rank: Frequent Contributor
timestamp: July 31, 2012, 10:18:40 pm
content: Earlier it was common with capacitors 100 pF, 1000V with dielectrica NP0 or C0G connected between each connector pin and GND. If possible, add a small series resistor or inductor after the capacitor.For CAN bus filtering I have borrowed a solution from an old transmission ECU. A common mode filter 22 pF ceramic capacitors to GND both before and after the filter. The over voltage protection on the CAN bus side was a BAV99 with both diodes connected antiparallel followed by a 18 V varistor to GND. One BAV99 and varistor each for CANH and CANL. The diodes lowered the capacitive load from the varistor. Now there are low capacitance TVS diodes available, at least for USB, HDMI etc.Also be careful with the GND reference for all I/Os. When the engine is cranking there can be large differences in GND potential between the engine and the rest of the chassie. I had an uninsulated type K thermocouple inside a manual transmission for tests connected to a converter box on the OBDII connector. The thermocouple interface was killed every time the engine was cranking.

author: rocky79
author_rank: Contributor
timestamp: September 03, 2014, 12:01:09 am
content: Quote from: free_electron on July 03, 2012, 03:30:21 pmfree_electron,I realized it's an old post but I got question regarding the zener diode 5v protection clamping circuit. My application require very low power concumption (in low uA's) so a zener diode won't work as it consumes in the mA range to keep it properly biased. Do you have an alternate solution for low power application?Thank you!

author: DutchGert
author_rank: Frequent Contributor
timestamp: September 03, 2014, 12:32:33 pm
content: Quote from: rocky79 on September 03, 2014, 12:01:09 amPerhaps a TVS or MOV?So: (input signal)>---(MOV (=low leakage) to SGND)>---(optional: high voltage cap to SGND)>---(fusable series resistor)----(MCU input)>free_electron what is your opinion about that?

author: JDW
author_rank: Frequent Contributor
timestamp: March 31, 2017, 06:11:37 am
content: Quote from: free_electron on July 04, 2012, 07:35:51 amWHY?What is the difference between putting the pull-down resistorBEFOREthe current-limiting 4k7 in that circuit versus putting the pull-down resistorAFTERit?The circuit in question is posted here:https://www.eevblog.com/forum/microcontrollers/robust-microcontroller-input-protection/msg125866/#msg125866Also...Why not just use a transistor instead?It would invert the signal, but handling that in the MCU's code is easy. It would offer reasonably good protection too. Here's an example circuit showing a +12V input and a GND input to an MCU (automotive environment):You'll note the 1K resistor is AFTER the 10K because, quite honestly, I don't see why that 1K pull-down needs to be placed BEFORE the 10K. Again, if you could explain why, I would love to hear it.Also, in terms of theresistance valueof the pull-down, it doesn't seem to matter too much. Here are circuit simulations for a 1K pull-down versus a 100K:The smaller resistance value of 1K would probably have better noise immunity, but I don't see a significant difference in terms of that resistor being used to pull down the base in cases where the +12V input is floating. The purpose of that pull-down is in my linked PNG file above is to prevent unintentional switching of the transistor.

author: boffin
author_rank: Unknown
timestamp: March 31, 2017, 06:31:24 am
content: Two simple words: OPTO ISOLATORthey're cheap, require minimal external components.So (for 12v) 5-10k series resistor, a diode across the opto's LED for reverse voltage protection.On the far side just wire it straight into the micro (potentially with a pullup resistor, but in the example below the AT processors have an input_pullup option)

author: JDW
author_rank: Frequent Contributor
timestamp: March 31, 2017, 06:53:49 am
content: OPTO isolators in a car environment? No! Good concept. Bad in reality.Too expensiveDraw too much powerSpikes will nail them at some pointNot just my opinion either:http://www.avrfreaks.net/comment/491166#comment-491166I still seek specific answers to the questions I posed in my previous post.

author: jesuscf
author_rank: Frequent Contributor
timestamp: April 01, 2017, 05:48:26 pm
content: Quote from: boffin on March 31, 2017, 06:31:24 amWhat about using the PC814 instead (or the LTV-814, etc. )? They come with two diodes already, so the extra diode (D9) in the circuit wouldn't be needed.

author: JDW
author_rank: Frequent Contributor
timestamp: April 02, 2017, 03:41:07 am
content: See Table 1 on page 2 of the following PDF for the types of car noise your opto will need to survive.http://m.littelfuse.com/~/media/electronics_technical/application_notes/varistors/littelfuse_suppression_of_transients_in_an_automotive_environment_application_note.pdf

author: boffin
author_rank: Unknown
timestamp: April 02, 2017, 08:22:46 pm
content: Quote from: JDW on April 02, 2017, 03:41:07 am120V load dump according to that spec sheet. So, if you use a 5k resistor as I suggested that's a whopping (wait for it)..... 24mA through the Opto (or just under 50% of the 50mA max).OK a 1N4148 doesn't have a high enough reverse voltage for 120V, so instead just use a 1N4004, and slap a cap in parallel to trim out some of the spike if you're really excited by that.The (cheap cheap cheap) PC817 opto is easy to implement, and much more resilient than resistor ladders, and/or fiddling w/ zeners; and has the benefit of being able to have a input source which isn't ground referenced and/or coupled to your processor at all.As for the person that asked about the 814, it's generally quite a lot more money, but you're right, it does cut down on parts countdigikey, C$ prices 100 lot (4pin DIP - because I'm old-school);PC817 C$0.27/eaPC814 C$0.40/eaI <heart> the 817. Such a nice simple jellybean part.

author: JDW
author_rank: Frequent Contributor
timestamp: April 03, 2017, 12:21:37 am
content: Quote from: boffin on April 02, 2017, 08:22:46 pmNo question. You prefer optocouplers and have good reasoning behind your feelings. But have you ever designed a device that was mass produced and used in a 12-volt car?I personally have seen a lot of automotive schematics, and I've not seen optocouplers used. And even at $0.20 each, that is more cost than resistors, transistors and caps, which is what most automotive schematics I've seen use for MCU input voltage drops and protection. When you have a lot of inputs, those teensy tiny costs add up.Putting optocoupler solutions aside for the moment,would anyone kindly care to offer specific answers to the questions I put forth in my previous post here?(Especially with regard to theschematicsI posted.):https://www.eevblog.com/forum/microcontrollers/robust-microcontroller-input-protection/msg1174838/#msg1174838Thank you.

author: boffin
author_rank: Unknown
timestamp: April 03, 2017, 01:35:44 am
content: Quote from: JDW on April 03, 2017, 12:21:37 amThe OP was asking for something robust, I don't remember his original post saying "something I can make 100,000 lots at the lowest possible price".Sure, I wouldn't probably use an opto if it was entirely about keeping the price down, but the optos are silly dirt cheap in volume too (under 0.10 in 10,000 lots), and I can get them off Aliexpress for my own tinkering for few cents each in small qtys.

author: JDW
author_rank: Frequent Contributor
timestamp: April 03, 2017, 01:44:19 am
content: Quote from: boffin on April 03, 2017, 01:35:44 amI am divergent. The Opening Post is old. I have somewhat altered it (extended it, expanded it, improved it, etc.)Agreed about buying parts on Aliexpress. I too do that a lot.But again, with regard to OPTOs:Have you personally ever designed a device that was mass produced and used in a 12-volt car? I don't seek to undermine your good advice. I simply have never seen OPTOs used in automotive designs. Surely there must be a reason above and beyond "cost." But perhaps that is for another thread.FORGETTING OPTOS FOR NOW...I would sincerely appreciate hearing specific thoughts on questions and schematics I put in my previous post here:https://www.eevblog.com/forum/microcontrollers/robust-microcontroller-input-protection/msg1174838/#msg1174838Thank you.

author: retrolefty
author_rank: Super Contributor
timestamp: April 03, 2017, 02:12:44 am
content: There is a firm selling a ruggedized version of the Arduino 328P. They show all the added protection (and why) used in their design. Interesting reading.https://www.rugged-circuits.com/ruggeduino/