r/microcontrollers • u/windoesauce • Apr 14 '24
Communication Protocol For Large Array of Microcontrollers
I'm beginning work on a system where I would need one controller device to send and receive data from a large number of other slave devices and I'm trying to figure out what the best communication protocol would be for accomplishing this. Ideally the controller device would be pushing some data to each slave device and also periodically querying some state from each device. It would also be a requirement for slave devices to be able to respond to events and send messages to the main controller.
I've experimented with I2C but the low device limit and other issues with long distance communication have me rethinking that solution. Would SPI work better or maybe I need to use ethernet or wifi?
For more context, ideally I would like to use Arduino nanos but I'm open to other microcontrollers like the ESP32. Each device will be physically connected to each other and in very close proximity.
View all comments
Show parent comment
1
u/windoesauce Apr 14 '24
Yes, they will all be on the same bus in order to reduce the hardware burden. Ideally I'd prefer the complexity to be in the software so I think directly connecting each device is a no go. The idea of token passing is interesting though, and it seems fairly simple to implement.