Skewjo / SysLat_Firmware

Arduino firmware for SysLat project
6 stars 3 forks source link

Display brightness influences results #8

Open AeliusSaionji opened 2 years ago

AeliusSaionji commented 2 years ago

My setup is a 240Hz monitor, I'm measuring against a game's titlescreen with vsync off and rtss limiting to 480fps. Probe placed bottom right of the display.

Display at minimum brightness: 28.80ms average over 500 samples. Display at maximum brightness: 18.53ms average over 500 samples.

A 10ms difference😱

I've been playing with it for some hours and I do get consistent results between trials where all controls are maintained. So long as all hardware is controlled for, relative comparisons of (certain) different software configurations can be made, as well as relative differences from placing the probe on different points on the monitor.

But if the luminance is influencing the results, then the absolute readings cannot be trusted, and readings between different displays are not comparable.

Looking through your code (I am no expert), I see you use an interrupt from the photosensor pin, and have it configured to interrupt on "rising". My guess is that, whatever the board considers to be "rising" is not sufficient for our uses. I suspect the arduino logic is waiting around some arbitrary length of time before it's "certain" we've entered a digital high state,

You probably need to drop the digital ISR approach and read analog data, and implement a calibration mode where the user can record the analog value at "black" and at "white" before running any test.

Then the trigger can be issued at some appropriate value (50% to white? User configurable? Open to discussion here).

Hope this helps!