I2C over long bus

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

Reply to
Jon Slaughter
Loading thread data ...

There _is_ a low-speed mode at 10 kbit/s.

Perhaps use current source pull-ups with clamps instead of the usual resistors?

You could probably roll-your-own higher current interface, but you'd have to be cutesy to get the bi-directional stuff to work ;-)

...Jim Thompson

--
|  James E.Thompson, P.E.                           |    mens     |
|  Analog Innovations, Inc.                         |     et      |
|  Analog/Mixed-Signal ASIC\'s and Discrete Systems  |    manus    |
|  Phoenix, Arizona            Voice:(480)460-2350  |             |
|  E-mail Address at Website     Fax:(480)460-2142  |  Brass Rat  |
|       http://www.analog-innovations.com           |    1962     |
             
         America: Land of the Free, Because of the Brave
Reply to
Jim Thompson

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

...Jim Thompson

--
|  James E.Thompson, P.E.                           |    mens     |
|  Analog Innovations, Inc.                         |     et      |
|  Analog/Mixed-Signal ASIC\'s and Discrete Systems  |    manus    |
|  Phoenix, Arizona            Voice:(480)460-2350  |             |
|  E-mail Address at Website     Fax:(480)460-2142  |  Brass Rat  |
|       http://www.analog-innovations.com           |    1962     |
             
         America: Land of the Free, Because of the Brave
Reply to
Jim Thompson

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.

--
Regards, Joerg

http://www.analogconsultants.com/
Reply to
Joerg

I think it's "up to" 100KHz. What's wrong with using RS-485 or Ethernet, something designed for the long haul?

Reply to
a7yvm109gf5d1

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.

--
These are my opinions, not necessarily my employer\'s.  I hate spam.
Reply to
Hal Murray

"Jim Thompson" wrote in message news: snipped-for-privacy@4ax.com...

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.

Thanks, Jon

Reply to
Jon Slaughter

The chip is probably minor relative to connectors and packaging. (and it avoids the conversion chip you were considering))

You could probably power the remote end over the serial link. All it takes is a diode and big cap.

--
These are my opinions, not necessarily my employer\'s.  I hate spam.
Reply to
Hal Murray

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

Reply to
Jon Slaughter

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.

Reply to
Jon Slaughter

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.

Reply to
Jon Slaughter

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

--
Regards, Joerg

http://www.analogconsultants.com/

"gmail" domain blocked because of excessive spam.
Use another domain or send PM.
Reply to
Joerg

Might be worth looking at the Maxim/Dallas 1-Wire devices, here is an app note that discusses distances etc:

formatting link

Dave.

Reply to
David L. Jones

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.