Designing the VEML6040 RGBW Color Sensor Into Applications

Similar documents
Designing the VEML6030 Into an Application

Designing the VEML7700 Into an Application

RGBW Color Sensor with I 2 C Interface

Designing the VEML6030 into an Application

High Accuracy Ambient Light Sensor with I 2 C Interface

Designing VCNL4000 into an Application

High Accuracy Ambient Light Sensor with I 2 C Interface

Fully Integrated Proximity and Ambient Light Sensor with Infrared Emitter and I 2 C Interface

SMD I 2 C Digital RGB Color Sensor CLS-16D17-34-DF6/TR8

UVA and UVB Light Sensor with I 2 C Interface

Designing the VCNL4035X01 Into an Application

Designing the VCNL4020C Into an Application

PRODUCTION DATA SHEET

FLD00042 I 2 C Digital Ambient Light Sensor

High Accuracy Ambient Light Sensor with I 2 C Interface

VCNL4000 Demo Kit. IR Anode. IR Cathode. IR Cathode SDA SCL

Designing VCNL4010 Into an Application

SMD I 2 C Digital RGB Color Sensor EACLSST2020A0

UVA Light Sensor with I 2 C Interface

DATASHEET ISL Pinout. Applications. Integrated Digital Ambient Light Sensor and Proximity Sensor. FN6522 Rev 0.00 Page 1 of 13.

High Sensitivity Long Distance Proximity and Ambient Light Sensor With I 2 C Interface

NFMS THEORY LIGHT AND COLOR MEASUREMENTS AND THE CCD-BASED GONIOPHOTOMETER. Presented by: January, 2015 S E E T H E D I F F E R E N C E

High Sensitivity Long Distance Proximity and Ambient Light Sensor With I 2 C Interface

White Paper. Reflective Color Sensing with Avago Technologies RGB Color Sensor. Reflective Sensing System Hardware Design Considerations

DATASHEET ISL Features. Applications. Simplified Block Diagram. Pinout. Ordering Information. Pin Descriptions

High Resolution Digital Biosensor for Wearable Applications with I 2 C Interface

MiCo SnP HT-01D HT-01D. Humidity & Temperature Sensor Module. User s Manual. MiCo SnP. 1/16

preliminary Fully Integrated Proximity Sensor with Infrared Emitter and I 2 C Interface featuring Interrupt Function I2C BUS VOLTAGE RANGE (V)

In sum the named factors cause differences for multicolor LEDs visible with the human eye, which can be compensated with color sensors.

TEKS5400. Silicon Photodetector with Logic Output VISHAY. Vishay Semiconductors

operating manual iliad for Windows & Mac OS X software application rc81

High Accuracy Ambient Light Sensor with I 2 C Interface

Fully Integrated Proximity Sensor With Infrared Emitter, I 2 C Interface, and Interrupt Function

ISL Light-to-Digital Output Sensor with High Sensitivity, Gain Selection, Interrupt Function and I 2 C Bus. Features. Ordering Information

Fully Integrated Proximity and Ambient Light Sensor With Infrared Emitter, I 2 C Interface, and Interrupt Function

Designing the VCNT2020 into an Application

MK350 Portable Spectrometer

Fully Integrated Proximity and Ambient Light Sensor with Infrared Emitter, I 2 C Interface, and Interrupt Function

IS31FL3236A 36-CHANNEL LED DRIVER; SELECTABLE PWM FREQUENCY IS31FL3236A. February 2018

Ultra-Low Lux, Low Power, Integrated Digital Ambient Light Sensor with Interrupt Function

Radiometric and Photometric Measurements with TAOS PhotoSensors

Light. intensity wavelength. Light is electromagnetic waves Laser is light that contains only a narrow spectrum of frequencies

Color Measurement with the LSS-100P

DATASHEET. Features. Applications. Related Literature ISL29033

DATASHEET. Features. Applications ISL Digital Ambient Light Sensor and Proximity Sensor with Interrupt Function. FN6619 Rev 4.

Silicon PIN Photodiode

3-Channel Fun LED Driver

Data Sheet. HDJD-S831-QT333 Color Sensor Module

Data Sheet. APDS-9702 Signal Conditioning IC for Optical Proximity Sensors with Digital I 2 C Interface. Features. Description.

IS31FL CHANNEL LIGHT EFFECT LED DRIVER. November 2017

TFDU4100/TFDS4500/TFDT4500

Integrated Low Profile Transceiver Module for Telecom Applications IrDA Standard

