OSSC latency tester

From Classic Console Upscaler wiki
Revision as of 20:38, 1 March 2020 by Alan Robinson (talk | contribs) (Sensor requirements and connection)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
Testing latency of NEC PA242W

Introduction

Since firmware 0.79, OSSC is able to measure display latency and strobe length (on low-persistence displays) using an external sensor and "white box" test pattern. Measurement can be made either using internally generated 480p@60Hz timing, or with a real source in any processing mode. Latency is measured by displaying a white rectangle on the display, and reporting the delay in ms between when the first pixel of the rectangle is sent to the display and when the photodiode detects a fixed amount of light (this threshold is set by the choice of photodiodes and resistors).

Sensor requirements and connection

In general, the sensor should be build with a phototransistor or photodiode (optionally using a transistor driver) to drive down a signal line when light intensity exceeds a suitable threshold. Below is described one of the easiest and cheapest implementation with minimal amount of components:

  • SFH 300 phototransistor
  • 150kohm 0603 SMD resistor
  • A pair cable long enough to reach from OSSC to display edges (e.g. speaker or telephone cable)
  • Some form of case


The first task is to find a suitable case for phototransisor which prevents external light affecting the sensor once it faces a display. Below is an example case built from a matchbox:

example case

Next up a pair cable is soldered on the phototransistor legs (long one is emitter), after which sensor itself is complete.


When the sensor is connected to OSSC, a common emitter phototransistor circuit is formed:

phototransistor circuit


The wires from phototransistor legs are connected in parallel to BTN1 terminals (corresponding to "Output" and "Gnd" in above circuit diagram) on the PCB (either side is fine, although bottom is usually more convenient solder point):

PCB connection

BTN1's pull-up resistor R43 acts as "Rc" in the circuit and sets sensor threshold. The resistor must be exchanged to one with more suitable resistance for the sensor (does not affect button functionality). Typically 100k-200k is a good range, although higher resistance may provide higher sensitivity and faster rise/fall time. Note that this is a binary circuit, so you have no adjustment to make the diode more or less sensitive. The upshot is you can get false triggers if the backlight is so bright that the OSSC mistakes it for the probe. For more flexibility you can use a potentiometer to reduce the sensitivity of the probe, or cover the photodiode with a semi transparent material (like paper). If you plan on using a potentiometer, make sure it is connected in series with a fixed (e.g. 10k) resistor to avoid accidentally shorting output to Vdd.

This external site has more photos of the actual soldering required for those requiring more hand holding.

Usage

With OSSC boot-up pattern or a real source on the display, navigate to "<DIY lat. test>" on Post-processing menu. Then select pattern box position (top-left/center/bottom-right) using LEFT/RIGHT, and press OK to confirm. If display panel refresh rate matches input refresh rate, latency is typically uniform across all positions. If panel refresh rate is higher than the input (e.g. 120Hz OLED TVs, or plasma TVs), the bottom-right position has the lowest latency because once it starts painting the screen it actually progresses faster than the data is sent to the display. When the probe is rendered on screen, place the sensor on it and press OK on the remote. The pattern disappears for a moment, and returns with measured latency shown on the character LCD display. If a strobe is detected, its length (<1ms glitches are filtered out) is displayed after the latency result. Press OK to repeat measurement, or EXIT to exit latency testing mode. When testing with real sources, make sure input mode is not switched while in latency tester mode. When latency tester is not used, the sensor should be covered as triggering is registered as BTN1 press in normal mode. Of note, if the sensor is exposed to too much light while the OSSC is turned on it will switch the OSSC into remote programing/learning mode.