Latency is the delay from when the computers commands that the lights come on and when they actually turn on. This delay will vary by controller and the method used to transfer the data to the lights. In fact, the computer may put delays into the system, depending upon how well it times the output of the messages.

The delay between sound and video has been thoroughly tested by the television broadcasters. Figure #1, indicates when most people can detect the errors between video and the sound. The broadcasters try to keep the value between -30mS and +22mS (R-REC-BT.1359-1), so that errors in the transmission of the video do pass the thresholds below. I used 50mS timing for my lights last year and could tell during parts of the sequences that I did not have the timing quite right, so I suspect that with music timed to lights you want to do better than the detectability threshold. The obvious answer is to adjust your music beats by -25mS.

Undetectability plateau: -95mS to +25 mS
Detectability threshold: -125mS to +45mS
Acceptability threshold: -185mS to +90mS

To give everyone an idea of how long it takes to transmit data for the various interfaces, I have plotted the delays in figure #1. The chart and table indicate the time to transmit a pixel, which is three channels in microseconds.

Latency Chart

Figure #1

Protocol Delays
Table #1

There are several things that you can note from figure #1 and table #1. First, the slow speed of the Renard is evident and the number of pixels/channel limits are shown visually. Second, the speed of Ethernet is the distribution protocol of choice, since it does not even show up on the graph. Third, Pixel Net always takes ~41mS to transmit all of the data, so it is not suitable higher refresh rates.

Most of the USB dongles that you will buy will be high speed devices, the speeds are shown in the notes section. Since these are hardware devices, the output will start as the data becomes available from the computer, so the main delay will be the serial output.

The NRF24L01 speeds are estimates and match fairly closely with the tested values from my hardware. This will change depending upon the output mode used.

Finally, I would like to point out that the latency will be summation of all of the protocols used to send the data to your lights. For example, the PX1 is a Renard to pixel converter. The output comes from a USB dongle or Ethernet device, is converted to Renard, is received and output as pixels (WS2811). The Renard receiver can not start tranmission of the pixel output until all of the data is received, since a pause in the output is an end of frame indication. So the total latency is a summation of all of the delays. This is shown in scale for 150 pixels at 230.4Kbaud in figure #2.

Latency SumFigure #2

Notes on Protocols

Pixel Net
Serial data 8bit, no parity 1 stop/start
Designer assumes 8 bits per byte (no start/stop bits)
1Mbit data rate
1 byte header
4096 data byte
Overhead: 10 uS
Per RGB pixel: 30 us

Serial data 8bit, no parity 1 stop/start
One start character
One byte per channel, assumes no two word bytes
Overhead (10 bits): 173.6uS, 86.8uS, 43.4uS, 21.7uS (57.6, 115.2, 230.4, 460.8)
Per RGB pixel: 520.8uS, 260.4uS, 130.2uS 65.1uS

Break – 88uS
MAB – 8uS
Start code – 11 bits (44 uS)
Data: 11 bits each (1 start/2 stop bits)
Overhead (88+8+44): 140uS
Per RGB pixel: 132uS

Pixel Net
Serial data 8bit, no parity 1 stop/start
Designer assumes 8 bits per byte (no start/stop bits)
1Mbit data rate
1 byte header
4096 data byte
Overhead: 10 uS
Per RGB pixel: 30 us

NRF24L01 RF Transceivers
1 byte preamble
5 byte address
9 bit control field
32 byte payload (with 2 unused bytes)
2 byte CRC
10uS before asserting TX
130uS for PLL lock

Ethernet (100Mbit/second)
160 bytes of header including preamble
4 bytes CRC
12 bytes empty space between packets
176 bytes of header/trailer
Overhead: 14.08uS
Per RGB pixel: 0.24uS

Low Bandwidth: 1.5M bit/second
Full Bandwidth: 12 Mbit/second
Hi-Speed: 480 Mbit/second
USB 3.0: 5 Gbit/second

  1. Leave a comment

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: