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.

OPT3001: The data abnormal for OPT3001

Part Number: OPT3001

Tool/software:

Hi, 

After storing the sensor at a high temperature of 85 ℃ for 60 hours, it was found that I2C communication was normal but the reading of light intensity failed.

Even after 24 hours of storage at room temperature, the light intensity could not be read normally;

At this time, when reading the data register 0x00 of OP3001, it was found to be 0; Then use i2c tools to read and write OPT3001 registers for debugging, dump all registers,

and find that IIC communication is basically normal, and the value of register 0x00 is 0;

Attempting to manually write configuration, after modifying the 0x01 register, it was found that the value of the data register 0x00 was not 0. At this time,

using the original program to read, sensor data can be read normally Read and write the register again, it works normally together;

The schematic and register print refer to below:

出现异常前,使用黑色电工胶带包裹传感器,但能读到数据。
# opt3001_test

 device = /dev/i2c-2
 interval=1000
 count=86400
[INFO] Found TI OPT3001

[DEBUG] conversion time:100000us

[0.6s]1/86400:opt3001 read failed
[1.7s]2/86400:als read: 18.410000lux
[2.8s]3/86400:als read: 18.639999lux
[3.8s]4/86400:als read: 18.639999lux
[4.9s]5/86400:als read: 19.609999lux
[5.10s]6/86400:als read: 19.689999lux
[6.10s]7/86400:als read: 19.689999lux
[7.11s]8/86400:als read: 19.850000lux
[8.12s]9/86400:als read: 19.689999lux
[9.12s]10/86400:als read: 18.889999lux
[10.13s]11/86400:als read: 18.889999lux
[11.13s]12/86400:als read: 19.129999lux
[12.14s]13/86400:als read: 18.730000lux
[13.14s]14/86400:als read: 14.380000lux








出现异常后,使用黑色电工胶带包裹传感器,能读到ID,读不到数据。
# opt3001_test

 device = /dev/i2c-2
 interval=1000
 count=10
[INFO] Found TI OPT3001

[DEBUG] conversion time:100000us

[0.1s]1/10:opt3001 read failed
[1.2s]2/10:opt3001 read failed
[2.2s]3/10:opt3001 read failed
[3.3s]4/10:opt3001 read failed
[4.3s]5/10:opt3001 read failed
[5.4s]6/10:opt3001 read failed
[6.4s]7/10:opt3001 read failed
[7.5s]8/10:opt3001 read failed

打印“opt3001 read failed”的原因是,读到数据寄存器0x00的值为0,此为异常情况。



在出现异常时,使用i2c-tools读写OPT3001的寄存器进行调试,dump出全部寄存器,发现寄存器0x00的值为0
# i2cdump -y 2 0x45 w
     0,8  1,9  2,a  3,b  4,c  5,d  6,e  7,f
00: 0000 90c4 0000 ffbf 0078 0280 0000 0000
08: 0000 XXXX 0000 0000 0000 0000 4954 0130
10: 0000 10c4 0000 ffbf 0078 0280 0000 0000
18: 0000 XXXX 0000 0000 0000 0000 4954 0130
20: 0000 10c4 0000 ffbf 0078 0280 0000 0000
28: 0000 XXXX 0000 0000 0000 0000 4954 0130
30: 0000 10c4 0000 ffbf 0078 0280 0000 0000
38: 0000 XXXX 0000 0000 0000 0000 4954 0130
40: 0000 10c4 0000 ffbf 0078 0280 0000 0000
48: 0000 XXXX 0000 0000 0000 0000 4954 0130
50: 0000 10c4 0000 ffbf 0078 0280 0000 0000
58: 0000 XXXX 0000 0000 0000 0000 4954 0130
60: 0000 10c4 0000 ffbf 0078 0280 0000 0000
68: 0000 XXXX 0000 0000 0000 0000 4954 0130
70: 0000 10c4 0000 ffbf 0078 0280 0000 0000
78: 0000 XXXX 0000 0000 0000 0000 4954 0130
80: 0000 10c4 0000 ffbf 0078 0280 0000 0000
88: 0000 XXXX 0000 0000 0000 0000 4954 0130
90: 0000 90c4 0000 ffbf 0078 0280 0000 0000
98: 0000 XXXX 0000 0000 0000 0000 4954 0130
a0: 0000 10c4 0000 ffbf 0078 0280 0000 0000
a8: 0000 XXXX 0000 0000 0000 0000 4954 0130
b0: 0000 10c4 0000 ffbf 0078 0280 0000 0000
b8: 0000 XXXX 0000 0000 0000 0000 4954 0130
c0: 0000 10c4 0000 ffbf 0078 0280 0000 0000
c8: 0000 XXXX 0000 0000 0000 0000 4954 0130
d0: 0000 10c4 0000 ffbf 0078 0280 0000 0000
d8: 0000 XXXX 0000 0000 0000 0000 4954 0130
e0: 0000 10c4 0000 ffbf 0078 0280 0000 0000
e8: 0000 XXXX 0000 0000 0000 0000 4954 0130
f0: 0000 10c4 0000 ffbf 0078 0280 0000 0000
f8: 0000 XXXX 0000 0000 0000 0000 4954 0130
# i2cget -y 2 0x45 0x7E w
0x4954
#
#
# i2cget -y 2 0x45 0x7F w
0x0130
#
#
# i2cget -y 2 0x45 0x01 w
0x90c4
#


