Skip to main content

How Do I Choose I2c Pullup Resistor?

by
Last updated on 6 min read
Affiliate Disclosure: As an Amazon Associate, TechFactsHub may earn commissions from qualifying purchases made through links in this article. Prices are subject to change.

Start with 4.7 kΩ pull-ups on both SDA and SCL lines; drop to 2.2 kΩ or 1.5 kΩ only if timing glitches appear, and never go below 2 kΩ.

I²C pull-ups default the bus high; pick resistors that let the line hit a clean logic-high without pushing the host past its sink-current limit.

I²C uses open-collector outputs—every chip can only drag the line low. Pull-ups yank it back up when nothing’s pulling down. Choose resistors that are too big (think 100 kΩ) and leakage or noise can stall the line below logic-high. Pick them too small (470 Ω, for instance) and the host or slave may need to sink more than 3 mA, which violates the 3.4 Mbps spec. Most modern microcontrollers sink 1–3 mA when they pull low, but always double-check the datasheet—some parts handle more. If you're unsure about current limits, you might want to review how to calculate resistor values for different configurations.

Measure bus current, check the MCU’s sink limit, then scope the waveform at your target speed to dial in the resistor.

  1. Measure the real bus current.
    • Power the board from a clean 3.3 V supply.
    • Hook a digital multimeter in series with SDA (or SCL) and watch IOL when the line goes low; expect 1–3 mA on most ARM Cortex parts.
  2. Install 4.7 kΩ pull-ups on both lines.
    • Run one resistor from SDA to 3.3 V and another from SCL to 3.3 V.
    • Some eval boards, like TI’s LAUNCHXL-CC1352P, give you 4.7 kΩ jumpers you can flip on or off.
  3. Check the MCU datasheet for max sink current.
    • An STM32F4 at 3.3 V can sink up to 8 mA (Table 62).
    • Work out the smallest safe resistor: Rmin = VCC / IOL = 3.3 V / 8 mA ≈ 413 Ω. Any larger value keeps you inside spec.
  4. Scope the waveform at the speed you plan to use.
    • Set the bus to 400 kHz (Fast Mode) or 1 MHz (Fast Mode Plus) and eyeball the edges.
    • If the rise time tops 300 ns (Fast Mode) or 120 ns (Fast Mode Plus), drop the resistor in steps—4.7 kΩ → 2.2 kΩ → 1.5 kΩ—and check again.
  5. Factor in bus capacitance.
    • A 2 m cable with two devices adds about 120 pF. According to the I²C specification (Rev. 7, §6.3), tr ≈ 2.2 × R × C. With R = 2.2 kΩ and C = 120 pF, tr ≈ 580 ns, comfortably under the 1000 ns Fast Mode limit.

If the bus still acts up, cut capacitance, kill duplicate pull-ups, or add a level-shifter for mixed-voltage setups.

  • Too much bus capacitance? Keep resistors at 1.5 kΩ or higher; tack on a 2.2 µF decoupling cap at the far end to tame noise.
  • Built-in pull-ups already lurking? Turn them off in firmware (STM32 users: clear GPIO_PUPDR bits) so you don’t end up with parallel paths that push current past the 3 mA limit.
  • Mixing 3.3 V and 5 V chips? Drop in a PCA9306 level-shifter and recalculate Rmin for the 5 V side; TI’s datasheet suggests 2.7 kΩ for 5 V hosts.

Always add pull-ups on both SDA and SCL, avoid piling on resistor banks without recalculating IOL, and slap a label on the board.

  • Put pull-ups on both SDA and SCL—those lines are electrically identical.
  • Don’t just double-up resistors without recalculating IOL. Two 4.7 kΩ resistors in parallel become 2.35 kΩ, which is fine for most 3.3 V MCUs, but four in parallel could force 12 mA and break the spec.
  • Label every board: “I²C pull-ups: 4.7 kΩ (SDA, SCL).” Future engineers—and your future self—will owe you one.

Does I²C need pull-up resistors?

