Arduino UNO I2c long distance.

Hello i was wondering what is the max Distance of a i2c wire can go up to with out putting some kind of booster or bus entender?

According to Wikipedia

The maximum number of nodes is limited by the address space, and also by the total bus capacitance of 400 pF, which restricts practical communication distances to a few meters.

And the I2C PDF is available but official specs vs what a real world implementation is may not correlate. Sounds like it is an opportunity to experiment.

Ray

I'm thinking of changing my other project i made a year ago which i made that has 4 arduino uno boards and 4 Ethernet shields. to just one uno board and one Ethernet shield. have the other 3 uno boards transmit the data through the I2C to the one that has the Ethernet module on it. the Range that it needs to be is up to 8ft the most maybe 10ft. i need to free up some network wire space.

josephchrzempiec: I'm thinking of changing my other project i made a year ago which i made that has 4 arduino uno boards and 4 Ethernet shields. to just one uno board and one Ethernet shield. have the other 3 uno boards transmit the data through the I2C to the one that has the Ethernet module on it. the Range that it needs to be is up to 8ft the most maybe 10ft. i need to free up some network wire space.

And, if you run up against a distance problem and still wish to keep the I2C protocol, there are solutions:

The I2C-bus capacitance limit of 400 pF restricts practical communication distances to a few meters. Using one P82B715 at each end of a long cable (connecting Lx/Ly to Lx/Ly) reduces that cable’s loading on the linked I2C-buses by a factor of 10 and allows the total system capacitance load (all devices, cable, connectors, and traces or wires connected to the I2C-bus) to be around 3000 pF while the loading on each I2C-bus on the Sx/Sy sides remains below 400 pF.

Ray

Hello i just wanted to update this post and what i found out on 1wire i can do 100ft and on i2c i can do over 300ft i have tested it so far. i haven't done spi yet. I'll be trying that soon.

I think remember reading some technical document that described a situation where they needed to push i2c to really long range with oodles of devices, and... I think they used shielded cable, and ran the clock at like 300 Hz. There wasn't much detail, it was just mentioned in passing as an example of how far i2c cold be pushed. Of course, I forget whose document it was and anything that might be useful for finding it

Last night i went back into looking at my old project and testing and this was one of them i had some network wire i bought 1000ft so i had a test of it and that is what i came up with so far. was a great test what i did was put 2 lcds both the same i2c lcd one on the arduino side and one on the other side of the network wire at 300ft wire. looked to see if there was a difference in a counter counting down from 100 and was no difference. mind you i had a external power adapter of 5v 2a going to both lcds so i didn't use the on board arduino power and i still used the 2 10k resistors.

Second thing i tested was a lcd on spi at 100ft and that seems to work counting down from 100 also didn't skip a beat so far I'm planing on doing more testing tonight.

Another thing i think if running 3 or 4 devices on i2c maybe at 100ft long wouldn't be all that bad.

30.5meters (100ft) of a CAT5 twisted pair (which I’m familiar with) has about 50pF per meter which adds up to 1525pF. So how fast could I2C/TWI clock run and what are the risk (I ask myself over a coffee)? A little simulation may help (if you have Chrome).

The first thing I notice while playing with the simulation is a current spike when the open drain pulls down (I used an NPN BJT to keep the simulation simple, but the MCU has an N-CH MOSFET that pulls down). The current spike can be limited to something bellow the absolute max value (e.g. <40mA on 328 AVR) if >125 Ohm is between the MCU and the I2C bus. I would try 180 Ohm to limit current and a 3.3k bus pull-up which gives a detectable 312mV low level and looks like the clock could go a little faster than 10kHz.