Shop OBEX P1 Docs P2 Docs Learn Events
I2C cable communications — Parallax Forums

I2C cable communications

FredBlaisFredBlais Posts: 380
edited 2011-07-30 16:00 in General Discussion
Hi,

Does someone here tried to communicate with i2c between several boards? If so, what is the maximum cable length you think i2c is capable of without needing any kind of buffer (like P82B96)?

Thanks

Comments

  • davejamesdavejames Posts: 4,047
    edited 2011-07-28 13:27
    Hello Fred,

    I don't know the max length immediately, but I go here for the information:

    http://www.i2c-bus.org/

    Later,

    DJ
  • davejamesdavejames Posts: 4,047
    edited 2011-07-29 08:32
    Fred - did that answer your question?
  • Al BoothAl Booth Posts: 137
    edited 2011-07-29 09:31
    I am driving 2 PCA9554's through 10 feet of CAT-5 cable directly from a Propeller pin with only pull-up resistors on the PCA9554 end. Is that close to what you are trying to do?
    Al
  • FredBlaisFredBlais Posts: 380
    edited 2011-07-30 06:47
    davejames wrote: »
    Fred - did that answer your question?

    I was looking for personal experiences
    Al Booth wrote:
    Is that close to what you are trying to do?

    yup, it is almost that
    what are you using for pull-up value?
    Do you think it would work with non twisted-pair cable and no shield?
  • Mike GreenMike Green Posts: 23,101
    edited 2011-07-30 07:11
    Maybe. It all depends on what else is in the environment. The shield and the twisted-pair structure are both intended to reduce noise picked up from the electrical environment, particularly from other wires in close proximity that travel along with the cable for some distance. Given that pretty much any structure where you'll have your signal cable will probably have power wiring in the walls, that includes noise induced from nearby power wiring. So, no one will be able to predict whether an unshielded non-twisted pair cable will work for you without a lot more information about your environment. The NXP document (here) has a section on choosing pull-ups starting on page 42. For the Propeller (3.3V) something on the order of 800-1000 Ohms is the minimum value and a low pull-up value will help reduce noise.
  • Al BoothAl Booth Posts: 137
    edited 2011-07-30 08:11
    Hi Fred,

    I am using 5K pull-ups on both SDA and SCL.

    The twisted-pair is probably what is helping the most, plus the fact that in each pair I have one one signal line and one DC or ground line. My shield is not connected to ground, although in a perfect world, it should be.

    I just thought about the CAT-5 cables as used for Internet connections and decided to try it since my data rates are much lower. Also, the CAT-5 cables I have seen do not have the shield connected.

    Al
  • FredBlaisFredBlais Posts: 380
    edited 2011-07-30 08:44
    In the datasheet, they talk about the bus capacitance, how would one find it out?
    (I have always problem with that kind of calculation)
    The bus capacitance is the total capacitance of wire, connections and pins

    If I'd like to reuse the propeller I2C bus, do I have to change the existing pull-up(or parallel new one)? Is it bad if the pull-up is not in the slave side?

    Thanks
  • TubularTubular Posts: 4,717
    edited 2011-07-30 16:00
    If you look up a specification sheet for the cable, it will tell you the capacitance in pF per foot of cable. For long cable runs the pins/connectors won't contribute much to the calculation and can be neglected.

    The capacitance figure you come up with above (depending on your cable and its length) - combined with the pull up resistor form a RC circuit. The lower the RC value, the lower the "time constant", and the higher the frequency you will be able to transmit data over the I2C bus. If you encounter problems starting at say 100kHz, you can always slow down until it works reliably.

    I'm not sure what you're asking about the pull-up - there is normally a single pull-up near the master. That way any number of slaves can be added and they don't need to worry about the pull-up. It would still work with a distributed pull up (multiple resistors), but I don't see an advantage (marginal noise advantage if any).
Sign In or Register to comment.