Application Note 1910 Enhancing RGB Sensitivity and Conversion Time Introduction ISL29125 TOP VIEW The RGB sensor is a low power, high sensitivity, RED, GREEN, and BLUE color light sensor (RGB) with an I2C (SMBus compatible) interface. Its state of the-art photodiode array provides an accurate RGB spectral response and excellent light source to light source variation (LS2LS). The sensor is designed to reject IR in light sources allowing the device to operate in environments from sunlight to dark rooms. The integrating ADC rejects 50Hz and 60Hz flicker caused by artificial light sources. Selectable ranges allow the user to optimize sensitivity suitable for the specific application. The sensor has 2 sensitivity ranges such as range 0 from 5.7 mlux to 375 lux and Range 1 from 0.125 lux to 10,000 lux. However, Intersil has options which can expose even higher sensitivity by simple setting in custom registers. VDD 1 6 SCL NC 2 5 INT GND 3 4 SDA ISL29124 TOP VIEW GND 1 4 VDD SDA 2 3 SCL Related Literature ISL29125 datasheet TABLE 1. EXPOSE THE CUSTOM REGISTER REGISTER ADDRESS NAME REGISTER BITS DEC HEX B7 B6 B5 B4 B3 B2 B1 B0 Device ID 0 0x00 0 1 1 1 1 1 0 1 7Dh RO CUSTOM MODE ACCESS 0 0x00 X X X X X X X X N/A WO REGISTER 0x02 2 0x02 00h RW STATUS 8 0x08 TMEN REVEN See Datasheet for more detail 04h RO CUSTOM MODE 1 25 0x19 RESERVED SENS_EN RESERVED 00h RW CUSTOM MODE 2 26 0x1A 00h RW CUSTOM MODE 3 27 0x1B 00h RW CUSTOM MODE 4 28 0x1C 00h RW CUSTOM MODE 5 29 0x1D Set by Intersil RO May 6, 2014 AN1910.1 See Datasheet for more detail RESERVED FAST RESERVED Gain Setting RESERVED SENSX[1] Gain Setting 1 SENSX[0] DEFAULT ACCESS CAUTION: These devices are sensitive to electrostatic discharge; follow proper IC Handling Procedures. 1-888-INTERSIL or 1-888-468-3774 | Copyright Intersil Americas LLC 2014. All Rights Reserved Intersil (and design) is a trademark owned by Intersil Corporation or one of its subsidiaries. All other trademarks mentioned are the property of their respective owners. Application Note 1910 Register 0x00 Register 0x00 performs two functions. If Reg 0x00 is in READ ONLY mode then it will be a Device ID. When the register is in the WRITE ONLY mode it will open up access to CUSTOM MODE registers. To access into a CUSTOM MODE, write 89h then C9h into Register 0x00. To reset all Registers to default and/or all state machine by writing 46h into Reg 0x00. TABLE 2. DEVICE ID/ CUSTOM ACCESS REGISTER ADDRESS NAME REGISTER BITS REGISTER BITS DEC HEX B7 B6 B5 B4 B3 B2 B1 B0 DEFAULT ACCESS Device ID 0 0x00 0 1 1 1 1 1 0 1 7Dh RO CUSTOM MODE ACCESS 0 0x00 X X X X X X X X N/A WO Register 0x02 See datasheet for more detail on how to set IR compensation. Write 00h to Reg 0x02 then Range 0 = 250 lux and range 1 = 6750 lux. Write BFh to Reg 0x02 then Range 0 = 375 lux and Range 1 = 10,000 lux. Register 0x08 TABLE 3. STATUS REGISTER (REG0x08) REGISTER ADDRESS REGISTER BITS NAME DEC HEX B7 B6 B5 STATUS 8 0x08 TMEN REVEN RGBCF[1] B4 B3 B2 RGBCF[0] RESERVED BOUTF B1 B0 DEFAULT ACCESS CONVENF RGBTHF 0x04 RO RGBTHF [B0] BOUTF [B2] This is the status bit of the interrupt. The bit is set to logic high when the interrupt thresholds have been triggered (out of threshold window), and logic low when not yet triggered. Once activated and the interrupt is triggered, the INT pin goes low and the interrupt status bit goes high until the status bit is polled through the I2C read command. Both the INT output and the interrupt status bit are automatically cleared at the end of the 8-bit (00h) command register transfer. Bit2 on register address 0x08 is a status bit for the brownout condition (BOUT). The default value of this bit is HIGH, BOUT = 1, during the initial power-up. This indicates the device may possibly have gone through a brownout condition. Therefore, the status bit should be reset to LOW, BOUT = 0, by an I2C write command during the initial configuration of the device. The default register value is 0x04 at power-on. TABLE 4. INTERRUPT FLAG TABLE 6. BROWNOUT FLAG B0 OPERATION B2 OPERATION 0 Interrupt is cleared or not triggered yet 0 No Brownout 1 Interrupt is triggered 1 Power-down or Brownout occurred RGBCF [B5:B4] CONVENF [B1] This is the status bit of conversion. The bit is set to logic high when the conversion have been completed, and logic low when the conversion is not completed or not converted. TABLE 5. CONVERSION FLAG B1 OPERATION B[5:4] are flag bits to display7. TABLE 7. CONVERSION FLAG B5:4 RGB UNDER CONVERSION 00 No Operation 0 Still convert or cleared 01 GREEN 1 Conversion completed 10 RED 11 BLUE Submit Document Feedback 2 a AN1910.1 May 6, 2014 Application Note 1910 REVEN [B6] TMEN[B7] REVEN is Bit 6 of the status register. The bit is asserted to logic 1 when writing 89h to reg 0x00. By default this bit is logic low. TMEN is Bit 7 of the status bit of Custom Mode condition. The bit is asserted to logic 1 when writing C9h to reg 0x00 and REVEN is at logic 1. By default it is at logic low. TABLE 8. TABLE 9. B6 OPERATION B7 0 Logic low or not writing 89h to Reg 0x00 1 Writing 89h to Reg 0x00 OPERATION 0 Logic low or not writing C9h to Reg 0x00 and REVEN = 0 1 Writing C9h to reg 0x00 and REVEN = 1 B7 and B6 are indicated whether the RGB sensor is in the custom mode or not. Register 0x19 SENS_EN is Bit 6 of CUSTOM MODE 1. In order to enable the CUSTOM MODE 4, SENS_EN should be asserted to a logic high. By default, it is a logic low or not enable CUSTOM MODE 4. TABLE 10. B6 OPERATION 0 Not Enable 1 Access to CUSTOM MODE 4 TABLE 11. CUSTOM MODE 1 (REG 0x19) REGISTER ADDRESS REGISTER BITS NAME DEC HEX CUSTOM MODE 1 25 0x19 B7 B6 B5 B4 RESERVED SENS_EN B3 B2 B1 B0 RESERVED DEFAULT ACCESS 00h RW Register 0x1A TABLE 12. CUSTOM MODE 2 (REG 0x1A) REGISTER ADDRESS REGISTER BITS NAME DEC HEX CUSTOM MODE 2 26 0x1A B7 B6 B5 RESERVED B4 B3 B2 FAST B1 B0 RESERVED DEFAULT ACCESS 00h RW FAST [2] Bit 2 in Reg 0x1A is asserted to a logic high then ADC clock frequency is 4x faster than normal mode. By default FAST bit is set to low for normal mode. TABLE 13. B2 OPERATION 0 Normal conversion time 1 4x faster than normal conversion time Submit Document Feedback 3 AN1910.1 May 6, 2014 Application Note 1910 Register 0x1B and 0x1D TABLE 14. CUSTOM MODES 3 AND 5 (REG 0x1B AND REG 0x1D) REGISTER ADDRESS REGISTER BITS NAME DEC HEX B7 B6 B5 B4 B3 B2 B1 B0 DEFAULT ACCESS CUSTOM MODE 3 27 0x1B GAIN SETTING 00h RW CUSTOM MODE 5 29 0x1D GAIN SETTING Set by Intersil RO Both CUSTOM MODE 3 and CUSTOM MODE 5 are set by Intersil in order to have a better part-to-part variation performance. Register 0x1C TABLE 15. CUSTOM MODE 4 (REG 0x1C) REGISTER ADDRESS REGISTER BITS NAME DEC HEX B7 TEST MODE 4 28 0x1C B6 B5 B4 B3 B2 RESERVED SENX[1:0] The full-scale range can be extended to be a high sensitivity at Bit[1:0] of reg0x1C. The range determines the ADC resolution (12 bits, and 16 bits). Each selectable range at SENX has a maximum allowable lux value. More information will be discussed in the following section. TABLE 16. B1:0 HIGH SENSITIVITY RANGES 00 1X 01 1.5X 10 2X 11 2.5X B0 DEFAULT ACCESS SENX[1] SENX[0] 00h RW 8. To get out of CUSTOM MODE without resetting the device, write any hex values other than 89h and C9 to Reg 0x00. OR 9. To get out of CUSTOM MODE and reset the device, write 46h to Reg 0x00. This will reset all registers to their default states. TABLE 17. SENSITIVITY RANGES Register 0x02 Write 00h to Register 0x02 Write BFh to Register 0x02 Range 0 = 250 lux, Range 1 = 6750 lux Range 0 = 375 lux, Range 1 = 10,000 lux Register 0x1C [1:0] SENX[1:0] High Sensitivity Range (Lux) SENX[1:0] High Sensitivity Range (Lux) RANGE 0 00 250 00 375 Application Information In order to expose high sensitivity ranges and speed up its conversion time, the sensor needs to be in the custom mode, instructed in the following steps: B1 RANGE 1 1. Write 89h to Reg 0x00 01 165 01 250 10 125 10 187.5 11 100 11 150 00 6750 00 10,000 01 6750 01 10,000 10 6750 10 10,000 11 6750 11 10,000 2. Write C9h to Reg 0x00 to enter CUSTOM mode. If user want to check flag status at bit [7] and bit [6] of Reg0x08 should be asserted to logic. If they are asserted logic 1 then the sensor is in the CUSTOM mode. Reg0x01 [4] (Bit) 16-bit ADC (Bit[4] = 0) 12-bit ADC (Bit[4] = 1) 3. Read reg 0x1D then store that value in a temp variable (software GUI/driver). Reg0x1A [2] (FAST bit) FAST= 0 FAST = 1 FAST =0 FAST = 1 4. Write 40h to Reg 0x19 to enable high sensitivity ranges (Reg 0x1C/ CUSTOM MODE 4). Conversion time (ms) 100 25 6.25 1.56 5. Write temp variable at step 2 to reg 0x1B. Number of Clocks 6. Table 17 explains multiple higher sensitivity options the sensor can be: 7. Table 18 explains how the sensor can be sped up in the conversion time for 16-bit and 12-bit ADC. Submit Document Feedback 4 TABLE 18. SPEED-UP CONVERSION TIME ADC clock Period (µs) 65536 1.52 4096 0.38 1.52 0.38 AN1910.1 May 6, 2014 Application Note 1910 Block Diagram for High Sensitivity Control Logic Initialization (1 time only) ROM 0x1D:Gain Setting Set CUSTOM Mode Enable 0x1B:CUSTOM MODE 3 0x19:(6):Enable High Sensitivity W:0x00:0x89 W:0x00:0xC9 Read Value R:0x1D MEM Enable High Sensitivity W:0x19:0x40 Write Value W:0x1B:MEM Exit CUSTOM Mode W:0x00:0x00 Run Time R W:0x00:0x00 S W:0x00:0xC9 W:0x00:0x89 R Q CUSTOM MODE Enable Set CUSTOM Mode Enable W:0x00:0x89 W:0x00:0xC9 Set High Sensitivity W:0x1C:0x03*ON Exit CUSTOM Mode W:0x00:0x00 Q S FIGURE 2. INITIALIZATION AND RUNNING TIME FIGURE 1. HIGH SENSITIVITY CONTROL LOGIC DIAGRAM Intersil Corporation reserves the right to make changes in circuit design, software and/or specifications at any time without notice. Accordingly, the reader is cautioned to verify that the document is current before proceeding. For information regarding Intersil Corporation and its products, see www.intersil.com Submit Document Feedback 5 AN1910.1 May 6, 2014