Introducing the piLagTesterPRO - a complete input lag testing kit for your Raspberry Pi
The piLagTesterPRO measures input lag (the delay between signal being sent to your display and being able to see it) using a high-temporal resolution brightness sensor. In contrast to my previous input lag device that used a pi zero + a high speed camera, this is a complete package you plug into to your Raspberry Pi.
UPDATE: order the piLagTesterPRO here.
Because it runs on the Pi, it's possible to display what's being sampled in real time, which at the very least is interesting to look at, but can also help diagnose what's going on as you change display settings or if you get unexpected variance in the lag reported. Here's a live photo of it in use:
The sideways graph in the center is the brightness recorded with the sensor, time locked to when the white probe rectangles were displayed on the right side of the screen (the top one is cut off by the sensor itself). The sawtooth shape throughout is caused by the display back-light being pulsed, and yes it complicates measuring lag. What we are interested in is the peaks of that sawtooth over time.
If your color sensitivity is excellent you might be able to see that the graph is color coded:
- the white region at the top is what happened after the probe signal was sent over the video cable, but before the display responded.
- the start of the red region is where the piLagTesterPRO detected that the display has started to respond to the new input. I call this the "1st response". This is what is typically reported as input lag.
- the end of the red region and the start of the final, yellow region is when the display has finished responding to the probe. I call this the "full response". This is typically reported as response time - note here it is black to white response time, which is not the same as gray-2-gray which manufacturers report, but the idea is similar.
Determining the 1st response and full response is a somewhat tricky affair if your monitor's brightness drifts over time (many/all do). To this end the program can average over as many trials as you wish.
The other nice thing about running on a Pi is it's possible to save all the data collected for later analysis. Here's an example of the pretty plots one can make using octave:
The horizontal lines show the maximum brightness before the probe is shown, and after. The x and the o are the automatically extracted 1st and full responses. These are set when the measured brightness has gone 5% and 80% of the way to the maximum brightness post-probe. You'll notice that it takes a really long time to reach 100% - over 150ms in this example. This is why I use the 80% point instead. The human visual system tends to respond to the log of brightness anyway, so the difference between 80% and 100% is not that salient.
In the octave code I've written you can click where you think the 1st response should be and compare that average to the automatically extracted one if you wish.
At the moment there's no photo of the device - because it's a pile of wires on my workbench. I'm not really sure where to go from here in that regard - building a nice box is really beyond my means and interest. I think I could put together a kit of parts already connected/soldered so that all you would have to do is plug it in to the GPIO header on your Pi, but it would still have a DIY ethos and appearance.
I'd be curious to hear how interested people would be in owning one of these kits to add to their raspberry pi, and how important it be that it look like a professional project.
Update: here's some input lag data collected with the piInputLagPRO. Some interesting results already, like an TV that scans-out at faster than the display refresh rate.
Publicly available hardware is available now for $40, so if you are interested in getting one use the email option below to contact me.
Update: here's some input lag data collected with the piInputLagPRO. Some interesting results already, like an TV that scans-out at faster than the display refresh rate.
Publicly available hardware is available now for $40, so if you are interested in getting one use the email option below to contact me.
Comments
Do you think the sensor you are using on the piLagTesterPRO may be able to take a good reading on these displays?
What resolutions and video outs will you be supporting?
I'm limited to the output resolution of the pi itself. The list is huge for the pi 4 but I haven't tested anything beyond the standard resolutions on my pi zero.
https://www.raspberrypi.org/documentation/configuration/config-txt/video.md
I'm mostly interested in understanding how well these displays will work with retro gaming gear. So 240p 480i 480p etc. Preferably using rgbs or rgbhv.
Fisher: have you been able to drive the 3840x1600 at native resolution with the pi? My device/kit depends on the pi to drive the display so that's the limiting factor.
As for professional packaging, that isn't a priority for me. I'm quite familiar with electronics and the rats nest that a workbench becomes.
the best bet would be a hdmi to analog converter, some of which are zero added lag (I believe retroRGB links to at least one).
Perhaps if you could explain what you are trying to do I might be able to give more assistance.
RGBs is done via D-sub in.
Next step: write a post somewhere and try and sell them so they are out of my garage! (They comprise and 4x4 floor standing videowall by the way.)
pins defined here:
https://www.element14.com/community/docs/DOC-92640/l/raspberry-pi-4-model-b-default-gpio-pinout-with-poe-header
Some devices like these commercial grade tvs will accept combined or separate syncs through the "VGA" (DSUB) port.
Csync is not to be confused with composite video. Composite video is rgbhv all in 1 signal which is why the quality is much further down on the spectrum. Where with csync RGB are still their own dedicated cables while HV sync are combined into one.
Just to round it out Component is just a further hybrid. The green signal is dropped entirely and just derived from the other 3 signals. Its a bit more complicated than that as red and blue aren't pure signals any more... they are just red and blue with respect to the Luma/sync signal. But you can visualize it as red blue and "sync".
I did know about the composite output but I am hoping to use a full RGB signal. How is your time table looking? I may order myself a pi4 in preparation.
I'm hoping to have the supplies within a week to be able to build more than the one I have on my bench currently. But since some of it's coming from china there's a high level of uncertainty.
FYI the raspberry pi zero is also an option if all you want to do is measure lag. Not nearly as fast as the pi 4, but way cheaper.
https://alantechreview.blogspot.com/2020/07/pilagtesterpro-status-update-pi4-or.html
https://alantechreview.blogspot.com/2020/08/pilagtester-pro-order-page.html