Finding a system to determine neighboring MCU chips

The project is basically a bunch of puzzle pieces, each with an MCU. Each piece needs to communicate with its neighbor to establish a grid/2D array of the "neighborhood".
Pieces can be moved around so the position/layout changes.

I am trying to determine a system that will allow communication between neighboring MCU chips.


From my understanding, I2C allows communication between all MCU chips but I need communication between neighboring MCUs only.

Currently, my theoretical solution is to use multiple sets of SDA/SCL pins. Say, if an MCU has 2 neighbors then I will need 2 sets of pins. I would eventually like to scale this up to 4-5 neighbors.

I don't even know if that solution is possible. I do know that running multiple BUS is processor heavy so it will not too ideal.

From what I can see now, the goal would be to have every MCU connected to one BUS but still be able to distinguish whose neighbors.

Thank you!!

Each chip on the bus has to have a unique address, so assign those judiciously.

There is no way with I2C, or any other bus I know of, to determine closest neighbors.

Perhaps if you gave an overview of the project, other ideas would emerge.

It would seem like any microcontroller that had at least 2 UART peripherals could implement your upper diagram well unless you are looking for higher data rates than the UART peripherals are capable of on your chosen microcontroller. However it is not uncommon to find modern microcontrollers which support UART baud rates up to 1 Mbits/s.

The project is basically a bunch of puzzle pieces, each with an MCU. Each piece needs to communicate with its neighbor to establish a grid/2D array of the "neighborhood".
Pieces can be moved around so the position/layout changes.

I'm not looking for high data rates, so I'll look into UART.

1 Like

Each piece needs to communicate with its neighbor

That has been done several times with magnetic, self-assembling modules, with contacts along each edge or face. Example

1 Like

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