Electronic – Protecting 3.3V I2C lines

i2c

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.

Best Answer

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.