PDA

View Full Version : Long distance I2C



T Chap
12-16-2009, 11:39 AM
search.digikey.com/scripts/DkSearch/dksus.dll?Detail&name=296-20942-1-ND (http://search.digikey.com/scripts/DkSearch/dksus.dll?Detail&name=296-20942-1-ND)

I thought this was interesting. I need to extend some I2C devices, and just saw this.

Tubular
12-16-2009, 01:41 PM
wow, I never would have thought I2C was good for 250 metres (at 120 kHz)
Even 25m at 400 kHz is impressive

Tidy little 8 pin package too. Thanks for pointing that one out Todd

Nak
12-16-2009, 04:11 PM
Hmm, that does look interesting. I just ordered some samples from TI!

dMajo
12-16-2009, 04:28 PM
Yes, and perhaps still better is the PCA9600
Depending on the circuit needs, also the P82B715 can be interesting

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
∑ Propeller Object Exchange (last Publications (http://obex.parallax.com/objects/?o=0&ot=dsc&n=20)/ Updates (http://obex.parallax.com/objects/?o=8&ot=dsc&n=50));∑∑ Vaati's custom search (http://www.google.com/cse/home?cx=014602381951657504386:0v5gwyvny3m&hl=en)

dMajo
12-16-2009, 04:28 PM
Some application notes to the above

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
∑ Propeller Object Exchange (last Publications (http://obex.parallax.com/objects/?o=0&ot=dsc&n=20)/ Updates (http://obex.parallax.com/objects/?o=8&ot=dsc&n=50));∑∑ Vaati's custom search (http://www.google.com/cse/home?cx=014602381951657504386:0v5gwyvny3m&hl=en)

VIRAND
12-16-2009, 06:16 PM
Tubular said...
wow, I never would have thought I2C was good for 250 metres (at 120 kHz)
Even 25m at 400 kHz is impressive

Tidy little 8 pin package too. Thanks for pointing that one out Todd


Just seriously trying to be funny, but What year is this?
And in what year did we have transcontinental and transoceanic TELEGRAPH and TELEPHONE cable. I'll guess late 1800s.
How long is a transoceanic cable, and guess how much data it could handle.
How do you fail to send signals WITH WIRE further than you can walk in 5 minutes?
Cheap toy walkie-talkies do that without a wire, yeah, some of those $5 a pair, 49 Mhz, 1 milliwatt ones.
Cable TV wire has bandwidth of between 200MHz and 1GHz just for analog TV channels... and HOW LONG IS THE WIRE?
If I2C is so bad, why did they invent it?
You can send way over 120,000 bits WORDS a minute in Morse Code with Spin and as much wire as you can get.

Other things that actually work incredibly much better than you think I2C does:
2 cans and a string.
2 funnels (horns) and a hose.
2 transistor-radio speakers on the ends of a wire.

What happened to your I2C when you used long wires and why would there be a problem?
Uh-Oh! The wires might pick up EMPs from lightning and local radio stations and cell phones and zap the Propeller.
Why not use optocouplers? Or shielded wires? Or Fiber Optics? Or Wireless? ...

Post Edited (VIRAND) : 12/16/2009 11:22:29 AM GMT

evanh
12-16-2009, 09:53 PM
That is tunnel for I2C. I2C has no chance at all of covering that sort of range. It's only intended for a metre or two. Same for USB.

Tracy Allen
12-17-2009, 12:58 AM
Isolation is not the same as distance, but distance sometimes translates into concern about ESD. Isolation circuits using opto-couplers can be complicated (=parts and board real estate) and have subtle glitch and speed issues. The article, "optoisolation.pdf", that deMayo posted above shows what is involved to address the issues. A single chip solution for I2C bus isolatiion is the ADuM2250 or ADuM2251, and I'm in the process of building it into an ADC interface for agricultural sensors. I wonder if anyone has leads on other isolated ADC interfaces?

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Tracy Allen
www.emesystems.com (http://www.emesystems.com)

dMajo
12-17-2009, 01:54 AM
Nice find Tracy: ADuM2250 (MultiMaster/ClockStreaching) or ADuM2251 (SingleMaster); pin compatible

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
∑ Propeller Object Exchange (last Publications (http://obex.parallax.com/objects/?o=0&ot=dsc&n=20)/ Updates (http://obex.parallax.com/objects/?o=8&ot=dsc&n=50));∑∑ Vaati's custom search (http://www.google.com/cse/home?cx=014602381951657504386:0v5gwyvny3m&hl=en)

John R.
12-17-2009, 01:56 AM
Virand;

Note that the applications you reference use much more power that I2C. I2C was designed as a short distance, low voltage, low power communication tool.

As such, it doesn't take much length to create problems with voltage drop, capacitance, interference (not just the "zapping the chip to oblivion kind of emp") and other signal degradation issues.

There are many long distance protocols available, but they require more voltage and/or power. There are always trade offs.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
John R.
Click here to see my Nomad Build Log (http://share.crustcrawler.com/JohnR/)

T Chap
12-17-2009, 02:51 AM
Unless I missed it, on the device Tracy listed, I don't see anything in the lit that suggests it is to be used for longer line lengths. Is there anything inherent to this device that would suggest it could be used for longer line lengths?

dMajo
12-17-2009, 03:07 AM
@Todd: No, but they are very nice single-chip galvanic isolators and have other applications beside I2C (I have downoaded the datasheet to my digital library). Beside the isolation they can provide also voltage level translation (eg. 3.3to5). Also live-insertion (hot-swap) is allowed.

As you noted there is no mention to long distance (distance extender) in the datasheet, but they are capable of 30mA sinking. It makes me curious if, by using two of them with central path powered to 5V and loaded with a lower pullup, they can also be used as isolated extenders.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
∑ Propeller Object Exchange (last Publications (http://obex.parallax.com/objects/?o=0&ot=dsc&n=20)/ Updates (http://obex.parallax.com/objects/?o=8&ot=dsc&n=50));∑∑ Vaati's custom search (http://www.google.com/cse/home?cx=014602381951657504386:0v5gwyvny3m&hl=en)

Post Edited (dMajo) : 12/16/2009 8:12:29 PM GMT

VIRAND
12-17-2009, 03:58 AM
I2C common standard speeds:
Slow:10kb/s
Standard:100kb/s
Fast:400kb/s 1Mb/s, 3.4Mb/s

"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."

Okey Dokey. I2C cannot possibly work on a wire more than 3 meters long. It would make serious RFI and violate FCC Part 15.
Nobody could listen to the radio or use wireless services if there were big and fast I2C networks all over the place.
Jeopardy Question:What is (wrong with) "Broadband over Power Lines (BPL)"?

Post Edited (VIRAND) : 12/16/2009 9:06:09 PM GMT

T Chap
12-17-2009, 05:22 AM
I use I2C on various boards at around 12 feet away from the Prop, never seen a missed communication. Unshielded ribbon cable.

I actually had started drawing a schematic for I2C over RS485 but decided to search for extenders.

Post Edited (Todd Chapman) : 12/16/2009 10:28:38 PM GMT

Tracy Allen
12-17-2009, 09:02 AM
I2C is a static protocol, in the sense that it can be run at a much much slower speed than its maximum, down to DC. At 400kHz buss speed, the transitions have to be made in about 1 microsecond, which even with 30 mA drive and a 1 kOhm pullup limits the line capacitance to around 1 nF, which would be about 10 meters on a 100 pF/meter cable. But at 40kHz or 4kHz it can work over a correspondingly longer distance, advisedly on something like shielded CAT5. The main thing is to 'scope the signals on the line. The Philips documents also talk about I2C line repeaters such as the P82B715 that extend the range of the normal I2C bus to capacitances of around 3000 nF and 100kHz buss speed, which they suggest is around 50 meters.

It's interesting how people run one-wire protocol over long wires, even tho it too depends on passive pullups and has strict time dependencies.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Tracy Allen
www.emesystems.com (http://www.emesystems.com)

VIRAND
12-17-2009, 12:21 PM
The wavelength of 100 Khz, (which TRULY SHOULD be the SCL clock rate of 100kbps I2C,
unless it is as meaningless as PC processor ratings,) is 3 or 4 kilometers, and if that matters
at all (which it probably doesn't), then 1000 meters of wire is nothing to standard speed I2C.

Remove those imaginary (square root of -1) capacitors. Terminate your wire. Match your impedance.
Anything below 100 Khz is for all practical purposes AUDIO.
Anything above 100 Khz starts to be a serious RFI nuisance.

You CAN'T FAIL to "slowly turn on and off a wire serially" and receive the data a long distance away.
It is totally ridiculous. Voodoo Wire for tube-amp audiophiles.
I think you'd need a microscope on an oscilloscope to detect anything wrong with slow I2C.
You could use a 100 year old rusty barbed wire fence for slow I2C wire, and it would WORK.
It is most incredible that they speed up phone wire for ethernet cable even beyond coaxial net wire just by twisting it more.
Why doesn't that increase inductance AND capacitance, and LOWER bandwidth by Tuning Down a low-pass filter?

It's not like you went camping and freezing with an electric heater connected from your house to your tent with extension cords.
It requires virtually NO power to transmit data over a wire.

Post Edited (VIRAND) : 12/17/2009 9:00:43 AM GMT

mmagnuson
07-09-2012, 01:25 AM
Yes, and perhaps still better is the PCA9600
Depending on the circuit needs, also the P82B715 can be interesting



From personal experience, I have found the PCA9600 to be very effective in increasing the distance of I2C. I2C has the limitation of a total bus capacitance of 400 pF. The 9600 effectively isolates the I2C BUS capacitance and increase the total bus capacitance to 4000pF. However, like I2C the 9600ís output is affected by electrical interference. If you want to go any distance consistently it is best to use differential signaling.

Protocols like RS485 minimize interference by transmitting each signal over not one but to wires. At the end of the connection, the receiving device reads the difference between the two signals. Since electrical magnetic interference affects both wires equally the potential between the two remain the same.

The PCA9600ís data sheet outlines how to setup a point-to-point differential bus. It your interested in setting up a differencial I2C buss take a look the I2C Differential board on SJT Bitsí site ( http://sjtbits.com/i2c-to-differential-breakout-board/ (http://sjtbits.com/i2c-to-differential-breakout-board/) ).

pinkmRyales
10-29-2012, 12:43 AM
I have been using the I2C breakout by SJT Bits to run I2C Cat5 at around 200 feet. These boards are great. They just work.

Circuitsoft
10-29-2012, 09:59 PM
It is most incredible that they speed up phone wire for ethernet cable even beyond coaxial net wire just by twisting it more.
Why doesn't that increase inductance AND capacitance, and LOWER bandwidth by Tuning Down a low-pass filter?
Ethernet runs data one way over the wire. Twisting it increases the consistency of the effective impedance of the transmission line. i2c can't run over long lines because it's a multidrop bus that uses pullups and open-drain drivers; that's why it's limited in capacitance. With Ethernet, since the capacitance is kept consistent by the twisting of the wires, it's easy to properly terminate and run high frequency signals down it. Once the frequency gets high enough (Gigabit ethernet), each pair is actually used for full-duplex data by preventing signal reflections and watching only the incoming waves and not the outgoing waves.

kwinn
10-30-2012, 01:21 AM
I have tested (in my work shop) I2C using a 1000 ft box of cat5 to send the data/clock out on 2 pairs and return it on the other 2 pairs using RS485 drivers and had no errors over a 15 minute period. In the field however I have only used it for a maximum of 60 feet.