Building a light and color testing tool (MALT)

This topic provides instructions and requirements on how to build and use a tool for testing and calibrating screen brightness and color. 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.

Diagram of a MALT device.

Prerequisites

This guide assumes that you have basic knowledge in electronics, programming, and soldering.

Components

You will need the following components.

Instructions

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.

Diagram of a light enclosure.

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 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, ensure the aperture will accommodate the fixture and provide sufficient light to the sensors in the SUT.

Assembly tips

  • 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. The MALT also uses two color sensors, one to measure the screen color and one to measure the ambient color. To achieve these simultaneously, wire them so 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 and color.

Diagram of a sensor rig.

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.

Image of a sensor schematic.

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.

MALT block diagram.

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 - Configure and calibrate the MALT

See Getting started with MALT for instructions on configuring MALT firmware and calibrating the color sensors.

Step 5 - Start testing

See Testing system brightness and color for details on testing your SUT with the MALT.

Test scenarios to cover

Custom tests

See the microcontroller commands API for information on using the MALT for creating custom tests.