IS31FL3209 IS31FL CHANNELS LED DRIVER; 1/24 DC SCALING WHITE BALANCE. December 2017

IS31FL3235A 28 CHANNELS LED DRIVER. February 2017

The CV90312T is a wireless battery charger controller working at a single power supply. The power

Fully Integrated Proximity Sensor with Infrared Emitter, I 2 C Interface, and Interrupt Function

Universal LCD driver for low multiplex rates. AEC Q100 grade 2 compliant for automotive applications.

Diode capacitance V R = 0 V, f = 1 MHz, E = 0 C D 1.2 nf V R = 5 V, f = 1 MHz, E = 0 C D 400 pf Dark Resistance V R = 10 mv R D 38 GΩ Optical

ELIIXA+ 8k/4k CL Cmos Multi-Line Colour Camera

To discuss. Color Science Color Models in image. Computer Graphics 2

7 OUT1 8 OUT2 9 OUT3 10 OUT4 11 OUT5 12 OUT6 13 OUT7 14 OUT8 15 OUT9 16 OUT10 17 OUT11 18 OUT12 19 OUT13 20 OUT14 21 OUT15 22 OUT16 OUT17 23 OUT18

Silicon PIN Photodiode

Silicon PIN Photodiode

LZP-Series Highest Lumen Density Cool White Emitter LZP-00CW00

NF1011 Frequency Translator and Jitter Attenuator

Data Sheet. APDS-9309 Miniature Ambient Light Photo Sensor with Digital (I 2 C) Output. Description. Features. Applications

Color Science. What light is. Measuring light. CS 4620 Lecture 15. Salient property is the spectral power distribution (SPD)

DATASHEET ISL Ordering Information. Applications. Digital Proximity Sensor with Interrupt Function. FN6732 Rev 0.00 Page 1 of 12.

SDIC XX 5075 SD5075. Two Wires Communication Digital Temperature Sensor. Features. Description. Applications. Ordering Information

DS4000 Digitally Controlled TCXO

Carbon Dioxide (Tiny CO2) Gas Sensor. Rev TG400 User Manual

CS6640 Computational Photography. 6. Color science for digital photography Steve Marschner

Ambient Light Sensor DIP 3mm T-1 ALS-PDIC144-6C/L378

Silicon PIN Photodiode, RoHS Compliant

LZ1-00WW05. LedEngin, Inc. High Luminous Efficacy Warm White LED Emitter. Key Features. Typical Applications. Description

Silicon Photodiode, RoHS Compliant

I2C Encoder. HW v1.2

Maxim > Design Support > Technical Documents > Application Notes > Digital Potentiometers > APP 3408

MAX Industry s Lowest-Power Ambient Light Sensor with ADC

BTS256-E WiFi - mobile light meter for photopic and scotopic illuminance, EVE factor, luminous color, color rendering index and luminous spectrum.

16 Channels LED Driver

IS31FL CHANNELS LED DRIVER. February 2018

Reflective Optical Sensor with PIN Photodiode Output. Parameter Test condition Symbol Value Unit Reverse Voltage V R 5 V Forward current I F 100 ma

Visible Light Detector with Analog and Digital Outputs

ALS-PDIC243-3B. 5mm T-1 3/4 Ambient Light Sensor. Features. Description. Applications

IS31FL3190 IS31FL CHANNEL FUN LED DRIVER. Preliminary Information November 2015

Calibration Coefficients and Thermistor Selection

Visibility, Performance and Perception. Cooper Lighting

Agilent HDJD-S831-QT333 Color Sensor Module

UNiiQA+ Color CL CMOS COLOR CAMERA

(PT-3528) Chip Ambient Light Sensor, RoHS Compliant. Token Electronics Industry Co., Ltd. Version: July 26, Web:

The PmodIA is an impedance analyzer built around the Analog Devices AD bit Impedance Converter Network Analyzer.

Silicon PIN Photodiode, RoHS Compliant

12/02/2017. From light to colour spaces. Electromagnetic spectrum. Colour. Correlated colour temperature. Black body radiation.

MT6803 Magnetic Angle Sensor IC

Visible Light Detector B datasheet - 150mm wafers

IS31FL CHANNEL FUN LED DRIVER July 2015

Color , , Computational Photography Fall 2017, Lecture 11

DATA SHEET. PCF pixel matrix driver INTEGRATED CIRCUITS

Color Sensing using the OPB780

Transcription:

