Voltage level in an open drain bus (I2C)

busopen-drainvoltage

I have a setup as seen in this image:
enter image description here

The question is what will the voltage at the line on the left size (marked with [Volt ??] ) be when the open-drain logic is active? The goal is to have a logic zero but I am not sure how the diode D1 is going to affect this. Will it depend of its forward voltage or some other characteristics? How can I estimate the voltage at [Volt??] to make sure it will be low enough to register as logic zero?

  • For clarifications: this is an I2C bus connecting a Raspberry Pi to an Atmel ATTiny13 micro-controller. The 3.3v and R1 are the RPi side, and the open-drain side is one of the ATTiny I/O pins. The diode D1 is added to protect the RPi from miss configuration on the ATTiny side that might pull the line high to 5v which might damage the RPi.

Best Answer

The maximum voltage that can be interpreted as a low per the I2C spec is 30% of VCC. For your circuit to operate correctly (assuming that the Raspberry Pi follows spec) the voltage will need to be less than 30% of 3.3V or 0.99V.

You'll need to do some circuit analysis to determine the voltage that will be seen.

The ATTiny13 data sheet says that for the GPIO lines, a low can be as high as 0.7V depending on the pin and the amount of current sunk.

Add in the forward drop of the diode you've placed (which will be conducting when the ATTiny13 is conducting) and you may end up in trouble.

You may need to reverse the logic on the ATTiny13 and have it drive an external logic level MOSFET on, instead of relying on the sinking capability of the pin. You should also go with a schottky diode for D1 to lessen the forward drop.