Author Topic: How do I protect I2C from ESD?  (Read 24476 times)

0 Members and 1 Guest are viewing this topic.

Offline SlowBroTopic starter

  • Regular Contributor
  • *
  • Posts: 137
  • Country: us
How do I protect I2C from ESD?
« on: January 17, 2018, 05:53:21 am »
How do I protect I2C from ESD? The best solution seems to be two steering diodes with a zener clamp like the attached. But what values of diodes should I use? Any other components?

I'm going to be using I2C with at least one 1m shielded cable, maybe two, and I don't want my Raspberry Pi to get zapped. I'm going to try to run my speed at 10 kHz for reliability but I may need to pump it up a bit higher some day. And everything will be through hole.

I've been poring over Google but not found much useful. There's this document, but no values are given:
https://assets.nexperia.com/documents/leaflet/75017664.pdf

This Stack Exchange mentions some values, but I think I need more values to make an informed decision? Anyway the two steering diodes seems a better solution. This (I believe?) adds unnecessary capacitance.
https://electronics.stackexchange.com/questions/292140/why-is-a-resistor-needed-in-zener-protection-circuit
« Last Edit: January 23, 2018, 02:15:18 am by SlowBro »
 

Offline bson

  • Supporter
  • ****
  • Posts: 2270
  • Country: us