VISHAY SEMICONDUCTORS www.vishay.com Optical Sensors By Reinhard Schaar The VEML6040 is an advanced RGB / ambient light sensor with an I 2 C protocol interface and designed with CMOS technology. VEML6040 GND 1 4 V DD W B G R Control logic SDA 2 Output buffer I 2 C interface 3 SCL Fig. 1 - VEML6040 Block Diagram The VEML6040 color sensor senses red, green, blue, and white light and incorporates photodiodes, amplifiers, and analog / digital circuits into a single CMOS chip. This digital RGBW information can be used in feedback control systems, among other things, to monitor and actively control a light source. For example, with the color msensor applied, the brightness and color temperature of a backlight can be adjusted, based on the ambient light conditions, in order to make the panel look more comfortable to the user s eyes. The VEML6040 s adoption of the Filtron TM technology achieves an accurate response to the mid of each requested band for the red, green, and blue channel. Furthermore, it provides excellent temperature compensation, keeping the output stable under changing temperatures. The VEML6040 s functions are easily operated via simple commands sent over the I 2 C (SMBus compatible) bus. The VEML6040 is packaged in a lead (Pb)-free 4-pin OPLGA package, which offers the best market-proven reliability. The VEML6040 comes within a very small surface-mount package with dimensions of just 2.0 mm x 1.25 mm x 1.0 mm (L x W x H). Revision: 03-Apr-18 1 Document Number: 84331

VEML6040 RGB SENSOR APPLICATIONS Automatic white balancing of digital cameras Eliminate unsightly blue or orange color casts Adjust the backlight of an LCD display to provide a white balance in all ambient light conditions Actively monitor and control the color output of LEDs APPLICATION CIRCUIT FOR THE VEML6040 The VEML6040 operates within a supply voltage range from 2.5 V to 3.6 V. The necessary pull-up resistors for the I 2 C lines can be connected to the same supply as the host micro controller, and have a range between 1.7 V and 3.6 V. 1.7 V to 3.6 V R1 R2 Host Micro Controller VEML6040 GND (1) SDA (2) I 2 C bus data SDA 2.5 V to 3.6 V C1 100 nf V DD (4) SCL (3) I 2 C bus clock SCL Fig. 2 - Application Circuit The value of the pull-up resistors should be from 2.2 kω to 4.7 kω. The current consumption of the VEML6040 is typically 200 μa when measurements are being made. In the shut-down mode, which can always be chosen between any measurements (SD = 1), the current consumption goes down to about 800 na. Revision: 03-Apr-18 2 Document Number: 84331

SPECTRAL SENSITIVITY The VEML6040 has peak sensitivities for red, green, and blue at 645 nm, 575 nm, and 460 nm, respectively. The bandwidth (λ 0.5 ) is shown to be ± 45 nm for red and green and about ± 35 nm for blue. 14 000 Average Gain 1 10000 Relative Responsivity (μw/cm 2 ) 1st line 12 000 10 000 8000 6000 4000 2000 Blue Green Red 1000 100 0 10 400 450 500 550 600 650 700 750 800 850 900 950 1000 Wavelength (nm) 2nd line Fig. 3 - Relative Responsivity vs. Wavelength Relative Responsivity (μw/cm 2 ) Normalized Responsivity 1.0 0.9 0.8 0.7 0.6 0.5 0.4 0.3 0.2 0.1 Blue Green Average Gain 1 Red 0 10 400 450 500 550 600 650 700 750 800 850 900 950 1000 Wavelength (nm) 2nd line White 10000 1000 100 Fig. 4 - Normalized Responsivity vs. Wavelength Revision: 03-Apr-18 3 Document Number: 84331

