I²C Pull-up Calculator

Size the pull-up on each SDA or SCL line from bus capacitance, rise-time limit and the weakest device's LOW-level sink capability. Estimate the capacitance from the board and connected pins if needed.

Method, formulas and references

Method

Bus capacitance is calculated for one SDA or SCL net: Cb = Ctrace + ΣCpin + Ccable + Cother. Count all branches of the net. The PCB trace term is its total length times capacitance per unit length. The manual option accepts a measured or otherwise known total.

For the geometry estimate, the existing Hammerstad–Jensen microstrip or Wheeler symmetric-stripline approximation gives trace impedance Z0 and effective dielectric constant εeff. Capacitance per metre follows from C′ = √εeff / (c·Z0). The microstrip approximation omits solder mask; both models assume uniform geometry and continuous reference planes. The known pF/cm option lets a fabricator or field-solver value replace this approximation.

For a passive open-drain pull-up, the sink-current minimum is (VDD − VOL(max)) / IOL and the rise-time maximum is tr,max / (0.8473 × Cb). Fast-mode also has a 20 ns minimum rise time, which can raise the resistance minimum on a very low-capacitance bus. The 0.8473 factor converts an RC time constant to a 30–70 % rising edge. A nominal resistor must keep its low-tolerance corner above the minimum and its high-tolerance corner below the maximum.

Sink current is calculated at VOL(max); maximum resistor power assumes the line is pulled near 0 V. The actual LOW level depends on the device's output characteristic. Leakage, level shifters, active pull-ups and parallel pull-ups can change the result. Verify the weakest device's datasheet and the bus capacitance.

References

  1. NXP UM10204, I²C-bus specification and user manual, Standard, Fast and Fast-mode Plus timing and electrical limits.
  2. Texas Instruments SLVA689, I²C Bus Pullup Resistor Calculation, equations and design example.
  3. E. Hammerstad and Ø. Jensen, “Accurate Models for Microstrip Computer-Aided Design,” IEEE MTT-S International Microwave Symposium, 1980; H. A. Wheeler, “Transmission-Line Properties of a Strip Line Between Parallel Planes,” IEEE Transactions on Microwave Theory and Techniques, 1978.

Related guides

Related tools

Related communication interfaces tools