Stage show Client Server many slaves what would be the best option?.

I've been asked to think about a client-server, solution for a new life stage art project.
Where there could be around 240 slaves to control led's and some other stuff on a life stage.
Obviously 240 computers is to expensive, while the tasks are simple, so Arduino became their choice.
They require to have fast communication between server and client, and the client should also respond back, (each arduino has a sensor, to act on nearby actors / dancers).
The whole actor play depends a lot on this.
The server side will be a PC, not an Arduino.

Their special effects man thought about RS485, since those modules are cheap too.
But if that couldn't do the job then take cabled ethernet modules.
They could make the cables themselves, only the switches might then get go expensive (240 ports switch??) But if RS485 wouldn't be able to do it, then you program it for ethernet he told me.

So now I'm a bit in doubt of the design here.
Because if i would use RS485, and send broadcast commands (i hope arduino RS485 libraries do support that), to update all clients at once, would go reasonable fast. But if each client would need to reply back, and just lets assume that it would take 50ms to answer back, ea a signal acka a frame on rs485 will be 50ms from client to server.

( 50ms is a random number out of my head, but I need to have some safety here,
I saw 50ms in some documentation on a project with 4 slaves ).

Then letting each client talk back in a time-slot fashion (since there will be frequent communication).
Then each Arduino would use his node ID multiplied by 50ms, to wait, and then send a reply, then the total wait would be, 240 * 50 ms = 12000ms = 12 seconds. (25ms would still be 6 seconds)
Which would be way to slow for a life stage act.

Should i use perhaps 2 RS485, devices per Arduino, so a Signal and a reply line ?
Or should i go for Ethernet 100mbit/sec might be a lot faster.

Long stage cabling, combined with RS485 might drop speed on RS485 quite according to wikipedia around 100kbit/s, for distances more then 10 meter.

(Note cannot use Wifi since cities have many wifi signals, the signalling might get suppressed, or worse jammed.)

RS-485 is only a hardware interface, you have to implement your own protocol or borrow from some other (serial) library.

I'd go with Ethernet. No difficult wiring, rugged cables are available, modules handle the low level stuff. The 240 clients may become a problem, though, not different from the other solutions. Eventually you can add server (concentrator) nodes, which e.g. handle 8 client nodes each, so that overall communication can become faster. In either case I see problems with cabling so many distributed clients, with power and signal lines.

But there exist other solutions, in detail for stage management. I don't remember dedicated network solutions, but found this link interesting: Show Networks and Control Systems. Just the TOC addresses many related topics.

Where there could be around 240 slaves to control led's and some other stuff on a life stage.

There are some inexpensive wireless modules you might use. You would have one master transmitter that broadcast to any number of receivers. The receivers receive the info and each attached arduino evaluates what is sent. If the received massage is identified that it is for the arduino, the arduino acts on the command. Other wise the arduino discards that command and waits on the next command.

I have been doing some tests with a master-slave system using NRF24 transceivers. The minimum time for a successful message and acknowledgement (NB the acknowledgement can hold useful data) seems to be about 2.5millisecs. However if you have a transmission that is not acknowledged the time to service it can be considerably longer (depending on the number of retries that you choose). With 3 retries it is about 12 millisecs IIRC.

If you have 240 transmissions with acknowledgements that best total time would be about 600 to 700msecs - probably 1500msecs would be a safer assumption.

HOWEVER ...
How could you possibly need 240 separate Arduinos on one stage. I strongly suspect you could get away with a tenth of that number by getting each one to do several things.

...R

[u]DMX 512[/u] is the theatrical standard for lighting and effects, and it uses RS485 (or it can be wireless). You can get a DMX shield for the Arduino.

DMX 512 supports up to 512 channels, but it is not bi-directional.

....and the client should also respond back, (each arduino has a sensor, to act on nearby actors / dancers).
The whole actor play depends a lot on this.

Doesn't the technical crew normally handle that "manually", by responding to cues?

Sorry, but I'm pessimistic about this whole deal..

When does the show open? This sounds like a project that's going to take a few months.

It also seems like a LOT of potential for things going wrong. A stage is a harsh/abusive environment and stuff gets banged-around. If you can get through a show will all 250 of those things working, I'd be surprised.

And, I'm with Robin.... 250 Arduinos with power supplies and cables and connections seems unmanageable... SOMEHOW that needs to be consolidated into fewer "modules". I mean, can you build one prop with one Arduino and several lights and whatever else? And then another prop with another Arduino that handles several more of these things?

Besides that, unless this is a Broadway (or similar) production you won't have the budget for 250 Arduinos. By the time you add a power supply, some connectors, cables, enclosures, some more electronics, etc., you are double or triple the price of the Arduinos so you might be somewhere in the $20,000 USD ballpark and I don't know what kind of lighting costs you'll have on top of that. And, you need backups & spares of almost everything (or every unique thing) so in case something fails you can have it up & running by the next show.

50ms is a lot of time for an Arduino. Also, if the slave has nothing to send then it doesn't need to use the whole timeslot. The master can hear that the slave didn't start transmitting so it can immediately start calling the next one. Or you can have the slave send a 1-byte acknowledge if it has nothing to send.

Do the calculations: pick a baud rate and estimate how many bytes you need to send to work out the time budget for communications.

Do none of these things need to move about on stage? You can't have wires trailing from every single one? I would go for WiFi because it can handle this many clients and it will only be slightly more expensive than cables. Interference is not usually a problem that is what WiFi is good at.

I don't see a need for wireless communication, when in fact the connected nodes deserve a power line. I'd not risk RF interference, be accidental or willingly.

Most props are battery powered, even the big ones that are moved by the crew. Remember the battery life can be as short as just a few seconds per show for 'effects' props. 240 power cables interacting with actors sounds like a bad idea.

How much interference do you notice in your iPad while accessing the Starbux WiFi? None. You complain when the data rate gets less than a few megabits.

MorganS:
How much interference do you notice in your iPad while accessing the Starbux WiFi?

I can't afford either an IPad or Starbucks :slight_smile:

...R