INITIALIZATION AND MEASUREMENT MODES Set-up and initialization of the VEML6040 is done over the shutdown (SD) bit in register #0. Setting SD = 0 enables the device and starts measurements in either auto (self-timed) mode or Active Force mode. Upon setting SD = 0 with the bit AF = 0, the so-called Auto mode is started, and measurements are made continuously until SD is set to 1. With AF = 1, only a single measurement is made, after which the component waits for the next command. This single measurement cycle is triggered by setting TRIG = 1. TABLE 1-1 - COMMAND CODE 00H BITS DESCRIPTION SLAVE ADDRESS: 0x10; REGISTER NAME: CONF; COMMAND CODE: 00H / DATA BYTE LOW X IT X TRIG AF SD BIT 7 BIT 6 BIT 5 BIT 4 BIT 3 BIT 2 BIT 1 BIT 0 0 IT2 IT1 IT0 0 TRIG AF SD DESCRIPTION IT Integration time setting TRIG Proceed one detecting cycle at manual force mode AF Auto / manual force mode SD Chip shutdown setting INTEGRATION TIME SETTINGS The time over which the sensor integrates per measurement cycle can be set via the IT bits in the command register 00H. Command Code IT The value set for IT defines the integration time and is set via bits 4, 5, and 6 in the command register. From 0 : 0 : 0 to 1 : 0 : 1, six different integration times are selectable. The selectable integration times are shown below: TABLE 1-2 - COMMAND CODE 00H REGISTER SETTINGS BITS SETTINGS DESCRIPTION BITS SETTINGS DESCRIPTION BIT 7 Default = 0 BIT 3 Default = 0 BIT 6, 5, 4 IT (2 : 0) (0 : 0 : 0) = 40 ms BIT 2 0 = not trigger (0 : 0 : 1) = 80 ms TRIG 1 = trigger one time detect cycle (0 : 1 : 0) = 160 ms BIT 1 0 = auto mode (0 : 1 : 1) = 320 ms AF 1 = force mode (1 : 0 : 0) = 640 ms BIT 0 0 = enable color sensor (1 : 0 : 1) = 1280 ms SD 1 = disable color sensor The sensitivity of the component changes according to the set integration time. With a set integration time of 80 ms, the lux sensitivity of the green channel is 0.12584 lux/step. Choosing a longer integration time will increase the sensitivity accordingly, with the longest integration time of 1280 ms leading to the highest sensitivity of 0.007865 lux/step. The maximal detectable intensity is also derived from the set integration time. The sensitivity and detectable range for each of the selectable integration times is shown in table 2. TABLE 2 - G CHANNEL RESOLUTION AND MAXIMUM DETECTION RANGE IT SETTINGS IT (2 : 0) INTEGRATION TIME G SENSITIVITY MAX. DETECTABLE LUX (0 : 0 : 0) 40 ms 0.25168 lux/step 16 496 (0 : 0 : 1) 80 ms 0.12584 lux/step 8248 (0 : 1 : 0) 160 ms 0.06292 lux/step 4124 (0 : 1 : 1) 320 ms 0.03146 lux/step 2062 (1 : 0 : 0) 640 ms 0.01573 lux/step 1031 (1 : 0 : 1) 1280 ms 0.007865 lux/step 515.4 Revision: 03-Apr-18 4 Document Number: 84331

READ OUT OF RGB RESULTS The VEML6040 stores the 16-bit measurement results from the red, blue, and green channels in the registers 08H to 0AH. Each 16-bit result consists of a low and high byte, stored in the respective 8-bit registers as shown in the table below: TABLE 3 - READ OUT COMMAND CODE DESCRIPTION COMMAND CODE REGISTER BIT DESCRIPTION 08H_L (08H data byte low) R_DATA_L 7 : 0 00H to FFH, R channel LSB output data 08H_H (08H data byte high) R_DATA_M 7 : 0 00H to FFH, R channel MSB output data 09H_L (09H data byte low) G_DATA_L 7 : 0 00H to FFH, G channel LSB output data 09H_H (09H data byte high) G_DATA_M 7 : 0 00H to FFH, G channel MSB output data 0AH_L (0AH data byte low) B_DATA_L 7 : 0 00H to FFH, B channel LSB output data 0AH_H (0AH data byte high) B_DATA_M 7 : 0 00H to FFH, B channel MSB output data 0BH_L (0BH data byte low) W_DATA_L 7 : 0 00H to FFH, W channel LSB output data 0BH_H (0BH data byte high) W_DATA_M 7 : 0 00H to FFH, W channel MSB output data The results will be updated after each measurement cycle, with each color channel being processed in parallel, so that red, green, and blue content of the light source is all measured at the same time. The amount of time taken for the completion of one measurement cycle depends on the IT setting in the command register. In self-timed mode the VEML6040 measures continuously; the host can poll the result registers. To ensure that the value read is current, an integration waiting period should be observed between readings. In Active Force mode, the VEML6040 executes one measurement cycle once the TRIG bit has been set. The result is updates after the measurement has completed, which remain in the result registers until a new measurement is made. VEML6040 GREEN CHANNEL USED AS AMBIENT LIGHT SENSOR The spectral characteristics of the green channel match well to the so-called Human Eye v(λ) curve (fig. 5). Accordingly, reading the 16-bit green channel result data and multiplying this with the sensitivity factor, for the selected integration time, will lead to an accurate ALS result in lux. The lux sensitivity for every given integration time is shown in table 2. Relative Responsivity 2nd Line (μw/cm 2 ) Normalized Output 1.0 0.9 0.8 0.7 0.6 0.5 0.4 0.3 0.2 0.1 Green Typical VEML6040 Green Channel Response v(λ) 0 10 400 450 500 550 600 650 700 750 800 850 900 950 1000 Wavelength (nm) 2nd line Fig. 5 - Normalized Green Channel Responsivity vs. Wavelength The corresponding ALS lux level is as follows: lux = G_DATA x sensitivity. Example: For a selected integration time of 40 ms, where sensitivity is 0.25168 lux/count multiplied with a 16-bit green data value of 3793 counts (shown in fig. 5), ALS (lux) = 3793 x 0.25168 = 954.62 lux. For a selected integration time of 80 ms, the sensitivity is 0.12584 lux/count. If the 16-bit green data value is 15 024, the ALS (lux) = 15 024 x 0.12584 = 1890.62 lux. Revision: 03-Apr-18 5 Document Number: 84331 10000 1000 100

