I2C - distance between master and slave?

Hi

what is your experience with the I2C bus, what is the practical max distance,

please specify your pull-up resistor value, I2C clock speed, and distance

thank you,

best regards

Jens

-------------------------------------------------------------------------------- Jeg beskyttes af den gratis SPAMfighter til privatbrugere. Den har indtil videre sparet mig for at få 3924 spam-mails Betalende brugere får ikke denne besked i deres e-mails. Hent en gratis SPAMfighter her.

Reply to
Jens Gydesen
Loading thread data ...

How about a mile ?

formatting link

Reply to
Arlet

Your wording sounds more like a 'homework' question. Distance, speed and rise times are noted in the I2C spec that is publicly available. Max distance also depends on repeaters and things like ACK turnaround time.

Pull-up resistor value depends on many factors, speed, capacitance of signal run, voltage drop down signal run. How you work this out depends on many aspects of your application.

I have done 8m at 80KHz and cannot remember what the pullup value was. The cable was chosen for low loss, low capacitance and screening.

Most full DDC compliant VESA monitors have greater than 1m of I2C signal run to read the monitor details.

See the I2C spec and many, many references on how to do this.

--
Paul Carpenter          | paul@pcserviceselectronics.co.uk
    PC Services
 Click to see the full signature
Reply to
Paul Carpenter

One limiting factor with any unbalanced TTL level system is the ground potential difference between devices.

Paul

Reply to
Paul Keinanen

sorry, but I have to ask

Why?

martin

Reply to
martin griffith

"Jens Gydesen" schrieb im Newsbeitrag news:45a5585d$0$14005$ snipped-for-privacy@dread15.news.tele.dk...

I have seen people using a 10 m i2c connection at about 10 hbit/s in a factory environment. Not sure what the pullup was but probably something below 4k7.

/Roland

Reply to
Roland Zitzke

Jens Gydesen ha scritto:

--------------------------------------------------------------------------------

In my BLOG You can see a schematic project (IPERKEY) that control a remote key (eeprom inside) with I2C bus.

I tested it at 100 meters with standard alarm cable (0.22)

Emanuele

--
*** YOUR ELECTRONICS OPEN SOURCE ***

http://dev.emcelettronica.com;---------------------------------------------------------
 Click to see the full signature
Reply to
Emanuele

From one inch to infinity, depending on the amount of EMI.

Regardless of the max. distance in the ideal conditions, using I2C for communication outside a device is bad idea.

Vladimir Vassilevsky

DSP and Mixed Signal Design Consultant

formatting link

Reply to
Vladimir Vassilevsky

I2C uses a wire-or'd bus so you can't use differential drivers. You are stuck with 0-5v TTL signal. Typically this type of signal is good for six feet. There are two things that will maximize possible distance. Run slower than 100K speed and terminate the line with maximum current allowed.

Don't think it would be a good idea to run more than 10 feet and that with shielded cable.

--------------------------------------------------------------------------------

Reply to
Prescott

Sounds like homework?

i2c is a 2 wire open-drain, wired-or BUS, and has many specs :

100Khz/400KHz/1MHz, and ~3.4MHz was talked about.

There is also a FM+ variant, that bumps the drive ability, and so improves the Speed-Distance profile.

There is no fundamental MAX distance : it depends on the chips used, on the pullup, or loads used, and on the speed you can tolerate.

Mostly, Philips specs a capacitance, drive current, and that tends to define a distance based on Cable pF/m values.

Older i2c systems were 5V, but you could take a modern CPLD, with Schmitt pins, and drive low value pullups to target almost any voltage/current profile, for maximising distances.

Look at the RS232 and RS485 resource out there, for speed/distance profiles, to get some idea of cable limits.

You can also use CAN BUS transcievers for the HW layer, as they are OR signal devices, but as you get this specialised, you loose the ability to clip on any-old-i2c device.

However, you could deploy a common i2c library in your uC, and have a local stub that was one speed, and another MUX'd remote 'i2c' bus, you tuned for distance : same SW, but different HW drivers

-jg

Reply to
-jg

You might be able to use the CANbus drivers with one load resistor from the line to Vcc and the other load resistor from the other line to Gnd.

Differential wire-ORed buses could also be constructed using ordinary RS-485 chips with resistors as above and feeding the data into the Transmit Enable pin and connecting the chip data input to fixed voltage (either "0" or "1", depending on which way the load resistors are connected).

Paul

Reply to
Paul Keinanen

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.