Skip to main content
Associate
September 13, 2024
Solved

ToF VL53L5CX delay after start_ranging

  • September 13, 2024
  • 2 replies
  • 1179 views

Hello everyone.
I'm currently working with ToF sensor VL53L5CX. I wanted to use it in collaboration with a digital camera.

But I can see the laser from ToF if the target has a high reflection level. I know that I can simply use the IR filter,
but I wanted to synchronize camera acquisition and ToF ranging on/off in a software part. Also, I'm using stop_ranging and start_ranging for autocalibration of temperature drift. I have approximately 200 ms delay before I get the first data from ToF. Is there any possibility to increase this part? 

In examples of API there only usage in the way, that ranging starts -> loop -> stop ranging. Is it possible to use it with switching _on/switching_off  without delay? 

Parameters used:

Frequency 30hz, 4x4 resolution, continuous mode, xtalk calibration.

Thank you!

Best answer by John E KVAM

The sync pin was a 'most asked for feature'. So we added it on the VL53L8. 

The L8 costs the same as the L5 and works better. Is it too late to switch?

To be honest the L8 takes different power and requires a re-spin of your board so I'll not blame you if you didn't want to switch.

No need to so the start/stop to do temperature re-calibration. It will do that by itself. 

You might consider running the sensor in Autonomous mode. You could set the sensor to take a range, pause, then take another. If you had some control over your camera, you might be able to take the picture between the ranges. 

Not sure what would keep the clocks from drifting together though. 

- john

2 replies

John E KVAM
John E KVAMBest answer
ST Employee
September 16, 2024

The sync pin was a 'most asked for feature'. So we added it on the VL53L8. 

The L8 costs the same as the L5 and works better. Is it too late to switch?

To be honest the L8 takes different power and requires a re-spin of your board so I'll not blame you if you didn't want to switch.

No need to so the start/stop to do temperature re-calibration. It will do that by itself. 

You might consider running the sensor in Autonomous mode. You could set the sensor to take a range, pause, then take another. If you had some control over your camera, you might be able to take the picture between the ranges. 

Not sure what would keep the clocks from drifting together though. 

- john

IvanKAuthor
Associate
September 17, 2024

Hello John!
Thank you so much for the clarification. Yes, you're right, we have already routed the schematic and device.
So, there is no way to reduce the 200 ms delay after start_ranging, right?

I will try to play around with autonomous mode, but as I know it gives worse results from accuracy perspective.

Can I ask for one more detail? I found the solution with autocalibration from this topic:
https://community.st.com/t5/imaging-sensors/disabling-vl53l5cx-autocalibration/td-p/53834
You also provided information there about autocalibration done by ToF itself. But Should it be done with some configuration? Because I had drifting anyway, so I created a wrapper with checking temperature for diff and did stop/start operation. Here results with my wrapper and without.

Standard procedure after initialization, and functions:
vl53l5cx_start_ranging
vl53l5cx_check_data_ready
vl53l5cx_get_ranging_data

IvanK_0-1726571459851.png

With my correction

IvanK_3-1726571605027.png