Maker Pro
Maker Pro

I2C over long bus

J

Jon Slaughter

Jan 1, 1970
0
Anyone here familiar with using I2C over a long bus, say up to a few hundred
feet? Basically either using charge pumps and/or slower speeds(even < 1k
will work).

I know there are some driver chips(but quite expensive for what they do) and
I'm curious as to if there are any simple solutions. (basically connecting
an I2C temp sensor(or several) over about 200 feet to a uC.

That or I was thinking of using a single to differential converter and run
it over twisted pair... but this is more complex and has some other issues.

Thanks,
Jon
 
J

Joerg

Jan 1, 1970
0
Jon said:
Is there? the I2C low speed mode is 100kHz. Although I can run it at any
speed I want for the most part(shouldn't be too hard). I will do some tests
soon and see. Maybe just lowering the clock to 1khz will be fine for my app.
(I don't need any real speed as I'm just monitoring temp and each conversion
takes a second anyways)


Yes, that was one recomendation I saw online as some others that use driver
chips and audio cable. Basically trying to avoid any expensive cabling(want
to use 4-wire telephone cable if possible but not sure about noise) and any
expensive chips.


I imagine this would be difficult cause the uC can only sink so much
current. Although its about 20mA so it should be fine... not sure about the
sensor though.

I'll just try a lower speed, which will be the best option cause I want to
run in low power mode anyways(see if I can get it battery operated) and if
not I'll look into the charge pump method and see if that works.

Also, consider AC termination, using a very small C. I don't know I2C
too well, I am mostly an SPI guy, but maybe that works.
 
J

Jon Slaughter

Jan 1, 1970
0
Jim Thompson said:
There _is_ a low-speed mode at 10 kbit/s.

Is there? the I2C low speed mode is 100kHz. Although I can run it at any
speed I want for the most part(shouldn't be too hard). I will do some tests
soon and see. Maybe just lowering the clock to 1khz will be fine for my app.
(I don't need any real speed as I'm just monitoring temp and each conversion
takes a second anyways)
Perhaps use current source pull-ups with clamps instead of the usual
resistors?

Yes, that was one recomendation I saw online as some others that use driver
chips and audio cable. Basically trying to avoid any expensive cabling(want
to use 4-wire telephone cable if possible but not sure about noise) and any
expensive chips.
You could probably roll-your-own higher current interface, but you'd
have to be cutesy to get the bi-directional stuff to work ;-)

I imagine this would be difficult cause the uC can only sink so much
current. Although its about 20mA so it should be fine... not sure about the
sensor though.

I'll just try a lower speed, which will be the best option cause I want to
run in low power mode anyways(see if I can get it battery operated) and if
not I'll look into the charge pump method and see if that works.

Thanks,
Jon
 
J

Jon Slaughter

Jan 1, 1970
0
Hal Murray said:
You can get tiny uPs with serial ports. Run the serial link slow enough
to work and let the uP do the I2C stuff locally.

That would mean I need one uC per IC. Essentially quadrupling the cost(well,
sorta)... and definitely ruling out battery power operation.
 
J

Jon Slaughter

Jan 1, 1970
0
A "low-speed mode" at 10 kbit/s is mentioned in the specification, but
I've never used it.

You sure?

I have the spec and from what I saw its only 100khz, 400khz and 3.4Mhz.
These are low speed, fast speed, and high speed modes.

But AFAIK there is no specific need to run at these modes because the master
provides the clock... so these, I guess, are the max speeds for the
different modes.

Wiki does mention that its from 10khz to 100khz so I guess your quoting the
min speed. But I've seen an app note for such things that say they've ran it
down to 500hz for over 1 mile.
 
J

Jon Slaughter

Jan 1, 1970
0
Joerg said:
Also, consider AC termination, using a very small C. I don't know I2C too
well, I am mostly an SPI guy, but maybe that works.

Yeah. I might have too. I2C is basically like SPI cept only data and clock
lines and lower speed with a specific protocol(sorta like RS232 almost) +
has some features like multi-master and such.
 
J

Joerg

Jan 1, 1970
0
Jon said:
Yeah. I might have too. I2C is basically like SPI cept only data and clock
lines and lower speed with a specific protocol(sorta like RS232 almost) +
has some features like multi-master and such.

.... plus it has some nasty hang-up features :-(
 
D

David L. Jones

Jan 1, 1970
0
Jon Slaughter said:
Anyone here familiar with using I2C over a long bus, say up to a few
hundred feet? Basically either using charge pumps and/or slower
speeds(even < 1k will work).

I know there are some driver chips(but quite expensive for what they do)
and I'm curious as to if there are any simple solutions. (basically
connecting an I2C temp sensor(or several) over about 200 feet to a uC.

That or I was thinking of using a single to differential converter and run
it over twisted pair... but this is more complex and has some other
issues.

Thanks,
Jon

Might be worth looking at the Maxim/Dallas 1-Wire devices, here is an app
note that discusses distances etc:
http://www.maxim-ic.com/appnotes.cfm/an_pk/148

Dave.
 
Top