SBOSA84 December 2022 OPT4048
PRODUCTION DATA
The OPT4048 device measures light on 4 independent channels and updates output registers with proportional ADC codes. Updated are based on the mode of operation as described in Section 8.3.4.1. If readout of output registers is performed before a successful completion of a measurement, the previous measurement is what would be read out. Output of the each channel is represented by two parts (i) 4 bits of EXPONENT_CHx and (ii) 20 bits of MANTISSA_CHx. This arrangement of binary logarithmic full-scale range with linear representation with in a range, helps in covering a large dynamic range of measurements. MANTISSA here represents the linear ADC codes proportional to the measured light within a given full-scale range and the EXPONENT_CHx represents the current-full scale range selected. The selected range can be automatically determined by the auto-range selection logic or manually selected as per Table 8-3.
Lux level can be determined using the following equations:
or
where RESULT_MSB_CHx, RESULT_LSB_CHx and EXPONENT_CHx are registers part of the output register for each channel
RESULT_MSB_CHx register carries the most significant 12 bits of the MANTISSA_CHx and RESULT_LSB_CHx register carries the least significant 8 bits of the MANTISSA_CHx. MANTISSA_CHx is then computed using the above equations to get the 20 bit number. EXPONENT_CHx is directly read from the register which is 4 bits.
Once the EXPONENT_CHx and MANTISSA_CHx portions are calculated the linearized ADC_CODES_CHx is calculated using the following equation:
or
With maximum value for register EXPONENT_CHx being 8 ADC_CODES is effectively a 28 bit number. The semi-logarithmic numbers have been converted to a linear ADC_CODES_CHx representation making simple to convert to lux and CIE XY color coordinates
Conversion of the raw ADC codes to the CIE colorimetric X, Y and lux are given by the equation below
The conversion matrix can be customized based on target application and details for the same can be found in Section 9.2.4.
As listed in the Equation 16 lux values can be obtained along with the color information as part of the matrix. However, isolating the lux calculations from the matrix can be useful. In that case, the matrix can be simplified to remove lux calculations as shown below
Lux can be simply calculated using the following equation
Threshold result registers THRESHOLD_H_RESULT and THRESHOLD_H_RESULT are 12 bit, while threshold exponent registers THRESHOLD_H_EXPONENT and THRESHOLD_L_EXPONENT are 4 bits. Since threshold is compared at linear ADC_CODES_CHx, the threshold registers are padded with zeros internally as shown to compare with the ADC_CODES_CHx
or
and
or
Threshold are then compared as shown to detect Fault events.
and
Based on the FAULT_COUNT register setting, with consecutive Fault High or Fault Low events, respective FLAG_H and FLAG_L registers are set. Clearly understanding the difference between THRESHOLD_H_EXPONENT, THRESHOLD_H_RESULT, THRESHOLD_L_EXPONENT, THRESHOLD_L_RESULT and the output registers is important to be able to set appropriate threshold based on application needs. More details can be found in Section 8.3.4.2.