The VLT - Video Latency Tester

The VLT is a tool to measure how long it takes (in milliseconds) for a video signal to change from one state to another.

Similar projects worth following
Consider a person pressing the next slide button in a Windows PowerPoint or Apple Keynote presentation. How long does it take the hardware/software to process the button press and display the next slide?

In any live broadcast or presentation the lower the latency, the better. For example, if people are at a concert signing to words on a screen, the projectionist needs to advance the text on the slides to the next screen of lyrics with sub second accuracy. It is no useful if the projectionist hits the next slide button, and then the hardware/software takes too long to change the slide. By no fault of the projectionist, the band is already at the next chorus while the singers are momentarily waiting to see their next lines on the projection screen; timing is everything!

This project is based around a simple Arduino circuit, a VGA Loop (switcher), and a computer mouse module. The mouse module is plugged into the presentation computer, and is used to progress a slide on a Windows PowerPoint or Apple Keynote presentation. When the button is pressed a timer in the Arduino is started, and the slide changes from a Black slide to a Green slide. The analog voltage of the Green VGA pin is monitored. When the voltage on this pin changes, the timer is stopped, and the resulting time measurement is displayed on the mini OLED screen.

Below is a screenshot of the schematic:

Source code and compiled binaries of the Arduino sketch are available from the 'Files' section of this project, or on GitHub:


EAGLE Schematic file

sch - 49.73 kB - 09/14/2017 at 06:33



Compiled binary for the ATmega328 IC chip with the Arduino bootloader

hex - 30.84 kB - 09/12/2017 at 01:21



Compiled binary for the ATmega328 IC chip without the Arduino bootloader

hex - 30.12 kB - 09/12/2017 at 01:21



Arduino source code

ino - 731.00 bytes - 09/12/2017 at 01:21


  • 1 × ATmega328P MCU
  • 1 × 16Mhz Crystal
  • 1 × 5V USB Voltage Regulator
  • 1 × Computer mouse module Extracted from an unused wired mouse
  • 1 × 128 x 64 OLED Display Module SSD1306 Chipset

View all 8 components

  • What is Affecting Video Latency

    Nathan Daniels10/02/2017 at 09:26 0 comments

    Another test was to deliberately ‘stress test’ the CPU and then gather the timing results. To achieve this I issued the following command in the macOS terminal of a MacBook Air:

    yes > /dev/null & yes > /dev/null & yes > /dev/null & yes > /dev/null &

    This created four processes that consumed a significant amount of CPU percentage in the Activity Monitor utility of macOS. In this test the results were as expected, and the timing was delayed; even if it was by only a small average amount of 64.5 milliseconds. The table below shows how the timing is delayed a little when the CPU is busy processing.

    To turn off the ‘stress test’ issue the following command:

    killall yes

  • Initial Timing Tests

    Nathan Daniels10/02/2017 at 09:21 0 comments

    I decided to do some timing tests. Initially I just timed how long it takes for a MacBook Air to change from a simple black slide to a green slide. After ten tests, the average came out at 62.9 milliseconds. The next test was to determine if playing a 1080P HD Video Clip in the background affects the latency of the slide change. Surprisingly, this did not seem to slow dow the time it takes to change a slide. In fact, it was actually quicker with an average time of 57.6 milliseconds. The table below shows the results of this initial test and comparison.

  • How accurate is the timing?

    Nathan Daniels09/26/2017 at 01:18 0 comments

    The question needs to be asked… How long does the Arduino chip take to execute it’s instructions, and do we need a timer to test The VLT timer?! The VLT can be considered obsolete if it is found that the Arduino chip runs too slow. There is obviously no need to test the speed of Video Latency if the testing device introduces it’s own timing issues. The good news is that the analogRead() Arduino function is very quick. According to:

    “It takes about 100 microseconds (0.0001 s) to read an analog input, so the maximum reading rate is about 10,000 times a second.”

    100 microseconds is not long considering that The VLT is measuring time in milliseconds. Therefore, in my opinion the speed of the ATmega328P chip is sufficient, as the time it takes to execute the analogRead() instruction in the code is negligible.

  • Fooling the Display Adapter

    Nathan Daniels09/18/2017 at 07:14 0 comments

    I needed a way for the computer to ‘think’ it was plugged into a display or projector. Initially I tried to read a voltage directly from the VGA output of my computer, however this was not possible for me. To solve this I used a Kramer VP-211DS. This piece of equipment is designed to be a VGA switcher. It also amplifies the signal as it runs from a 12 volt wall socket power source. The switching mechanism of the Kramer VP-211DS is not used in this project, as its sole use is to power the video signal and allow the computer to output a VGA video feed. Any other device that causes the laptop computer to detect a display can be used for this project. Future hardware changes of this project may wish to eliminate to VGA Switcher altogether by constructing the circuitry needed for a dummy display to initialise.

View all 4 project logs

  • 1
    Loading the Arduino hex file

    The hex file that is loaded on to the IC chip is compiled and created using the Arduino open source software. This is done by clicking the Sketch menu, and then ‘Export compiled Binary.’ The hex files are subsequently created in the same project folder as the sketch.

    In order to get the hex file on to the IC chip, a software application called Avrdude was used. Avrdude runs on a range of Operating Systems, but I chose to use it on MacOS via the Mac Ports package manager. Avrdude was used in conjunction with a Usbasp Programmer:

    The command I used to load the hex file to the IC chip was:

    avrdude -c usbasp -p atmega328p -U flash:w:Video_Latency_Tester.ino.standard.hex -b 9600

    Once the sketch is uploaded, it is simply a matter of pressing the reset button before running each test.

View all instructions

Enjoy this project?



Nathan Daniels wrote 09/12/2017 at 01:49 point

It should be interesting to see how background tasks on a computer affect the latency of a slide change. One might expect that if the CPU is running computational heavy tasks, the time it takes to change the video signal is increased?

  Are you sure? yes | no

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates