I2C pull-up resistor calculator
The valid pull-up range for an I2C bus from the supply, the mode and the bus capacitance, with a standard value that stays inside it across its tolerance.
- Rp(min), from sink current
- 966.7 Ω (3.3 V - 0.40 V) / 3 mA
- Rp(max), from rise time
- 3.541 kΩ 300 ns / (0.8473 x 100 pF)
- Rise time with suggested value
- 153 ns Limit 300 ns
- Sink current when low
- 1.61 mA Limit 3 mA
| Pull-up | Rise time, 30% to 70% | Sink current | Rise margin |
|---|---|---|---|
| 1 kΩ | 85 ns | 2.90 mA | 72% |
| 1.1 kΩ | 93 ns | 2.64 mA | 69% |
| 1.2 kΩ | 102 ns | 2.42 mA | 66% |
| 1.3 kΩ | 110 ns | 2.23 mA | 63% |
| 1.5 kΩ | 127 ns | 1.93 mA | 58% |
| 1.6 kΩ | 136 ns | 1.81 mA | 55% |
| 1.8 kΩ | 153 ns | 1.61 mA | 49% |
| 2 kΩ | 169 ns | 1.45 mA | 44% |
| 2.2 kΩ | 186 ns | 1.32 mA | 38% |
| 2.4 kΩ | 203 ns | 1.21 mA | 32% |
| 2.7 kΩ | 229 ns | 1.07 mA | 24% |
| 3 kΩ | 254 ns | 0.97 mA | 15% |
| 3.3 kΩ | 280 ns | 0.88 mA | 7% |
How this is calculated
Rp(min) = ( VDD − VOL(max) ) / IOL Rp(max) = tr / ( 0.8473 · Cb ) 0.8473 = ln( 0.7 / 0.3 ), the RC time from 0.3 VDD to 0.7 VDD
- Limits per mode
- Standard-mode 100 kHz: tr 1000 ns, Cb 400 pF, IOL 3 mA. Fast-mode 400 kHz: tr 300 ns, Cb 400 pF, IOL 3 mA. Fast-mode Plus 1 MHz: tr 120 ns, Cb 550 pF, IOL 20 mA. All from UM10204 Table 10.
- Output low
- VDD above 2 V: VOL(max) 0.4 V at the mode sink current. VDD of 2 V or less: VOL(max) 0.2 VDD at 2 mA (Table 10, VOL2).
- Suggested value
- The E12 or E24 value nearest the geometric center of the range, after checking that the resistor stays inside the range at both ends of its tolerance. Battery designs can pick a higher value from the table to cut current, as section 7.1 notes.
- Assumes
- A plain resistor pull-up. Series protection resistors, bus buffers and current-source pull-ups change the limits.
- NXP UM10204, I2C-bus specification and user manualRev. 7.0, 1 October 2021: Table 10 and section 7.1
Questions
With 100 pF of bus capacitance the valid range is 967 Ω to 3.54 kΩ. The calculator suggests 1.8 kΩ (153 ns, 1.61 mA when low). A 2.2 kΩ pull-up is also inside the range: it gives a 186 ns rise time against the 300 ns Fast-mode limit and sinks 1.3 mA when low. At 200 pF the maximum drops to 1.77 kΩ, so 2.2 kΩ no longer meets the rise time.
A device only has to sink 3 mA (20 mA in Fast-mode Plus) while holding the line at or below 0.4 V. A smaller resistor demands more current than that. UM10204 section 7.2.4 gives the example of a 5 V ±10% supply: (5.5 V − 0.4 V) / 3 mA = 1.7 kΩ minimum.
Add the pin capacitance of every device (UM10204 allows up to 10 pF per pin) to the trace and cable capacitance. On a built board, measure the 30% to 70% rise time with a known pull-up and solve Cb = tr / (0.8473 · Rp).
The bus capacitance is too high for the mode. The limits are 400 pF for Standard and Fast-mode and 550 pF for Fast-mode Plus. Split the bus with a buffer, use a switched or current-source pull-up (UM10204 section 7.2), or drop to a slower mode, whose 1000 ns rise time allows a pull-up 3.3 times larger than Fast-mode.
At 2 V and below, UM10204 specifies VOL(max) as 0.2 VDD at 2 mA instead of 0.4 V at 3 mA. At 1.8 V that is (1.8 − 0.36) / 2 mA = 720 Ω minimum. The rise time limit is unchanged, so the maximum is set by capacitance exactly as at 3.3 V.