The output of each channel is seen to be linear over the different integration times. Relative Responsivity 2nd Line (μw/cm 2 ) Normalized Output 900 800 700 600 500 400 300 200 100 0 Red Green Blue 40 80 Average Gain 1 Wavelength (nm) 2nd line 160 Fig. 6 - Linearity of Integration Times 320 10000 1000 100 10 CORRELATED COLOR TEMPERATURE (CCT) Another major application of an RGB sensor is to sense the correlated color temperature (CCT). This information can then be used in a feedback system to control a light source, such as a television backlight or an LED array. This can help to maintain the light sources output with reference to drifts associated with aging and temperature changes. Ambient light conditions in a room may also be monitored, so that backlights can be adjusted to make the screen appear more appealing to the human eye. The procedure for calculating the CCT from the sensors raw RGB channels is explained below. XYZ TRISTIMULUS VALUES AND THE COLOR GAMUT In order to help define a light source to specific common parameters, the International Commission on Illumination (CIE) has defined a color space called the XYZ color space. These XYZ values are called the tristimulus values. The color space calls upon a set of specified spectral sensitivity functions, called the color matching functions, from which the tristimulus values are derived. The tristimulus values are arrived at by integrating over the visible spectrum. The color matching functions and the corresponding tristimulus values are shown below: X = Relative Responsivity 2nd Line (μw/cm 2 ) Tristimulus Values 780 360 Average Gain 1 2.0 10000 1.8 Z 1.6 1.4 1000 1.2 Y X 1.0 0.8 100 0.6 0.4 0.2 0 10 350 400 450 500 550 600 650 700 750 800 Wavelength (nm) 2nd line Fig. 7 - Color Matching Functions 780 X( λ)dλ, Y = Y( λ)dλ, Z = Z( λ)dλ 360 780 360 Revision: 03-Apr-18 6 Document Number: 84331

The chromaticity coordinates (x, y) values can then be derived from the normalized XYZ values. This allows the color gamut (CIE 1931 chromaticity diagram) to be used to arrive at the color of the light and calculate the color temperature, for example, by using the McCamy formula. The process of calculating the CCT from the RGB sensor values is described in the next section. The color gamut and the corresponding equations to arrive at the (x, y) coordinates are shown below. 2nd Line y 0.9 0.8 520 540 0.7 560 0.6 500 580 0.5 T C (K) 4000 3000 6000 0.4 10 000 2500 2000 1500 600 620 0.3 490 100 700 0.2 0.1 480 0 470 460 380 10 0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 x Fig. 8 - The CIE1931 (x, y) Chromaticity Space, also Showing the Chromaticities of Black-Body Light Sources of Various Temperatures (Planckian Locus), and Lines of Constant Correlated Color Temperature Y y = ------------------------ X + Y + Z X x = ------------------------ X + Y + Z When converting between the XYZ color space and the xyy color space, the Y value (illuminance) is simply kept the same: Y = Y Revision: 03-Apr-18 7 Document Number: 84331

