Skip to main content
Visitor II
June 4, 2021
Solved

I2C Bus pull-up resistor for multiple slave devices

  • June 4, 2021
  • 4 replies
  • 5100 views

Hello,

I am using multiple different sensors which require different pull-up resistors. For I2C BUS, I have to use just one pull-up resistor value for all sensors. How can I calculate or decide the resistor value?

MCU is STM32WB55.

Sensors are VL53L3CXV0DH and LSM6DSOTR.

Thank you,

Batuhan

    This topic has been closed for replies.
    Best answer by LMI2

    No, your sensors do not require different pull up values. Pull up resistor in I2C bus has to charge bus capacitances fast enough. And every chip must be able drive the bus/pull-up down.

    Pull up resistor depends on how much capacitance your bus has =its lenght. And how many devices there are on the bus. You should check what is weakest chip on your, don't use lower resistor than that.

    You need pull ups for both Sda and Scl.

    Try 5k.

    4 replies

    LMI2Answer
    Visitor II
    June 4, 2021

    No, your sensors do not require different pull up values. Pull up resistor in I2C bus has to charge bus capacitances fast enough. And every chip must be able drive the bus/pull-up down.

    Pull up resistor depends on how much capacitance your bus has =its lenght. And how many devices there are on the bus. You should check what is weakest chip on your, don't use lower resistor than that.

    You need pull ups for both Sda and Scl.

    Try 5k.

    Graduate II
    June 4, 2021

    Usually a function of how long the connectivity is and how fast you plan on driving things. It everything is on a single board, with close proximity it's going to be a lot easier than having lots of board, hung off lots of cables. Also how much sink current the OD transistors on the I2C slave(s) expect to be sinking.

    Visitor II
    June 4, 2021

    And you can check with an oscilloscope if all signals square and go from 0V to +VDD.

    Visitor II
    June 7, 2021

    Thank you for your replies @LMI2​ and @Community member​ 

    They help me understand the topic.

    Best regards