100nF

I²C pull-up

The pull-up has a floor and a ceiling. Too small and the driver cannot sink enough current to pull the line down to a valid low. Too large and the line cannot rise fast enough through the bus capacitance for the mode you picked. Pick something in the window; the geometric middle is a fine default.

100 Ω1.0 kΩ10 kΩ100 kΩminmax2.2 kΩ
Fig 1 — Pull-up window 967 Ω to 3.5 kΩ.
Minimum (V_OL at rated sink)
967 Ω
Maximum (rise time)
3.54 kΩ
Suggested E24 value
1.80 kΩ · 153 ns rise
Rise time with 2.20 kΩ
186 ns
Low-level current per line
1.32 mA
Pull-up power, both lines low
8.70 mW
Time constant R·C_b
220 ns

What it computes

An I²C line is open-drain. Nothing drives it high; the pull-up does, through whatever capacitance hangs on the line. That gives the resistor a floor and a ceiling, and the tool reports both.

The floor comes from the low level. When a device pulls the line down it has to sink the pull-up current and still hold the line at or below VOL. NXP UM10204 section 6.1 (Table 9) rates the driver at 3 mA for Standard- and Fast-mode, 20 mA for Fast-mode Plus, with VOL = 0.4 V. Go below Rmin and the low level creeps up towards the input threshold.

The ceiling comes from the rise time. UM10204 Table 10 limits tr to 1000 ns, 300 ns and 120 ns for the three modes, and defines it between 30 % and 70 % of VDD, not 10 % to 90 %. For an RC edge, the time between those two points is ln(0.7/0.3) = 0.8473 time constants. That constant is the whole difference between this calculator and one that multiplies by 2.2.

R_min = (V_DD − V_OL) / I_OL             I_OL = 3 mA (SM, FM), 20 mA (FM+)
R_max = t_r(max) / (0.8473 · C_b)        t_r(max) = 1000 / 300 / 120 ns
t_r   = 0.8473 · R_p · C_b               rise time with the resistor you chose
I_low = (V_DD − V_OL) / R_p              current per line while it is held low
P     = V_DD · I_low                     per line; SDA and SCL both need one

Bus capacitance Cb is the total on one line: every device pin, the MCU pin, the pads and the copper. UM10204 caps it at 400 pF (550 pF for FM+). If you have not measured it, budget 10 pF per device pin (the specification's own allowance, section 6.1) plus roughly 1 pF per centimetre of trace over a ground plane. The tool builds Cb from those two terms so the estimate is at least visible.

The same formulas, with the same constants, appear inTI SLVA689, I²C Bus Pullup Resistor Calculation, section 2 and 3. The source isNXP UM10204, I²C-bus specification and user manual, section 7.1.

Worked example

Fast-mode at 400 kHz, 3.3 V rail. Six devices on the bus (the MCU plus five peripherals), 30 cm of total SDA copper across a small backplane.

C_b   = 6 × 10 pF + 30 cm × 1 pF/cm = 60 + 30 = 90 pF

R_min = (3.3 − 0.4) / 3 mA
      = 2.9 / 0.003
      = 967 Ω

R_max = 300 ns / (0.8473 × 90 pF)
      = 300e-9 / 76.26e-12
      = 3.93 kΩ

Geometric middle = √(967 × 3934) = 1950 Ω  →  nearest E24: 2.0 kΩ

Fit a 2.2 kΩ (what was in the reel) and check it:

t_r   = 0.8473 × 2200 × 90e-12 = 168 ns          (limit 300 ns, fine)
I_low = 2.9 / 2200              = 1.32 mA         (limit 3 mA, fine)
P     = 3.3 × 1.32 mA           = 4.35 mW per line
Both lines held low             = 8.70 mW

The calculator gives Rmin 967 Ω, Rmax 3.93 kΩ, suggested 2.0 kΩ, and 168 ns / 1.32 mA / 4.35 mW for the 2.2 kΩ choice. The 8.7 mW is the worst case, both lines low; average power on an idle bus is close to zero since both lines sit high.

Where it stops being valid

The model is a single RC. It is right as long as the line is electrically short, which at I²C speeds is always true on a PCB, and it is right as long as the only thing pulling up is the resistor. Three things break it:

This is why the 4.7 kΩ everyone has in the drawer fails at 400 kHz. It was a fine Standard-mode value on a short 5 V bus. On the 90 pF bus above it gives 0.8473 × 4700 × 90 pF = 358 ns, already over the 300 ns limit; at 200 pF it is 796 ns and the edges are visibly rounded on a scope. At 400 pF it is 1.59 µs, which fails even Standard-mode. Fast-mode with any real bus wants something between 1 kΩ and 2.2 kΩ.

Common mistakes

Further reading