cancel
Showing results for 
Search instead for 
Did you mean: 

Questions about full calibration of VL53L1CB (SPADS, XTALK & Offset)

userLM
Associate

Hi ST team !

I am developing a program allowing indoor / outdoor distance reading with a fixed and static VL53L1CB. I would like, just to test, to carry out a general calibration of the sensor using a cover glass. Have you developed or is there a general sensor calibration sequence program?

A general calibration, in the order, concerning: SPADS -> XTalk -> Offset (created by XTalk)

Is a SPADS calibration really useful for the efficiency of the sensor?

When I execute the "VL53L1_PerformRefSpadManagement ()" function, the sensor subsequently returns false values (Status: 255) and I must therefore perform a complete reboot.

In the following program, what is really useful or unnecessary?

Knowing that this desired calibration will be done without test precautions (impossibility of placing a target at 140mm or 600mm in the dark etc ...)

I need more details, thank you!

LM

void calibration_sensor() // Function use is the setup using the C++ API
{
   // delay(5000);
   synchro_init_sensor(); //WaitDeviceBooted, DataInit and StaticInit
   status = sensor_vl53l1_sat->VL53L1_PerformRefSpadManagement();
   SerialPort.print("Status Calibration SPADs : ");
   get_status(status); // return sensor status
 
   status = sensor_vl53l1_sat->VL53L1_SetXTalkCompensationEnable(1); // 0 = disabled or 1 = enabled
   SerialPort.print("Status Enable Calibration XTalk : ");
   get_status(status);
 
   status = sensor_vl53l1_sat->VL53L1_PerformXTalkCalibration(VL53L1_XTALKCALIBRATIONMODE_NO_TARGET);
   SerialPort.print("Status Calibration XTalk : ");
   get_status(status);
   // set_preset();
   status = sensor_vl53l1_sat->VL53L1_SetPresetMode(VL53L1_PRESETMODE_MULTIZONES_SCANNING);
   // config_full_roi();
   roiConfig.UserRois[0].TopLeftX = 0;
   roiConfig.UserRois[0].TopLeftY = 15;
   roiConfig.UserRois[0].BotRightX = 15;
   roiConfig.UserRois[0].BotRightY = 0;
   status = sensor_vl53l1_sat->VL53L1_SetROI(&roiConfig);
   status = sensor_vl53l1_sat->VL53L1_SetOffsetCalibrationMode(VL53L1_OFFSETCALIBRATIONMODE_MULTI_ZONE);
   SerialPort.print("Status Offset Calibration Mode : ");
   get_status(status);
 
   status = sensor_vl53l1_sat->VL53L1_SetOffsetCorrectionMode(VL53L1_OFFSETCORRECTIONMODE_PERZONE);
   SerialPort.print("Status Offset Corection Mode : ");
   get_status(status);
 
   status = sensor_vl53l1_sat->VL53L1_PerformOffsetSimpleCalibration(140); // I can't place a target at 140mm
   SerialPort.print("Status Calibration Offset : ");
   get_status(status);
 
   get_pal_error(status);
}

1 REPLY 1
John E KVAM
ST Employee

The calibration was meant to be done in factory - and only once. It was expected that after calibration, you would read the calibration data from the chip and store it in your EEPROM or flash. The at each reboot, write that calibration data back into the sensor.

That will give you the best accuracy.

If you really, really cannot do this, then you do have a alternative.

Don't do the offset - you will get up to a 2cm fixed offset. Each range will be short by 1.5 cm in one sensor and long by 0.7cm in another.

But you really do need to compensate for the crosstalk.

In the lab build a few prototypes, use the same sensor and coverglass configuration.

(you can even use the P-Nucleo-53L1A1 evaluation board if you can get your coverglass in the right position. Shims are provided.)

then run the crosstalk on all your prototypes. Use the proper target and spend some time getting it right.

Then use the worst result - and shove this result into all your products.

the reason to use the worst - is that over-compensating has a slight accuracy issue. Under compensating will create 'ghost targets' where the sensor thinks your coverglass is a real target.

But I want to caution you. Please buy the P-Nucleo-53L1A1 evaluation board and check its results in the conditions you expect to run in.

That eye-safe 940nm light is very faint and will be overwhelmed by direct sunlight.

Spending $50 to check your idea works might save you a lot of frustration later.

As for the VL53L1_PerformRefSpadManagement() failing, I've seen that happen on some chips.

It this case you may proceed. There are factory presets that will take over.

good luck,

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