APPLICATION NOTE 4871

Optimize the MAX44007 Ambient Light Sensor for Use in Applications with Black Glass

By:  Prashanth Holenarsipur
Arpit Mehta, Strategic Applications Engineer, Amplifiers & Sensors
Sunny Hsu

Abstract: Black glass presents a particular challenge for ambient light sensors since it changes the spectrum of ambient light that falls on the ambient light sensor. In particular, black glass enhances the infra-red content of the light spectrum, to which the human eye is blind. This application note explains how a calibration/compensation scheme corrects a light sensor's lux readings in the presence of different light sources. The article shows how to use Advanced Modes in the MAX44007 light sensor to adjust its response to visible and IR channels. Using the MAX44007's register map, you can optimize sensor performance under black glass.

Introduction

The MAX44007 ambient light sensor provides advanced modes of operation designed to optimize sensor performance under black glass.

Today most smartphones, tablets, notebooks, and TVs have a black glass framing the LCD screen. This frame gives a sleek and professional look to the end-product. Traditionally, a clear circular window or slot was visible on the glass where the ambient light sensor was located. In recent designs, however, the window or slot for the light sensor is covered with a nearly opaque black ink to help that area blend with the color of the surrounding black housing. The manufacturers' reasoning is straightforward: darker the ink, the less distracting, more professional, and sleeker the look!

Unfortunately, the use of black ink over the ambient light sensor complicates its operation in two important ways. First, the black ink attenuates ambient light, thereby reducing the amount received by the sensor. Second, that ink also modifies the spectrum of the light that does get through. The spectral characteristics of the ink allow almost all the incident infrared light to be transmitted, while the visible light is attenuated to 3% to 5% of its original strength. As a result the infrared content is greatly amplified in the ambient light. The transmission of the light, infrared or ambient, is further complicated because the exact chemistry of the black ink can vary with suppliers.

Calibrating and Compensating for Black Glass

It is difficult to precisely match the human eye's CIE curve. For this reason most high-performance ambient light sensors (e.g., the MAX44009) include a calibration/compensation scheme to correct its lux readings in the presence of different light sources. This correction is accomplished by mixing two types of on-chip photodiodes so that their combined effect provides an accurate light reading regardless of the type of light source. With the significant change in light spectrum falling on the sensor under a black glass, these calibration parameters need to be adjusted further.

It is important to note that the light source does affect the amount of calibration correction that will be required for a sensor under black glass. The adjustment is especially important when the light sources are naturally high in infrared content, such as sunlight and incandescent light. Less adjustment will be needed for light from white LEDs (WLEDs) and fluorescent light.

The MAX44007 incorporates Advanced Modes that can be used to adjust its response to visible and IR channels.

Register Map for Optimizing Sensor Performance Under Glass

The following is the register map of MAX44007. You will also find this map in the device data sheet.

REGISTER BIT REGISTER ADDRESS POWER-ON RESET STATE R/W
7 6 5 4 3 2 1 0
STATUS
Interrupt Status               INTS 0x00 0x00 R
Interrupt Enable               INTE 0x01 0x00 R/W
CONFIGURATION
Configuration CONT MANUAL     CDR TIM[2:0] 0x02 0x03 R/W
LUX READING
LUX high byte E3 E2 E1 E0 M7 M6 M5 M4 0x03 0x00 R
LUX low byte         M3 M2 M1 M0 0x04 0x00 R
THRESHOLD SET
Upper Threshold—High Byte UE3 UE2 UE1 UE0 UM7 UM6 UM5 UM4 0x05 0xFF R/W
Lower Threshold—High Byte LE3 LE2 LE1 LE0 LM7 LM6 LM5 LM4 0x06 0x00 R/W
Threshold Timer T7 T6 T5 T4 T3 T2 T1 T0 0x07 0xFF R/W
ADVANCED MODE REGISTERS
Adv1 Register                 0x09 0x00 R/SW
Adv2 Register                 0xA 0x00 R/SW
Visible Gain Register                 0xB 0x00 R/SW
IR Gain Register                 0xC 0x00 R/SW
Trim Enable Register 1             ADV 0xD 0x80 R/W

One-Time Presetup, Typically at Power-Up

Follow this procedure to perform a one-time presetup, typically at power-up.
  1. Read the content of each of four register addresses: 0x09–0x0C.
    • Store as variables: Adv1, Adv2, VisibleGain, and IRGain, respectively.
  2. Store 1s complement of these variables into new variables: Adv1C, Adv2C, VisibleGainC, and IRGainC, respectively. For example, IRGainC = !IRGain;
    • If IRGain = 1010 0110, IRGainC = 0101 1001.
  3. Write 1000 0001 to register 0x0D to enter Advanced Mode (i.e., set ADV=1).
  4. Write Adv1C, Adv2C, VisibleGainC, and IRGainC back to registers 0x09–0x0C, respectively.
    • As an example, 0101 1001 is written to register 0x0C, although originally it had 1010 0110.
    • Note: subsequent reads to register 0x0C (after the above write statement) would still read back 0101 1001 because of the internal automatic bit flipping carried out by the IC before storage into these advanced registers.
    • Retain the value of IRGainC, in particular, for future use.
  5. Set a suitable delay for the Threshold Timer register, register 0x07 if necessary.
  6. Set INTE = 1 (register 0x01) to enable interrupt.

Enter Normal Mode Of Operation

Follow this procedure to enter Normal measurement mode.
  1. Read registers 0x03 and 0x04 to get a 12-bit lux reading.
    • Store value as ComboLux.
  2. Write 0000 0000 to register 0x0C to enter Temporary measurement mode.
  3. Wait for at least 1.6s (2x 800ms).
    • Contact Maxim to shorten this time, if necessary.
  4. Read registers 0x03 and 0x04 to get a 12-bit lux reading.
    • Store value as ApproxLux.
  5. Write IRGainC to register 0x0C to exit Temporary measurement mode.
  6. Calculate: ActualLux = ApproxLux - IRFactor × (ApproxLux - ComboLux)
    • ActualLux is the true ambient light lux reading.
    • ApproxLux = ComboLux for fluorescent and WLED light, approximately.
    • ApproxLux > ComboLux for Incandescent light and sunlight, typically
    • For help calculating a suitable IRFactor, contact Maxim's applications team with your glass sample. The data can be generated directly from lab tests.
  7. Set the appropriate backlight strength based on the ActualLux calculated above.
  8. Set the appropriate Upper Lux Threshold (register 0x05) and Lower Lux Threshold (register 0x06) using ComboLux as reference (since this is normal operating mode for the part).
  9. Dummy Read the INTS bit (register 0x00) to clear any interrupts if previously set.
  10. Wait for a hardware interrupt.
    • This is where the program spends much of its time.
  11. On hardware interrupt, read register 0x00 to confirm that INTS=1.
    • If INTS=1, go to step 7 above.
    • Otherwise, if INTS=0, return to Step 16 after checking other sources of hardware interrupt.


Related Parts
MAX44007 Low-Power Digital Ambient Light Sensor with Enhanced Sensitivity  
MAX44009 Industry's Lowest-Power Ambient Light Sensor with ADC  


Next Steps
EE-Mail Subscribe to EE-Mail and receive automatic notice of new documents in your areas of interest.
Download Download, PDF Format (31kB)  

© Dec 23, 2010, Maxim Integrated Products, Inc.
The content on this webpage is protected by copyright laws of the United States and of foreign countries. For requests to copy this content, contact us.

APP 4871: Dec 23, 2010
APPLICATION NOTE 4871, AN4871, AN 4871, APP4871, Appnote4871, Appnote 4871