I2C Pull-up Resistor Calculator
I2C Pull-up Resistor Calculator
How the I2C pull-up resistor is calculated
The calculator determines a minimum and maximum resistor value.
The valid resistor must satisfy:
Rp(min) ≤ Rp ≤ Rp(max)
The lower limit is determined by the current that an I2C device must sink while pulling SDA or SCL LOW:
Rp(min) = (VDD − VOL(max)) / IOL
The upper limit is determined by the bus capacitance and the maximum allowed rise time:
Rp(max) = tr / (0.8473 × Cb)
These are the equations specified by NXP in section 7.1 of the UM10204 I2C-bus specification. The 0.8473 factor comes from the 30%–70% RC rise-time definition used for I2C. NXP UM10204
What Rp(min) means
A pull-up resistor that is too small produces more current when a device pulls the bus LOW.
For example, with a 3.3 V bus, VOL(max) = 0.4 V and IOL = 3 mA:
Rp(min) ≈ (3.3 − 0.4) / 0.003 ≈ 967 Ω
Using a resistor below this value can exceed the assumed sink-current limit.
What Rp(max) means
A resistor that is too large makes the rising edge too slow.
I2C devices use open-drain/open-collector outputs, so the bus is actively pulled LOW but relies on the pull-up resistor and bus capacitance to return HIGH.
Higher capacitance or a faster I2C mode therefore requires a lower maximum resistor value.
I2C rise-time limits
The commonly used maximum rise times for the modes supported by this calculator are:
I2C mode Typical clock Maximum rise time —————- ————— ——————- Standard-mode 100 kHz 1000 ns Fast-mode 400 kHz 300 ns Fast-mode Plus 1 MHz 120 ns
Always check the datasheets for the devices actually used in your design.
Fast-mode Plus is particularly important because its sink-current requirement is higher. The calculator therefore uses 20 mA as the default IOL value for Fast-mode Plus, while Standard-mode and Fast-mode use 3 mA. These values follow the pull-up sizing guidance in UM10204. NXP UM10204
How much bus capacitance should you enter?
The bus capacitance is not simply the capacitance of one sensor.
It includes the combined capacitance of:
- MCU SDA/SCL pins
- sensor and peripheral pins
- PCB traces
- connectors
- level shifters
- protection components
- cables and wiring
NXP describes bus capacitance as the total capacitance of the wires, connections and device pins.
If the capacitance is unknown, use a reasonable estimate and treat the result as a starting point. For a final hardware design, measuring the actual rise time with an oscilloscope is preferable.
Why common 4.7 kΩ pull-ups are not always correct
4.7 kΩ is a common I2C pull-up value, but it is not universally correct.
It can work well on a short, low-capacitance 3.3 V bus, but the correct value depends on:
- bus voltage
- I2C speed
- total bus capacitance
- device sink-current capability
- required rise time
For example, a higher-capacitance Fast-mode bus may require a lower resistor than 4.7 kΩ, while a small Standard-mode bus may work perfectly with a larger value.
The correct approach is to calculate the allowable range instead of blindly choosing a standard value.
Multiple I2C devices and pull-ups
One common source of I2C problems is having multiple breakout boards with their own pull-up resistors.
Pull-ups connected in parallel produce a lower effective resistance:
1 / Req = 1 / R1 + 1 / R2 + 1 / R3 + …
For example, two 4.7 kΩ pull-ups in parallel produce an effective resistance of about 2.35 kΩ.
This can be beneficial for rise time, but it also increases the LOW-level current that the active device must sink.
If an I2C bus becomes unreliable after adding another sensor module, check whether the new module also contains SDA/SCL pull-up resistors.
Practical I2C pull-up resistor workflow
A good design workflow is:
- Determine the I2C bus voltage.
- Select the required I2C speed.
- Estimate the total bus capacitance.
- Check the weakest device’s VOL(max) and IOL specifications.
- Calculate Rp(min).
- Calculate Rp(max).
- Choose a standard resistor value inside the valid range.
- Check for pull-ups already present on connected modules.
- Verify SDA and SCL rise times on the finished hardware.
For debugging I2C devices and addresses, you can also use the I2C Address Lookup tool on Embedded Nerd.
FAQ
What is the best I2C pull-up resistor value?
There is no single value that is best for every I2C bus. A value such as 4.7 kΩ is common, but the correct value depends on bus voltage, capacitance, speed and device sink-current capability.
Use the calculator to determine the valid range for your bus.
Can I use 10 kΩ pull-ups for I2C?
Sometimes. 10 kΩ can work on a low-capacitance Standard-mode bus, but it may produce rise times that are too slow for Fast-mode or higher-capacitance buses.
Can I use 1 kΩ pull-ups?
A 1 kΩ resistor can provide fast rise times, but it can also create excessive LOW-level current. Check Rp(min) and the IOL rating of every device that can pull the bus LOW before using a low resistance.
Do SDA and SCL need separate pull-up resistors?
Yes. Normally SDA and SCL each have their own pull-up resistor connected to the I2C bus supply.
Do I need pull-ups with an ESP32?
Usually, yes, unless the board or connected device already provides suitable pull-ups. Avoid adding another set of pull-ups without checking the total effective resistance of the bus.
Do I need pull-ups with an Arduino?
It depends on the Arduino board and connected hardware. Some boards or modules may already include pull-ups. Check the schematic and datasheets before adding external resistors.
What happens if the I2C pull-up resistor is too large?
The bus rises too slowly. At higher speeds this can violate the I2C rise-time specification and cause communication errors.
What happens if the I2C pull-up resistor is too small?
The bus can rise quickly, but the device pulling the line LOW must sink more current. If the current exceeds its specification, VOL may become too high or the device may be overstressed.
Technical reference
The calculations in this tool are based on the pull-up resistor sizing guidance in:
- NXP Semiconductors, UM10204 I²C-bus specification and user manual, Rev. 7.0, section 7.1.
- Rp(max): rise-time and bus-capacitance constraint.
- Rp(min): supply voltage, VOL(max) and sink-current constraint.
For the authoritative specification, see the NXP UM10204 I²C-bus specification and user manual.
Engineering note: This calculator is a design aid, not a substitute for checking the electrical specifications of the actual devices in your design. For production hardware, verify SDA/SCL rise and fall times, LOW-level voltage and current on the completed bus.