Skip to main content
Associate II
November 14, 2024
Solved

VL53L8CX not accurate distance

  • November 14, 2024
  • 3 replies
  • 1006 views

I’ve been using the "vl53l8cx" sensor to measure distances through I2C, and I noticed that when I measure distances (between 10cm and 50cm), the values reported by the sensor are consistently half of the actual distance. For example, when the actual distance is 100mm, the sensor reports around 50mm, and similarly for other distances.

I used the example code ST provided.

I set 8*8 resolution and 15Hz frequency.

I think problem occurs here. I got "target status : 6"  

Could you please explain the reason for this issue and how to fix it?

 
 
This topic has been closed for replies.
Best answer by John E KVAM

I'm going to guess you are using a coverglass. Below about 60cm the glass return signature gets mixed in with the target signature and a million photons from your glass at distance zero, mixed with a million photons from your target at distance 50cm = 25cm. 

Having lots of photons - from a white paper will overwhelm the glass and you get closer to the right answer. 

Solution is to remove the coverglass, get a better one, or calibrate the one you have. 

You can read my article on the subject - it's short. 

https://community.st.com/t5/mems-and-sensors/time-of-flight-cover-glass/ta-p/49259

This is the user manual on how to calibrate. 

https://www.st.com/resource/en/user_manual/um3109-a-guide-for-using-the-vl53l8cx-lowpower-highperformance-timeofflight-multizone-ranging-sensor-stmicroelectronics.pdf

Product – 閎喬光學 - is a Taiwanese company that sells a really good coverglass. (It's not associated with ST, but we did jointly design that glass.)

- john

3 replies

John E KVAM
John E KVAMBest answer
ST Employee
November 14, 2024

I'm going to guess you are using a coverglass. Below about 60cm the glass return signature gets mixed in with the target signature and a million photons from your glass at distance zero, mixed with a million photons from your target at distance 50cm = 25cm. 

Having lots of photons - from a white paper will overwhelm the glass and you get closer to the right answer. 

Solution is to remove the coverglass, get a better one, or calibrate the one you have. 

You can read my article on the subject - it's short. 

https://community.st.com/t5/mems-and-sensors/time-of-flight-cover-glass/ta-p/49259

This is the user manual on how to calibrate. 

https://www.st.com/resource/en/user_manual/um3109-a-guide-for-using-the-vl53l8cx-lowpower-highperformance-timeofflight-multizone-ranging-sensor-stmicroelectronics.pdf

Product – 閎喬光學 - is a Taiwanese company that sells a really good coverglass. (It's not associated with ST, but we did jointly design that glass.)

- john

If this or any post solves your issue, please mark them as 'Accept as Solution' It really helps. And if you notice anything wrong do not hesitate to 'Report Inappropriate Content'. Someone will review it.
Associate II
November 26, 2024

Thansk a lot. 
It was just my code mistake but your answer was useful.