Electronic – How to choose protection resistor for I2c devices

i2cmicrocontrollerprotectionresistorsstm32

Note : I am a beginner.

I noticed on the STM32-410RB datasheet page 100 (https://www.st.com/resource/en/datasheet/stm32f410rb.pdf), protection resistors were used in series on the SDA and SCL line.
enter image description here

Further research showed that using protection resistors for devices connected to I2C is commonplace. How would I choose/calculate what resistor to to "protect devices" on the I2C bus or generally?

Could this method be: (input voltage – Forward voltage)/ Forward current ? This was the method I found for protecting and LED using a resistor in series, would this be the same for the I2C bus?

Best Answer

The series Rs resistors aren't for 'protection' pe se, the I2C spec notwithstanding (more about this below.) In any event, for Standard (100 KHz) and Fast (400 KHz) mode they're optional.

For the higher-speed I2C modes (1 and 3 Mbit) they are used as series damping to reduce ringing and thus improve signal integrity.

For that case, choose an Rs value such that the driver impedance (Rds(on)) and Rs together are roughly the same as the board trace impedance.

Typical Rs values are 22 to 33 Ohms, which when combined with the driver Rds(on) resistance, yields about 60-70 Ohms, a reasonably good match for typical trace routing.


MORE: The I2C spec states the reason for Rs is to suppress noise spikes, and that Rs is optional.

In reality, the limiting value for Rs depends on several factors:

  • Bus speed chosen
  • Max allowable risetime
  • Total bus capacitance
  • Strength of pull-up

The bigger your I2C bus (# devices, signal length), the stronger your pullup needs to be to overcome capacitance. Same with faster bus speed: to meet risetime, a stronger pullup is called for.

On the other hand, the driver Rds(on) resistance and Rs form a voltage divider with the pullup resistor Rpu. If Rs is made too large, the output low on the bus might not be low enough to meet the Vin(low) spec for the other devices on the bus. Design accordingly.

Finally, if ESD hardiness is a factor in your system (for example, if your I2C is going to a connector), don't rely on Rs to do this job. Instead, consider an I2C isolation device, and use TVS diodes on the lines for a more robust solution.

(Experience: set-top boxes with HDMI as well as on-board I2C.)