i2c mesh network

Discussion in 'Embedded Systems and Microcontrollers' started by howardb, Sep 1, 2015.

  1. howardb

    Thread Starter New Member

    Sep 1, 2015
    Dear all,

    I am new to this forum and have a question that has been bothering me for a while.
    My approach might be wrong and your advise would be much appreciated.

    I am trying to build a network of components with unique IDs where I can address on component and request its neighbouring component IDs. The network should work in a 'plug and play' manner.

    I have been exploring the idea of using I2C as they are simple components that can have a unique identifier and a value that can be read or written. On connecting a component - is it possible to pass this component's ID or values to its neighbouring I2C?

    Basic example:
    I2C/A (id: A, value: 0)
    I2C/B (id: B, value: 0)

    1. I2C is connected to an arduino
    2. I2C/A is connected to I2C/B
    3. I2C/A transfers its ID to I2C/B resulting in I2C/B (id: B, value: A)
    4. I2C/B’s value is read via arduino as A.
  2. ErnieM

    AAC Fanatic!

    Apr 24, 2011
    The I2C master needs to know the address of every slave.

    I suppose one could try every possible address and query for what is out there. While such is possible it is not standard so you are stuck building all your slaves.
  3. MachineHum


    Nov 3, 2014
    There's nothing out there exists to what you describe (that I know of)

    The closest thing may be Ethernet, but that's not even on the same electrical lines like I2C (you need a switch to connect your stuff)

    To make something plug and play, you would need to have independent lines for each device. That way when everything powers up, the master would poll each lines, configure an address (if it's static this could be negotiated - slave determines addr)

    Other then independent lines for each slave, I can't think of a way to negotiate individual addresses.

    It's an interesting question and I've thought of it as well.