sporadic wrote:I'm curious about this as I'm just getting around to working on my wireless stuff as well. For the 17ms @ 1Mbps latency you stated, at what two points was it measured? What was the route? Where you using Komby's stuff or driving the nRF modules directly from your FGPA setup?At a glance, this what I see so far:
8192bits on air @ 1Mbps - 7.8ms
8192bits SPI @ 2Mbps - 3.9ms (arduino driver)
nRF settling delay for 32 packets - 5.28ms
** 160us of delay per packet for radio config and TX powerup (from driver)That comes out to right at 16.98ms, leaving 20us or roughly 320 cycles on an Arduino @ 16Mhz. However, the SPI loop itself for sending the buffer would chew up a few thousand cycles.
**EDIT: I was thinking more about this last night and am obviously missing many other things such as the packet overhead, nRF processing time, etc...
I was using my FPGA to send the RF packets and a Komby receiver. I was just measuring the time the SPI clock was active, so my timing does not include the time to output the pixel data from the Komby receiver. I was transmitting two universes, but I was using Xlights when it was sending all 512 bytes. So rather than just sending 17 packets for the 170 pixels, I was sending an 18th with the last two bytes. I didn't measure the time accurately with the scope. I have basically no latency in my FPGA, I start sending after I receive the first data byte in the Ethernet packet, so the latency is under 1uS. I have a timing diagram of this on my web page, showing how each of the 32 output pixel drivers becomes active as soon as the data shows up. The top trace is the Ethernet Physical output data valid. Note, that E1.31 has about 14uS of header data, and I was only sending 3 pixels per universe.
I have been searching on the web for the edge of acceptable latency for video and sound. There is quite a bit of research in this area due video over the Ethernet, and basically people can't see anything below about 50-60mS.
The industry standard for audio to video delay is 8ms. Beyond that people can perceive lip sync issues. Most people don't see it until 20-25ms bough.
-- Jon Chuchla --
Sent from my iPad using Tapatalk
It is also easier for the mind to deal with the video preceding the audio slightly rather than the other way around. Since light travels faster than sound, our minds are used to seeing things slightly before we hear them. Hearing something before you see is out of the ordinary.
In television I could find a miniscule delay, but most people can't pick it up.
jchuchla wrote:The industry standard for audio to video delay is 8ms. Beyond that people can perceive lip sync issues. Most people don't see it until 20-25ms bough.-- Jon Chuchla --
Sent from my iPad using Tapatalk
Do you have any references for these numbers?
If this is true, you don't want to string too many pixels. WS2812B take ~5mS to just send 150 pixels over the protocol plus the computer/pixel controller.
I'll have to dig it up in one of my reference books when I'm at the office next week. It's one if those things that been in my head so long I don't remember where i first learned it.
-- Jon Chuchla --
Sent from my iPad using Tapatalk
Now that I think about it my 8ms number may not be what you're asking for. We use the 8ms rule if thumb for the maximum delay that any one device may introduce into the signal path.
The film industry uses 22ms (half a frame at 24fps) total delay. I think the 8ms is derived from this number assuming that there's often 3 delay points player, processor, output device. So keeping at 8ms per step, that should keep you around the 22ms number.
For a good comprehensive document on the topic check out ITU-R BT.1359-1. It suggests that detectability (by the average untrained viewer) is +45ms to -125ms. I can tell you from experience that most pros and content creators are much more sensitive than that.
http://www.itu.int/dms_pubrec/itu-r/rec/bt/R-REC-BT.1359-1-199811-I!!PDF-E.pdf
-- Jon Chuchla --
Sent from my iPad using Tapatalk
Thanks so much.
I know for my music, I could tell my lights were just off the beat.
I don't have any new numbers to contribute here but I will say I'm really excited to see others pushing the envelope with these wireless modules.
I know the current hardware with he komby sandwich transmitter has way more latency than it should by the numbers and data sheet. The current code has to wait between each of the rf packets to ensure the receivers see the packets in order.
I haven't been able to pinpoint if this is due to the receivers taking too long to process or the transmitter overloading the Nrf transceiver pull or something.
I seem to remember that joe mentioned he had done some timing related work and found he was transmitting a full universe in 22ms with the serial dmx transmitter code he wrote. That code is mostly the same serial dmx transmitter code in the rfpixelcontrol library. So if I am remembering that correctly that's 22ms at 250kbps.
The other issue I think needs to be taken seriously is how much the use of the 1Mbps or even 2Mbps data rate will impact your transmitter range. Some of the shows this year with folks running 250 kbps had poor reception on the receiving end and they had to upgrade transceivers at the last minute to fix that issue.
If you are planning on the 1Mbps rate or more i am really interested to find out what your experiences are with reception/range/dropped packets. I've had two universes running fine for me in my office on 1mbps with 1 komby sandwich but if I introduced any interference the delay was noticeable to my eye.
I used to have a table of numbers on the wiki for the reception ranges at the different data rates but it seems I somehow lost it or something. But in my tests at 250kbps I could walk like 7 houses down the street with line of sight and with 1Mbps I could cross the street and get to the border of my neighbors lot ~200ft Also these tests were only with a 3 pixel string. I really should have been testing with most of a universe because where we see latency the most with the rfpixelcontrol receiver code is when we drop packets and we need all 17 or 18 to update the universe.
jchuchla wrote:Now that I think about it my 8ms number may not be what you're asking for. We use the 8ms rule if thumb for the maximum delay that any one device may introduce into the signal path.
The film industry uses 22ms (half a frame at 24fps) total delay. I think the 8ms is derived from this number assuming that there's often 3 delay points player, processor, output device. So keeping at 8ms per step, that should keep you around the 22ms number.
For a good comprehensive document on the topic check out ITU-R BT.1359-1. It suggests that detectability (by the average untrained viewer) is +45ms to -125ms. I can tell you from experience that most pros and content creators are much more sensitive than that.
http://www.itu.int/dms_pubrec/itu-r/rec/bt/R-REC-BT.1359-1-199811-I!!PDF-E.pdf-- Jon Chuchla --
Sent from my iPad using Tapatalk
So the -125mS to +45mS is pretty close to what the web says for video over the internet. So from your comment you would prefer to be about half what most people can see at 22mS.
From the paper this brings up an interesting thought. Since most people are less sensitive to the negative latency, we ought to start our sequencing with a -25ms to -50mS adjustment on the output of the lighting data. Then if there is latency, it should be about right.

