Length of I2C bus

  • Question
  • Updated 2 years ago
Someone on here described their I2C bus as "long" when it was only 4 feet. I'm planning on using some MaxM LED units in a display that requires several meters of cable between the Arduino and the units. Will this work okay?
Photo of Adam

Adam

  • 3 Posts
  • 0 Likes

Posted 6 years ago

  • 9
Photo of todbot

todbot, Official Rep

  • 611 Posts
  • 155 Likes
Official Response
Hi Adam,
It's true that I2C is designed as a "chip-to-chip" protocol, not something going over cables. But I've had I2C cables as long as 20 feet with no problems. You need 4.7k pull-up resistors on the two data lines. When people want longer runs, they use I2C line driver chips. We're currently evaluating a few and when we have some recommendations we'll post them here.

Since you're driving MaxMs, I suspect the larger problem will be getting adequate power to them. If you're using the MaxMs in the Master+Blaster configuration, each MaxM draws 1/4 Amp and most ribbon cabling can't do more than one Amp. You might need to run separate power cables to each MaxM.
Photo of gush

gush

  • 10 Posts
  • 0 Likes
This project seems to have worked out well with LTC4300A-2 TWI bus buffer IC. http://labs.ideo.com/2009/08/19/glass...
Photo of

  • 3 Posts
  • 0 Likes
hey i'm going to have this same issue. I bought a master and 2 blasters for testing though i want to eventually drive up to 8 blasters when im done. I thought it could just daisy chain them like in the example in the PDFs and hang them from the ceiling spaced 5 feet apart.
Photo of

  • 3 Posts
  • 0 Likes
Photo of Adam

Adam

  • 3 Posts
  • 0 Likes
Thanks for the response todbot.

I'm not so worried about the power consumption; I'll have individual power sources for each MaxM group and some heavy duty cabling to handle the current draw.

In terms of the I2C bus, would a simpler approach be to simply increase the distance between the MaxM Master board and the MaxM Blaster board, while keeping the I2C cable extremely short?

i.e. if I have a 50cm cable between the Arduino and all MaxM Master boards and ten metre+ extension between the Master and Blaster boards.

Let me know your thoughts!

(Great product BTW!)
Photo of Will Pickering

Will Pickering

  • 9 Posts
  • 3 Likes
I will have a I2c -> twisted pair converter available soon at FunGizmos.com that will allow you to connect two I2C busses with up to around 300M of twisted pair cable. With two of these you could separate the Arduino from your array of BlinkM's by quite a distance.

Will
Photo of Adam

Adam

  • 3 Posts
  • 0 Likes
Thanks Will. Be sure to post here when it's available. I hope you ship internationally (Australia)!
Photo of Technic9T

Technic9

  • 3 Posts
  • 0 Likes
I have a similar issue running 25 blinkMs along a 25 foot I2c bus. Its not working very well and I'd like to use a fast clock speed, can anyone recommend a good I2C line driver chip to make this work?

Thanks,
Aaron
Photo of Joseph Silvashy

Joseph Silvashy

  • 11 Posts
  • 0 Likes
@Technic9, I have a similar project, Attached is a photo of 25 BlinkM's spaced 14" apart on just some ribbon cabled connected to IDC connectors. They work great. They one thing is definitely the clock speeds are off after about 1 or two seconds, so what I did is just send like a timing signal to all of the BlinkM's about every 500ms to keep them in sync.

In my case I'm running animations across the matrix from an iMac, via serial. So I'm just constantly pushing out the fade commands interpolated with syncing commands.

Photo of Dominic Gentile

Dominic Gentile

  • 6 Posts
  • 0 Likes
2 questions?
1) Are you powering all those BlinkMs from the 5v arduino?
2) can you post (fora newb) an example of sync code?

Thanks
Photo of Cesar GarciaCG

Cesar Garcia

  • 3 Posts
  • 1 Like
Hi, Joseph. How do you sync them? What message do you send? I've checked guide and it seems we should just reset them or send them playScript continuosly.

Thanks
Photo of

  • 2 Posts
  • 1 Like
To anyone interested in extending the I2C bus -

http://www.nxp.com/documents/applicat...

There are other ICs capable of more distance. I have been doing this for years in my light displays so if you have questions just email me at prismalites@gmail.com.

Todd has a handle on it...But if you need a quickie solution let me know , it's not too hard to do using twisted pair just as Will mentioned above...
Photo of Pedro Werneck

Pedro Werneck

  • 1 Post
  • 1 Like
You can increase range by using an active terminator instead of just pull-up resistors. Reducing speed you'll also increase range.

http://www.avrhelp.mcselec.com/index....
Photo of matt

matt

  • 21 Posts
  • 0 Likes
The latest examples include a soft i2c library is more fault tolerant and better for longer distances per : http://todbot.com/blog/2010/09/25/sof...
Photo of Minnie RyalsMR

Minnie Ryals

  • 1 Post
  • 0 Likes
I have been using a I2C to differential pair board. So far, so good.

http://sjtbits.com/i2c-to-differentia...
Photo of Sanjay SinghSS

Sanjay Singh

  • 1 Post
  • 0 Likes
Hello

I am working on a project in which I have to make connecting between Micro controller and Si 4777 IC. I have to use I2C I know but no idea which cable I should use to make physical connection between them.
Please help me out somebody.
Photo of Paul Clifford

Paul Clifford

  • 1 Post
  • 0 Likes
Hey Sanjay,

A cable length limitation arises because the cable has capacitance, and that capacitance has to charge up passively through the buses pull-up resistor. If the clock speed is slow you can have a long cable, but if the clock speed is fast the cable must be shorter. Here's a site that has a pretty good discussion of the tradeoff between cable length (capacitance) and bus speed.