0
\$\begingroup\$

I am up to design system with ~128 MCUs communicating to one MCU master. Communication will be bidirectional. Data will be mostly sensor reads, but I plan to use the bus also as communication method for custom bootloader to reprogram client if needed. Distance between clients will be ~10-15cm (~3.90-5.90 inch). MCUs will communicate through wires.

Right now I am reaserching which bus and which protocol should be used with such requirements. My first thought was I2C with 10-bit addressing, but I'm afraid that number of clients would exceed maximum capacitance of I2C bus.

  1. What bus and what protocol would be suitable for this kind of system?
  2. If the answer is I2C, what is the method to make sure bus parameters will match with specification? (I've heard about I2C buffers, would they help?)
\$\endgroup\$
3
  • \$\begingroup\$ With 128 things on a bus, any one going short or talk-only will kill the bus, what's your reliability going to be like? In a 12x12 mesh, each MCU would need 2 I2C tranceivers, one for north/south, one for east/west. Only 12 nodes per bus. Any random MCU to MCU message will need 2 hops, but it could be done in either of two ways, EW first or NS first (or both) so any one MCU failure is restricted to that MCU. Less than full redundancy can be had by only implementing a few of the buses in one direction, or even just one in one direction (lower capacitance and limited failure effect) \$\endgroup\$
    – Neil_UK
    Mar 8, 2019 at 9:21
  • \$\begingroup\$ How much data, and how often? \$\endgroup\$ Mar 8, 2019 at 16:53
  • \$\begingroup\$ Every client would send ~4 bytes of data. Pooling frequency constraint is not a hard requirement, but I was thinking about reading the data from all clients every 500ms. \$\endgroup\$
    – Matthew
    Mar 9, 2019 at 4:55

3 Answers 3

0
\$\begingroup\$

Master-slave situation, where the master queries the slaves one at a time, and both can be transmitting at the same time?

I'd go with RS485, full duplex for fastest speed, half duplex if master talks, slave answers while master listens (same way USB works). Termination resistor at both ends of the wiring chain, short stubs off the wiring chain to each slave. Maxim-ic.com has some nice articles that I've posted links to in the past.

\$\endgroup\$
0
\$\begingroup\$

If you wanted a simple, existing solution, you could go for Onewire. It's made for hundreds of devices and high bus loads so you don't need buffers. The main drawback is low speed because of that.

It has only one data wire, so timing may be another complication. Various client implementations for µCs are available.

But keep in mind the the drawbacks of a single bus:

  • a single bus is likely to fail miserably and how do you locate the culprit?
  • updating software through a slow bus is going to be a nuisance with 128 nodes.
\$\endgroup\$
0
\$\begingroup\$

For such a crowded system, you should organise them as groups. Each group is a subnet and only one of the MCUs in the group has the role of being listener and speaker for the outside and a ruler for the inside. These groups makes the targets which master selects first and then address of element of subnet or all the information the group has.

So, the advantage is, now you have the freedom of implementing different topologies for the main net and the group elements for faster and more reliable communication.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.