This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

OPT4003-Q1: Datasheet errors or user errors?

Part Number: OPT4003-Q1
Other Parts Discussed in Thread: OPT4003

Hi,

I want to use the OPT4003 light sensor in our embedded linux device.

I bought the EVM USB stick, tried it on Windows and now use the OPT4003 chip alone in our hardware device.

I wrote a driver in Python, but here I have 2 problems with interpretating the real data compared to the datasheet SBASA69A from Dec 2023.

1) The device ID DIDH is always 0x221 instead of 0x121 as described in the datasheet.

2) I want to use the conversion ready flag in register 0xC bit 2.

     But it never changes, what is changing is bit 10 but this bit should always be 0.

All measurements looks good compared to a measurements device and or old sensor.

Any idea?

Thanks and BR,

Erich

  • Hey Erich,

    Can you share complete register dump from the device? 

    Jalen

  • Hi Jalen,
     
    her a dump while running (rainy homeoffice day with no lamp on):
     
    Lux result= 70
    IR result= 35
    ==================
    Reg. 0x0: 0xa60
    Reg. 0x1: 0x4f00
    Reg. 0x2: 0x260
    Reg. 0x3: 0x4000
    Reg. 0x4: 0xa60
    Reg. 0x5: 0x4f00
    Reg. 0x6: 0x460
    Reg. 0x7: 0x4000
    Reg. 0x8: 0x0
    Reg. 0x9: 0xffbf
    Reg. 0xa: 0xb118
    Reg. 0xc: 0x400
    Reg. 0x11: 0x2102
    ==================
     
    Even if I have endianess error, the Device ID would not be correct.
    I use smbus2 function read_word_data to read the 16 bit values.
    Thanks, Erich
  • Hi Erich,

    I have confirmed using the EVM that register 0x11 returns 0x221. This seems to be a typo in the datasheet, thank you for bringing it to our attention.

    Since you are reading 0x2102 I believe this is an endianness error, which would also account for you reading 0x400 from register 0xC. I was able to confirm that register 0xC returns 0x4, which correctly corresponds with the bit 2 conversion ready flag.

    Best regards,

    Nicole

  • Hi Nicole,

    thanks for the answer.

    I'm busy in finalizing a schematic for our customer, I will come back to this topic in 1-2 weeks.

    BR Erich