Electronic – Connecting i2c slaves to master over RJ45 style cable

connectori2cmicrocontrollerrj45

I'm desigining several modules (e.g. sensors, motor controller, etc.) that need to communicate over I²C.
These modules can be up to 15ft (5m) away from the base module (I²C master – Spark Photon) – although most will be less than 5ft away. To keep connections simple, I would like to be able to daisy-chain these modules.

Each module uses an ATTiny84/85 which handles the various functions of each module (e.g. ADC/DAC). Each micro also acts as an i2c slave (configurable address) and responds to commands from the I²C master (Spark Photon).

I'd really like to use (abuse) an ethernet (RJ45) style cable. Given that ethernet cables are widely available in various lengths and relatively inexpensive, they would be ideal. I could provide power (3.3V & 5V) and ground as well as the I²C lines to each module and still have spare wires I could potentially use in a future revision. I could even use two twisted pairs to shield the i2c lines. Maybe? The only downside I see here is that someone might be using a crossover cable, which could potentially mess things up.

Alternatively I could use USB cables (A style female extension cables). If I give up separate power lines and use a voltage regulator on the modules that require 3.3V. I'm not sure if my length requirements would be met here, but if daisy-chaining works, this shouldn't be a big problem.

Are there RJ45 connectors that would allow me to use a wire-to-board style connector (e.g. Molex Mini-Latch)?
I'd really like to not have to deal with the precision milling and the cost through-hole or surface mount style connectors require.

The same would go for USB style connectors.

UPDATE:
It appears that I²C is indeed a viable solution. My biggest concern at this point is the cable to use and if there are connectors available that do not need to be directly soldered onto the PCB (wire-to-board would be ideal).

Best Answer

If "daisy-chaining" means that data will come in on "I2C0" and be repeated out "I2C1", you shouldn't have many problems other than your slaves being too busy responding to interrupts to measure anything.

"Daisy-chaining" could also mean bussing them.

In either case, consider raising your voltage and/or using a buffer/line-driver (at least between the longest runs). This approaches a redesign of RS-232.

Simple and might be good enough:

schematic

simulate this circuit – Schematic created using CircuitLab