Active Pull-Up

You can use an IC or build it with discrete components. All you will need is some resistors and an off-the-shelf analog switch. Here comes the schematic:

 
How it works:

Rs are serial resistors used to minimize cross talk and undershoot. They also protect the I/O drivers of the I2C devices against higher than allowed voltages and current injection. These resistors are advised if you run a long bus on high speed (such as in enhanced I2C mode).

When the bus becomes idle, all output stages on the bus are turned off and SCL and SDA) go high. This will not happen immediately, the voltage will rather rise during a certain time. Now assume the switch (IC1) is not there. The charge time of the bus capacitor would only be determined by the value of R1. The larger R1 and Rs, the longer it will take for the bus to reach a sufficient stable HIGH level.

We can't make the Rs resistors too small because then we would go out of spec on the maximum allowable current into one I2C device when turning on its output driver.

When we calculate for a current of 3mA, we end up at approximately 1800 Ohms for the serial resistance.

     5V / 3mA = 1666 Ohms.

To stay somewhere below this 3mA rating, we pick 1800 Ohms. The charge time for a bus capacitance of about 200pF would be around 360 ns. That is out of spec. The spec for rise or fall time in Fast I2C is set to approx 300ns.

But we can't drop the value of our resistor without breaking the other spec of 3mA of maximum current.

The idea is to change the value of the resistor temporarily using the analog switch IC1. If the voltage level sensed by the switch is in the range 0.8 to 2 volts then it will turn on. This means that as soon as the voltage on the SDA line starts rising, resistor R2 will kick in. R1 and R2 in parallel result in a resistance of 720 Ohms. This increases the charge current to a value of

5 volts / 720 Ohms = 7 mA.

This is allowable for a brief period of time. Of course all of this is a dynamic process. The actual charge current will change due to the fact that the bus voltage will rise.

A small graphical representation will explain more:

 

Waveform 1 represents turning off the I2C device, which will release the bus lines so that they can go HIGH.

Waveform 2 is what you get if you only use a resistor. The bus slowly comes up to 5 volts due to RC constant of the pull-up resistor R1 and the parasitic capacitance of the bus line Cp.

Waveform 3 shows the analog switch kicking in. If the bus line is at approx 0.7 volts it closes. It opens again when the bus reaches approx 3 volts.

Waveform 4 is how the voltage on the bus changes. You can see that it rises much faster when the switch is turned on.

Finally, waveform 5 shows the current flowing into the I2C device. It starts at approx 3mA.

When the output stage is turned off, this current slightly drops due to the fact that the voltage on the bus is rising. The moment our switch kicks in you see the current doubling. The same effect is then present as before the switch closed: the current drops as the bus voltage rises. When the switch opens again the current drops a little to charge the capacitor up to 5 volts. But at that time, all chips already detect a logic one and are well within the 300ns rise time.

© Vincent Himpe 2016