此时发现基本通信正常,尝试手动写入配置,修改0x01寄存器后,发现数据寄存器0x00的值不为0,取掉包裹传感器的黑色胶带,此时能读到数据。
# i2cset -y 2 0x45 0x01 0x10CE w
#
# i2cget -y 2 0x45 0x01 w
0x90ce
#
# i2cget -y 2 0x45 0x00 w
0x0400
# i2cget -y 2 0x45 0x00 w
0x0400
# i2cget -y 2 0x45 0x00 w
0x0400
# i2cget -y 2 0x45 0x00 w
0x0400
# i2cget -y 2 0x45 0x00 w
0x0400
# i2cget -y 2 0x45 0x00 w
0x0400
# i2cget -y 2 0x45 0x00 w
0x0400
# i2cget -y 2 0x45 0x00 w
0x0400
# i2cget -y 2 0x45 0x00 w
0x0400
# i2cget -y 2 0x45 0x00 w
0x0400
# i2cget -y 2 0x45 0x00 w
0x0400
# i2cget -y 2 0x45 0x00 w
0xc01b
# i2cget -y 2 0x45 0x00 w
0x9d3b
# i2cget -y 2 0x45 0x00 w
0xe23b
# i2cget -y 2 0x45 0x00 w
0xb83a
# i2cget -y 2 0x45 0x00 w
0xd33b
# i2cget -y 2 0x45 0x00 w
0x133e
# i2cget -y 2 0x45 0x00 w
0x123f
# i2cget -y 2 0x45 0x00 w
0xd23e


发现数据寄存器恢复后,使用程序读取数据,能够正常读到传感器数据:
# opt3001_test

 device = /dev/i2c-2
 interval=1000
 count=10
[INFO] Found TI OPT3001

[DEBUG] conversion time:100000us

[0.1s]1/10:opt3001 read failed
[1.2s]2/10:als read: 246.239990lux
[2.3s]3/10:als read: 253.919998lux
[3.4s]4/10:als read: 254.239990lux
[4.4s]5/10:als read: 254.559998lux
[5.5s]6/10:als read: 246.559998lux
[6.5s]7/10:als read: 228.559998lux
[7.6s]8/10:als read: 265.759979lux
[8.6s]9/10:als read: 262.559998lux
[9.7s]10/10:als read: 258.079987lux





断电,上电,传感器数据依旧正常:
[1717647697.375s]36/86400:als read: 253.279999lux
[1717647698.375s]37/86400:als read: 252.319992lux
[1717647699.376s]38/86400:als read: 252.639999lux
[1717647700.377s]39/86400:als read: 254.239990lux
[1717647701.377s]40/86400:als read: 253.919998lux
[1717647702.378s]41/86400:als read: 252.319992lux
[1717647703.379s]42/86400:als read: 252.959991lux
[1717647704.379s]43/86400:als read: 253.599991lux
[1717647705.380s]44/86400:als read: 252.639999lux
[1717647706.380s]45/86400:als read: 255.199997lux
[1717647707.381s]46/86400:als read: 255.839996lux
[1717647708.382s]47/86400:als read: 255.839996lux
[1717647709.382s]48/86400:als read: 257.759979lux
[1717647710.383s]49/86400:als read: 255.839996lux
[1717647711.383s]50/86400:als read: 255.839996lux
[1717647712.384s]51/86400:als read: 257.440002lux
[1717647713.385s]52/86400:als read: 259.679993lux
[1717647714.385s]53/86400:als read: 261.279999lux


