This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TMP175-Q1: How to calculate the bus capacitance and maximum number of temperature sensor that can be connected with I2C

Part Number: TMP175-Q1

Hi,

I am designing a PCB where I will be connecting several temperature sensors TMP175-Q1 using I2C interface to the MCU. I have three questions in regards to this:

1) I have read that the maximum number of devices that can be connected with I2C is 128, however, on the datasheet of the temperature sensor I read this "TMP175-Q1 device allows up to 27 devices on one bus" does this mean that I can connect a maximum of 27 temperature sensor with I2C?

2) I also know that the maximum bus capacitance with I2C is 400pF, I know that the temperature sensor has an input of 3pF, do you know how I can calculate the bus capacitance of the tracks? so that I will be able to know the maximum number of temperature that I can use.

3) The length of the I2C connection will roughly be around 3m, do you know if this is a problem or whether the I2C can work fine with that length?

Thanks in advance,

Regards,

Giorgio

  • Dear Giorgio - 

    At that length, you should measure the capacitance of your cable at frequency of operation. You can do so either with RCL meter, Antenna (like from MFJ) or Network Analyzer. A handheld C meter may also work, but you need to check that it is using same frequency you intend to operate at (some I have seen run at 1kHz, which will not give you same answer as what you will see at 100kHz, 400kHz or above 2MHz). You also should use twisted pair with a shield, so as to minimize any stray cap that may try to sneak in as well. 

    Then you should review these documents, too: https://www.ti.com/lit/an/slva689/slva689.pdf , https://www.ti.com/lit/an/slva704/slva704.pdf 

  • Hi Josh, thanks for your answer.
    The problem is that at the moment it is only a concept, the I2C connection will consist of two tracks (around 3m long) that will be connected to the PCB, I will have to find a way to calculate the bus capacitance before manufacturing them, is there a way to do that?

    Regards,

    Giorgio

  • Giorgio - 

    To calculate this beforehand you will need to know if this is a PCB which is 3 meters long or a cable? 

    if PCB, will you use twisted traces (you should) and if cable, will you use twisted pair with shield? (you should)

    Then, at what frequency will you run I2C at? 

  • Hi Josh, 


    Thanks for your explanation. The PCB might be flex with simply two parallel lines for the I2C running from one to the other end. The frequency will be around 1Hz ( we only want to send a signal like once every second).

    According to these criteria, how can I calculate the bus capacitance? is there a formula I can use?

    Thanks,

    Regards,

    Giorgio

  • Giorgio,

     I think you are getting hung up on a number (Total capacitance) Yes while it true that if you exceed 400pf that you wont be able to communicate at higher frequencies. You can always decrease the pull up resistor to overcome the capacitance. That being said, you need to be aware of the capacitance and minimize as needed. 

    The length of traces or cable used in I2C is of no consequence. It's the capacitance per foot that limits the length. Most cables have fairly high capacitance per foot, however they make low capacitance cables. example: CAT5 and CAT6 ethernet cables. CAT5 allow data rates up to 100M bit and CAT6 allow data rates up to 1G bit. 

    Getting past all of this lets look at your setup. FR4 has a dielectric constant of 4.7. If you have a ground plane the parasitic capacitance will be higher. Kapton or polyimide used for flex circuits has a dielectric constant of 3.5. Traces on flex without a ground plane will have a lower parasitic capacitance (on the bench).  In a real world application placing the flex next to a metal cabinet will increase the parasitic capacitance and that could effect the communications. Shielding is a great method of controlling the parasitic capacitance, however shielding usually increases the capacitance.

    General rules to follow. In the data sheet we tell you the maximum number of units that can be on the buss due to the capacitance of the sensors. You can get an idea of the total capacitance from that. Add in your PCB and flex or cable capacitance and you will have a good start. Again don't worry about trying to get an exact capacitance value just make sure you use common sense to stay below the maximum units. Now take a look at the PCB and the length of the traces, then the flex or cable. If you have longer traces or cable you will have to reduce the number of units to lower the capacitance. You can also use lower capacitance cables. The flex can be designed to reduce the capacitance. Keep traces further apart. If using an 8mil trace on the flex increase spacing to 10mil or 12mil. Don't use a ground plane on the flex except now you may be sensitive to outside parasitics and EMI.

    It would be great to calculate all of this and you can get a good idea in general. Once it's all together, look at the clock and data edges on the lines. If there is to much capacitance the edges will be rounded and the rising edge may not reach the levels needed. You can decrease the pull up resistance value to overcome the capacitance as long as you do not exceed the current capabilities of the open drain, or collector of the devices that will be communicating. 

    We can't calculate this for you because you are the only one that has all of the information. Make your best guess, add up the total and see where you are. Allow some head room.