The I²C bus needs a pull-up resistor on each line. The I2C pull-up resistor calculator gives the smallest value, set by the sink current, the largest value, set by the rise time and the capacitance of the bus, a suggested value between them, the rise time and the current in the resistor.
How the calculation works
- Enter the supply voltage of the I²C bus and the total capacitance of the lines: the wires, the pins and the connectors, often 50 to 200 pF.
- Choose the speed mode, which sets the maximum rise time allowed by the I²C specification.
- The smallest value comes from the sink current: R(min) = (Vdd − 0.4 V) / 3 mA. The largest value comes from the rise time: R(max) = t_r / (0.8473 × C_b).
- The calculator gives both limits, a suggested value between them (the geometric mean), the rise time it gives and the current in the resistor when the line is low.
Example
An I²C bus runs at 3.3 V in fast mode (300 ns) with a total capacitance of 100 pF. The smallest resistor is (3.3 − 0.4) / 0.003 = 967 Ω. The largest is 300 ns / (0.8473 × 100 pF) = 3,541 Ω. The suggested value is the geometric mean, 1,850 Ω, so the standard value 1.8 kΩ is a good choice. The rise time is 156.8 ns and the line draws 1.57 mA when it is low.
Why it matters
The calculator helps makers, students and embedded engineers to choose pull-up resistors for a microcontroller, sensors and displays, instead of using 4.7 kΩ for everything. A good value gives clean edges at high speed and saves power, and the calculator shows when the bus has too much capacitance for a speed mode.
Good to know
The limits come from the I²C specification for a low level of 0.4 V at 3 mA and a rise time measured from 30 % to 70 % of the supply. The internal pull-ups of a microcontroller are weak, typically 20 to 50 kΩ, and are not enough for a fast bus. The bus capacitance includes the pins of the devices, the traces and the cables, and the real values should be checked with an oscilloscope.
Related tools
The UART baud rate calculator handles another serial link, the resistor calculator combines resistors, the voltage divider calculator gives a level shifter by resistors, and the capacitor calculator combines the capacitance of several parts.