Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

I2C bus - what is maximum bus lenght when working with 100 KHz clock (errorless work)

Status
Not open for further replies.

FlyingDutch

Advanced Member level 1
Advanced Member level 1
Joined
Dec 16, 2017
Messages
458
Helped
45
Reputation
92
Reaction score
55
Trophy points
28
Location
Bydgoszcz - Poland
Activity points
5,027
Hello,

today I was looking for (internet) information what is maximum range of I2C bus (assumption errorless working width clock 100 KHz). I found several sites with such information, but there were big dispersion of answers. There also were used different methods for extending bus lenght. For example such methods:
  • properly matched pull-up resistors
  • MOSFET transistor keys for driving clock and data lines
  • specialized ICs designed for this purpose

The given answers ragarding maximum bus lenghts has been form 4-6 meters to 80-200 meters.

I would like to perform my own tests, but before that I would like to know what method for extending I2C bus lenght is most promising? Could someone of forum users has expierience in such topic and share his knowledge? For my purpose the maximum length of I2C bus equals 4 meters is enough (errorless working with clock speed 100 Khz).

Thanks in advance and Regards
 

Hi,

the main issue is the capacitance represented by your cable and consequently the charge time of this cable (t_charge ≈ 5 • R_pullup • C). So low pull-up resistors are required to use long cables in combination with a high frequency.
There are also buffers available (e.g. [1]) which are used to extend the cable langth. The datasheet [1] also addresses the calculation of the pull-up resistors.

The maximum cable lengt I used was about 1 meter with a clock frequency of 400 kHz. I had no problems with the communication.

[1] https://www.nxp.com/docs/en/data-sheet/P82B715.pdf

greets
 
Hi,

In my eyes this is misusing the bus.
I2C is designed as "Inter Integrated Circuit" Bus. Meant mainly within one PCB at least within one box (device).

The I2C specification tells all you need to know when it should work as designed.

I know many people try to use it as "wide" bus. ..resulting in expectable problems..

Thus all informations about a wide I2C bus come from trial and fail. No standard, no standard tests.. Thus the results varies that much.
It simply is not designed for this.

(The wheels of an office chair are meant to be used within a room. But they quickly break down when used over a 100m distance.)
****
You talk about properly matched pull up resistors. Surely not matched to the characteristic line impedance..
... and the characteristic line impedance is the way to go if you talk about lengthy busses. This helps to reduce reflections and quarantee clean signals.
But this is not possible with an I2C bus. From it´s driving method it´s clear that:
* the signal source moves from master to slave on the SDA (and as well on the SCK if clock stretching is used)
* and the signal source impedance differs whether it is HIGH or LOW.

****
This is the case why there are busses for "inter IC" and other buses for "long distance".

****

You are free to do what you want... But from the view of reliabilty I personally won´t use an I2C for long distance.

Klaus
 
Bus capacitance related, 4 m is no problem with regular I2C IC and low pull-up resistor value, e.g. 1k. But I2C can be easily disturbed by electrical noise, it has no error recovery or error correction features. To use it for reliable inter-instrument communication, the single ended bus can be converted to differential signalling, e.g. with NXP PCA9615.
 
Bus capacitance related, 4 m is no problem with regular I2C IC and low pull-up resistor value, e.g. 1k. But I2C can be easily disturbed by electrical noise, it has no error recovery or error correction features. To use it for reliable inter-instrument communication, the single ended bus can be converted to differential signalling, e.g. with NXP PCA9615.

Hello,

this option seems to me most promising, a I am going to make experiments just with this option.

Best regards
 

I once attempted to use I2C over a length of 5 meters.
When one has several I2C devices, it is *very tempting* to connect everything in the same bus. One of them, was a temperature/humidity sensor located just outside my office window.

It would work most of the time, but would crash up regularly and unexpectedly.

Ended up with an altogether different solution.

EDIT, changed the length from 10 to 5 meters....sorry for the confusion.
 
Last edited:
I have used it in a new product design, ask me a few weeks later. The application focus isn't extending the bus length but improving the noise immunity.
 
Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top