I2C/1-W wiring over long distances with Cat5e

Discussion in 'General Electronics Chat' started by jabss, Jan 12, 2015.

  1. jabss

    Thread Starter New Member

    Jan 12, 2015

    I have made my own home alarm system that has a central unit and several "satellite" nodes all over the house. The communication relies on Cat5e cabling, which carry I2C, 1-Wire and power for the remote satellites.
    The I2C bus is extended via a mesh of 82B96's and I've lowered the total pull-up resistance of 1-W in order to be able to communicate over aproximately 20m.

    So, in each satellite, I have a few I2C and 1-w devices (mainly PCF8574's, PCF8581's and DS18B20's) and connected to it I have some sensors like PIR's and actuators like relays, buzzer or sirenes.

    The pinout I've been using so far (without any problems) is the following:

    RJ45 / Cat5e cabling:

    1 - Green-White - GND
    2 - Green - I2C SDA
    3 - Orange-White - 12V
    4 - Blue - I2C SCL
    5 - Blue-White - GND
    6 - Orange - INTERRUPT BIT (for the PCF8574's)
    7 - Brown-White - 5V
    8 - Brown - 1-W

    If you noticed, all x-white conductors are power-related. Not sure if this would be a good design rule or not...

    According to the Cat5e specifications, each conductor should be able to carry 500mA current (so enough to feed a couple of sattelites) and the number of twists per meter is different according to the colour we are talking about.

    I'll now update my alarm system for "version 2" and I have the chance to change the cabling pin-out (although the current one is working fine).

    Having this in mind, I'd like to ask the experts what would be the best theorethical pinout for the Cat5e cabling for carryng these signals in order to avoid as much as possible interference. Would my current pinout be the possible best, or would it be better if different (how and why?).

    Let's open this discussion to the community!

    Thanks in advance,
  2. MrChips


    Oct 2, 2009
    Don't do it. It is asking for trouble.
    I2C is designed for inter-chip communication, like 6 inches (15cm).
    If you want to communicate over 20m, go with RS-485.
  3. jabss

    Thread Starter New Member

    Jan 12, 2015
    Maybe you didn't go through all of my post... I'm saying it is working like that as of today (over 20 meters of Cat5e).

    I also know I2C is designed for "within PCB" communication, that's why I'm using I2C range extenders (82B96), as mentioned (maybe you also missed that part).

    Like I2C, it was phillips who developed these extenders. Check it out http://www.nxp.com/documents/data_sheet/P82B96.pdf

    The objective of my thread is just to discuss what would be the best theoretical Cat5e pinout for such setup. I've paired I2C conductors with GND and 1-W with 5V.
    I know the best setup would be to pair all data conductors with GND lines, but my design cannot afford 3 GND lines - I need to power my satellites, so would any other pairing theoretically be better?

  4. MrChips


    Oct 2, 2009
    You're absolutely correct. I didn't read you post thoroughly.

    I would still choose RS-485.
  5. crutschow


    Mar 14, 2008
    The digital signals are of most concern and you have those on their own set of twisted-pair with a ground return so that looks okay. Otherwise the rest looks okay also. Can't see any better way to do it.
    Make sure that both power voltages at the far end are well decoupled to ground.
  6. Papabravo


    Feb 24, 2006
    The wire may be able to carry the current, but the voltage won't be what you expect at the other end. What is the maximum common mode ground difference that the extenders can have an still operate? What bauderate are you planning to use? Longer cable runs suggest lower baudrates. What is the capacitance per foot of the cable? The reason I ask is that with enough capacitance the I2C pullups will provide very sloppy rising edge.

    RS-485 will drive the line in both directions. That is why people use it.