This took me ANOTHER 6 months to make… OSRTT PRO!!!
|This is what 6 months more of my life looks like. See these grey hairs??? That’s from this lot. Let me explain what I’ve been up to.
Since building the open source response time tool – the V1 here – I’ve learned so, so much. This is a great tool and there is absolutely nothing wrong with using it, but as with all things, especially first generation devices, there are some parts that can definitely be improved. This design is roughly based on the excellent video from Aperture Grille that I’ll link in the cards above – if you haven’t watched that please go check it out it’s fantastic. I’m using the same sensor, a Melexis MLX75305 which is a light-to-voltage sensor, then essentially that is connected to an Adafruit ItsyBitsy M4 board which is using the same SAMD51 chip that Eric uses in his setup, albeit I’m using the physically smaller one but still.
There are a few constraints in using that sensor though, with the first being that to get the maximum light input level you need to power it with 5V. That’s ok, the USB bus has that, but the microcontroller’s analogue to digital converter – or ADC – can only handle 3.3V. So we need to chop off the signal using a potentiometer. The problem is you can think of the ADC as having a window that’s this big, and the sensor itself being more like this big. The potentiometer’s job is to shrink that sensor window down to the right size to match the ADC – but now you have to guess where is the sensor hitting its maximum output and where is the potentiometer just going off the page. Yeah, it’s a pain. I’ve mostly solved that problem here, but the one I can’t solve is the brightness limit.
For this sensor, how I have it set up, that absolute maximum limit is around 160 nits, give or take about 20. The contrast can also mess with that, but on most displays it takes around 160 nits to max this out. And that’s… that’s a problem. Sure, for most displays you should be able to either dim it down or brighten it up to that, but what if you want to test at max brightness? What if you want to test an outright bright display? Plus, the actual photodiode in there is absolutely tiny, meaning you have to run it at 160 nits to get clean data – anything lower is just full of noise. It also means the darker transitions are pretty noisy too, so not absolutely ideal.
The solution? Replace the tiny sensor with not one, not two, not three, not four, but FIVE much, much larger photodiodes instead! Ok ok let me step back for a second and explain. Let’s start with what’s different between this “Light-to-Voltage sensor” and this “photodiode”. The latter is actually a pretty simple thing. This is a piece of silicon that when exposed to light generates current, just like a mini solar panel. That’s it, nice and simple. This on the other hand is an entire sensor, it not only has a photodiode in the middle, but has two op-amps, a diode and a transistor built in too. But why does it need all that stuff?
The short answer is that the photodiode outputs current, not voltage, and current isn’t all that easy to measure, especially when you can be talking about nano or pico-amps – that’s 1 with 11 zeros in front of it, that’s how little we are talking. So, an op-amp, an operational amplifier, or specifically a transimpedance amplifier circuit converts that tiny amount of current into a voltage that our ADC can read and measure. Basically, the op-amp has two inputs, an “inverting” input, and a “non-inverting” input, plus and minus here. The op-amp wants to keep those inputs balanced, so if you put 1V on the plus side, it wants the minus side to have 1V too. That behaviour is really important here, and is why I have my photodiodes connected across both inputs, with the plus side also connected to ground. The important piece is the feedback from the output, which is what makes this whole thing work. On that loopback you’ll find two components, one is a capacitor which is there to stop it oscillating too quickly, and the other is a resistor. This is what determines the gain of our little amplifier here.
Let’s imagine you are shining a light on the photodiode, which is managing to eke out 1uA of current. That creates a tiny voltage across the inputs, and the op-amp doesn’t like that. So it outputs a voltage, which then feeds back through the resistor to the inputs, allowing the resistor to discharge the current. The size of the resistor determines what voltage the op-amp needs to output to balance its inputs – let’s say it’s a 1 MOhm resistor. Well ohm’s law says V=IR, so current times resistance, or in our example 1×10^-6 * 1×10^6 gives us 1, so 1 volt. Make that a 100K resistor instead and now it’s 0.1V. 10M Ohm? 10V!
That might help explain this madness. These 8 resistors make up a total of 1.17M Ohms, but thanks to the painfully – and I mean painfully – tiny chip, they can be individually selected in any one of 256 configurations. That means this board can fine tune how much gain the op-amp is using, meaning this tiny thing can comfortably measure anything from around 60 nits, to… well I’m honestly not sure. I think hypothetically it could do like… 10,000 nits? I’ve extrapolated my test data up to over two and a half thousand nits and I’m comfortably within the limit. With this setup that would need around 29K of feedback resistance. The absolute lowest this will do is.. Erm… 800 ohms. Yeah. Oops.
The actual photodiodes themselves are osram BPW 34 S photodiodes, which as best as I can tell will top out around 1,500 nits, so I guess that’s the practical limit instead. I went with these as they have a large photosensitive area for better low light performance, they are very linear, and I’m fairly certain that’s what you can find if you crack open NVIDIA’s LDAT tool – and since we’re here and I’ve never seen anyone on the internet open one up, here’s a look. They are using an Atmel ATMEGA32A4U microcontroller to read the output from their AD8542 dual op-amp, and if not this exact one, one incredibly similar. As for why I’m using 5, I tested up to 10 at various brightness levels for a total of over 100 data points to work out that 5 is the sweet spot for the most amount of current and therefore the least noise, while still not being too many, too difficult to package, or really giving that much extra benefit.
There’s also one other quirk with the op-amp. These are called “rail to rail” op-amps, because, in theory, their output can swing from whatever you supply as the ground/negative power input and the positive power input. If you power that with the board’s 3.3V supply, that means at the low end it outputs around 6mV, and at the upper end it’s around 3.2V or something like that. This is fine, but it makes setting up the board for the right brightness a bit of a pain. See when the ADC hits it’s maximum, it’s a perfectly flat line. In the mode I run it in, that’s at 65,520. But when the op-amp is maxed out at 3.2V, the ADC is still reading a touch of noise, so it’s hard to know that this is because the sensor arrangement isn’t set up right. The solution? Mo powa baby!
I could just power this from the USB 5V rail, but experience has taught me that is noisy as hell, plus dumping 5V into a 3.3V microcontroller is… let’s say not recommended. So to solve both of those problems, I’m using a 3.6V LDO power supply. LDO stands for either low dropout or linear dropout depending on who you ask, but all you really need to know is that is takes a higher voltage and drops it to a beautifully, beautifully clean lower one, in this case 3.6V to power the op-amp. That means the op-amp can now max out the ADC, but is still within a decently safe margin.
To top it all off, I’ve also added a tiny little 128×64 pixel OLED, because why not. Actually, it’s really useful for understanding what’s going on during the test, plus look how cute the OSRTT logo looks on there.. Nawwwww… Oh right sorry… Erghm. I do want to make a “standard” version available without the display for a little lower cost, and to let you in on a little secret, I’m planning on doing a design that is much more focused for input lag with a headphone jack for audio triggering, a single photodiode with a fixed resistance and more dedicated software modes – but that one’s a little ways off yet.
As for this one, I’m in the final stages of testing and tweaking to get this ready to actually properly launch and make available to buy as a built kit on OSRTT.com. Like I’ve said before, you can drop an email address in the newsletter box at the bottom of the page so you can be notified when I’ve got this ready to buy. Or you can keep an eye on the site, or my twitter, @techteamgb. This is such a big step forward in making this a much more capable device, so much so that you can now test at any brightness you like.