Calculadora de Resistencia Pull-up I2C
Calcula el valor óptimo de resistencias pull-up para buses I2C según velocidad y capacitancia.
Fórmula
R_{max} = \frac{t_r}{0.8473 \cdot C_{bus}}, \quad R_{min} = \frac{V_{DD} - V_{OL}}{I_{OL}}, \quad R_{rec} = \sqrt{R_{min} \cdot R_{max}}
Referencia: NXP I2C-bus specification and user manual, Rev. 7.0 (UM10204), §7.1
Cómo Funciona
I2C bus communication relies on open-drain/open-collector drivers, which require pull-up resistors to establish the default HIGH state. These resistors are critical in determining signal integrity, rise time, and bus capacitance characteristics. The pull-up resistor must be carefully selected to balance two primary constraints: minimum current to guarantee logical HIGH state and maximum resistance to ensure rapid signal transitions. The calculation involves understanding the bus capacitance, supply voltage, and I2C mode-specific electrical parameters. Pull-up resistors create a current path that charges the bus capacitance, with the resistance value directly influencing signal rise time and noise immunity. Different I2C modes (Standard, Fast, and Fast Plus) have varying electrical specifications that impact resistor selection.
Ejemplo Resuelto
Consider a Fast Mode I2C bus with 5V supply and 100 pF total capacitance. First, calculate maximum resistance: t_rise is typically 300 ns, so Rmax = 300 ns / (0.8473 × 100 pF) = 3.55 kΩ. For minimum resistance, with 3 mA typical sink current and 5V supply: Rmin = (5V - 0.4V) / 0.003A = 1.53 kΩ. The recommended pull-up resistor is the geometric mean: √(3.55 kΩ × 1.53 kΩ) ≈ 2.4 kΩ. A standard 2.2 kΩ or 2.7 kΩ resistor would work well in this scenario.
Consejos Prácticos
- ✓Use 1% tolerance resistors for consistent bus performance
- ✓Consider adding parallel termination for long bus traces
- ✓Measure actual rise time with oscilloscope to validate theoretical calculations
Errores Comunes
- ✗Using identical pull-up resistors for different I2C modes without recalculating
- ✗Neglecting total bus capacitance, including parasitic capacitance from long traces
- ✗Assuming linear relationship between resistance and rise time
Preguntas Frecuentes
Why do I2C buses need pull-up resistors?
Pull-up resistors establish the default HIGH state in open-drain I2C bus configurations. They provide a current path to charge bus capacitance and ensure reliable logic signaling.
How does bus capacitance affect pull-up resistance?
Higher bus capacitance requires lower resistance to maintain fast rise times. Increased capacitance from longer traces or multiple devices will impact signal integrity.
Can I use the same pull-up resistor for all I2C modes?
No, different I2C modes (Standard, Fast, Fast Plus) have varying electrical characteristics that require recalculating pull-up resistance.
What happens if pull-up resistance is too high?
Excessive pull-up resistance causes slow signal rise times, potentially violating I2C timing specifications and causing communication errors.
How do I choose between multiple suitable resistor values?
Select the standard value closest to the calculated resistance, preferring lower values for faster rise times and higher noise immunity.
Shop Components
Affiliate links — we may earn a commission at no cost to you.
Related Calculators
Comms
UART Baud Rate
Calculate UART frame timing, throughput, and USART BRR register divisor from baud rate, data format, and MCU clock frequency. Identify baud rate error for reliable serial communication.
General
RC Time Constant
Calculate RC circuit time constant τ, charge time to 63.2% and 99%, and −3dB cutoff frequency. Essential for filter and timing circuit design.
General
Ohm's Law
Calculate voltage, current, resistance, and power using Ohm's Law. Enter any two values to solve for the remaining two quantities.
Comms
SPI Timing
Calculate SPI bus timing parameters including bit period, frame time, maximum clock frequency limited by trace capacitance, and signal slew rate
Comms
CAN Bus Timing
Calculate CAN bus bit timing parameters including prescaler, time quanta, sync segment, propagation segment, and phase buffer segments for a given baud rate and sample point
Comms
USB Termination
Calculate USB bus termination resistor values, differential impedance, cable propagation delay, signal rise time, and eye opening for USB 2.0 and USB 3.0