Skip to content
MCUs

I2C Pull-up Calculator

Calculate the minimum and maximum pull-up resistor values for I2C bus speeds of 100 kHz (Standard), 400 kHz (Fast), and 1 MHz (Fast-Plus). Prevents signal integrity issues caused by too-weak or too-strong pull-ups.

Estimate the resistor range from sink-current and rise-time limits. Use the weakest device on the bus and the total bus capacitance.

Minimum resistance

0.97 kΩ

Limits sink current at VOL.

Maximum resistance

3.54 kΩ

Approximate rise-time upper bound.

A theoretical resistor range exists

Choose a standard value within the calculated limits, then verify rise time and VOL on the actual bus.

Uses tr ≈ 0.8473 × Rp × Cbus. Check the applicable I²C specification and every device’s voltage tolerance; never pull the bus above a connected device’s allowed logic voltage.

Why I2C needs pull-ups

I2C devices only ever pull SDA and SCL low; they never drive them high. Pull-up resistors bring the lines back up. The resistor value is a trade-off:

  • Minimum value (strongest pull-up): limited by how much current a device can sink while holding the line low. The I2C spec allows 3 mA at standard and fast mode: Rmin = (VCC − 0.4 V) ÷ 3 mA. At 3.3 V that is about 967 Ω, at 5 V about 1.53 kΩ.
  • Maximum value (weakest pull-up): limited by rise time. The resistor charges the bus capacitance; too slow and the edges don't reach HIGH in time. Rmax = tr ÷ (0.8473 × Cbus), where tr is 1000 ns at 100 kHz and 300 ns at 400 kHz.

Typical values

Bus100 pF bus (short wires, 1–3 modules)200 pF (longer wires / more modules)
100 kHz standard modeUp to 11.8 kΩ → 4.7–10 kΩUp to 5.9 kΩ → 4.7 kΩ
400 kHz fast modeUp to 3.5 kΩ → 2.2–3.3 kΩUp to 1.8 kΩ → 1.5 kΩ

Watch out for stacked pull-ups

Most breakout boards (BME280, SSD1306 OLED, MPU6050) already include 10 kΩ or 4.7 kΩ pull-ups. Connect four such modules and the pull-ups add in parallel: four 10 kΩ resistors become 2.5 kΩ. Five 4.7 kΩ become 940 Ω, below the 3.3 V minimum. If a bus with many modules fails, remove (or cut the solder jumper on) the extra pull-ups.

Estimating bus capacitance

Each device pin adds roughly 5–10 pF and each 10 cm of wire roughly 5–10 pF. A breadboard with three modules and 30 cm of jumpers is around 50–100 pF. Above 400 pF (the I2C limit) use a bus buffer such as the P82B715 or PCA9600, or lower the clock speed.

Formula, inputs and worked examples

Formula and method

Approximate rise-time upper bound: tr ≈ 0.8473 × Rp × Cbus; sink-current lower bound: Rp ≥ (Vpullup − VOL(max))/IOL. Check the applicable I2C speed and device limits.

Worked examples

One BME280 on an ESP32

The module's 10 kΩ pull-ups at 3.3 V and ~50 pF bus capacitance give a 0.42 µs rise time, fine for 100 kHz and borderline for 400 kHz.

Four modules at 400 kHz

Four modules with 4.7 kΩ pull-ups each combine to 1.18 kΩ. At 3.3 V the sink current is 2.5 mA, just inside the 3 mA limit.

Long cable to a sensor

A 1 m cable adds roughly 100 pF. At 100 kHz with 200 pF total, Rmax is 5.9 kΩ, so 4.7 kΩ pull-ups at the controller end work; 10 kΩ would not.

Inputs

  • Pull-up rail voltage — Unit: V
  • Maximum LOW voltage — Unit: V
  • Device sink current — Unit: mA
  • Bus capacitance — Unit: pF
  • Maximum rise time — Unit: ns

What the result means

  • Minimum resistance from sink-current limit — Unit: kΩ
  • Maximum resistance from rise-time limit — Unit: kΩ
  • Whether a theoretical range exists — Unit: boolean

Practical tips and common mistakes

  • Measure the combined pull-up with a multimeter between SDA and VCC (power off).
  • If an I2C scanner finds nothing, check pull-ups and wiring before blaming the library.
  • Pull up to the lower voltage when mixing 3.3 V and 5 V devices, or use a level shifter.

Assumptions and limitations

  • Use the actual bus capacitance, pull-up rail, and weakest device sink-current specification.
  • Parallel breakout-board pull-ups combine and can make the effective resistance too low.
  • Do not pull SDA/SCL above the voltage tolerated by any device on the bus.

Frequently asked questions

What value pull-up resistor for I2C?

4.7 kΩ is the standard starting point for 100 kHz and short wires. For 400 kHz or several modules, use 2.2–3.3 kΩ. Check whether your modules already have pull-ups first.

Does the ESP32 need external I2C pull-ups?

The internal pull-ups (~45 kΩ) are too weak for reliable I2C. Most sensor breakout boards include pull-ups, so a single module usually works; a bare chip on a custom PCB needs external 2.2–4.7 kΩ resistors.

Can I use 10k pull-ups for I2C?

Yes at 100 kHz with short wires and low capacitance. At 400 kHz 10 kΩ usually gives rounded, slow edges and intermittent errors.

Do I need pull-ups on both SDA and SCL?

Yes. Both lines are open-drain and each needs its own pull-up to the bus voltage.

Learn more

More MCUs