ESD protection again :D - Page 1
Forum section: electronics / projects

author: truhlik_fredy
author_rank: Regular Contributor
timestamp: April 04, 2011, 01:33:43 am
content: I read couple threads on forums what I could find, but still I don't feel satisfied. I know this is kind of washed up topic, but still I want to askFirst I wanted to avoid the whole thing and pain and just get IC designed for it, I got MAX6818 and when it arrived I realized that it has 40ms debouncer integrated. So it's more for somebody with mechanical switches on input, but I wanted to measure 3ms signals with it, so not usable.In second step I designed similar circuit as it's in the third, but instead inverter I had resistor bridge and instead 4.7V zener I had 5.1V, to pull up and curent limiting resistor were smaller. I tried to simulate it in LTSpice and it looked very good, but I used similar parts and I don't know exactly how weak will be input signal and how it work in real life (IRL there would be much more hidden resistors and I don't know how it would work with mine bridges, pull ups etc... and it looked for me to complicated for simulate it 100% properly)So I decided to do differently in last step I got rid of the resistor bridge and replaced it with 74HC14, they have schottky diodes so it's next level of protection and it's signal booster, so I don't need to know what values is PullUP resistor in MCU and I will know that the inverters output will have proper voltage levels (with the resistor bridge I wasn't 100% sure). Then next problem is that I don't have 5V transil diode and I can't buy it (even if I could find it in some distributors cataloge, they would ship it very expensively like 60 euro, so I usually buy parts from sites like eBay and similars...). The lowest value is 5.8V transil (400W), to make it frendly for inverters input I put there 4.7 zener diode (1W). Then I have there weak pullup 47k (I'm not sure if I should put there even higher value) and when desired it will be pull down. And series resistor of 10k, I hope for general automotive purpose it will be OK, not to low to disturb the signals in car and not to high to have decent signal for MCU.So I can you criticize me if it's OK to use it in my car? (At the moment it's one off project and this parts I have available, using cheaper parts that I don't have available in my junk box won't help me)Thanks Anton.

author: DrGeoff
author_rank: Frequent Contributor
timestamp: April 04, 2011, 02:13:39 am
content: You may want to consider using a series inductor as well.

author: truhlik_fredy
author_rank: Regular Contributor
timestamp: April 04, 2011, 03:56:54 pm
content: Quote from: DrGeoff on April 04, 2011, 02:13:39 amTo make low pass filter?

author: Unknown
author_rank: Unknown
timestamp: April 04, 2011, 11:06:25 pm
content: Hi,What are you trying to do with this circuit? What is connected at 'Input'?Alex

author: truhlik_fredy
author_rank: Regular Contributor
timestamp: April 05, 2011, 03:00:14 pm
content: Quote from: Alex on April 04, 2011, 11:06:25 pmMany different things, like injectors, distributor signal, open doors, open boot, handbrake, break, clutch / neutral position, oil pressure signal, alternator charging signal. Many of them are like switches and need debounce, that is done in software. Couple other (injectors and distributor) have big spickes and, in the distributor, signal IGN- is just the spike measured, in injectors is the gorund level measured, but it has spike on the and of impulse.

author: Unknown
author_rank: Unknown
timestamp: April 05, 2011, 04:13:16 pm
content: Given the slow nature of these signals you can increase your input resistance and drop the other protection measures, effectively using the resistor in series with the internal clamping diodes. You can leave in the capacitor to suppress very high frequency spikes, it will have little effect on the useful signals. The pull-up inside the MCU is not needed either. Why do you have a pull-up to 12V?

author: truhlik_fredy
author_rank: Regular Contributor
timestamp: April 05, 2011, 04:30:57 pm
content: Quote from: Alex on April 05, 2011, 04:13:16 pmSwitches yes, but the INJ and IGN- aren't slow. Pull-up to 12V / GND (depending on signal) it's there for signals which are disconnected (I think the ECU in the car is High-Z) when inactive and have GND when active, that's for mostly switches. I think IGN- is disconected and just when it's making impulse it has about 60V.

author: Zero999
author_rank: Super Contributor
timestamp: April 05, 2011, 05:33:37 pm
content: It looks much more complicated than it needs to be.The MCU input will almost certainly have clamping diodes build in and the same is true for the 74HC14.Connect a 1M resistor in series with the input with a varistor across the ESD prone side.