USING THE VEML6040 TO CALCULATE THE CCT (McCAMY FORMULA) In order to calculate CCT values from the RGB values (counts) that are read by the VEML6040, the following steps can be taken: RGB sensor values (counts) Correlation coefficients (mapping matrix) XYZ xyy McCamy formula CCT ( K) As indicated by the first step, a so-called mapping matrix is required to convert the RGB values to XYZ values. The coefficients in this matrix map the RGB sensor values to the defined color matching functions, to then accurately arrive at the XYZ tristimulus values. Once the correlation coefficients of the mapping matrix are found, the following equation can be used to arrive at the XYZ values: X Y Z = M 1 M 2 M 3 M 4 M 5 M 6 M 7 M 8 M 9 x R G B M 1 M 2 M 3 R Where M 4 M 5 M 6 is the mapping matrix and G are the values read from the sensor. M 7 M 8 M 9 B Revision: 03-Apr-18 8 Document Number: 84331

CALCULATING THE MAPPING MATRIX In order to get accurate results for the calculated XYZ values, accurate correlation coefficients need to be derived to fill the mapping matrix. This is done through a calibration procedure where values read from the sensor are mapped to xyy values measured by a reference chroma meter or lux meter (e.g. Minolta CL-200). This is done over a range of different light sources in order to allow for a broad transformation. The light sources chosen for the calibration should be close enough to the desirable limits that are to be measured, as well as a light source that is very close to the conditions the application will be exposed to. Accurate results can be found by using at least three light sources. Typical choices here are: A light or 60 W incandescent - this light source has high IR content 6500 K compact fluorescent for cool color temperature 2700 K compact fluorescent for warm color temperature The measurements taken during the calibration process are then used to populate the matrices of the following equation, to then arrive at the correlation coefficients matrix: X 60 W X 2700 CF X 6700 CF R 60 W R 2700 CF R 6700 CF 1 Corr_Coeff. = Y 60 W Y 2700 CF Y 6500 CF Z 60 W Z 2700 CF Z 6500 CF x G 60 W G 2700 CF G 6500 CF B 60 W B 2700 CF B 6500 CF Values from chroma meter Counts from VEML6040 The calibration procedure is conducted as follows: Place the sensor and reference chroma meter side by side, so that they are exposed to the same light conditions throughout the calibration Warm up illuminant A light source to a stable brightness and color temperature condition. Use the chroma meter to measure the Y, x, and y value of the illuminant A light source and use the VEML6040 to make a measurement, reading out the red, green, and blue channel Use these values to populate the first column in both matrices Warm up the 6500 K light source to a stable brightness and color temperature condition. Again take note of the Y, x, and y values from the chroma meter and the red, green, and blue results from the VEML6040 Use these values to populate the second column in both matrices Warm up the 2700 K light source to a stable brightness and color temperature. Again take note of the Y, x, and y values from the chroma meter and the red, green, and blue results from the VEML6040 Use these values to populate the third column in both matrices Now that the matrices are complete, the equation can be solved and the correlation coefficient can be found. When the sensor is exposed to just typical open-air values, the correlation coefficients were found to be as follows: Corr_Coeff. = This can then be plugged into the XYZ equation to give the following: X Y Z = 0.048403 0.183633-0.253589 0.022916 0.176388-0.183205-0.077436 0.124541 0.032081 0.048403 0.183633-0.253589 0.022916 0.176388-0.183205-0.077436 0.124541 0.032081 Revision: 03-Apr-18 9 Document Number: 84331 x R G B

The same calibration procedure was followed with different light sources, giving the following coefficients: A light or 60 W incandescent - this light source has high IR content 2700 K compact fluorescent for warm color temperature 5000 K white LED for cool color temperature Corr_Coeff. = -0.023249 0.291014-0.364880-0.042799 0.272148-0.279591-0.155901 0.251534-0.076240 CALCULATING THE X, Y VALUES USING THE McCAMY FORMULA TO CALCULATE CCT Once the XYZ have been found, these can be used to derive the (x, y) coordinates, which then denote a specific color, as depicted on the axes CIE color gamut on page 7. For this the following equations can be used: x = X ( X+ Y + Z) y = Y ( X+ Y+ Z) To give a sample calculation, the following RGB values will be used, which were measured with the VEML6040 sensor under the standard room lighting in our lab: R = 5132 counts G = 4279 counts B = 2353 counts Using the standard correlation matrix stated above and solving for X, Y and Z gives the following X Y Z = 0.048403 0.183633 0.253589 0.022916 0.176388 0.183205 0.077436 0.124541 0.032081 5132 4729 2353 X Y Z = 520.11 520.66 267.04 Having found the XYZ values, the (x, y) coordinates can be calculated using the equations above: x = 520.11/(520.11 + 520.66 + 267.04) = 0.3977 y = 520.66/(520.11 + 520.66 + 267.04) = 0.3981 Plotting these coordinates on the CIE gamut chart shows that it is a white light source that is close to 4000 Kelvin, which is what we would have expected for our lab light lighting: Revision: 03-Apr-18 10 Document Number: 84331

