arduino and pcf8574 max cable length

What is the max cable length between an arduino and pcf8574 . how much resistors need i use?

What is the max cable length between an arduino and pcf8574 .

What is a pcf8574? Why should we go look that up, when you could have provided a link?

how much resistors need i use?

Only one, if it is the right size. Say about 1/8" in diameter or less, and about 3" long, or less.

The PCF8574 is a chip for I2C connection . My cable is 6x0.22 and is about 20 meter

http://www.nxp.com/documents/data_sheet/PCF8574.pdf

I2C is for chip to chip communication on the same board. Have you ever seen a PCB that was 20 meters long or wide?

Ok how can i connect a Keypad and an LCD on 4 only cable clone Do you know any other solution ?

Ok how can i connect a Keypad and an LCD on 4 only cable clone

I don't know what you mean by "4 only cable clone", so I don't know how you would connect the keypad and LCD.

What I do know is that 20 meters is a very long cable for connecting the keypad and LCD to anything.

my cable is 6 clones x 0.22 diameter and 20 meter length .I can use only 4 clones

Hi Paul,

I'm also interested in something like this, ie two arduino's comunicating over 4 existing cables (using 2 for power). The reasoning behind it is that in the alarm system I'm building for my house I do not want to re-invent the wheel to make my keypad/LCD display "talk" over serial to the main CPU where all the sensor cables are. I2C seems the perfect choise for the two ATMega328 chips (with Arduino bootloader) to communicate.

I'm testing it but unfortunatelly it wont work. Cable length is about 4 meters (~12 feet). I'm also using pull-up resistors (no idea if the ATmega chip has some build in, and if so, if they are enabled) of 4.7K (unfortunatelly I can only connect them at either side of the bus, but not in the middle of it, as the cable goes inside the wall). Tried also to lower bus speed (using the following two commands TWBR = 158; TWSR |= _BV (TWPS0); after the wire.begin) but that did not work either.

One thing it did work, (discovered accidentally and can not explain it with my limited electronics knowledge) is that when my multimeter is set on circuit continuity test (the beep thing) and the red probe (+) touches the SCL and the black probe touches the SDA .... voila, the two chips start communicatig perfectly, it also beeps everytime the "hello" word gets sent (I'm using the wire example sketches). I have no idea why it works like that, so no idea how to reproduce it without the Multimeter.... Any suggestions/references would be much appreciated.

Sorry for the length of my first message, and a huge thanks in advance for even reading it.

Nikos BTW, I have no logic analyzer, but I can get my hands onto a 100MHz Hameg analog osciloscope. Would it be of any use?

Silly me... Seems to be working with lower pullup resistor values. Didn't make any tests, just throwed two 330Ohm on each bus and is working nicely with a 10' cable. That value seems kind of an overkill though, will test with some other... I guess I need to completely disable the internal pullups because I suppose they act in parallel with the external ones...

Any idea how do I do that? some say just to edit the twi.c, others that I need to recompile it, others that there is another librry that can do that natively. The issue is that I need the slave functionallity so the later one is not usable...

Any pointers?