Electronic – Multiple I2C slaves on Intel Edison I2C-6 Bus

i2cintelmicrocontroller

I've managed to get my hands on an Edison a few weeks ago and have been messing around with the I2C-6 bus and have encountered a few problems.

Problem
I mainly have sensors on the I2C line. I can place 2 sensors on the line without any problems, however when I add a third sensors to the line, an already attached sensor will become non-respondent as well the newly attached sensor also not responding. I've double checked and there are no address clashes.

Best Answer

This is most likely a problem of wrong combination of pullup and/or bus speed. The longer the cable, the more parasitic capacitance there is on the SDA and SCL lines. This slows their edges, particularly the rising edges since these are only passively driven high with the pullup resistors.

Whenever you are having trouble with multiple devices, use the minimum possible pullups. On a basic IIC bus, nodes must be able to sink 3 mA to bring a line low. That means that the pullup resistors can be as low as 1.1 kΩ to 3.3 V or 1.7 kΩ to 5 V. If that's not what you are already using, then change the pullups.

For a long bus, it can help to split the pullup on each line into two resistors, one at each end. The parallel combination becomes the total pullup value.

Some ill-conceived IIC modules each add a little pullup. This can cause trouble with multiple modules since the total pullup value can be too low, and some devices may not be able to pull the lines low enough. Most such module can at least be configured to not add some pullup resistance.

If the pullups are already as low as they can be, but not too low, and you've taken reasonable steps to minimize parasitic capacitance, then you have to adjust the clock down to what the lines can support. Look at the signals on both lines with a scope. Make sure that each line gets reasonably close to its new state before the next possible clock edge. IIC is not meant for high speed communication, and really shouldn't be used off-board. If you do anyway, then you may very well have to slow down the clock.

Related Topic