Pages: [1] 2   Go Down
Author Topic: I2C Distance  (Read 19342 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Full Member
***
Karma: 0
Posts: 235
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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?
Logged

Global Moderator
Netherlands
Offline Offline
Shannon Member
*****
Karma: 216
Posts: 13673
In theory there is no difference between theory and practice, however in practice there are many...
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Rob Tillaart

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

0
Offline Offline
Full Member
***
Karma: 0
Posts: 235
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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??  smiley-cry  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.  smiley-confuse 
Logged

Seattle, WA USA
Offline Offline
Brattain Member
*****
Karma: 611
Posts: 49092
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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?
Logged

0
Offline Offline
Full Member
***
Karma: 0
Posts: 235
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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?
smiley-lol  smiley-lol  smiley-lol  smiley-lol  smiley-lol  smiley-lol  smiley-lol 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???
« Last Edit: April 05, 2011, 08:40:11 pm by 000 » Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 17
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

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

0
Offline Offline
Full Member
***
Karma: 0
Posts: 235
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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  smiley
How much distance can I can expect by using this IC?
Or should I go for RS 485? I am totally confused. smiley-sad
« Last Edit: April 06, 2011, 09:49:09 am by 000 » Logged

nr Bundaberg, Australia
Offline Offline
Tesla Member
***
Karma: 126
Posts: 8501
Scattered showers my arse -- Noah, 2348BC.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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

« Last Edit: April 06, 2011, 10:10:27 am by Graynomad » Logged

Rob Gray aka the GRAYnomad www.robgray.com

Georgina Ontario
Offline Offline
Sr. Member
****
Karma: 5
Posts: 437
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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...
Logged

Just another Hacker

0
Offline Offline
Full Member
***
Karma: 0
Posts: 235
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks for the replies...  smiley Man, I am in a pickle now..  smiley-confuse I coded an entire project on this using i2c and wire.h and I never thought about the distance problem... smiley-sad
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?
Logged

Georgina Ontario
Offline Offline
Sr. Member
****
Karma: 5
Posts: 437
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

We all make minor errors from time to time. Get over it.. smiley-razz
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.
Logged

Just another Hacker

0
Offline Offline
Full Member
***
Karma: 0
Posts: 235
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Well will give it a try then..  smiley
Thanks again for all your help..
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 17
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Twin Cities, Minnesota, USA
Offline Offline
Newbie
*
Karma: 0
Posts: 10
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 1
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset



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.

Logged

Pages: [1] 2   Go Up
Jump to: