6
\$\begingroup\$

Raspberry Pi has 3.3V I2C bus without any protection against overvoltage. So, I want to add protection against an accidental 5V level on the bus. How to do it?

My two tries:

schematic

simulate this circuit – Schematic created using CircuitLab

Is it OK, what is better, what there are other solutions? Does serial resistors (R1, R9) make a problem for I2C communication? What is recommended value for it?

Note. I need not a level convertor. I assume that all I2C slaves has 3.3V levels. 5V maybe on the bus only for accident.

\$\endgroup\$

2 Answers 2

3
\$\begingroup\$

I like your first approach better, but you can lose R1. There is already a maximum pullup current spec for IIC, so D1 only needs to be able to handle that. If something outside has a pullup to 5V, the diode will still clamp the voltage nicely with well bounded current.

\$\endgroup\$
5
  • \$\begingroup\$ What if I connect strong 5V to the SDA_PROTECTED without R1? \$\endgroup\$
    – user54579
    Commented Sep 22, 2013 at 8:39
  • 1
    \$\begingroup\$ Why first approach is better? \$\endgroup\$
    – user54579
    Commented Sep 22, 2013 at 8:42
  • \$\begingroup\$ I think first solution is worse, because of capacitance of zener diode, that increases the capacitance of line and, therefore, decreases maximal frequency. Isn't it? \$\endgroup\$
    – user54579
    Commented Sep 22, 2013 at 8:59
  • \$\begingroup\$ @DRoss: You have to decide what you're protecting against, some external device pulling the IIC bus to 5 V, or a dead short to a 5 V supply. The first case is much more likely and what I assumed. The small capacitance of a zener diode won't add much to the time constant of a IIC bus, which is pretty slow anyway. \$\endgroup\$ Commented Sep 22, 2013 at 12:29
  • \$\begingroup\$ Usually there are no information about capacitance in datasheets, but sometimes there is. It's seems the capacitance maybe >500pF. Isn't it? \$\endgroup\$
    – user54579
    Commented Sep 22, 2013 at 16:02
1
\$\begingroup\$

Small series resistors generally aren't harmful so long as they don't slow down the edges of the pulses so much that speed becomes an issue (i.e. big resistors can prevent 400kHz operation from working). I've seen values between 4.7 and 10 ohms designed into units with 100kHz and 400kHz slaves with no issues.

Clamping diodes on the lines are generally OK since pull-ups on the bus are current limited, and ESD events are energy-limited. A hard short to a stiff power rail may still blow any diodes that don't have a series resistor to limit the current (and could blow downstream stuff as well) but you cannot protect against every possible abnormal.

Combining both the small series resistor and the clamping diodes gives you a fairly robust non-invasive solution.

\$\endgroup\$
1
  • \$\begingroup\$ Thanks. But what of two solutions are better, and why? How to estimate the optimal value of series resistor from a I2C frequency? For example, my frequency is 10 kHz. \$\endgroup\$
    – user54579
    Commented Sep 22, 2013 at 8:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.