再次读取寄存器,一切正常:
# i2cget -y 2 0x45 0x01 w
0x90c4
#
# i2cget -y 2 0x45 0x01 w
0x90c4
# i2cget -y 2 0x45 0x00 w
0xce3c
# i2cget -y 2 0x45 0x00 w
0xde3c
#
# i2cdump -y 2 0x45 w
     0,8  1,9  2,a  3,b  4,c  5,d  6,e  7,f
00: ba3c 90c4 0000 ffbf 0078 0280 0000 0000
08: 0000 XXXX 0000 0000 0000 0000 4954 0130
10: ba3c 10c4 0000 ffbf 0078 0280 0000 0000
18: 0000 XXXX 0000 0000 0000 0000 4954 0130
20: ba3c 10c4 0000 ffbf 0078 0280 0000 0000
28: 0000 XXXX 0000 0000 0000 0000 4954 0130
30: ba3c 10c4 0000 ffbf 0078 0280 0000 0000
38: 0000 XXXX 0000 0000 0000 0000 4954 0130
40: ba3c 10c4 0000 ffbf 0078 0280 0000 0000
48: 0000 XXXX 0000 0000 0000 0000 4954 0130
50: ba3c 10c4 0000 ffbf 0078 0280 0000 0000
58: 0000 XXXX 0000 0000 0000 0000 4954 0130
60: ba3c 10c4 0000 ffbf 0078 0280 0000 0000
68: 0000 XXXX 0000 0000 0000 0000 4954 0130
70: ba3c 10c4 0000 ffbf 0078 0280 0000 0000
78: 0000 XXXX 0000 0000 0000 0000 4954 0130
80: ba3c 10c4 0000 ffbf 0078 0280 0000 0000
88: 0000 XXXX 0000 0000 0000 0000 4954 0130
90: ba3c 10c4 0000 ffbf 0078 0280 0000 0000
98: 0000 XXXX 0000 0000 0000 0000 4954 0130
a0: ba3c 10c4 0000 ffbf 0078 0280 0000 0000
a8: 0000 XXXX 0000 0000 0000 0000 4954 0130
b0: ba3c 10c4 0000 ffbf 0078 0280 0000 0000
b8: 0000 XXXX 0000 0000 0000 0000 4954 0130
c0: ba3c 10c4 0000 ffbf 0078 0280 0000 0000
c8: 0000 XXXX 0000 0000 0000 0000 4954 0130
d0: ba3c 10c4 0000 ffbf 0078 0280 0000 0000
d8: 0000 XXXX 0000 0000 0000 0000 4954 0130
e0: ba3c 10c4 0000 ffbf 0078 0280 0000 0000
e8: 0000 XXXX 0000 0000 0000 0000 4954 0130
f0: ba3c 10c4 0000 ffbf 0078 0280 0000 0000
f8: 0000 XXXX 0000 0000 0000 0000 4954 0130


  • Hello Zhang,

    Could you please share the contents of register 0x01 before and after you changed the configuration? It could be possible that you did not switch the device mode out of shutdown, which is why the device output was reading 0.

    Thank you,

    Daniel Balmaceda

  • Hi Daniel,

    The previous we have shared the I2C register log and it is the total dump register configurations;

    Our I2C tools read the register high and low bytes are opposite and we need to manual swap, the 0X01 register bit10:bit9 is 0b10 or 0b11,

    it is not the shutdown mode, thanks.

  • Hi Daniel,

    Is there any comment for this issue, thanks?

  • Hello Zhang, 

    I apologize for the late response.

    As per the datasheet, he maximum operating temperature of the device is 85 C; however, it is not recommended to expose the sensor to this temperature for a very prolonged period of time. How are you storing the device? Is there any humidity present as well?

    The fact that it is still working after some time seems suggests that this failure was temporary due to the high temperature.

    Thank you,

    Daniel Balmaceda