Calculating Pull-up Resistors

On an I2C bus, no device ever drives a line HIGH. Masters and slaves only pull SDA and SCL down towards ground; the HIGH level is restored by the pull-up resistors as soon as the drivers release the line. The value of these resistors is therefore not a detail – it decides whether the bus works at all.

Two limits define the usable range. The lower limit follows from the current a device has to sink while holding a valid LOW level, the upper limit from the rise time of the RC network formed by the pull-up and the bus capacitance. Both limits come straight from the I2C specification (UM10204, Rev 7.0).

Why open drain needs pull-ups

I2C uses open-drain outputs (open-collector on bipolar parts) for both lines. A driver can switch a transistor to ground, but it has no path to VDD. That is deliberate: the wired-AND behaviour is what enables multi-master arbitration and clock stretching, and devices with different supply voltages cannot fight each other. The price is that the bus goes HIGH only passively, through the pull-up resistors – it never goes HIGH actively.

The rising edge is therefore the critical one. Its shape depends entirely on the pull-up resistance Rp and the total bus capacitance Cb. The falling edge is fast, because the driver actively pulls the line down.

The lower limit: how much current can the device sink

When a device pulls the bus LOW, the current from the pull-up resistor flows through the driver transistor. If the resistor is too small, this current exceeds what the driver can sink, and the line no longer falls below the LOW-level limit. The specification allows at most 0.4 V at the pin while 3 mA flow into the driver, which yields the minimum resistance: Rp(min) = (VDD − VOL) / IOL, with VOL(max) = 0.4 V.

For Standard Mode and Fast Mode, IOL is 3 mA. A 5 V bus then needs at least (5.0 V − 0.4 V) / 3 mA ≈ 1.5 kΩ, a 3.3 V bus at least (3.3 V − 0.4 V) / 3 mA ≈ 1.0 kΩ. Fast Mode Plus raises the required sink capability to 20 mA, which lowers the minimum to 230 Ω at 5 V and 145 Ω at 3.3 V. Many real devices sink considerably more, but the specified values are the contract: below these resistances the bus runs outside the standard.

The upper limit: rise time

A released bus charges through the pull-up like an RC network. The specification models this with a single RC step and defines the rise time between 30% and 70% of VDD – hence the slightly odd constant in the formula: tr = 0.8473 × Rp × Cb for Standard Mode and Fast Mode, and tr = 0.4773 × Rp × Cb for Fast Mode Plus.

The rise time must not exceed 1000 ns in Standard Mode, 300 ns in Fast Mode and 120 ns in Fast Mode Plus. Rearranged, this yields the maximum resistance: for a Fast Mode bus with 200 pF bus capacitance, Rp may be at most 300 ns / (0.8473 × 200 pF) ≈ 1.8 kΩ. In Standard Mode, the same bus tolerates about 5.9 kΩ.

Typical pull-up ranges in practice

The following ranges satisfy both limits at once for Standard Mode and Fast Mode (3 mA sink current). They are typical values for orientation, rounded to common resistor series – they do not replace the calculation with your own, measured bus capacitance.

VDDCb = 100 pFCb = 200 pFCb = 400 pF
1.8 V470 Ω – 3.5 kΩ470 Ω – 1.8 kΩ470 Ω – 900 Ω
3.3 V1.0 kΩ – 3.5 kΩ1.0 kΩ – 1.8 kΩStandard Mode only: up to 2.9 kΩ
5.0 V1.5 kΩ – 3.5 kΩ1.5 kΩ – 1.8 kΩStandard Mode only: up to 2.9 kΩ

The third column shows the uncomfortable truth: at 400 pF bus capacitance, a Fast Mode bus at 3.3 V or 5 V has no valid single pull-up at all, because the minimum required by the sink current already exceeds the maximum allowed by the rise time. Such a bus either runs in Standard Mode only, or the termination has to be improved – active pull-ups, a bus buffer, or shorter wires that reduce the capacitance.

For Fast Mode Plus (20 mA sink current, 120 ns rise time, up to 550 pF bus capacitance) the window shifts downwards:

VDDCb = 100 pFCb = 200 pFCb = 400 pF
1.8 V75 Ω – 2.4 kΩ75 Ω – 1.2 kΩ75 Ω – 620 Ω
3.3 V150 Ω – 2.4 kΩ150 Ω – 1.2 kΩ150 Ω – 620 Ω
5.0 V230 Ω – 2.4 kΩ230 Ω – 1.2 kΩ230 Ω – 620 Ω

Practical tips

  • Count the pull-ups that are really on the bus. Resistors in parallel act like one smaller resistor: two devices with 4.7 kΩ each give roughly 2.4 kΩ, and every further device pushes the value down.
  • On long lines, the internal pull-ups of one or two chips are usually not enough. Values of 20–50 kΩ are far too weak once the bus capacitance grows; external resistors of a few kiloohms are then mandatory.
  • Account for stray series resistance. Long thin wires, connector contacts and protective resistors form a voltage divider with the pull-up and worsen the LOW level at the receiver. Keep the loop resistance small.
  • Edge steepness is a compromise. Soft edges from large resistors reduce crosstalk into neighbouring lines, but they eat into the rise-time budget. On densely wired boards, check both sides of the trade-off.
  • Measure instead of guessing: an oscilloscope or a logic analyzer shows within minutes whether the edges meet the limits.

More background on this site: how termination works in general is covered in Termination, the interaction between pull-up size and line length in Termination Versus Capacitance, and the level questions in Voltage Level.

The authoritative source for all formulas is the I2C-bus specification UM10204, Rev 7.0 (NXP); the application note AN10216 contains the same arithmetic with worked examples.