View Single Post
  #3   Spotlight this post!  
Unread 17-01-2011, 12:52
Matt Krass's Avatar
Matt Krass Matt Krass is offline
"Old" and Cranky. Get off my lawn!
AKA: Dark Ages
FRC #0263 (Sachem Aftershock)
Team Role: Mentor
 
Join Date: Oct 2002
Rookie Year: 2002
Location: Long Island, NY
Posts: 1,187
Matt Krass has a reputation beyond reputeMatt Krass has a reputation beyond reputeMatt Krass has a reputation beyond reputeMatt Krass has a reputation beyond reputeMatt Krass has a reputation beyond reputeMatt Krass has a reputation beyond reputeMatt Krass has a reputation beyond reputeMatt Krass has a reputation beyond reputeMatt Krass has a reputation beyond reputeMatt Krass has a reputation beyond reputeMatt Krass has a reputation beyond repute
Send a message via AIM to Matt Krass
Re: I2C Cable Length issue?

Be aware that i2c has a limitation on maximum bus capacitance of 400pF (Source: http://en.wikipedia.org/wiki/I2c#Design) and that you may have inadvertently exceeded that with your wire splicing connections. If you don't have access to the an LCR Bridge to read the capacitance, you can get creative with some resistors and an oscilloscope to see what your cables capacitance is.

The capacitance becomes a problem because i2c relies on pull-up resistors to stabilize the bus when it's idle. Whenever a device outputs a logical 1 (or the start of a clock pulse) the line is disconnected and because of the pull-up resistor, goes to 5V (in this case, other busses may have different IO voltages). However any capacitance in the line slows that process down as it needs to build a charge, too much capacitance, the line doesn't reach a 1 state by the time something expects it to, and communications break down.

Wires running parallel to each other have some capacitance, which increases as distance increases, this is what typically causes cable length problems for i2c. I'm not sure off the top of my head because I typically use very short busses, or something more robust for my projects, but twisted pair wiring (such as that in Ethernet cabling) may be suitable for this.

I hope my explanation made sense, if not, feel free to reply to me or PM me for more information.
__________________
Matt Krass
If I suggest something to try and fix a problem, and you don't understand what I mean, please PM me!

I'm a FIRST relic of sorts, I remember when we used PBASIC and we got CH Flightsticks in the KoP. In my day we didn't have motorized carts, we pushed our robots uphill, both ways! (Houston 2003!)
Reply With Quote