Author Topic: I2C and Analog Mixed Cable Lengths?  (Read 2301 times)

0 Members and 1 Guest are viewing this topic.

Offline Thane of CawdorTopic starter

  • Regular Contributor
  • *
  • Posts: 96
I2C and Analog Mixed Cable Lengths?
« on: March 22, 2017, 09:20:54 am »
Hey all,

Are there any general considerations to be aware of when using a multi-core wiring cable to carry both analog and I2C signals over about 5-10m? Is this mostly dependant on the cable capacitance and is shielding usually recommended/required?

 :D
 

Offline ggchab

  • Frequent Contributor
  • **
  • Posts: 281
  • Country: be
Re: I2C and Analog Mixed Cable Lengths?
« Reply #1 on: March 22, 2017, 09:44:50 am »
Will the communication be reliable on a so long cable ? I2C has no error correction/detection mechanism. Micro-controllers on both sides ? What happens in case of clock pulses loss, ... ? Timeout detection ?
 

Online Ian.M

  • Super Contributor
  • ***
  • Posts: 13029
Re: I2C and Analog Mixed Cable Lengths?
« Reply #2 on: March 22, 2017, 10:59:23 am »
The best advice is: Don't!

I2C is only intended for board level stuff or at worst within the same EMI shielded equipment cabinet.  To remain compliant with the I2C specification, you are limited to 400pF capacitance on SDA or SCL, which will be difficult to meet over a 5m multicore cable and probably impossible over a 10m cable (e.g. Cat5 is about 50pF/m). 

Also I2C isn't differential and uses logic level signalling so doesn't handle ground offsets very well. 

You'll probably get away with it using a screened cable if the remote device is either low powered and powered over the cable (so the 0V return current isn't large enough to cause a significant ground offset) or has an isolated PSU so there isn't a ground loop, and you are willing to bit-bang or otherwise run the I2C bus a lot slower than the 100KHz standard speed, and the analog signals are either slow and heavily low-pass filtered at both ends or true differential.

Otherwise you'll need a slave MCU at the far end to handle the I2C devices, and to use some sort of asynchronous serial link with differential signalling  over the cable in place of I2C.

 
The following users thanked this post: Thane of Cawdor

Offline Thane of CawdorTopic starter

  • Regular Contributor
  • *
  • Posts: 96
Re: I2C and Analog Mixed Cable Lengths?
« Reply #3 on: March 22, 2017, 11:32:39 am »
Thanks for the advice! Is there a way to 'buffer' the I2C signals at a particular cable length?
 

Offline Cliff Matthews

  • Supporter
  • ****
  • Posts: 1911
  • Country: ca
    • General Repair and Support
Re: I2C and Analog Mixed Cable Lengths?
« Reply #4 on: March 22, 2017, 11:41:23 am »
NXP's P82B715 extends the reach of the I2C bus.
 

Online Ian.M

  • Super Contributor
  • ***
  • Posts: 13029
Re: I2C and Analog Mixed Cable Lengths?
« Reply #5 on: March 22, 2017, 11:50:58 am »
Thanks for the advice! Is there a way to 'buffer' the I2C signals at a particular cable length?
Yes.  However it gets quite complex.  Google: I2C extender twisted pair
and you'll get a bunch of chips and app. notes.  The NXP ones are particularly worth looking at as NXP used to be Philips who originally invented I2C, so tend to know what they are doing with I2C and offer solutions with good compatibility.
« Last Edit: March 22, 2017, 11:54:43 am by Ian.M »
 

Offline tecman

  • Frequent Contributor
  • **
  • Posts: 444
  • Country: us
Re: I2C and Analog Mixed Cable Lengths?
« Reply #6 on: March 22, 2017, 12:16:18 pm »
You are unlikely to be successful pushing I2C that distance.  Analog also will have considerable attenuation at that distance, depending on frequencies involved.  I would look to fiber links.

paul
 

Offline BrianHG

  • Super Contributor
  • ***
  • Posts: 8031
  • Country: ca
Re: I2C and Analog Mixed Cable Lengths?
« Reply #7 on: March 22, 2017, 04:08:12 pm »
It's not impossible, but you might look at how it was done with the EDID I2C data lines for VGA monitors.  However, these only had an I2C prom at 1 side, ran at 1kHz or less, had check-sums since the reads were error prone and had to be done multiple times, both the analog signals had their own shielding + the larger cable housing everything else also had a second frame ground shielding, there was heavy cap filtering at the ends + the I2C prom was also powered through the same cable as well.  It wasn't too reliable a system especially when some monitor extension cables sucked, or, some video cards attempted to run the thing at 3.3v instead of the full 5v.

I got lucky with a functional 12meter extension cable, still being able to read the EDID on my video scaler.


« Last Edit: March 22, 2017, 04:13:58 pm by BrianHG »
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf