cancel
Showing results for 
Search instead for 
Did you mean: 

VL53L3CX Tuning Parameters: What do they do and to which values they have to be set?

NKohl.1
Associate II

The API has the function VL53LX_SetTuningParameter (VL53LX_DEV Dev, uint16_t TuningParameterId, int32_t TuningParameterValue) and there is a file vl53lx_tuning_parm_defaults.h, which contains defines for the TuningParameterId I guess. What I don't know yet is what the effects of these parameters are and to which values I have to set them. In the user manual under 5.3.2 it is said, that you can set the VL53LX_TUNINGPARM_PHASECAL_PATCH_POWER to 2 in order to improve accuracy. I was wondering if I could do more to that in order to suit the setup best for my application.

Thank You in advance.

Kind regards,

Niklas Kohlisch

3 REPLIES 3
John E KVAM
ST Employee

You don't HAVE to change any of them. The defaults are quite acceptible to the vast majority of customers.

The phase cal is something that happens when you issue the start command. To get speed to the first range, the phase cal was kept short. But some applications were quite happy to spend more time getting the first range if it provided more accuracy.

The VL53LX_TUNINGPARM_PHASECAL_PATCH_POWER was invented to allow customers to choose. Increasing that number will take more time before the first range starts, but the offset due to phase will be more consistent between starts.

If the time to first range is not vital to your task, you can increase it. But there diminishing returns. I would expect 3 or maybe 4 to be a practical max. A 3 will spend most of 300ms determining the phase, although I don't think I saw much improvement over the 2 setting.

Rather than spend months trying to learn what the settings do, perhaps you could detail the issues you are having and we could create an app note on which parameters might be of use resolving your issues.

  • 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.
NKohl.1
Associate II

Thank you for the help! I have spent the day aquiring data and I can try to describe the issues to you.

First of all, the accuracy is the biggest problem. In my application there are 4 VL53L3-Sensors on one board. I am calibrating each on in the order refSPAD, XTalk with gray target @600mm and Offset per VCSEL with white target @150mm. After calibration, the acurracy is still pretty poor, I am experiencing linear offsets on two sensors and after calibrating many times and also trying different settings, I was not able to compensate that.

I will manually calibrate them and this should fix the biggest part.

Second, even if that is fixed, the accuracy is still not suitable for my application (get the orientation of plane targets up to a distance of 450 mm).

When changing the distance mode or the timing buget, this results in not finding a valid target and I always end up using something close to the default settings (distancemode medium, timing buget 10 ms at the moment).

Because of that limitation, I was wondering if there was more I could do.

The third issue I could see after aquiring some data, was that the measured distance of one sensor is somewhat odd distributed...

I coud provide you a screenshot of the histogram of a white target @250, 350 and 450 mm distance. X-Axis is measured distance, Y-Axis is how many times the range was measured, each one is result of ca. 1000 measurements.

Thanks again,

Niklas0693W000008xaXGQAY.png

John E KVAM
ST Employee

Given the clustering of your data, I'm going to take a guess.

At each 'start' command the sensor does a 'phase detect'. and it sure appears that you are coming up in one of two phases.

(This guess assumes you didn't do one 'start' and a lot or ranges, but did at least a few 'start/stop' operations.

Find the parameter #define VL53LX_TUNINGPARM_PHASECAL_PATCH_POWER_DEFAULT in the VL53Lx_tuning_param_defaults and see if increasing it helps.

Try 2 to start.

Note - this WILL delay the time until first_range_complete as it spends more time calculating the range.

See if the data gets bettter and if you can live with the delay.

  • 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.