Go Down

Topic: I2C Distance (Read 23202 times) previous topic - next topic

000

I am creating a network with 1 master and around 10 slaves using I2C. What can be the maximum distances between the Master and slave? I have read somewhere that distance is low. Is it true? Can distance be increased to say around 75m - 100m?

robtillaart

Quote
Can distance be increased to say around 75m - 100m?

For such distances one typically uses - ethernet, RS485 or sometimes XBEE

IIRC - I2C will go up to 6 meters or 20 feet - you might need to tweak with the pull up resistors etc.

Myabe this is interesting - http://xj900diversion.free.fr/bus/I2C%20-%20RS-485%20adapter.htm

What is the datarate / sec you need? Tell us about your application, there are allways other solutions
Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)

000

Quote
What is the data rate / sec you need? Tell us about your application, there are always other solutions

Data rate is quite small. whenever master asks for the status slaves respond with 1 byte of information. Its for hoe automation device. so length between the master and slave can extend upto 100m.
i2C cant do this??  =(  Which is the best method to move forward with?
In the link you gave it shows conversion from i2c to RS 485. Is it possible? Is it the way forward for me via RS 485?
Dont have much idea about RS 485.  :~ 

PaulS

Quote
Its for hoe automation device.

It's almost spring. Lots of weeding to be done. I'm interested in this automated hoe of yours. Can I sit and drink beer and watch it do the weeding?

000

Quote
It's almost spring. Lots of weeding to be done. I'm interested in this automated hoe of yours. Can I sit and drink beer and watch it do the weeding?

XD  XD  XD  XD  XD  XD  XD U cracked me up...  :smiley-yell:

Things that a small spelling mistake can do..  :smiley-eek:
Its HOME not hoe... HOME! HOME! HOME!  :smiley-sweat:

Any help please???

sathopper

I used P82B715PN I2C extender IC from Philips.  Very cheap and easy:

http://pdf1.alldatasheet.com/datasheet-pdf/view/15876/PHILIPS/P82B715PN.html

000

Quote
I used P82B715PN I2C extender IC from Philips.  Very cheap and easy:

http://pdf1.alldatasheet.com/datasheet-pdf/view/15876/PHILIPS/P82B715PN.html


Thanks  :)
How much distance can I can expect by using this IC?
Or should I go for RS 485? I am totally confused. :(

Graynomad

#7
Apr 06, 2011, 05:08 pm Last Edit: Apr 06, 2011, 05:10 pm by Graynomad Reason: 1
RS-485 is not very compatible with i2c. There are some chips that split the signals and that would allow 485 to be used but that's not very suitable for what you are doing IMO.

The P82B715PN  is probably your best bet, either that or ditch i2c and use async serial. That would mean having a small processor at each sensor though.

Quote
How much distance can I can expect by using this IC?

Don't know, from what I've seen they never quote distances in the docs for these i2c extender chips, you need someone who has tried it.


______
Rob

Rob Gray aka the GRAYnomad www.robgray.com

WillR

On these questions always go back to the specs

http://www.nxp.com/acrobat_download2/literature/9398/39340011.pdf

http://ics.nxp.com/products/i2chubs/

Long Distance I2C or SMBus
The P82B715, P82B96, and PCA9600 are specifically designed to extend the reach of the I2C or SMBus over long distances, in the range of kilometers, depending on the maximum bus speed. This allows the designer to use I2C to interconnect equipment cabinets or for large area systems such as warehouse pick and place systems.
The P82B96 and improved PCA9600 use a static level offset on the slave side to isolate noise and loadings on either side of the device, allowing 4000pF on the high drive side. The nominal offset is 0.8V. That VOL level may create worst-case design tolerance problems with slave devices that do not use I2C switching levels, for example TTL levels. It also precludes operation with other bus buffers using special non-compliant I2C levels. A lower VOL level (<0.4V), combined with the ability to operate with any master, slave, or bus buffer, is the primary advantage of using the P82B715 for long-distance buses, but it doesn't isolate bus capacitance the way the P82B96 and the improved PCA9600 do, so the total system loading must be less than 3000pF.


You just need to use the search engines...
Just another Hacker

000

Thanks for the replies...  :) Man, I am in a pickle now..  :~ I coded an entire project on this using i2c and wire.h and I never thought about the distance problem... :(
So I really have to change the protocol i used for this project? Or use i2c repeaters as mentioned by Garynomad and WiIIR?
Anyone here who has worked with the i2c repeaters?

WillR

We all make minor errors from time to time. Get over it.. :P
http://focus.ti.com/lit/ds/symlink/p82b715.pdf

We are Talking about $8-$12 or so... for two of them

DIP
http://parts.digikey.com/1/parts/1546480-ic-i2c-bus-extender-8-dip-p82b715pe4.html

SOIC (More $$$)
http://parts.digikey.com/1/parts/1546476-ic-i2c-bus-extender-8-soic-p82b715d.html

I think it will work. NXP is reputable and so is TI. I am sure there would be complaints galore if it did not work.
Just another Hacker

000

Well will give it a try then..  :)
Thanks again for all your help..

sathopper

I use the P82B715PN with about 20meter Cat-5 UTP cable. Works fine. :)

robbok

This is great information.  A couple questions:

1.  How many of these extenders can be used on a single bus?  I thought I saw a limit of 30 somewhere.... Would you still be able to have the maximum number of devices on a bus as provided by the I2c spec if each connected to the bus via one of these extenders?

2.  It seems that pull up resistor value is critical with this device.  But what if you don't know the total number of devices that will be connecting to the network?  Can you design for the max number of devices in terms of pull up resistor calculations and still have everythig work when fewer than the maximum number of devices are on the bus?

3.  How are these extenders different from the mosfet-based level shifting circuit described at the end of the I2c spec?  Until reading about the dedicated bus extenders, I had planned on using the level shifting circuit on every one of my slave devices to provide the same type of bus extendability provided by these chips.

4.  If you use these chips, how many wires do you need for the long-range bus?  In the diagrams it looks like you could get by with just two wires but then other diagrams also show 4.  I have a need to minimize the number of wires on the bus (I can do 3 wires max) while maximizing the number of slave devices supported as well as the total bus length.

Any suggestions would be much appreciated.  Thank you!

--Rob

jspink




http://www.nxp.com/acrobat_download2/literature/9398/39340011.pdf

http://ics.nxp.com/products/i2chubs/

Long Distance I2C or SMBus
The P82B715, P82B96, and PCA9600 are specifically designed to extend the reach of the I2C or SMBus over long distances, in the range of kilometers, depending on the maximum bus speed. This allows the designer to use I2C to interconnect equipment cabinets or for large area systems such as warehouse pick and place systems.



The 9600 works great for longer distances with little electromagnetic interference.  Differential signaling is used in RS485 to transmit a single over two complementary signals sent over two paired wires.  The 9600 chip breaks the I2C clock and data signals into inbound and outbound data lines.  The Am26LS32 and AM26LS31 can be used to then turn each of the directional signals into a differential pair.  To do this, I have used the i2C breakout board (http://sjtbits.com/i2c-to-differential-breakout-board/) by sjtbits.com.  If believe they have the schematics on their site if you are interested in the wiring details.


Go Up