cancel
Showing results for 
Search instead for 
Did you mean: 

VL53L0x Offset calibration and Crosstalk calibration

zhy
Associate II

Hi

   follow  can  make offset calibration?Place the object 14cm away .Must be in a dark environment?

   

zhy_0-1761292891871.png

follow can make Crosstalk calibration?   Place the object 60cm away.

zhy_1-1761293001860.png

my coverglass like follow,The measured distance seems very short. How can I solve this problem?

zhy_2-1761293212141.png

follow is my read out data

zhy_3-1761293684788.png

 

 

 

 

 
1 ACCEPTED SOLUTION

Accepted Solutions
Zhiyuan.Han
ST Employee

Hi

As this discussion is too deep level technical question, let's move to email loop to improve the efficiency and continue communicate the Q&A.

I will initialize an email loop and involve region support team.

 

Br

Zhiyuan.Han


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.

View solution in original post

14 REPLIES 14
Zhiyuan.Han
ST Employee

Hi

About offset calibration, normally we suggest do offset calibration at short distance(10cm or 14cm) with white target (88% reflectance) in dark condition. 

About xtalk calibration, can you share your ranging data in dark condition? normally we suggest do xtalk at reorted distance start to drop, refer below picture. 

And you shared ranging data is under the sun, VL53L0CX ranging ability will decrease with IR noise increase, as sun also contain 940nm noise, so sun light will impact VL53L0CX max ranging ability 

ZhiyuanHan_0-1761299521101.png

 

you can refer UM for more detail.

VL53L0X API User_Manual.fm

 

Br

Zhiyuan.Han


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.

Hi,dear Zhiyuan.Han

  follow is offset calibration value:14cm 

zhy_0-1761359251442.png

follow is talkcross calibration 60cm  not under sun

zhy_1-1761359569927.png

 

 

 

zhy
Associate II

Hi,dear han

    I used continue mode,I set  Thresh_Low = 250,Thresh_High=255,  I made clibration. find without coverglass is OK

if coverglass , it Trigger interrupt when there are not object before sensror.

Dear Han,

     This question has puzzled me for a long time.

The interrupt will not be triggered when there is no glass cover in front of the sensor and the background is far away without any obstacles in front of the sensor.

when there are  glass cover in front of the sensor,  The background distance is too far. Otherwise, the interrupt will be triggered even if there are no obstacles in front of the sensor. the reading is 0 or 8190.

when there are  glass cover in front of the sensor,The background distance under 1 meter, all OK。

                 thank you    

zhy
Associate II

Hi,

  I positioned the glass cover in front of the sensor and performed offset calibration at 14cm. The actual and measured distances are as follows. Where should I perform the CROSSTALK calibration?

zhy_0-1761378030290.png

 

When there is glass in front of the sensor, if the sensor is not well calibrated, the cover glass will be detected as target, that's why you will receive the abnormal interrupt. 

you can check the range status, if status is not 0, then you can discard the data.

and you can also try to play with interrupt, below options are available:

No Interrupt
Level Low (value < thresh_low)
Level High (value > thresh_high)
Out Of Window (value < thresh_low OR value > thresh_high)

 

 

Zhiyuan.Han


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.

Hi

From the data seems your calibration is not succeeded, or you forgot set the offset value after rebooting, normally after doing offset, if you do range measurement, the reported distance will be around 140mm, but your measurement data is 170mm. 

Anyway, from your test result, I suggest you do xtalk between 650~700mm.

 

Br

Zhiyuan.Han


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.

Hi,dear Han 

  

void GPIOA_IRQHandler( void )
{
    uint32_t InterruptMask;
    VL53L0X_Error Status = 0;
    VL53L0X_RangingMeasurementData_t *pRangingMeasurementData;
    if(GPIOA_ReadITFlagBit(EXIT_INT))                        //表示产生了外部中断 PA4
    {
       if(VL53L0X_GetInterruptMaskStatus(&vl53l0x_dev,  &InterruptMask) == VL53L0X_ERROR_NONE)
       {
         valver.alarm_flag = 1;                                //置检测到标志()
       }
    //    if(VL53L0X_GetRangingMeasurementData(&vl53l0x_dev,    pRangingMeasurementData) == VL53L0X_ERROR_NONE )
    //    {
    //       if((pRangingMeasurementData->RangeStatus == VL53L0X_ERROR_NONE) &&(pRangingMeasurementData->RangeMilliMeter != 0))
    //         {
             
    //           valver.alarm_flag = 1;  
    //        valver.alarm_flag_even=valver.alarm_flag;
             
    //     }
    //     else
    //     {
    //       valver.alarm_flag = 0;
    //        }
    //     }
       
       GPIOA_ClearITFlagBit(EXIT_INT);                         //清除单片机的中断标志  
       
    //if (Status == VL53L0X_ERROR_NONE)
   
        // Status = VL53L0X_GetRangingMeasurementData(&vl53l0x_dev,
        //  pRangingMeasurementData);
    //   GPIOB_ResetBits(1 << 7);                               //这是LED2
    //            tmos_start_task(halTaskID,HAL_TEST_EVENT,100);
       GPIOB_ResetBits(int_indicator);                               //这是LED2
       tmos_start_task(halTaskID,HAL_TEST_EVENT,100);
       VL53L0X_ClearInterruptMask(&vl53l0x_dev,0);             //
      // tmos_start_task(halTaskID,LED_BLINK_EVENT,0);       //zhy
             //62.5mS让LED熄灭
      //GPIOA_InverseBits(int_indicator);                      //反转端口,用于测试中断时间  
    }
}

Hi,dear Han

  every power up ,I must run 

VL53L0X_Error VL53L0X_set_offset_calibration_data_micro_meter(VL53L0X_DEV Dev,
        int32_t OffsetCalibrationDataMicroMeter)