Building a Light Testing Tool (MALT)
This topic provides instructions and requirements on how to use (and build if neccessary) a tool for testing and calibrating screen brightness. The MALT (Microsoft Ambient Light Tool) is provided for reference.
Please use these instructions for leveraging ideas and concepts into your testing solution. The microcontroller API is published for you to further leverage tests published in the HLK and elsewhere. Your feedback will help improve this guide.
This guide assumes that you have basic knowledge in electronics, programming, and soldering.
You will need the following components.
- Calibrated light source of sufficient range / spectrum
- Power supply for light source
- Digital to analog converter (DAC)
- 2 Ambient light sensors (ex TI OPT3001 or better)
- 2 Color sensors
- Light enclosure
Step 1 - Assemble light enclosure
Controlling light exposed to the system under test (SUT) is key to accurate testing. The enclosure needs to be matched to the light panel being used and the SUT. This will consist of a box with an aperture on top for the controllable light source and room for the SUT underneath.
The enclosure we used for laptops was 16"x16"x12", with a 10"x10" aperture at the top of the enclosure. The model can be 3D printed.
Light enclosure tips
An effective light enclosure will provide a sterile light environment where light cast on the panel (or device) under test will be from the controlled light source and not environmental. The following are examples of light boxes.
The enclosure needs to be large enough for the SUT and remove it from external light influence The light fixture can be placed on top or mounted inside the enclosure.
If the light fixture is mounted outside the box (on top), ensure the aperture will accommodate the fixture and provide sufficient light to the light sensors in the SUT.
- If glue or tape is needed for box assembly, we recommend using glue or matte black gaffer tape.
- Check that the enclosure is flush with the work surface the enclosure is placed on. There should be no external light leakage.
- Use the sensors from the MALT (and no SUT in the light enclosure) to determine if there is external environmental light leakage into the enclosure.
- If the light source requires an aperture, use an appropriately sized hole so that your light can rest on top of the box without falling through or leaking light.
Step 2 - Assemble sensors
The MALT uses two light sensors (one to measure the screen brightness and one to measure the ambient brightness), and two color sensors (one to measure the screen color and one to measure the ambient color). To achieve these simultaneously, wire them such that one light sensor and one color sensor are facing away from the other two sensors. When the screen sensors are facing downwards (sitting on the screen), the other sensors are facing upwards to measure the ambient light.
Connect the LED light panel to the power supply and connect it to the DAC. The microcontroller must be able to control the voltage sent to the light panel in order to control its intensity, which is achieved using the DAC. The schematic below shows how connections were made for the tool we use. More details can be found in the Sensor PCB KiCad project.
Step 3 - Connect the microcontroller
Connect the sensors to the microcontroller and the microcontroller to the PC. For our purposes, we have the PC controlling the tests be the same as the system under test (SUT).
The following diagram shows how various parts of MALT are connected.
Through the MALT PCB, we are able to connect the Arduino board to the sensor PCB and the light source. More details can be found in the MALT PCB KiCad project.
Step 4- Start testing
Refer to Testing System Brightness Response for details on setting up and using the MALT you just assembled.
Test scenarios to cover
Refer to the
microcontroller commands api for using the MALT for creating custom tests.