cancel
Showing results for 
Search instead for 
Did you mean: 

VL53L0X crosstalk calibration

Hardwariano
Associate III

Hello.

I'm using a VL53L0X sensor with cover glass from www.gilisymo.com, so I need to do crosstalk calibration to get an accurate measurement. The problem is that the correction is too big.

The process is as follows:

1) SPAD calibration (ok)

2) Ref calibration (ok)

3) Offset calibration. I use a white card located at 100mm from the sensor. Distance measured is accurate.

4) Crosstalk calibration. As UM2039 says: "The starting point of the valid distance to perform cross-talk calibration is when the actual signal starts to deviate from the ideal curve".

In my case that distance is 150 mm, so I place a grey card at that distance from the sensor and call "VL53L0X_PerformXTalkCalibration()". The sensor returns a value of approximately 26000 MegaCps.

5) Ranging. When an object is located at a distance of:

  • 50 mm --> Sensor measures 55 mm
  • 80 mm --> Sensor measures 100 mm
  • 110 mm --> Sensor measures 210 mm
  • 150 mm --> Sensor measures 8191mm (0x1FFF, no object detected)

I think the correction applied is very excessive considering the cover glass is specifically designed for VL53L0X. What I did do wrong in the process? Should the calibration be done in complete darkness?

Regards

14 REPLIES 14
Julien NGUYEN
ST Employee

​Hi Hardwariano,

Please make a try with xtalk calibration distance at 300 mm or 400 mm. In your case it seems that the device is over compensated. To fine tune,  make a several tests to find the best xtalk calibration distance [250, 300, 350, 400 mm ]

Julien


In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.
John E KVAM
ST Employee

That is a fine coverglass. You are right in that your Xtalk number should be much,much less. Using that glass your Xtalk distance should be MUCH farther out. I would think something like most of a meter.

So something is really wrong.

My guess is that when you took the white protective cover off, there is a yellowish - almost clear cover that stuck to the part. (most of the time it comes off with the white bit, but maybe not for you.)

Look carefully, and just remove the cover. And I've seen it get stuck inside the coverglass, so if you don't see anything stuck on the sensor, check that it didn't get stuck inside the 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.
Hardwariano
Associate III

Hello again

I tried different distances as Julien suggested but the problem persists. I also checked the cover and the sensor as John suggested but I didn't find anything.

Then, I placed the SAME sensor cover on X-NUCLEO-53L0A1 and used VL53L0X GUI from ST to calibrate the NUCLEO's sensor: It worked really well (offset = 7mm and xtalk = 0.00018).

0693W000001tB6OQAU.png

Seeing this, now I think the problem is in my code. Could you please help me understand how the function VL53L0X_PerformXTalkCalibration works?

1) XTalkCalDistance is FIXPOINT1616. If I want to tell the sensor the xtalk calibration distance is 330mm, is this ok?

0693W000001tB3FQAU.png

2) pXTalkCompensationRateMegaCps is FIXPOINT1616. During my last attemp VL53L0X_PerformXTalkCalibration returned the value 24320. How can I interpret it?

  • 24320 Megacps (0101 1111 0000 0000)
  • 0.24320 Megacps (000000000000000 0101111100000000)
  • Other

Thanks in advance.

Hardwariano
Associate III

One more question. Should the cover be placed over the sensor for both offset and crosstalk calibration?

Hardwariano
Associate III

Hello again.

I still need help on this issue. Can anyone confirm that I have understood correctly the crosstalk calibration process of my previous posts?

Thanks

Julien NGUYEN
ST Employee

​Hi,

What is the size of the target you were using to perform the crosstalk calibration. You need a 1mx1m grey target.

If the target is a card, it is too small, depending on the distance, the target will not cover the full FoV of the sensor, and then there is no enough photons coming back from the target, the photons coming back from the cover glass become very quickly dominant which makes you believe that the measured distance starts to deviate at 150 mm, but in reality it should be longer (~60 cm or more).  Please use a bigger 1mx1m target if it is not already the case. Thanks, Julien 


In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.
John E KVAM
ST Employee

The classic problem with crosstalk is that it causes your system to UNDER-range. Meaning all your numbers are too small. But you are OVER-ranging.

5) Ranging. When an object is located at a distance of:

  • 50 mm --> Sensor measures 55 mm
  • 80 mm --> Sensor measures 100 mm
  • 110 mm --> Sensor measures 210 mm
  • 150 mm --> Sensor measures 8191mm (0x1FFF, no object detected)

That means your crosstalk is too high.

Try this experiment...

Run your calibration and click the 'save' button.

Go to the Log page and click on File1 - we are just trying to find where the calibration files are.

Find a .txt file that contains the calibration data.

It will be in a directory such as:

C:\Users\YOURNAME\AppData\Local\STMicroElectronics\VL53L0X\VL53L0X_StateDataIni.txt