2nd Line y 0.5 0.4 0.3 490 T C (K) 10 000 6000 4000 3000 2000 1500 2500 600 620 700 100 0.2 0.1 480 470 0 460 10 380 0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 x The (x, y) coordinates can now be used to calculate the correlated color temperature (CCT). This can be done via the McCamy formula which is stated as follows : CCT = 449.0 n 3 + 3525.0 n 2 + 6823.3 n + 5520.33 Where: n = (x - Xe)/(Ye - y) Xe and Ye are constants: Xe = 0.3320 Ye = 0.1858 For our test this gives the following result for n: n = (0.3977-0.3320)/(0.1858-0.3981) = -0.3094 This can now be inserted into the McCamy formula to calculate the CCT value: CCT = 449.0 (-0.3094) 3 + 3525.0 (-0.3094) 2 + 6823.3 (-0.3094) + 5520.33 = 3733 K Revision: 03-Apr-18 11 Document Number: 84331

USING THE VEML6040 TO CALCULATE THE CCT (EMPIRICAL APPROACH) A less accurate but less computationally intensive method of calculating CCT can be found using an empirical approach. This is based on the following estimation, which was arrived at by mapping CCT values calculated from the sensor results to CCT values measured by a chroma meter: CCT = 4278.6 x CCTi -1.2455 Where: CCTi = CCTi_Raw + offset CCTi_Raw = R ------------- - B G Offset (open air) = 0.5 In open-air conditions the offset = 0.5. Depending on the optical conditions (e.g. cover glass) this offset may change. VEML6040 SENSOR BOARD AND DEMO SOFTWARE With the help of the VEML6040 sensor board and the accompanying demo software, it is easy to test the RGB sensor. The six possible integration times are selectable over the GUI (1), as shown in fig. 9. As shown in fig. 10, the output results of the sensor are strictly linear over the integration times. A factor of 2 in the integration time leads to a factor of 2 in the output data counts, shown on the graph and the color results section (3). Depending on the chosen integration time, the measurement rate will be affected accordingly (2). Fig. 9 - Linearity of the Integration Times Revision: 03-Apr-18 12 Document Number: 84331

MECHANICAL CONSIDERATIONS AND WINDOW CALCULATION FOR THE VEML6040 For optimal performance, the window size should be large enough to maximize the light irradiating the sensor. In calculating the window size, the only dimensions that the design engineer needs to consider are the distance from the top surface of the sensor to the outside surface of the window and the size of the window. These dimensions will determine the size of the detection zone. First, the center of the sensor and center of the window should be aligned. The VEML6040 has an angle of half sensitivity of about ± 55, as shown in the figure below. Axis Title 0 20 10000 2nd line S Light rel - Relative Transmission Sensitivity (%) 1.0 0.9 0.8 0.7 0.6 1000 40 100 60 ϕ - Angular 1st Displacement line 2nd line 0.5 0.4 0.3 0.2 0.1 0 λ - Wavelength (nm) 2nd line 80 10 Fig. 10 - Relative Radiant Sensitivity vs. Angular Displacement Fig. 11 - Angle of Half Sensitivity: Cone Fig. 12 - Window Above Sensitive Area Remark: This wide angle and the placement of the sensor as close as possible to the cover is needed to show good responsivity. Revision: 03-Apr-18 13 Document Number: 84331

The size of the window is simply calculated according to triangular rules. The dimensions of the device, as well as the sensitive area, is shown within the datasheet. Best results are achieved with a known distance below the windows, upper surface and the specified angle below the given window diameter (w). Dimensions (L x W x H in mm): 2.0 x 1.25 x 1.0 w 0.5 x. D d α tan 55 = 1.43 = x/d x = 1.43 x d 1.0 Here in drawing, α = 55 Dimensions in mm Fig. 13 - Window Area for an Opening Angle of ± 55 The calculation is then: tan α = x/d with α = 55 and tan 55 1.43 = x/d x = 1.43 x d Then the total width is w = 0.5 mm + 2 x x. d = 0.5 mm x = 0.72 mm w = 0.5 mm + 1.44 mm = 1.94 mm d = 1.0 mm x = 1.43 mm w = 0.5 mm + 2.86 mm = 3.36 mm d = 1.5 mm x = 2.15 mm w = 0.5 mm + 4.30 mm = 4.80 mm d = 2.0 mm x = 2.86 mm w = 0.5 mm + 5.72 mm = 6.22 mm d = 2.5 mm x = 3.58 mm w = 0.5 mm + 7.16 mm = 7.66 mm d = 3.0 mm x = 4.29 mm w = 0.5 mm + 8.58 mm = 9.08 mm Revision: 03-Apr-18 14 Document Number: 84331