The I²C bus must have pull-up resistors—one on SDA and one on SCL.

They’re usually 4.7 kΩ or 10 kΩ, but anywhere from 2 kΩ to 10 kΩ works fine. If you're working with different voltage levels, you may need to consider SMD chip resistors for compact designs.

What pull-up resistor do I need?

Pull-up resistors pull the line to a logical high state when the switch is open.

Without them, the MCU input floats when nothing’s driving it low, which is never a good look. Understanding how pull-up resistors function can help clarify their importance in circuit design.

What happens if the pull-up resistor for an I²C signal is too large?

If the resistor is too large, it can’t beat leakage current.

Even if it just squeaks past leakage, any stray noise can flip the input. For more details on resistor behavior, you can explore resistor applications in voltage dividers.

How do you find the pull-up resistor value?

Start with IEN and ILKG, calculate IPull-up, then use Equation 2 to set the maximum RPull-up.

For a 1.8 V output example, that gives you the upper bound. Next, work out the minimum resistor value. If you're unsure about calculations, reviewing resistor selection for voltage dividers can provide additional insights.

How many slaves can be connected on I²C?

A single I²C network can theoretically support up to 128 slave devices.

In practice, the real limit is much lower, but you’ll rarely hit the ceiling. If you're considering expanding your network, you might want to look into alternative communication methods.

How many pull-up resistors for I²C?

The I²C spec caps pull-up current at 3 mA per line.

For example, the Aardvark adapter pairs a 2.2 kΩ resistor with a 100 kΩ resistor on each line; the 2.2 kΩ can be toggled on and off. If you're working with different configurations, you may need to understand how resistor values impact circuit performance.

Why do you need pull-up resistors?

Pull-up resistors give a known state to a floating signal.

They quietly hold the line high until something actively pulls it low, which keeps the circuit predictable. For more context on signal management, you can read about the importance of proper signal handling in different systems.

What does a 10 kΩ resistor look like?

A 10 kΩ resistor wears four color bands: brown, black, orange, and gold for 5 % tolerance.

A 1 kΩ resistor looks similar: brown, black, red, and gold for 5 % tolerance.

Why does Port 0 need pull-up resistors?

Port 0 on the 8051 needs an external pull-up when it’s used as an output.

It doubles as a simple I/O port and as the low byte of the external-memory address bus with Port 2.

What is the speed for Fast Mode in I²C?

Wires 2 (SCL and SDA) Data Frame Size 8 Bits packets Maximum speed Standard mode = 100 Kbps Fast Mode =
400 Kbps
High-Speed mode = 3.4 Mbps

Does SPI need pull-up resistors?

SPI doesn’t need pull-ups.

Unlike I²C, SPI drivers are push-pull, so the lines never float. If you're comparing communication protocols, you might find insights on alternative technologies useful.

How do you calculate the I²C pull-up resistor?

With 3.3 V and 1.77 kΩ, the pull-ups draw about 1.86 mA each when SCL/SDA is low.

In the worst-case capacitance scenario, that suggests starting with 1.77 kΩ resistors; you can go as low as 171 Ω if the drivers can handle 13.5 mA.

Why are pull-up resistors used in I²C?

Pull-up resistors give each signal line a default high state.

They’re the quiet guardians that keep the bus from floating into undefined territory.

What is the difference between pull-up and pull-down resistors?

A pull-up ties an unused input to VCC to keep it HIGH; a pull-down ties it to ground (0 V) to keep it LOW.

Use pull-ups for AND/NAND inputs and pull-downs for OR/NOR inputs.

How many external pull-up resistors are used in Port 0?

Five external pull-ups are typically used on Port 0.

They let you connect components running at different voltages to the microcontroller.

Edited and fact-checked by the TechFactsHub editorial team.
David Okonkwo

David Okonkwo holds a PhD in Computer Science and has been reviewing tech products and research tools for over 8 years. He's the person his entire department calls when their software breaks, and he's surprisingly okay with that.