Re: How do I protect I2C from ESD?
« Reply #1 on: January 17, 2018, 06:09:57 am »
A 5V TVS avalanche diode that reverse breaks down to ground.  Such as a Littlefuse SP0502.  Ground goes on the common anode terminal and the signals on the cathodes.  You can use 5V TVS diodes for 3.3V (they're not that exact anyway), unless what you're protecting is super sensitive (which shouldn't be the case with an I2C bus).
 
The following users thanked this post: SlowBro

Offline SlowBroTopic starter

  • Regular Contributor
  • *
  • Posts: 137
  • Country: us
Re: How do I protect I2C from ESD?
« Reply #2 on: January 17, 2018, 06:26:23 am »
Okay so any other parameters of the TVS I should look for? Voltage, time, current, leakage, all that? And it needs to be through hole, I forgot to mention that.
 

Offline Dubbie

  • Supporter
  • ****
  • Posts: 1115
  • Country: nz
How do I protect I2C from ESD?
« Reply #3 on: January 17, 2018, 06:31:29 am »
If your project can afford it, I have used this chip in the past:
http://www.ti.com/lit/ds/scps144c/scps144c.pdf

Seemed to work as advertised.
« Last Edit: January 17, 2018, 06:39:02 am by Dubbie »
 
The following users thanked this post: SlowBro

Offline SlowBroTopic starter

  • Regular Contributor
  • *
  • Posts: 137
  • Country: us
Re: How do I protect I2C from ESD?
« Reply #4 on: January 17, 2018, 01:11:05 pm »
Dubbie: Whew, price ouch. And not through-hole.

bson: Also how would you protect against negative spikes with just one TVS? Edit: Oh. The diode you recommended is an array. Could you share a circuit example?

By the way it's listed as obsolete on DigiKey. You should probably start looking for a replacement.
« Last Edit: January 17, 2018, 01:20:59 pm by SlowBro »
 

Offline SlowBroTopic starter

  • Regular Contributor
  • *
  • Posts: 137
  • Country: us
Re: How do I protect I2C from ESD?
« Reply #5 on: January 17, 2018, 01:40:21 pm »
A 5V TVS avalanche diode that reverse breaks down to ground.  Such as a Littlefuse SP0502.

Can't seem to find an equivalent in through-hole. This one has a 35pF capacitance according to DigiKey (datasheet says 70pF but even that is still acceptable for me) but the reverse break down is 418V. Wayyyyy above 5V....
« Last Edit: January 17, 2018, 02:03:53 pm by SlowBro »
 

Offline David Hess

  • Super Contributor
  • ***
  • Posts: 16618
  • Country: us
  • DavidH
Re: How do I protect I2C from ESD?
« Reply #6 on: January 17, 2018, 01:52:42 pm »
By preference I would use BAT41 small signal schottky diodes between the signal lines and ground and Vcc along with a zener diode clamp or shunt regulator between Vcc and ground.  There are more complex and higher performance ways to do this using diodes and bipolar transistors but that is where I would start.
 
The following users thanked this post: SlowBro

Offline SlowBroTopic starter

  • Regular Contributor
  • *
  • Posts: 137
  • Country: us
Re: How do I protect I2C from ESD?
« Reply #7 on: January 17, 2018, 02:06:10 pm »
By preference I would use BAT41 small signal schottky diodes between the signal lines and ground and Vcc along with a zener diode clamp or shunt regulator between Vcc and ground.  There are more complex and higher performance ways to do this using diodes and bipolar transistors but that is where I would start.

Okay that's helpful. So with a layout similar as to what I posted in the OP? Schottkys on the signal lines and a zener to clamp what gets through to ground?
 

Offline schmitt trigger

  • Super Contributor
  • ***
  • Posts: 2222
  • Country: mx
Re: How do I protect I2C from ESD?
« Reply #8 on: January 17, 2018, 02:43:39 pm »
I would think that one of the parameters that you should closely look at, regardless of the device you choose,  is junction capacitance....more so if you are using high speed I2C.
 
The following users thanked this post: SlowBro

Offline David Hess

  • Super Contributor
  • ***
  • Posts: 16618
  • Country: us
  • DavidH
Re: How do I protect I2C from ESD?
« Reply #9 on: January 17, 2018, 03:49:37 pm »
By preference I would use BAT41 small signal schottky diodes between the signal lines and ground and Vcc along with a zener diode clamp or shunt regulator between Vcc and ground.  There are more complex and higher performance ways to do this using diodes and bipolar transistors but that is where I would start.

Okay that's helpful. So with a layout similar as to what I posted in the OP? Schottkys on the signal lines and a zener to clamp what gets through to ground?

The zener diode clamps the supply voltage to ground in case the protection diodes connected to the positive supply pull it higher.  It may not be required if the positive supply is stiff enough.  Essentially it is just a backup shunt regulator.

I would think that one of the parameters that you should closely look at, regardless of the device you choose,  is junction capacitance....more so if you are using high speed I2C.

Junction capacitance is a primary selection criteria at high speeds.  The BAT41 schottky diode is 100 volts, 100mA, 0.1uA, and 2pF making it useful in lots of applications so I keep them available.  The ubiquitous 1N4148/1N914 and 1N4448/1N916 silicon diodes are also suitable but have a higher forward voltage drop. 

The BAT81/BAT82/BAT83/SD101A/SD101B/SD101C schottky diodes are lower capacitance but also have a lower current rating.  The BAT42/BAT43 and BAT46 schottky diodes are higher current but have a higher capacitance.

Any of the above should work at typical I2C speeds.  I would even use germanium 1N270s if they were all I had available at the time although they might be slower than all of the above.

 
The following users thanked this post: SlowBro

Offline SlowBroTopic starter

  • Regular Contributor
  • *
  • Posts: 137
  • Country: us
Re: How do I protect I2C from ESD?
« Reply #10 on: January 21, 2018, 10:58:56 pm »
By preference I would use BAT41 small signal schottky diodes between the signal lines and ground and Vcc along with a zener diode clamp or shunt regulator between Vcc and ground.  There are more complex and higher performance ways to do this using diodes and bipolar transistors but that is where I would start.

Did I do this correctly? And how do I determine what the wattages of the components should be?
« Last Edit: January 21, 2018, 11:30:33 pm by SlowBro »
 

Offline David Hess

  • Super Contributor
  • ***
  • Posts: 16618
  • Country: us
  • DavidH
Re: How do I protect I2C from ESD?
« Reply #11 on: January 22, 2018, 02:25:43 am »
Did I do this correctly? And how do I determine what the wattages of the components should be?

That is correct but zener diode D5 should be slightly higher in value.  Check the tolerances given in the datasheet for the zener diode to make sure it is not going to conduct at the worst case nominal supply voltage.  A higher value series resistor will increase the protection and the higher its peak voltage rating the better.  A 50 or 100 volt resistor is not going to do much for a 1000 volt ESD pulse when it flashes over.  Higher wattage resistors are higher voltage but they make special high voltage resistors also.  I would put series resistors on both sides of the shunt diodes.

Diodes are usually rated by forward current rather than wattage.  But the peak current they can sustain increases dramatically for short pulses because of the thermal capacity of the silicon die.  The 100mA BAT41 is a compromise for minimum capacitance but larger current diodes like the 350mA BAT48 could be used if 10 times the capacitance and 50 times the leakage is acceptable which it probably is for IC2.  1 amp schottky rectifier diodes might be too large.
« Last Edit: January 22, 2018, 03:26:30 am by David Hess »
 
The following users thanked this post: SlowBro, Ario

Offline sreeb

  • Contributor
  • Posts: 22
Re: How do I protect I2C from ESD?
« Reply #12 on: January 22, 2018, 03:13:34 am »
All HDMI/DVI interfaces contain an I2C interface.  A little reverse engineering of some consumer electronics should give you a solid solution.  If you only need one, you may find something you cannibalize.
 

Offline AllTheGearNoIdea

  • Supporter
  • ****
  • Posts: 269
  • Country: gb
    • AllTheGearNoIdea
Re: How do I protect I2C from ESD?
« Reply #13 on: January 22, 2018, 02:00:16 pm »
Just thought that I would chip in here with some general ignorance. . I  have been working with a system that uses serial memory devices that are plugged into  and out of a panels all day long every day hundreds of installation  a thousand panels for over 15 years and never had a single I2C failure of any type.

From memory the only ESD protection implemented is some series resistance and also whatever ESD protection is built into I2C buffer.  I would suggest you consider mechanical considerations and the Mechanism of how the ESD is actually going to enter your device.   In my case the I2C device plugged in is relatively small and  has a nonconductive wrapper and the actual terminal are touch-proof.

I’m not saying this is the solution works for everyone but don’t ignore the working environment and obvious mechanical solutions etc.  I work in industrial sector it could be different in a dry hospital folding nylon bed sheets etc.

If this is a one off project I wouldnt even consider additional protection. Chances are it will never see ESD damage and if it does replace the pie.

Chris
« Last Edit: January 22, 2018, 02:06:56 pm by AllTheGearNoIdea »
AllTheGearNoIdea Where Its All About The Gear
 
The following users thanked this post: SlowBro

Offline madires

  • Super Contributor
  • ***
  • Posts: 7765
  • Country: de
  • A qualified hobbyist ;)
Re: How do I protect I2C from ESD?
« Reply #14 on: January 22, 2018, 02:15:53 pm »
Okay so any other parameters of the TVS I should look for? Voltage, time, current, leakage, all that? And it needs to be through hole, I forgot to mention that.

Capacitance, often a few nF, especially for types with a low breakdown voltage. But the TVS' capacitance can be hidden by a diode bridge.
 

Offline MarkL

  • Supporter
  • ****
  • Posts: 2131
  • Country: us
Re: How do I protect I2C from ESD?
« Reply #15 on: January 22, 2018, 03:22:14 pm »
I would be cautious in using BAT41 for ESD clamping.  I looked at a couple of BAT41 datasheets and didn't see any data for turn-on time.

The ESD testing standard you should comply with is IEC 61000-4-2.  It has several different susceptibility levels ranging up to 15kV.  But more importantly, the rise time before it reaches the peak levels is on the order of a nanosecond.

If you're trying to protect a circuit with a diode of unknown turn-on time, the ESD event could be over and your circuit destroyed before the diode even starts to turn on.

I realize you want to stick with through hole, but doing ESD the right way is not trivial.  I would select components that were made for the task and make sure your board layout has a low impedance path for shunting the ESD strike.

Datasheets will specify the maximum clamp voltage after the device turns on, and from there you can also provide series resistors between it and your microprocessor (or whatever it's connected to) to make sure the residual ESD pulse stays within the absolute maximum pin current when your microprocessor protection diodes turn on.

Also be aware that some devices claim "integral ESD protection", but they are often referring to the human body model (HBM) where the protection is primarily there to protect against stray ESD from handling and manufacturing.  HBM is much less aggressive than IEC 61000-4-2 and HBM protection is not enough for a zap after dragging your feet across a carpet.

Here's an app note with a good overview of ESD and various standards:

  https://www.onsemi.com/pub/Collateral/TND410-D.PDF

There are thousands of ESD devices out there, and it can be difficult to choose.  Here's one that's suitable for I2C and other high speed protocols (approx US$0.40 qty 1):

  http://www.st.com/en/protection-devices/usblc6-2.html

I like this one because it's a "through" design, which means it has a pair of pins for each signal line and you route the signal through the device.  It makes layout easier and guarantees a low impedance path on the signal side to the protection diodes.  It's not through hole, but it's available in a SOT23-6 package so you could probably work with it.

If you're using it with a 3.3V supply I would recommend a 0.01uF bypass cap very close to the device's supply pins.  If 5V, it also wouldn't hurt to have a 0.01uF cap if you don't have a good ground plane on your board.
 
The following users thanked this post: SlowBro

Online T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 21686
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: How do I protect I2C from ESD?
« Reply #16 on: January 22, 2018, 06:33:12 pm »
I would be cautious in using BAT41 for ESD clamping.  I looked at a couple of BAT41 datasheets and didn't see any data for turn-on time.

Er, it's a schottky diode, turn-on is zero. :)

I would be worried about surge rating and ESR, though.  Usually a bigger diode like BAT54S is used (which by the way is dual, saving on parts, and being SMT, saving on stray L too!).

3.3V zener/TVS is a lie -- if you get a true 3.3V zener part, it's very leaky under 3.3V, and doesn't clamp any better than a 5V zener/TVS does (peak clamp voltage in the 8-10V range for both cases).  The only thing that can do 3.3V logic signals is a completely different component type, a snapback diode (which is actually a fast SCR structure).

I've used these before, seems fine:
https://www.digikey.com/product-detail/en/on-semiconductor/NUP4202W1T2G/NUP4202W1T2GOSCT-ND/2122071

Note that they're made for 5V systems.  3.3V and below, you don't have much choice but to place a bypass cap at the TVS's supply pins, and bias that with VCC.

There are beefier versions for slower signals, and filtered versions, too.

Nice thing about the quad: you can place series resistors between pairs, so the ESD gets clamped twice.  This doesn't address supply pin inductance, but it still helps reduce the peak further.

You may also be concerned about charged cable ESD, where the cable delivers a slug of current at its characteristic impedance.  So, 1kV charge on 1m of 100 ohm cable is 10A for 5ns!  (Comparable to a 5kV+ ESD strike.  Of course, duration goes up with length, so this can be quite destructive with long cables.)

Cables can become charged from handling and ambient fields -- usually not much, and kind of rare -- but it can happen.

This, by the way, is a good reason why USB, HDMI, SATA and so on are all shielded standards, with the shell making contact first!  While the cable overall might have whatever ESD on it (say someone picks up a cable, walks over the carpet, and plugs it into a machine -- its shell dumps the 10kV into ground, while all the inner conductors follow along not knowing this is happening because they are surrounded by that ground), the potential between conductors and shield is much less, and so the circuit only has to sink what's left, not a direct ESD strike.

Tim
« Last Edit: January 22, 2018, 06:36:20 pm by T3sl4co1l »
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 
The following users thanked this post: SlowBro

Offline David Hess

  • Super Contributor
  • ***
  • Posts: 16618
  • Country: us
  • DavidH
Re: How do I protect I2C from ESD?
« Reply #17 on: January 22, 2018, 06:42:22 pm »
I would be cautious in using BAT41 for ESD clamping.  I looked at a couple of BAT41 datasheets and didn't see any data for turn-on time.

I have difficulty imagining forward recovery time for a schottky diode which is in excess of the effect produced by series inductance.

Quote
I realize you want to stick with through hole, but doing ESD the right way is not trivial.  I would select components that were made for the task and make sure your board layout has a low impedance path for shunting the ESD strike.

High frequency layout with minimum loop area is important.  The ESD shunts should be power supply decoupled just like a load.

Quote
Also be aware that some devices claim "integral ESD protection", but they are often referring to the human body model (HBM) where the protection is primarily there to protect against stray ESD from handling and manufacturing.  HBM is much less aggressive than IEC 61000-4-2 and HBM protection is not enough for a zap after dragging your feet across a carpet.

Often some part and layout changes will protect against significantly higher ESD hazards for no additional cost.  I am not a big fan of meeting the minimum requirements on exposed interfaces.

 

Offline MarkL

  • Supporter
  • ****
  • Posts: 2131
  • Country: us
Re: How do I protect I2C from ESD?
« Reply #18 on: January 22, 2018, 08:39:48 pm »
I would be cautious in using BAT41 for ESD clamping.  I looked at a couple of BAT41 datasheets and didn't see any data for turn-on time.

Er, it's a schottky diode, turn-on is zero. :)
...
Yes, quite so.  Duh on my part.

My main point is that I would stick with parts that were designed and characterized for repeated ESD abuse under the prevailing standards.  Otherwise, you can't be certain what level of protection you're going to end up with.


I would be cautious in using BAT41 for ESD clamping.  I looked at a couple of BAT41 datasheets and didn't see any data for turn-on time.

I have difficulty imagining forward recovery time for a schottky diode which is in excess of the effect produced by series inductance.
Agreed, as above.

On that same note, using the through-hole version of the BAT41, which is where the OP was heading, could have excessive series inductance by just leaving the leads too long.  It wouldn't take much for a 1ns ESD event to build up a significant overshoot.
 

Offline David Hess

  • Super Contributor
  • ***
  • Posts: 16618
  • Country: us
  • DavidH
Re: How do I protect I2C from ESD?
« Reply #19 on: January 23, 2018, 01:14:59 am »
On that same note, using the through-hole version of the BAT41, which is where the OP was heading, could have excessive series inductance by just leaving the leads too long.  It wouldn't take much for a 1ns ESD event to build up a significant overshoot.

Construction over a ground plane or with a layout which minimizes loop area will work fine.  This is no different than how small switching regulators should be constructed.  The same rules apply for load decoupling capacitors.

Except for layout, the most common problem I have seen is using a low voltage series resistor which basically does nothing because it immediately breaks over.  But even if this is the case, the series resistor may still protect against excessive voltage applied to the signal line.

Maximum energy depends on thermal mass of the diode junction which is why I picked the BAT41 instead of say a 1N5711 or BAT81/BAT82/BAT83.  A BAT48 would be my choice for a lower frequency signal where 60pF of capacitance from two diodes is acceptable and may even be desirable.

Even in the old days, I never saw a diode or transistor bond wire blown off by an ESD pulse; it took an ESD activated SCR crowbar to do that. :)
 

Offline SlowBroTopic starter

  • Regular Contributor
  • *
  • Posts: 137
  • Country: us
Re: How do I protect I2C from ESD?
« Reply #20 on: January 23, 2018, 02:12:33 am »
All, I'm getting some interesting but seeming contradictory information about this, and my head is spinning now. Could someone kindly point this beginner to a proven schematic that uses proven through-hole components? Or draw one?

This is for a device going into an outdoors, waterproof enclosure. The I2C port on the Raspberry Pi Zero W will be connected to a 1m shielded cable with a humidity sensor (BME280) at the other end, and the speed will be 10 kHz or thereabouts. So I have a high capacity for high capacitance :)

