Maximum I2C Bus Length?

The insane sounding lengths like 10,25, and 100m are perfectly possible, and I use the method often (with UART not I2C, but the method stands) when I need to put stuff together quickly. It's not exactly the best way, though.

The key is to know your input voltage threshold. Make sure the voltage drop in the ground lead is well below this, or else a transmitter at a high ground potential will not be able to pull the voltage low enough. Lack of tolerance for ground offsets IMHO is the biggest reason to use RS485 or can transceivers (I2C over CAN is mentioned in a few application notes).

Ideally, all devices will have their own wall wart and battery and no power will be sent over the ground wire between devices.

But, lets take CAT5 for example. CAT5 can't be higher than 52pf/m, or it isn't CAT5.

100m of 52pf cable has a capacitance of 5200pf or 5.2nf.

5.2n times 20kohms (pullup) gives a time constant of about 104 microseconds. That limits speed to about 10kHz or so.

Using 2.2kohm pullups, you could probably get to 100kHz.

I have heard that devices should have a resistor on SDL and SCK, because of the big capacitive load they are driving, of something like 180 or 200 ohms.

But honestly, I2C is not at all the way to go for long distances. CAN transceivers or RS485 used with normal UART is a robust solution with very good fault protection, ESD resistance, speed, distance, etc, at a cost of a dollar a chip or so, ground offsets don't matter nearly as much so you are free to carry power along with data.

The only downside is that a can transceiver can reach 70ma transmitting and 1 or 2ma just listening, so I2C or direct TTL UART might be useful in extreme low power situations, but consider how much time you actually spend sending.


For fast mode, and resistor pullup, capacitance should be less than 200pF, according to this NXP document I2C-bus specification and user manual.

With current source pullups you can go to 400pF, but not with resistors.

If your wire is 20pF/30cm and you have another 50pF of stray and input capacitance, you're limited to 2.25m of cable length. Different assumptions will lead to different numbers.


I work for a company making USB sensors. Most of them are based on I2C sensor chips, those devices can be split in two, so you can install the CPU part in one place and the sensor part in another. We conducted quite a lot of tests on the I2C connection between the device CPU and the I2C sensors. At 100 kHz, with a good error recovery protocol, 25m can be easily reached using basic wires. We were even able to reach 100m once with CAT5 cable.

Tags:

I2C