I have around 400 devices that i want to address in a star topology. Each device controls a set of LED strips (27*12 resolution). The idea is display a video animation in a good frame per second rate (at least 25fps).

I was successful controlling one set using Arduino (working code in this post). The step of transforming the video into RGB values was done with ffmpeg tool in Linux , the program then transform RGB values to a raw binary frames ready to be sent by the Arduino to the LED strip.

So to send these frames from the Linux program to all the Arduinos i have made an MQTT layer through TCP/IP where each device listen on a topic and the Linux program send according frame to it.

The problem is the heavy delay between sending the frames to all of the 400 devices and the start of the animation (trust me it seems awful resolution where each LED strips shows the RGB values in delay from the others).

I want to stay at 60fps which gives around 16ms between each frame being converted ,sent and displayed. So we are on a milliseconds tolerant architecture.

My question is how to implement a synchronized network with above considerations ?

Below a picture of a 12 pixel strip :

Here an example of one 12 pixel strip

  • 1
    \$\begingroup\$ Have you researched any possible solutions? Please list those that you are dissatisfied with. If you haven't researched potential solutions, then go and do it. \$\endgroup\$ – Andy aka Jun 15 '20 at 12:57
  • \$\begingroup\$ You may need a real-time Ethernet network, most off-the-shelf switches won't work for this type of application because, as you found out, they can introduce quite a bit of latency. Look into other Ethernet based protocols such as Ethercat. \$\endgroup\$ – Ron Beyer Jun 15 '20 at 13:21
  • \$\begingroup\$ Thanks Ron for the suggestion , i'll look into its protocol stack. \$\endgroup\$ – Mohammed BENHADINE Jun 15 '20 at 13:25
  • \$\begingroup\$ Much better. Now it could attract many answers with a variety of solutions and ideas. Thanks for working through on it. \$\endgroup\$ – TonyM Jun 16 '20 at 15:08
  • \$\begingroup\$ A different controller might be able to control 400 strips all together - or at least 50. \$\endgroup\$ – user253751 Dec 15 '20 at 19:19

First, synchronize all of the devices to a common timebase using NTP, PTP or GPS, depending on your actual accuracy requirements (on the order of ms, µs, or ns, respectively).1 NTP should be sufficient for "a window of 10 ms".

Your command packets should include both the action to be performed along with a timestamp (a short time into the future) that indicates when the action should happen. The device then performs the action at the specified time.2

1 "Exact same" is not an engineering specification. You need to specify a tolerance.

2 Many years ago, I was able to use this general strategy — GPS synchronization plus delayed action — to synchronize multiple simulcast transmitters across an entire metropolitan area to within ±1 µs.

  • \$\begingroup\$ Very interesting , planning the actions in the future with a common timebase... I will try to use this strategy and post back the final solution...hope so... The tolerance is a 10ms interval. Thanks @Dave \$\endgroup\$ – Mohammed BENHADINE Jun 15 '20 at 13:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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