i2c limits

I am working on a project that will use a Duemilanova to control a remote device via i2c. The plan is to put the smarts -- Arduino, keypad, LCD (Devantech LCD03), batteries, etc -- in a small box connected to a remote MD23 motor controller via i2c. What is the maximum cable length between Arduino and MD23? Is twisted pair desirable? Should I used shielded cable? Will the MD23 be damaged if it is powered off but connected to a live Arduino i2c bus? Will the Arduino be damaged if it is powered off but connected to a live MD23?

Sorry for all of the questions but I'm rather new to i2c.

Will the MD23 be damaged if it is powered off but connected to a live Arduino i2c bus? Will the Arduino be damaged if it is powered off but connected to a live MD23?

Note sure of your terminology. The I2C buss is a two wire (plus ground) bidirectional communication link. It does not have power lines as part of it's definition so either extra power lines or power supplies at each node are required.

The I2C buss was designed for on board or on chassis lengths, just a foot or two length normally, however there are I2C buss driver chips that may be able to extend that length. It was designed to connect IC chips together which are not far apart. I2C signals are designed to work with either 5vdc TTL or 3.3vdc logic levels so can be safety wired to any nodes that have logic level and support open drain or open collector/bidirectional I/O pins.
So basically what you wire a I2C link from an Arduino board, has to be designed to work with the I2C protocol, both at the hardware and software level.

Lefty

Sorry but I was not very clear with my questions. I realize that the two wires are data and not power. I have successfully used i2c for several projects and they all used relatively short interconnects (perhaps 6 inches). For this one I would like about 24 inches between the Arduino and the MD23 controller. One concern was that the two ends will be powered by separate batteries so it is quite possible for the Arduino to be on and the MD23 off or vice versa. I understand that some devices don't like having input voltages greater than the power supply voltage.

Yes I see your concern. I'm not sure about having a input voltage applied to a chip that does not have it's Vcc on, and I bet a data sheet for a given device probably wouldn't directly answer that question. Also a I2C buss usually has each signal line pulled up with a resistor to Vcc and you will have to determine which end should supply that pull up voltage also. I don't think 24" total length in itself will be an issue is you utilize decent wiring.

Good luck.

Check out the I2C bus spec sheet at http://i2c2p.twibright.com/spec/i2c.pdf - this gives you all sorts of information such as the recommended wiring, how to use longer wires (you need caps between various wires on each end, for instance), how to use twisted pair wire, etc. Very useful info.

Cheers