Multiple Arduino devices wired communication

Hi, I am doing a project to connect multiple Arduino devices with wire and allowing them to communicate. The requirements are:

  1. Each Ardruino device operates exactly the same individually if no other devices connected.
  2. Each Ardruino device can connect/disconnect to 1 or more other devices with wire at runtime.
  3. Some common info can be shared among all the devices connected.
  4. Each Ardruino device can "DIRECTLY" connect to at most 4 devices.
  5. Total devices number in the connected network is at most 10.

The way I am thinking is to use I2c bus to connect all the devices, and dynamically pick one device as master and all other devices as slaves. Then master can broadcast the info to share to all slaves.

Since all the devices setup exactly the same, it means each device will setup its own pull up resistor for SDA, SLC pins to connect to VCC. When devices connects together, all the VCC, GND, SDA, SLC will connect together. My question is will the pull up resistor be a problem here? Because multiple connected devices will make the resistor connected in parallel, which will reduce the effective resistor value. Will it eventually go down to a value that I2C will not work? Is there a way to solve it?

Thanks

[Edit] I seem to find a solution, just needed a transistor as a switch to control the existence of the pull up. Only master could have pull up. Seems working tested on two devices.

No reply possible to the post for an arbitrary number of Arduinos.

Yes.

Yes. Read the datasheets telling the sink capacity of the SDL/SDA outputs and the voltage levels needed for the receivers.

Hot-plugging I2C is rarely done.
Distance between multiple devices is limited by I2C.

Why not use a wireless ESP mesh.
Leo..

As @Wawa says, hot plugging I2C will be a problem. I suspect you will find it locks up. If it does then you will need code to detect the lock up and recover it.

I'm a great believer that electronics is a hobby where you can experiment and see what works, so do that, experiment.

This wireless mesh network might give you some ideas. Since the data protocol is very simple UART serial, you can replace the radios with wires.

Use a mega 2560 with 4x hw serial ports. serial 0 is ide, 1 & 2 are for next/prev mega, port 3 is supervisory broadcast channel. Prev/next links allow unlimited machines in a ring, but broadcast channel allows fast override. Run the baud rates up & add a Rs-232-c level shifter to give you 1200' or so with 2pr twisted/shielded at +-12V

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.