I2C - maximum capacitance - Page 1
Forum section: electronics / general

author: nForce
author_rank: Frequent Contributor
timestamp: December 31, 2018, 01:02:58 pm
content: Why is there a maximum capacitance of 400pF for I2C bus? Why do we increase capacitance when connecting devices on the bus?

author: T3sl4co1l
author_rank: Super Contributor
timestamp: December 31, 2018, 02:59:34 pm
content: Pins have capacitance -- check the datasheet.Tim

author: rstofer
author_rank: Super Contributor
timestamp: December 31, 2018, 06:58:50 pm
content: Wire has capacitance, and inductance.I2C is typically a short range protocol but there are buffer chips to extend it.https://www.nxp.com/docs/en/application-note/AN255.pdf

author: rounin
author_rank: Regular Contributor
timestamp: January 01, 2019, 06:52:09 am
content: I think the maximum capacitance has to do with rise and fall time requirements, given the moderately weak pull up strength I2C has. Too much capacitance and the edges get too slow. I think there is a spec for how much current an I2C device is expected to sink which limits the fall time, although probably not as much as the (typical) 4k7 resistor limits rise time.

author: Rerouter
author_rank: Super Contributor
timestamp: January 01, 2019, 09:18:08 am
content: I should also mention its 400pf at 100KHz,If you run the bus slower, you can cope with a lot more capacitance.

author: eb4fbz
author_rank: Regular Contributor
timestamp: January 01, 2019, 05:48:18 pm
content: Maximum capacitance depends on required speed and pull-up resistors. Capacitance is due to traces parasitics and devices pin itself.

author: nForce
author_rank: Frequent Contributor
timestamp: January 01, 2019, 05:56:55 pm
content: ThanksThe pull-up resistor 2k connected to the line pulls the line high. So when the communication starts the SDA goes low, so the current flows to the ground?I am just checking if I understand correctly.

author: rstofer
author_rank: Super Contributor
timestamp: January 03, 2019, 02:02:38 am
content: Quote from: nForce on January 01, 2019, 05:56:55 pmYesThis is what is known as an Open Collector bus. No device pulls the signals up, they only pull them down. Resistors pull the bus up. This allows for a 'wired AND' connection where it is electrically possible for two devices to pull own simultaneously without damage. The data will be corrupted but nothing will be damaged.https://en.wikipedia.org/wiki/Wired_logic_connection#The_wired_OR_connection

author: bson
author_rank: Unknown
timestamp: January 03, 2019, 05:30:08 am
content: Quote from: nForce on December 31, 2018, 01:02:58 pmIt's set by the max current at the 100kHz clock. If you run it at lower clocks you can have higher load capacitance. A host controller may also be able to drive a higher load, but unless it states otherwise assume it can handle 400pF at 100kHz. It may also be able to run up to several MHz at much smaller loads.400pF is a lot...

author: TomS_
author_rank: Frequent Contributor
timestamp: January 03, 2019, 01:05:16 pm
content: Quote from: rstofer on January 03, 2019, 02:02:38 amDo you mean wire OR? Although in theory it operates more like NOR.

author: eb4fbz
author_rank: Regular Contributor
timestamp: January 04, 2019, 10:15:01 am
content: Quote from: bson on January 03, 2019, 05:30:08 amNot correct. I2C outputs are only able to sink current, and this current way higher than pull-up current. Rising slew rate is limited by pull-up current and bus capacitance, and this is what determines the maximum speed.

author: Ian.M
author_rank: Super Contributor
timestamp: January 04, 2019, 10:55:00 am
content: OTOH the minimum pullup resistance is set by the weakest device on the bus's max pulldown current and the pullup rail voltage.

author: David Hess
author_rank: Super Contributor
timestamp: January 04, 2019, 05:24:57 pm
content: Quote from: TomS_ on January 03, 2019, 01:05:16 pmIt is wired AND because if all inputs are high (true) then the output is high (true) but since the level are inverted to true is low on every input and output signal, it becomes wired OR where any low (true) input produces a low (true) output. See the second example below.It is called wired OR in ECL also but the outputs are "open emitters" with a pull-down resistor.

author: Fungus
author_rank: Super Contributor
timestamp: January 04, 2019, 05:31:54 pm
content: Quote from: nForce on January 01, 2019, 05:56:55 pmYes.PS: It depends on your wires but 2k is too much in my experience, I usually end up using 470 Ohms with Arduinos, etc.The best way to choose a resistor is to look at the bus with an oscilloscope and make sure it's rising/falling properly. Adjust resistor as needed.

author: bson
author_rank: Unknown
timestamp: January 06, 2019, 11:00:55 pm
content: Quote from: eb4fbz on January 04, 2019, 10:15:01 amYou didn't think through this enough. Sinking is driving, too. The optimal pullup resistance is a function of the max drive current and capacitance, and is calculated to balance rising and falling transition times. (I assume this is what you mean by "speed".) The resistance is calculated from the bus properties. What sets the upper limit on the clock period is the capacitance and drive current, or conversely what sets the upper limit on the clock period is the drive current and capacitance. The resistance is a derived value that just is whatever you need it to be.