I2C Pull-Up Resistor Calculator (SDA and SCL)
The window of pull-up resistor values that an I2C bus allows for its supply voltage, speed mode and bus capacitance, and whether the resistor you picked sits inside it.
Results
The dashed line marks the value you entered.
What this tool does
I2C lines are open-drain, so the resistor pulls the line up and the devices pull it down, and two limits fix the allowed value. The upper one comes from the rise time: the line has to climb from 30 % to 70 % of the supply within 1000, 300 or 120 ns (standard, fast and fast-mode plus), which for an RC rise takes 0.8473 × R × C, so R ≤ t_r ÷ (0.8473 × C_b). The lower one comes from the 3 mA (20 mA in fast-mode plus) a device must sink while holding the line below 0.4 V. That is why 4.7 kΩ suits a 100 kHz bus with about 250 pF, while 400 kHz with 200 pF needs less than about 1.8 kΩ.
Formula
R_max = t_r ÷ (0.8473 × C_b) · R_min = (V_DD − 0.4 V) ÷ I_OL · t_r = 0.8473 × R × C_b (t_r max 1000 / 300 / 120 ns; I_OL 3 / 3 / 20 mA)
Variables
| Symbol | Meaning | Unit |
|---|---|---|
vdd | Bus supply voltage | V |
cb | Total bus capacitance (wiring + pins) | pF |
md | Bus speed mode | — |
rp | Pull-up resistor you plan to use | kΩ |
RX | Highest pull-up that meets the rise time | kΩ |
RN | Lowest pull-up the devices can pull down | kΩ |
TR | Rise time with your resistor | ns |
ST | Does your resistor work? | — |
Worked example
- Bus supply voltage3.3 V
- Total bus capacitance (wiring + pins)100 pF
- Bus speed mode2
- Pull-up resistor you plan to use2.2 kΩ
- Highest pull-up that meets the rise time3.54 kΩ
- Lowest pull-up the devices can pull down0.97 kΩ
- Rise time with your resistor186 ns
- Does your resistor work?Yes — it is inside the allowed window
Limitations
- Coverage and consumption figures vary between products. Take the values from the manufacturer's datasheet for the product you are actually using.
- The formula assumes ideal conditions: no friction losses, no air resistance and no efficiency losses unless you enter them.