SBOSA93C May 2023 – June 2024 OPT4001-Q1
PRODUCTION DATA
Refer to the PDF data sheet for device specific package drawings
The OPT4001-Q1 measures light and updates output registers with proportional ADC codes. The output of the device is represented by two parts: by four EXPONENT register bits and by 20 MANTISSA bits. This arrangement of binary logarithmic full-scale ranges with linear representation in a range helps cover a large dynamic range of measurements. MANTISSA represents the linear ADC codes proportional to the measured light within a given full-scale range and the EXPONENT bits represent the current full-scale range selected. The selected range can either be automatically determined by the auto-range selection logic or manually selected as per Table 6-3.
The lux level can be determined using the following equations. First, use Equation 1 or Equation 2 to calculate the MANTISSA. Next, use Equation 3 or Equation 4 to calculate the ADC_CODES. Finally, use Equation 6 to calculate the lux.
or
where:
The RESULT_MSB register carries the most significant 12 bits of the MANTISSA, and the RESULT_LSB register carries the least significant eight bits of the MANTISSA. Use the previous equations to get the 20-bit MANTISSA number. The four EXPONENT bits are directly read from the register.
After the EXPONENT and MANTISSA portions are calculated, use Equation 3 or Equation 4 to calculate the linearized ADC_CODES.
or
The maximum value for register E is 8, thus the ADC_CODES is effectively a 28-bit number. As shown in Equation 6, the semi-logarithmic numbers are converted to a linear ADC_CODES representation, which is simple to convert to lux.
The MANTISSA and ADC_CODES are large numbers with 20 and 28 bits required to represent them. While developing firmware or software for these calculations, allocating appropriate data types to prevent data overflow is important. Some explicit typecasting to a larger data type is recommended, such as 32-bit representation before a left-shift operation (<<).