VL53L1X: temperature and repeatability
Hi friends,
I want to measure the distance to an obstacle (120 mm) with the VL53L1X, but I am having problems with the repeatability.
NOTE: I measure 10 times to get a sample and I repeat every 10 seconds.
These are the results...


The distance measured is not stable, there is a ripple of 15 mm. This effect is worse when the environment temperature is under 24ºC.
Does the sensor range depend on the temperature?
I have made a function to compensate the temperature effect (see the code above), it is based on the function VL53L1X_ERROR VL53L1X_StartTemperatureUpdate (API Lite), I´m working with the standard API. I am calling this function before starting the measure ranging (but it doesn´t work).
VL53L1_WrByte(Dev,0x0008,0x81); /* full VHV */
VL53L1_WrByte(Dev,0x0B,0x92);
Intentos = 0;
do
{
status = VL53L1_StartMeasurement(Dev);
Intentos++;
}while ((status != VL53L1_ERROR_NONE)&&(Intentos < 3));
byteData=0;
Intentos = 0;
do
{
status = VL53L1_GetMeasurementDataReady(Dev, &byteData);
Intentos++;
}
while((!byteData)&&(status == VL53L1_ERROR_NONE)&&(Intentos < 3));
VL53L1_ClearInterruptAndStartMeasurement(Dev);
VL53L1_StopMeasurement(Dev);
VL53L1_WrByte(Dev, 0x0008, 0x09); /* two bounds VHV */
VL53L1_WrByte(Dev, 0x0B, 0); /* start VHV from the previous temperature */