0
Offline
Full Member
Karma: 0
Posts: 229
|
 |
« on: April 05, 2011, 04:05:48 am » |
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
|
|
|
|
|
Netherlands
Offline
Tesla Member
Karma: 90
Posts: 9401
In theory there is no difference between theory and practice, however in practice there are many...
|
 |
« Reply #1 on: April 05, 2011, 06:06:50 am » |
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.htmWhat is the datarate / sec you need? Tell us about your application, there are allways other solutions
|
|
|
|
|
Logged
|
|
|
|
|
0
Offline
Full Member
Karma: 0
Posts: 229
|
 |
« Reply #2 on: April 05, 2011, 07:34:14 am » |
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.
|
|
|
|
|
Logged
|
|
|
|
|
Seattle, WA USA
Offline
Brattain Member
Karma: 313
Posts: 35507
Seattle, WA USA
|
 |
« Reply #3 on: April 05, 2011, 08:35:12 am » |
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
Full Member
Karma: 0
Posts: 229
|
 |
« Reply #4 on: April 05, 2011, 09:36:02 am » |
|
|
|
|
« Last Edit: April 05, 2011, 08:40:11 pm by 000 »
|
Logged
|
|
|
|
|
0
Offline
Newbie
Karma: 0
Posts: 13
Arduino rocks
|
 |
« Reply #5 on: April 06, 2011, 07:36:49 am » |
|
|
|
|
|
Logged
|
|
|
|
|
0
Offline
Full Member
Karma: 0
Posts: 229
|
 |
« Reply #6 on: April 06, 2011, 09:46:58 am » |
Thanks How much distance can I can expect by using this IC? Or should I go for RS 485? I am totally confused. 
|
|
|
|
« Last Edit: April 06, 2011, 09:49:09 am by 000 »
|
Logged
|
|
|
|
|
nr Bundaberg, Australia
Online
Tesla Member
Karma: 71
Posts: 6825
Scattered showers my arse -- Noah, 2348BC.
|
 |
« Reply #7 on: April 06, 2011, 10:08:51 am » |
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. 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
|
|
|
|
|
Georgina Ontario
Offline
Sr. Member
Karma: 4
Posts: 437
Arduino rocks
|
 |
« Reply #8 on: April 06, 2011, 10:42:45 am » |
On these questions always go back to the specs http://www.nxp.com/acrobat_download2/literature/9398/39340011.pdfhttp://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
Full Member
Karma: 0
Posts: 229
|
 |
« Reply #9 on: April 06, 2011, 12:45:35 pm » |
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?
|
|
|
|
|
Logged
|
|
|
|
|
|
|
0
Offline
Full Member
Karma: 0
Posts: 229
|
 |
« Reply #11 on: April 07, 2011, 12:22:33 am » |
Well will give it a try then..  Thanks again for all your help..
|
|
|
|
|
Logged
|
|
|
|
|
0
Offline
Newbie
Karma: 0
Posts: 13
Arduino rocks
|
 |
« Reply #12 on: April 07, 2011, 04:24:12 am » |
I use the P82B715PN with about 20meter Cat-5 UTP cable. Works fine. 
|
|
|
|
|
Logged
|
|
|
|
|
Twin Cities, Minnesota, USA
Offline
Newbie
Karma: 0
Posts: 10
|
 |
« Reply #13 on: April 11, 2011, 09:18:28 am » |
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
Newbie
Karma: 0
Posts: 1
|
 |
« Reply #14 on: August 18, 2012, 12:17:42 pm » |
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
|
|
|
|
|
|