Best multi star topology with up to 1000 masters?

I’m sketching on a multi star topology to act as a control system for escape room/Space game. So I want every thing to be connected to one system and each node (with micro controller) should be allowed to send update once a user pres the button but also be told to change the color during setup to test all buttons. I also intend to drive power through the same flat cable but there will be possibilities to inject new power points injecting the power in a new point. Debugging and simplicity to fix problems is king.

My question is what is the best bus system for multi master. CAN, RS 485, LIN, other?

I intend to use star nodes which will repeat the signal to each star leg other than the one it received the message from to avoid to long stubs leading to all kind of funky with reflections.

For infastructure communication (between stars) Ethernet is the first that jumps to my mind. It’s definitely a bit pricier, and more complex but lots of bandwidth and PoE. Routing between devices is also handled and the master could be anything from a uC, but prototypes on a PC. OS might be an issue if you’re attempting to synchronize devices over Ethernet tho.

Ethernet might be interesting because you basically have a fire house for sending data. And PoE for powering the Stars.

The length of the system will be up to 25 meter but the data rate will be slow. So 9600bps will be enough. Acks will be crucial and all will be low voltage.
PoE is interesting but I would like to keep the system to only one bus type and it need to be low cost since every button will have microcontroller talking out on the bus. But maybe PoE could be an option if I have multiple roomes… hmmm.

A few RS 485s with repeaters should do it, cheap and cheerful.

Why is RS485 best? How would it handle collisions with multiple masters?

for the number of nodes and distances it seems a good choice, where CAN , LIN etc wouldn’t be since limited nodes and distance for CAN. (also i just did this search for replacing the RS485 and i had a hard time finding something better)

watch the bus, send when its quiet, send and test the receive, ack, etc. the usual stuff

Deploying a long bus via rs-485 will require attention to line termination at each of the endpoints. Just telling you now, before you get stuck :slight_smile:

1 Like

Rs485 does nothing MAC related, it’s just a PHY. You can run CAN over rs-485, which might be the best option for you. It will provide some MAC and protocol features you’d otherwise need to implement.

yep we have termination and repeaters.

i didn’t choose CAN since short length of spurs and maximum number of nodes was too low for me.

RS-485 is a PHY. It offers literally nothing except a specification about differential signaling across some wires. You will need something to do the data framing and channel access. You can write it yourself, or find something that already exists. I recommend the later.

CSMA is better than nothing, but I recommend something with guaranteed-time-slots. Doing CSMA right takes a pretty serious contention avoidance algorithm and frame reservation implementation, and even then it maxes-out around 40% channel utilization. So just be wary of that. At 25m you can run the bus much higher than 9600. A shorter transmission period will make everything better, if you’re doing CSMA.

1 Like

What about an internet button? Here is one version https://www.instructables.com/id/Remote-Control-ESP8266-With-Coin-Cell/

I like to have my stuff wired to avoid interference. So yes easy but not robust and a he## to troubleshoot.

The length seam to be the same…?

Why not run can over canBus, but instead go with RS485?

spurs are much shorter on the can spec.

added cost to each node, doing CD in software with RS485 is fine for us.

When you say spurs you mean stub length… which gives spurs?

I have read more on can and rs485. Still I don’t understand the difference between CAN and rs485 on a electrical level. I understand that CAN has predefined higher level. Is there a difference?

yes the length of one node away from the main bus wiring. they’re both similar electrically, the spec calls out for different abilities, rs485, more modes, greater speed and longer. but since rs485 doesn’t define any protocol the comparison ends there.

2 Likes

Interesting. But if cost a d simplicity of development is a bigger consideration than bus speed then you would recommend CAN?

My opinion is that the firmware & software cost will be much higher than the hardware cost. If you can find a solution that has the fw and sw all completed, this is the way I would do it for a small job like this — where hw unit cost not a serious concern.

So if you can put together a CAN network that does everything you need, start with this. Change the PHY to RS-485 if you need to, but keep all the CAN SW.

FlexRay may be another option. It’s more robust than CAN, but less accessible

1 Like

With the exception of the STAR bus topology (instead of a straight line) CAN is really the ideal solution for something like this because it has built in arbitration and error checking. CAN also has a very robust track record in the worst conditions.

If you run it slow, the topology probably does not matter but you run the risk of timing issues between different spokes of the network and also there is the case of where to terminate the bus given all of the spokes. There is such thing as the concept of a “CAN Hub” to connect multiple spokes and manage them but that is just added complication. Daisy chain FTW.

1 Like