A smaller window will also be sufficient, although it will reduce the total sensitivity of the sensor. Dimensions (L x W x H in mm): 2.0 x 1.25 x 1.0 w 0.5 x. D d α tan 40 = 0.84 = x/d x = 0.84 x d 1.0 Here in drawing, α = 40 Dimensions in mm Fig. 14 - Window Area for an Opening Angle of ± 40 The calculation is then: tan α = x/d with α = 40 and tan 40 0.84 = x/d x = 0.84 x d Then the total width is w = 0.5 mm + 2 x x. d = 0.5 mm x = 0.42 mm w = 0.5 mm + 0.84 mm = 1.34 mm d = 1.0 mm x = 0.84 mm w = 0.5 mm + 1.68 mm = 2.18 mm d = 1.5 mm x = 1.28 mm w = 0.5 mm + 2.56 mm = 3.06 mm d = 2.0 mm x = 1.68 mm w = 0.5 mm + 3.36 mm = 3.86 mm d = 2.5 mm x = 2.10 mm w = 0.5 mm + 4.20 mm = 4.70 mm d = 3.0 mm x = 2.52 mm w = 0.5 mm + 5.04 mm = 5.54 mm Revision: 03-Apr-18 15 Document Number: 84331

VEML6040 REFERENCE CODE //----------------------------------------------------------------------------- // Global definition for VEML6040 registers //----------------------------------------------------------------------------- #define VEML6040_SLAVE_ADD 0x10 #define CONF 0x00 #define R_DATA 0x08 #define G_DATA 0x09 #define B_ DATA 0x0A #define W_DATA 0x0B //---------------------------------------------------------------------------- // C main function //---------------------------------------------------------------------------- void main () { WORD VEML6040_DATA_R; WORD VEML6040_DATA_G; WORD VEML6040_DATA_B; WORD VEML6040_DATA_W; //-------------------------------------------------------------------------------------------------- // Write Initial Command to VEML6040 // Command Code: 0x00, // Low Byte 20 (0010:0001) // IT = 160 ms // TRIG = No trigger // AF = Auto mode // SD = Disable // // High Byte 00 (0000:0000) // Default = 00 // -------------------------------------------------------------------------------------------------- // Shut Down Color Sensor WriteBytes(VEML6040_SLAVE_ADD, CONF, 0x21, 0x00, 2); // Enable Color Sensor WriteBytes(VEML6040_SLAVE_ADD, CONF, 0x20, 0x00, 2); // Read VEML6040 Data Loop while (1) { Delay(200); // Read VEML6040 R Channel Data VEML6040_DATA_R = read_veml6040_data(r_data); // Read VEML6040 G Channel Data VEML6040_DATA_G = read_veml6040_data(g_data); // Read VEML6040 B Channel Data VEML6040_DATA_B = read_veml6040_data(b_data); // Read VEML6040 W Channel Data VEML6040_DATA_W = read_veml6040_data(w_data); } Revision: 03-Apr-18 16 Document Number: 84331

VEML6040 REFERENCE CODE (continued) //----------------------------------------------------------------------------- // FUNCTION NAME: read_veml6040_data // // DESCRIPTION: //----------------------------------------------------------------------------- WORD read_veml6040_data(word channel) { BYTE buff[2]; BYTE lsb, msb; WORD channel_data; ReadBytes(VEML6040_SLAVE_ADD, channel, buff, 2); lsb = buff[0]; msb = buff[1]; channel_data = ((WORD)msb << 8) (WORD)lsb; return channel_data; } VEML6040 SENSOR BOARD AND DEMO SOFTWARE The small blue VEML6040 sensor board is compatible with the SensorXplorer TM. Please also see: www.vishay.com/optoelectronic/sensorxplorer. Revision: 03-Apr-18 17 Document Number: 84331