i2c bus length - how long is too long?

stocky

Senior Member
Has anyone played around with ganging lots of i2c devices together on a "bus"?
Looking to get LOTS of IO (64) with PC8574 port expanders and wonder how far the bus will run before i get probs?
Concept is a series of DIN rail modules with combinations of I/O ganged together to "master" module. Is it possible to use bi-di drivers on the lines to improve reliability/distance (if its even a problem?)
I estimate max length of tracks from PICAXE would be 8 modules of 60-80mm length (ie 500-700mm approx) - is that feasible?
I know I can get other port expanders with more I/O than 8 - thats just more convenient for the concept at hand (which happens to interface to something else that works with multiples of 8 I/O!)

Cheers
Stocky
 
Last edited:

westaust55

Moderator
What is the maximum distance of the I2C bus?

This depends on the load of the bus and the speed you run at. In typical applications, the length is a few meters (9-12ft). The maximum capacitive load has been specified (see the electrical Spec's for i2c ). Another thing to be taken into account is the amount of noise picked up by long cabling. This noise can disturb the signal transmitted over the bus so badly that it becomes unreadable.

The length can be increased significantly by running at a lower clock frequency. One particular application - clocked at about 500Hz - had a bus length of about 100m (300ft). If you are careful in routing your PCB's and use proper cabling (twisted pair and/or shielded cable), you can also gain some length.

The PC8579 is apparently now/becoming obsolete. If you already have some then not an issue.

Presume you are intending 8 I/O expanders using 8 bits on each for 64 I/O. With only 2 address lines the max number of identical chips is 8.
 

stocky

Senior Member
Cheers - based on that info the length proposed shouldn't be a problem.

According to NXP many variants are in "volume production" so I think they should be available for a while yet :)
 

westaust55

Moderator
i2c bus and PCF8574 I/O Expanders

Having recently ascertained that some commands such as SHIFTIN and SHIFTOUT through Port C on the PICAXE 40X1 I needed to consider some changes.

Decided to look at the PCF8574 myself as an i2c I/O Expander.

In Australia, Aztronics in Adelaide have some 3700+ of these at $2.55ea.
have ordered some with a view to using as an alternative to the 74HC595 shift register which will free up three outputs.

A further find is that in addition to the PCF8574 there is also a PCF8574A which is identical other than a different addressing ID so in fact there can be up to 16 8-bit I/O expanders.

There are also Microchip 16-bit I/O expanders for about $4.80ea but these are not available of the shelf at Aztronics (about a week to get them in).
 
Top