have a look at that.

Mine looks like the following:

[Version Info]
VERSION=1.0.0.0
DEVICE_ID=1.1
[Ranging Settings]
SIGNAL_RATE_XTALK_COMP_MCPS=0.01860046
SIGNAL_RATE_XTALK_COMP_MCPS_APPLY=True
PT_TO_PT_RANGE_OFFSET_MM=7
PT_TO_PT_RANGE_OFFSET_MM_APPLY=True
XTALK_CALIBRATED=True
OFFSET_CALIBRATED=True
XTALK_CALIBRATED_MANUAL=False
OFFSET_CALIBRATED_MANUAL=False
SNR_LIMIT_CHECK_ON=False
SIGNAL_LIMIT_CHECK_ON=True
SIGMA_LIMIT_CHECK_ON=True
XTALK_CORRECTION_ON=True
SNR_LIMIT=0
SNR_LIMIT_APPLY=False
SIGNAL_RATE_LIMIT_MCPS=0.1000061
SIGNAL_RATE_LIMIT_MCPS_APPLY=True
SIGMA_ESTIMATE_LIMIT_MM=32
SIGMA_ESTIMATE_LIMIT_MM_APPLY=True
TIMING_BUDGET_MS=20
TIMING_BUDGET_MS_APPLY=True
INTER_MEASUREMENT_PERIOD_MS=300
INTER_MEASUREMENT_PERIOD_MS_APPLY=True
XTALK_AUTOCAL_TIME_PERIOD_SECS=30
XTALK_AUTOCAL_TIME_PERIOD_SECS_APPLY=False
XTALK_COMP_LIMIT_MCPS_PER_SPAD=0.05
XTALK_COMP_LIMIT_MCPS_PER_SPAD_APPLY=False
MSRC_ON=False
DSS_ON=True
TCC_ON=False
PRE_RANGE_ON=True
MSRC_TIMEOUT_MS=2.058594
MSRC_TIMEOUT_MS_APPLY=False
PRE_RANGE_TIMEOUT_MS=8.03125
PRE_RANGE_TIMEOUT_MS_APPLY=False
PRE_RANGE_VCSEL_PERIOD_PCLKS=14
PRE_RANGE_VCSEL_PERIOD_PCLKS_APPLY=True
FINAL_RANGE_VCSEL_PERIOD_PCLKS=10
FINAL_RANGE_VCSEL_PERIOD_PCLKS_APPLY=True
[Comms]
I2C_SPEED_KHZ=400
I2C_SPEED_KHZ_APPLY=False
[DISPLAY]
RANGE_DISPLAY_UPPER=10
RANGE_DISPLAY_UPPER_APPLY=True
RANGE_DISPLAY_LOWER=0
RANGE_DISPLAY_LOWER_APPLY=False
SIGNAL_RATE_DISPLAY_UPPER=80
SIGNAL_RATE_DISPLAY_UPPER_APPLY=False
SIGNAL_RATE_DISPLAY_LOWER=0
SIGNAL_RATE_DISPLAY_LOWER_APPLY=False
DISPLAY_PLOT_SAMPLES=50
DISPLAY_PLOT_SAMPLES_APPLY=False
RANGE_STATS_FILTER_SIZE=20
RANGE_STATS_FILTER_SIZE_APPLY=False
[DATA_LOG]
DATA_LOG_SAMPLES=0
DATA_LOG_SAMPLES_APPLY=False

Reduce the number in the line:

SIGNAL_RATE_XTALK_COMP_MCPS=0.01860046 (this is my value - yours will be different)

and save the file

CLOSE THE GUI and run it again. This clears out the old data.)

Go to the calibration page and verify you have the crosstalk number you put in.

Do some ranges.

Repeat this process until you are convinced you are getting correct distances. (Over-ranging means your number is too large, Under-ranging means it's too small.)

Now we know the right crosstalk value.

So let's try to find out why your crosstalk was wrong when you did it.

In Julien's reply, he suggests you need a larger target. The target must half as wide as the distance to your sensor. So if you do your crosstalk at 1M, your target must 0.5 meters square.

(A 1m square target can be hard to come by.)

Finding the right distance can be hard. To do this, go to the calibration page and hit RESET. This insures you are not double calibrating. Then do the offset calibration.

Go back to ranging. Find a target and distance were you are under-ranging by 20 or 30 percent.

Then do your crosstalk cal. Did you get the number you know to be right?

If not, try a different distance, or a different target. Keep in mind the size.

good luck


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.
NCao
Associate II

Do I have to calibrate every time I power on my device?

John E KVAM
ST Employee

The proper procedure would be to do the calibration, then 'Get' that calibration data and store it into your memory.

Then at reboot, you can download that cal data into the sensor just prior to running.

Once you calibrate a particular sensor, that calibration is good forever - but only for that one chip.

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