I’m building an open source latency tester…
|Throughout the process of building the open source response time tools, the one request I’ve had more than anything was to make a latency specific tool. The few of us that were lucky enough to get an NVIDIA LDAT unit use them for a whole bunch of things, from obviously monitor testing, but also things like games, mice, keyboards and headsets. Sadly the response time tool is very much a monitor tester – it just can’t test anything other than displays. So, I built this.
This is the open source latency testing tool, and much like the response time tool it’s fully open source. While it’s not quite ready yet, I wanted to give you a peek into what it is, what it can do, and what to expect. While I could have bashed something together and rushed this out the door, I wanted to not only do it right, but to make it the most useful tool it can be. I want this to be better than LDAT, and, you know, actually available.
At its core, it’s pretty similar to the response time tool. I’m using the same light sensor circuit, same op amp, same photodiode – the only change is having a fixed gain on the light sensor as latency doesn’t care much about the granularity of the light level, it just cares about the change in light level. I’ve spec’d it to work with up to 600 nits, but should work on much dimmer displays too. The biggest pain in the development of this was the microphone input. I’ve never worked with microphone circuits before and my god it’s confusing. You need to power the mic but have a capacitor (that’s big enough) in line to filter the DC voltage you are pushing in out, then the amplifier circuit needs a bias voltage and an inverting amplifier circuit with a input output rail to rail op amp. Yeah, my head hurts too. As you can see from this board, I’m still tweaking some of the resistor values to get the best balance of sensitivity and ease of use, hence the through hole resistors jankily soldered onto surface mount pads.
Not that it matters for the user experience, but I’m really proud of the single sided design here. All the components, including the photodiode, are on the top side of the board, and only the switch and the two pin header are through-hole components. The microcontroller is in the same family as the ones I use in the response time tools, but it’s a much more useful package that I can surface mount, and HAS USB C NOW! Woooooooooo! Case wise, I’ve included a hole for a lens for a status LED, a hole for the two pin connector if you want to use that, and a crosshair to show you where the photodiode is underneath. Trying to line up LDAT can be a pain sometimes so I like having that there.
Features wise, this is where I’m really excited. There are a number of different ways to use this thing so let me give you a few examples. If you want to test a monitor’s input latency, the exact same test that OSRTT can do, this can do too, including using my own DirectX code to subtract the USB polling delay and render time to give you an on-display latency time too. That’s all still here. But if you’d rather test latency in a game, well you can now disable my DirectX code and test anything you like! If you want to test the latency of a mouse, you can use the mic jack and the included mic and stand to smack that left click button and record how long it takes from it registering the sound of the click to the screen flashing. If you are handy with a soldering iron you can use the two pin input instead of the mic for a more reliable trigger. While I’ve deliberately designed this circuit to protect the device, I should stress that you should only supply 3.3V to the “power” pin here. 5V is fine if you must, but just because this is rated for 50V doesn’t mean you should – ok?
If you’re more interested in testing audio latency, oh boy do I have good news for you! Stick the mic into your speaker grille, ear cup or headphone and test away. I even composed my own test tone for this! It’s not exactly much but I’m expecting my BRIT award in the post.
So far that should all sound pretty familiar, but the thing that I’ve been so excited about makes this thing so much more useful. See tools like LDAT can only tell you the end-to-end latency. They register the button press or the mouse click, then wait for the screen to flash, then they tell you how long it was between those two actions. I’ve somewhat already improved that with the response time tool and my DirectX code to cut out some of that middleman and give you an on-display latency figure, but what’s new here is the ability to pre-test your system. Say you want to test mice – well just quoting the end-to-end figure isn’t all that useful really, because any change in your system, your gameplay or your monitor will change the end-to-end results. By pre-testing your system, the software can basically subtract your system’s latency from the equation and tell you what THAT device did. That’s a more objective measurement, and I’m really excited to get this ready and into your hands!
I’ve also revamped the software completely – it’s a fully separate program and has a much more professional look. This isn’t necessarily final yet either and I’ve got a lot of work to do to make everything work with as few bugs as possible, but I’m really happy with this. Up at the top is a few preset buttons – all they do is change the settings below, but it makes it easy to quickly switch it into a setup to test various types of devices. Next is the device and test info boxes. The device name is what gets used in the folder name for the results – both raw and processed files will still be there so you can reprocess or verify results manually if you want to. The test notes will be on the results view page once the test completes. Below that are all the settings. I’ve made it so you can’t select a combination of settings that won’t work – like if you want to use the audio jack as the trigger, but want to test audio latency, that obviously wouldn’t work. If you are testing with my DirectX tool you can also pick which display you want that to show up on. Then you’ll just hit the start test button and press stop test when you’re done and it’ll go away and process everything and give you a nice set of graphs of the results.
Considering just how successful OSRTT has been – I think I’ve shipped over 100 of them around the world now, including to big names like Linus, Wirecutter, TechTesters, Kitguru and a whole load more amazing people – I’m really excited to see people making use of this one. I know that testing latency applies to a much wider field than just monitors and laptops, so I’m planning on scaling up my production a little bit! I’m still planning on hand-building these for the time being, and I’ll be validating them before the ship out, the same as I do for the response time tool. Like I said though, these aren’t quite ready yet, and while I’m sure most people would probably start taking pre-orders and taking money, I don’t feel right taking anything until I can guarantee I have something to give you for it, and since I’m not quite there yet, all I’ll ask is that if you are interested in grabbing one of these once it’s all ready, head to OSRTT.com and drop your email in the sign up box at the bottom of the page. You won’t be getting spammed with anything, your email will never be sold to marketers and trust me when I say you won’t hear from me unless I have something really important to share – like these things are available.