cancel
Showing results for 
Search instead for 
Did you mean: 

VL53L4CX RefSPAD caliberation - no target?

cyclops
Associate II

Hi,


i'm playing around with the VL53L4CX after putting it on my own pcb (yay).

The user guide states that for the SPAD caliberation, NO target should be placed. The crosstalk requires a 600mm target.

Do i understand correctly that the SPAD caliberation therefor is best performed outside and upwards to the sky? Or maybe in a room that is at least 6 meter long?
It confuses me because i wonder how this is done in a factory where space is a premium :)

 

Kind regards,

        Ruben

 

1 ACCEPTED SOLUTION

Accepted Solutions
John E KVAM
ST Employee

The requirements for the RefSPAD calculation are "no close target" and by that they mean 5cm or so. 

If you wanted, in your factory to do the offset calculation at say 14cm (it's what we suggest). It would be fine to set up a target at 14cm, do the RefSpad calc, then do the offset calc. 

Once that is done, we have to work on Crosstalk.

You need a target where the normal ranging ends up being 10-20% short. If you use a dark target, that might only be 30cm. Or it could be more depending on the target reflectivity and the quality of your coverglass.

Experiment to find this. Make sure the diameter of the target is at least 1/2 the distance you are ranging. 

Once you have this distance. Create a set-up to do your calibration. Create some sort of flap that can fall down and create the 14cm offset target. 

Fold the flap down, do the RefSpad and the offset cal. Then lift the flap and do the crosstalk cal.

If you have very consistent glass quality and the air gap between sensor and glass is consistent, consider calibration of the first few off the production line, then just use the worst of these calibration values for your entire line.

(The penalty for over calibration of the cross talk is a short measurement, but under calibration can lead to a ghost image - and you don't want that. 

For the best accuracy, go ahead and crosstalk cal them all. But if you don't absolutely need the best accuracy, lots of people crosstalk the design, then just use the numbers.

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

View solution in original post

6 REPLIES 6
John E KVAM
ST Employee

The requirements for the RefSPAD calculation are "no close target" and by that they mean 5cm or so. 

If you wanted, in your factory to do the offset calculation at say 14cm (it's what we suggest). It would be fine to set up a target at 14cm, do the RefSpad calc, then do the offset calc. 

Once that is done, we have to work on Crosstalk.

You need a target where the normal ranging ends up being 10-20% short. If you use a dark target, that might only be 30cm. Or it could be more depending on the target reflectivity and the quality of your coverglass.

Experiment to find this. Make sure the diameter of the target is at least 1/2 the distance you are ranging. 

Once you have this distance. Create a set-up to do your calibration. Create some sort of flap that can fall down and create the 14cm offset target. 

Fold the flap down, do the RefSpad and the offset cal. Then lift the flap and do the crosstalk cal.

If you have very consistent glass quality and the air gap between sensor and glass is consistent, consider calibration of the first few off the production line, then just use the worst of these calibration values for your entire line.

(The penalty for over calibration of the cross talk is a short measurement, but under calibration can lead to a ghost image - and you don't want that. 

For the best accuracy, go ahead and crosstalk cal them all. But if you don't absolutely need the best accuracy, lots of people crosstalk the design, then just use the numbers.

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

Thanks john!


i'm assuming that i can not do the refSPAD calibration with the coverglass? For  me it would mean placing the cover glass after the first refSPAD calibration - that's ok. It is another step though.

The manual states that the crosstalk should be done at 600mm in a dark environment. i have noticed that VL53L4CX_PerformOffsetPerVcselCalibration has a parameter, so i'm assuming that I can just put it at 300mm as well. But, the VL53L4CX_PerformXTalkCalibration does not. So is that what you're saying with the 10-20% short? Or should i just stick to the 600mm?

My setup is of course not a factory :) I'm a hobbyst and i'm just thinking to make a box for this where i can shove the device in and perform the calibration in there. I'm happy to do that in steps and in between put the coverglass on.

Additionally. In my setup it would be ideal if i could do these steps separately. Can i run the the refSPAD and PerformOffsetPerVcselCalibration in one method and GetCalibrationData(), to then load that again before doing the PerformXTalkCalibration?

So, i did some experimenting.

 

I've run the `VL53L4CX_PerformRefSpadManagement` with a piece of white paper at ~15cm above the sensor.

Then i did the offset calibration. I did that with the `VL53L4CX_PerformOffsetPerVcselCalibration` and a 300mm parameter. Paper of course at 30cm above the sensor.

I store these results on the esp32s littleFS (i just dump the `VL53L4CX_CalibrationData_t` struct to a file).

 

Then i've added the lid of my enclosure (which is the cover glass). I do this without power, which is why i've stored the calibration data.

Then i do a second calibration for the Xtalk. So i read the calibration data from the file and run the `VL53L4CX_SetCalibrationData`, and then the `VL53L4CX_PerformXTalkCalibration`. After this i again store the struct to a file.

For the normal measurement i read the struct from disk and load it with the SetCalibrationData method, and i then also perform:

  • VL53L4CX_SetXTalkCompensationEnable(1);
  • VL53L4CX_SetMeasurementTimingBudgetMicroSeconds(33333);
  • VL53L4CX_SetDistanceMode(VL53L4CX_DISTANCEMODE_LONG);
  • VL53L4CX_SetOffsetCorrectionMode(VL53L4CX_OFFSETCORRECTIONMODE_PERVCSEL);
  • VL53L4CX_SmudgeCorrectionEnable(VL53L4CX_SMUDGE_CORRECTION_CONTINUOUS);

 

I then do the StartMeasurement() and get the readings.

 

This seems to work well for now. I need to work on a setup with a box so the measurements are more exact and it becomes easier to run this calibration process, but overall - i'm happy like this.

Is there anything that i could do differently to get better accuracy and/or less issues with (for example) dirty cover glass?

I think everything you have done is perfect. 

But if you are concerned about a dirty coverglass, there is a coverglass you can buy that is crosstalk free. Or you could make one. The trick is to put an opaque barrier between the TX side and the RX side. And of course this means two bits of coverglass. 

There is a company www.hornix.com.tw that makes such a glass. ( I helped design it.) In small quantities, it's not inexpensive, but depending on your budget it's very effective. You could buy a few and give it a shot. With this glass you could skip the crosstalk calibration completely - there is no crosstalk.

But assuming you are using a good bit of consistent 'glass' and the air gap between the sensor and the glass is small, you have done everything we recommend. 

Well done.

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

Thanks John,

 

I have one final question - if i run the 3 methods after each other and do one GetCalibrationData() then i get everything. But can i do one method, perform the get calibration data and store that. Can i then reboot everything, load the data and perform the 2nd method? And then do the same for the 3rd method?

This seems to have worked, i just want to make sure this is ok!

Absolutely. The measurements are independent. 


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.