2024-11-25 08:02 PM
Hello,
I am using the VL53L8CX ToF sensor (I2C) and have encountered an issue. Currently, I’m not using a coverglass, and I have set the sensor to an 8x8 resolution with a frequency of 15 Hz.
The problem is that when I run the sensor in an infinite loop, it stops collecting data after a while, usually within 10 minutes, without displaying any error messages.
Could you please help me identify the cause of this issue and suggest possible solutions?
Thank you in advance!
2024-11-25 10:21 PM
I guess 15hz was too fast to continuously getting data. So I set 10hz and it runs well. Which frequency do you recommend for long time measurment like a few hours.
2024-11-26 07:50 AM
That's not a very good solution. Whatever was killing your 15 frame solution will kill your 10 frame solution, it will just take longer.
Most of the time, it's an I2C issue. Wires longer that 1foot are problematic. It's not just our sensor - it's an i2c issue. But this sensor has much more traffic. Shorten the wires if you can. Or twist a ground with the CLK line. (SDA line too if you have another ground available.
Another issue is noise on the LPn pin. Pull that up robustly.
Power can be another issue. This sensor draws a lot of power - in bursts. If you power supply is not up to the task you can cause a partial reboot on the ranging engine, and the only way to fix it is to re-initialize it.
I'm going to bet on that last issue. Running at 10 frames is 1/3 more gentle on your power supply than is the 15 frames.
-john
2024-11-26 04:21 PM
Wires are alredy short enough.
I2C connection has no problem.
I think power is not the reason because we keep supplying power and my code (python) assigns 30% of CPU when running.
What do you think about adding defensive code to reinitialize the driver during execution?