(Earlier I mentioned 400 kHz but I decided to split the design into two buses and the fast devices will have a dedicated hardware bus while the slow devices can ride a software emulated bus. Edited my OP to reflect this change.)
« Last Edit: January 23, 2018, 02:16:00 am by SlowBro »
 

Online T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 21686
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: How do I protect I2C from ESD?
« Reply #21 on: January 23, 2018, 04:10:31 am »
I mean, if it's always connected, why bother?  It's not like anyone can touch the signal lines then. ;)

Tim
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 

Offline bson

  • Supporter
  • ****
  • Posts: 2270
  • Country: us
Re: How do I protect I2C from ESD?
« Reply #22 on: January 23, 2018, 04:38:30 am »
bson: Also how would you protect against negative spikes with just one TVS?
It has a breakdown voltage, which when exceeded discharges to ground.  If the signal goes negative it conducts like a normal diode, from ground.  Hence it limits the excursion to a range relative to ground.  The breakdown voltage isn't terribly important, it just needs to be high enough not to incur additional load under normal use, and it's often not spelled out for TVS devices. (But perhaps more often is.)

You get to look up parts yourself, but a quick look at Mouser shows 2123 different through-hole, axial, and radial package ESD suppressors in stock...
Just search for "TVS diode", select ESD suppression devices, check "in stock", pick a 5V working voltage (or 3.3V if that's what you use), then just drill down.
 
The following users thanked this post: SlowBro

Offline SlowBroTopic starter

  • Regular Contributor
  • *
  • Posts: 137
  • Country: us
Re: How do I protect I2C from ESD?
« Reply #23 on: January 23, 2018, 10:17:42 am »
I mean, if it's always connected, why bother?  It's not like anyone can touch the signal lines then. ;)