author: DrGeoff
author_rank: Frequent Contributor
timestamp: April 05, 2011, 10:23:54 pm
content: Given that the OP suggested the circuit was for automotive use I'd also put a series ferrite inductor on the input. Test it with a 1.2/50us 5kV impulse and see if it survives.

author: truhlik_fredy
author_rank: Regular Contributor
timestamp: April 06, 2011, 01:54:49 am
content: Quote from: DrGeoff on April 05, 2011, 10:23:54 pmI don't have equipotent to test it. And it perhaps just one-off with small possibility of more quantities in future. But at the moment I just don't want to do something stupid and the replacing the device and redesigning the inputs. I saw somewhere just 50k resistor and zener diode as protection.

author: truhlik_fredy
author_rank: Regular Contributor
timestamp: April 08, 2011, 01:28:51 am
content: Quote from: Hero999 on April 05, 2011, 05:33:37 pmSo I will get rid of the 74HC14 (it's mentioned in datasheets that there is ESD protection, but it's not clarified).Shouldn't I keep the Pull Ups and Pull downs after the series resistor, on some places I'm not 100% sure if it's pulled down/up by ECUside and I would like to not change any performance of car and charasterics, for example the injectors are at idle hight (12V), but I'm sure if the ECU is HIGH-Z or PullUp because the 12V could go from injector itself which is connected nonstop to 12V rail. And another example if the supply got some interference and my suplly input would be filtered then my circuit could make difference in potentials and could interfere with injector itself, something like LED, if I will put 14V on one side and 11V on otherside then it will lit.

author: Zero999
author_rank: Super Contributor
timestamp: April 08, 2011, 03:57:09 pm
content: Quote from: truhlik_fredy on April 08, 2011, 01:28:51 amThe 74HC is only required if you need a Schmitt trigger input. If your code is written to ignore glitches then there should be no need for it.QuoteThe ECU probably has push pull outputs but if it doesn't you need to look at using pull-up/down resistors. The MOV should act as a weak pull-down but if it's not good enough then connect a pull-up/down resistor on the MOV side.QuoteWhat do you mean? The MCU could interfere with the ECU? Do you have any ECU inputs connected to the MCU? There's no chance of an MCU input connected via a 1M resistor interfering with the MCU, if there's a bug in the code and somehow the input is set to an output, the 1M resistor should prevent it from interfering with the ECU.

author: Bloch
author_rank: Unknown
timestamp: April 08, 2011, 06:59:44 pm
content: Hi AntonMaybe I am overlooking something. But why not use an optocoupler ?Regards,Lars

author: Zero999
author_rank: Super Contributor
timestamp: April 08, 2011, 09:21:23 pm
content: Quote from: Bloch on April 08, 2011, 06:59:44 pmWhy use an opto-coupler?

author: truhlik_fredy
author_rank: Regular Contributor
timestamp: April 08, 2011, 10:28:17 pm
content: QuoteI more meant the MOV could interfere. I don't know how much current is enough to change behavior. The injector is mechanical, so perhaps it's not to bad, but on some other places are just electrical. So when I imagined that whatever I will connect to the device it will be after series resistor. Perhaps 20k and then pull up/down so I will be sure that under any conditions I will draw/supply minimum current that won't affect cars sensors and components. Pull down perhaps are not always necessary but that other thing that it looks like that ECU has pull ups/downs but not 100% sure and I don't have proof, and many times is not easy to take measurements where I needed to. So having pull up/down would exclude that "perhaps" and I would be sure that always it has proper levels. And then the ESD protections itself. So I wanted have universal building block what I would blindly use on any inputs inside my car (12V, 60V from ignition coil,switches, electronic sensors) and I would have just adjust the pull up or down and had free of mind that I won't alter behavior of my car and it won't fry my MCU.

author: truhlik_fredy
author_rank: Regular Contributor
timestamp: April 08, 2011, 10:36:29 pm
content: Quote from: Bloch on April 08, 2011, 06:59:44 pmI'm not sure If I'm correct and my information are right, but for couplers you need to drive the diode, so it needs current and I don't won't to draw anything that big that it could lit something. Then I could get the galvanic isolation but that is overkill and still if I'm correct it won't save the opto from frying. So anyway my device will stop wroking, right the MCU will be safe, but the device won't be working, perhaps if I will make couple copies in future nobody will be interested if it's big deal and everything is damaged or small part which will prevent it from working, still it won't be working. And I think the device without the coupler could be more robust (not galvanic isolated), but still more durable so everything will work even will withstand what could the opto version fry.

author: Bloch
author_rank: Unknown
timestamp: April 09, 2011, 03:06:21 am
content: Quote from: Hero999 on April 05, 2011, 05:33:37 pmI agree.But if it was me i would add a parallel capacitor 100nF to the input pin.Anton I dont know if you have seen this app. notehttp://www.freescale.com/files/microcontrollers/doc/app_note/AN2764.pdfAt page 27 it is aboutinput signals.Regards,Lars

author: Bloch
author_rank: Unknown
timestamp: April 09, 2011, 03:08:58 am
content: Quote from: truhlik_fredy on April 08, 2011, 10:36:29 pmOk

author: Zero999
author_rank: Super Contributor
timestamp: April 09, 2011, 08:16:34 am
content: Quote from: truhlik_fredy on April 08, 2011, 10:28:17 pmIt depends on the desired cut-off frequency.The circuit on page 27 of the paper you linked to has a 1k series resistor so the RC time constant would be 100us. The circuit I posted has a 1M resistor so the RC time constant would be 100ms.

author: Bloch
author_rank: Unknown
timestamp: April 09, 2011, 10:52:57 am
content: Quote from: Hero999 on April 09, 2011, 08:16:34 amThat is just a minor detailI still think there should be a capacitor.

author: Zero999
author_rank: Super Contributor
timestamp: April 09, 2011, 11:13:22 am
content: I disagree, I don't think having a cut-off frequency of 1.6Hz vs 1.6kHz (the circuit you posted) or 16kHz (my circuit assuming 10pF of input capacitance) is a minor detail.By all means put a capacitor there as long as you're aware of the consequences.

author: Bloch
author_rank: Unknown
timestamp: April 09, 2011, 05:44:37 pm
content: Quote from: Hero999 on April 09, 2011, 11:13:22 amSo do I. That was the smiley if you do wonder.Have a nice weekendRegards,Lars

author: truhlik_fredy
author_rank: Regular Contributor
timestamp: April 09, 2011, 06:31:18 pm
content: Quote from: Hero999 on April 09, 2011, 11:13:22 amI'm not saying you are wrong, the MCU has diodes, if the current will be kept low while discharge, then they should be grand and with 1M resistor it should be low. So it should be reasonable protection, but somehow it looks like just too simple to be true. And then why there is so much fuzz about ESD...Another question if I will make 2 revision, 1 yours and 1 mine. What should I alter on my design? I have for example 5.1V zenner, so I could swap it with 4.7V it will have slight over voltage but the HIGH level will be kept on higher voltage (if that matters at all). And other like resistor values, cap value. I tried to pick just blindly some, are they all to be used in real circuit?

author: Zero999
author_rank: Super Contributor
timestamp: April 09, 2011, 07:28:44 pm
content: Quote from: truhlik_fredy on April 09, 2011, 06:31:18 pmThere's an application note on Microchip's website showing a PIC input connected to the mains via a high value resistor.

author: truhlik_fredy
author_rank: Regular Contributor
timestamp: April 12, 2011, 05:47:13 am
content: Quote from: Hero999 on April 09, 2011, 07:28:44 pmYes but MCU is not Microchips but many others, in my case Atmel, and they should have diodes there, its mentioned in one app note (not in datasheet), but never any closer specification. So I have impresion from them that they are there but I should not be 100% relaying only on them (because the app note could be write by sales/reps/managment and in datasheet where are real facts there it is not even mentioned). And mains are not same as automotive environment. And I believe you, with 1M it should be OK and I will try it out, but I want to try my design as well.And about my design, besides that you think it's overkill, is there something that could be considered as very bad? Cap value to high? PullUp res. value to low?

author: Zero999
author_rank: Super Contributor
timestamp: April 12, 2011, 05:15:16 pm
content: The diodes may not have any spec's but the peak current at 230VAC would only be 325uA which shouldn't damage even the tiniest of diodes. In an automotive situation (assuming a 2kV pulse) and a MOV with a 1M resistor the maximum diode current would depend on the break-over voltage of the MOV and the resistor value. With a negative spike, a MOV with a break over of 200V and 1M, the current will only be 200uA. All you need to do is ensure the MOV can withstand the energy pulse.The value of the pull-up/down resistor and capacitor will depend on the desired frequency response and input impedance.

author: Reuben
author_rank: Contributor
timestamp: April 23, 2011, 11:30:17 pm
content: I like to put several MOVs in parallel