Tim

It wouldn’t be initially connected and there may be other times it’s not.
 

Offline SlowBroTopic starter

  • Regular Contributor
  • *
  • Posts: 137
  • Country: us
Re: How do I protect I2C from ESD?
« Reply #24 on: January 23, 2018, 02:43:33 pm »
You get to look up parts yourself, but a quick look at Mouser shows 2123 different through-hole, axial, and radial package ESD suppressors in stock...
Just search for "TVS diode", select ESD suppression devices, check "in stock", pick a 5V working voltage (or 3.3V if that's what you use), then just drill down.

Mouser has exactly one TVS 3.3V through hole in stock :P 35pF, but that should be acceptable. However, the breakdown is 7V which will blow an RPi, so that's no good.
https://www.mouser.com/ProductDetail/Texas-Instruments/SN65240P?qs=rgxfVHSNRPUo%252b7i0vDZMxA%3d%3d

Ew. Even DigiKey's minimum standoff/working voltage for through-holes is 5V. Okay so maybe I need one surface part in my design... Hope I can find a large one for my fat fingers.
« Last Edit: January 23, 2018, 02:53:06 pm by SlowBro »
 

Offline SlowBroTopic starter

  • Regular Contributor
  • *
  • Posts: 137
  • Country: us
Re: How do I protect I2C from ESD?
« Reply #25 on: January 23, 2018, 03:45:49 pm »
Maybe instead I just opto-isolate it? Seems easier. Per this NXP document opto-isolated I2C can go up to 5 kHz with inexpensive parts. I've tested my design down to 100 Hz and while it takes 3 seconds to get a humidity reading that's perfectly tolerable.
 Here's a component with a 3us/2.3 turn on/off time, which should work well within the required 1ms rise time of a 100 Hz signal.
« Last Edit: January 23, 2018, 03:47:34 pm by SlowBro »
 

Offline SlowBroTopic starter

  • Regular Contributor
  • *
  • Posts: 137
  • Country: us
Re: How do I protect I2C from ESD?
« Reply #26 on: January 24, 2018, 12:37:01 am »
Nah, skip opto coupling. It also requires a buffer that would drive costs way up.

3.3V zener/TVS is a lie -- if you get a true 3.3V zener part, it's very leaky under 3.3V, and doesn't clamp any better than a 5V zener/TVS does (peak clamp voltage in the 8-10V range for both cases).  The only thing that can do 3.3V logic signals is a completely different component type, a snapback diode (which is actually a fast SCR structure).

Is this one any good? About leakage, the RPi can do up to 50mA per GPIO and this is 150uA @ 1V. How would I know the leakage at 3.3V?
http://www.onsemi.com/pub/Collateral/1N5333B-D.PDF
 

Offline SlowBroTopic starter

  • Regular Contributor
  • *
  • Posts: 137
  • Country: us
Re: How do I protect I2C from ESD?
« Reply #27 on: January 24, 2018, 01:00:01 am »
A higher value series resistor will increase the protection and the higher its peak voltage rating the better.  A 50 or 100 volt resistor is not going to do much for a 1000 volt ESD pulse when it flashes over.  Higher wattage resistors are higher voltage but they make special high voltage resistors also.  I would put series resistors on both sides of the shunt diodes.

Do you have some examples of high voltage resistors? The only way I can think to make it possible to handle a 1000V spike with a series resistor that's not gargantuan is with a 1G ohm (or thereabouts) 1W resistor, and if I do that I'll kill my signal levels (right?). That sounds like overkill in my (untrained and possibly incorrect) opinion.

FYI here is the current design.
« Last Edit: January 24, 2018, 01:19:50 am by SlowBro »
 

Online mikeselectricstuff

  • Super Contributor
  • ***
  • Posts: 13748
  • Country: gb
    • Mike's Electric Stuff
Re: How do I protect I2C from ESD?
« Reply #28 on: January 24, 2018, 01:08:22 am »

I'm going to be using I2C with at least one 1m shielded cable
[/quote]
Don't.  Just don't.
I2C is not designed to go off board or down wires.
Youtube channel:Taking wierd stuff apart. Very apart.
Mike's Electric Stuff: High voltage, vintage electronics etc.
Day Job: Mostly LEDs
 

Offline SlowBroTopic starter

  • Regular Contributor
  • *
  • Posts: 137
  • Country: us
Re: How do I protect I2C from ESD?
« Reply #29 on: January 24, 2018, 01:20:56 am »
Don't.  Just don't.
I2C is not designed to go off board or down wires.

Understood, but I had seen plenty of examples where it was usable at 1m. What do you recommend instead?
 

Online T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 21686
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: How do I protect I2C from ESD?
« Reply #30 on: January 24, 2018, 03:05:30 am »
If your expectations are low, the cable shielding is good, and the signal filtering is good, I2C is okay here.

For anything that matters, I2C should stay on board only, or at worst, board-to-board connectors (with lots of ground pins in them).

SPI is better, because the signals never go open circuit (weak pullup).  You still need shielding.

SPI can be sent via RS-422 trivially: just add transmitters and receivers.  This is good enough that a shielded cable may not even be needed (you can get twisted pair ribbon cable, or all-weather CAT5 more likely here), though it's still better of course.

Most '422 devices include beefy ESD protection, too.

This thread is rather obsessive.  A single 1N5231B and series resistor will do more than good enough.  The original device isn't made of glass, it's got an ESD rating as well.  Whatever's left after the diode and resistor will be much less duration and energy, and that's what matters.  If a 10kV strike is effectively reduced to an equivalent 1kV or less, it won't die.  We're not dealing with 1970s metal gate CMOS, or teeny tiny RF transistors!

Tim
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 
The following users thanked this post: SlowBro

Offline SlowBroTopic starter

  • Regular Contributor
  • *
  • Posts: 137
  • Country: us
Re: How do I protect I2C from ESD?
« Reply #31 on: January 24, 2018, 03:12:40 am »
This thread is rather obsessive.

I was beginning to think that myself :D FYI the product is for hobby farmers and is not life-critical. If it fails I can ship a new one without much fuss. I'm just trying to cut down on warranty work.
 

Offline David Hess

  • Super Contributor
  • ***
  • Posts: 16618
  • Country: us
  • DavidH
Re: How do I protect I2C from ESD?
« Reply #32 on: January 24, 2018, 04:54:26 am »
A higher value series resistor will increase the protection and the higher its peak voltage rating the better.  A 50 or 100 volt resistor is not going to do much for a 1000 volt ESD pulse when it flashes over.  Higher wattage resistors are higher voltage but they make special high voltage resistors also.  I would put series resistors on both sides of the shunt diodes.

Do you have some examples of high voltage resistors? The only way I can think to make it possible to handle a 1000V spike with a series resistor that's not gargantuan is with a 1G ohm (or thereabouts) 1W resistor, and if I do that I'll kill my signal levels (right?). That sounds like overkill in my (untrained and possibly incorrect) opinion.

The resistance value and wattage are not higher.  Just the peak voltage rating is higher so they can sustain high voltages and currents for short periods of time.  If you are looking for surface mount, then the Panasonic ERJ series "Anti-Surge Thick Film Chip Resistors" are an example.
 
The following users thanked this post: SlowBro

Online mikeselectricstuff

  • Super Contributor
  • ***
  • Posts: 13748
  • Country: gb
    • Mike's Electric Stuff
Re: How do I protect I2C from ESD?
« Reply #33 on: January 24, 2018, 09:10:10 am »
For short distances, simple TTL UART works fine up to the same sort of speeds I2C can do. Ideally using a buffer type driver like HC541 or HC365, and 100R or so series terminantion at source. If you need protection angains connection to >5v, add a ~2K2 series R with 1nf across it, in series with the normal series termination resistor. 

The problem with I2C is it relies on a resistive pullup, so cable capacitance directly affects speed, and the resulting slow edges can make it very susceptible to noise.
Youtube channel:Taking wierd stuff apart. Very apart.
Mike's Electric Stuff: High voltage, vintage electronics etc.
Day Job: Mostly LEDs
 
The following users thanked this post: SlowBro

Offline SlowBroTopic starter

  • Regular Contributor
  • *
  • Posts: 137
  • Country: us
Re: How do I protect I2C from ESD?
« Reply #34 on: January 24, 2018, 02:17:08 pm »
The resistance value and wattage are not higher.  Just the peak voltage rating is higher so they can sustain high voltages and currents for short periods of time.  If you are looking for surface mount, then the Panasonic ERJ series "Anti-Surge Thick Film Chip Resistors" are an example.

Thank you, that makes a lot more sense. I was thinking, I know I'm a newbie, but... ;D

I found that if in the Digikey parametric search I also include the search phrase "Pulse" I can see all of the pulse-withstanding resistors. I'll definitely be using those since they're only a few pennies more.
 

Offline SlowBroTopic starter

  • Regular Contributor
  • *
  • Posts: 137
  • Country: us
Re: How do I protect I2C from ESD?
« Reply #35 on: January 24, 2018, 02:23:32 pm »
For short distances, simple TTL UART works fine up to the same sort of speeds I2C can do.

I found that the I2C speed of the temp/humidity sensor readings are acceptable down to 100 Hz so it should be able to tolerate all sorts of line abuse. And the need is only to get periodic temperature humidity readings; I can design in the software a rejection of bad readings and just try again. I think it'll be okay but if not I'll take your suggestion. I can stick an Atmega on the end by the sensor and talk at around 9600 baud.
 

Offline MarkL

  • Supporter
  • ****
  • Posts: 2131
  • Country: us
Re: How do I protect I2C from ESD?
« Reply #36 on: January 24, 2018, 04:22:52 pm »
I found that the I2C speed of the temp/humidity sensor readings are acceptable down to 100 Hz so it should be able to tolerate all sorts of line abuse. And the need is only to get periodic temperature humidity readings; I can design in the software a rejection of bad readings and just try again. I think it'll be okay but if not I'll take your suggestion. I can stick an Atmega on the end by the sensor and talk at around 9600 baud.
There's no data integrity protection in the returned BME280 data or in the I2C protocol, so you might not be able to detect a bad bit depending on where it lands.  It might create crazy values, which is easy to spot, or it might change the temperature subtly by a couple of degrees.

One method would be to read the result registers twice between measurements (during Tstandby).  If the reads are identical you can be confident there were no transmission errors.

Also, the BME280 supports 3- or 4-wire SPI as well as I2C.  Just FYI, since T3sl4co1l brought up SPI.  I would still try slow I2C.  It should be fine.  If not, consider SPI before adding another processor to the mix.
 
The following users thanked this post: SlowBro

Offline SlowBroTopic starter

  • Regular Contributor
  • *
  • Posts: 137
  • Country: us
Re: How do I protect I2C from ESD?
« Reply #37 on: January 24, 2018, 05:22:15 pm »
A sticking point about using SPI is the module I bought is only wired up for I2C. I see on the datasheet that the same pins are used for both but because there are 10k pull-ups onboard I would think that rules out trying SPI mode.

I like your idea of doing two reads and comparing. There may be tiny variations that I can account for in code, but should not be wide swings. This should work fine.
 

Offline MarkL

  • Supporter
  • ****
  • Posts: 2131
  • Country: us
Re: How do I protect I2C from ESD?
« Reply #38 on: January 24, 2018, 06:04:13 pm »
A sticking point about using SPI is the module I bought is only wired up for I2C. I see on the datasheet that the same pins are used for both but because there are 10k pull-ups onboard I would think that rules out trying SPI mode.
SPI mode is activated by pulling CSB low, once.  If you don't pull CSB low it stays in I2C mode.  The internal pullup is 120k (typ).  I guess you're referring to a 10k on an eval or carrier board?  Even if it's 10k, a processor can still pull it down to activate SPI mode, if that's your concern.

Quote
I like your idea of doing two reads and comparing. There may be tiny variations that I can account for in code, but should not be wide swings. This should work fine.
The idea would be to catch it *between* measurement updates, so that you're reading the same data out of the registers twice.  The data should be bit-for-bit identical since it has not been updated.

The chip measures the environment, writes the data to the result registers, and then goes back to sleep (the state they call Tstandby).  The result registers can be read as often as you like even if it's sleeping.

Alternatively, you can just continuously read the result registers at a rate of 3 or 4 times (or higher) than the update rate.  Any two back-to-back readings that are identical could constitute a valid reading.  The standby time is programmable from 0.5ms to 1sec.

You could also used "Forced" mode.  Here, you would trigger a measurement, wait for it to finish, and then read the result registers twice.  Having it synchronous like this may be easier to implement, but the spec sheet recommends free-running "Normal" mode if you are using the IIR filter (sec 3.3.4).
 

Offline David Hess

  • Super Contributor
  • ***
  • Posts: 16618
  • Country: us
  • DavidH
Re: How do I protect I2C from ESD?
« Reply #39 on: January 24, 2018, 06:49:45 pm »
For short distances, simple TTL UART works fine up to the same sort of speeds I2C can do. Ideally using a buffer type driver like HC541 or HC365, and 100R or so series terminantion at source. If you need protection angains connection to >5v, add a ~2K2 series R with 1nf across it, in series with the normal series termination resistor.

There are all kinds of ways to improve performance.

I am very leery of using LSI (large scale integration) for off board signals except within the same chassis simply because external drivers can be much more robust and may be replaceable.  For this reason if I did use an LSI signal directly, I would go heavy on the external protection network.

Quote
The problem with I2C is it relies on a resistive pullup, so cable capacitance directly affects speed, and the resulting slow edges can make it very susceptible to noise.

Replacing the resistive pullup with a current source pullup will improve the performance somewhat.
 

Online T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 21686
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: How do I protect I2C from ESD?
« Reply #40 on: January 24, 2018, 07:02:57 pm »
Hehe, the unfortunate thing about LSI vs. drivers is -- to us it seems fine to buffer and isolate dirty outside signals from the sensitive inner bits, and we'd be perfectly okay with replacing a driver if that's all that's failed on a board.  Success, right?  Unfortunately: 1. a failure is a failure, and 2. the service tech is just going to swap the board anyway.  So who really gives a damn? :P

That said, you could get the best of one and a half worlds by placing the drivers/buffers/isolators on a sacrificial daughterboard.  Service tech pops in a new one, good to go.  There's still down time for the end user, but you get to keep your smug sense of efficiency. ;)  Obvious downside: cost and space!

So of course -- when overall, end user, uptime, operational reliability, is tantamount: you have no choice but to belt-and-suspenders the interface, so it does not glitch or fault under adverse conditions.  Doesn't matter if the drivers or brains get fried, a fail is a fail.  Do whatever is necessary to maintain operation!  Drivers, filtering, whatever it takes.

Tim
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 

Offline David Hess

  • Super Contributor
  • ***
  • Posts: 16618
  • Country: us
  • DavidH
Re: How do I protect I2C from ESD?
« Reply #41 on: January 24, 2018, 11:08:15 pm »
I have seen modern surface mount boards where the interface ICs were socketed DIPs at the edge of the board so they could be sacrificed and replaced.

As you point out, if the ESD protection shorts out the signal line, that is the same as a hard failure whether the driver or LSI logic is dead or not.  I have seen that happen with input protection circuits for RF inputs and oscilloscopes.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf