Skip to main content
Associate II
December 5, 2024
Solved

VL53L1X temperature effects

  • December 5, 2024
  • 3 replies
  • 1867 views

We placed two VL53L1X sensors at 18.6" in our temperature chamber. 

Over a 50C swing we saw up to 1.15" of variability. In the images bellow the chamber temperature stabilized around 30 minutes. 

The target was a large 24x24 sheet of white nylon 0.5" thick

The sensors were left on the entire time, polled every 10 seconds.

SPAD ARRAY size 8x8

Is there any way to improve this? Is it possible to access the temperature registers on the VL53L1x so we can create a variable to compensate for the temperature induced error? 

Brettjohnson7191_0-1733414347663.png

 

Best answer by Brettjohnson7191

Unfortunately, we were unable to get the sensor to fall within tolerance across temperature.

we did however find the temperature induced offset to be consistent across all distances and boards. By stepping through the temperature ranges we were then able to come up with a temperature offset correction formula Correction value = 0.0225*TEMPC-0.4005 and Corrected distance=measured distance-correction value

Using this we added an onboard temperature sensor and correct for it that way. This keeps us within plus or minus 0.1” of the real value which is accurate enough for our use case.  

 

Hopefully this helps someone else down the road. 

3 replies

John E KVAM
ST Employee
December 5, 2024

Assuming you are using the STSW_IMG009 - UltraLite driver.

To save time for each range we limit the amount of temperature compensation we do. 

Look at the init function :

VL53L1X_ERROR VL53L1X_SensorInit(VL53L1_Dev_t dev)
{
	VL53L1X_ERROR status = 0;
	uint8_t Addr = 0x00, tmp=0;

	for (Addr = 0x2D; Addr <= 0x87; Addr++){
		status = VL53L1_WrByte(&dev, Addr, VL51L1X_DEFAULT_CONFIGURATION[Addr - 0x2D]);
	}
	status = VL53L1X_StartRanging(dev);
	while(tmp==0){
			status = VL53L1X_CheckForDataReady(dev, &tmp);
	}
	tmp = 0;
	status = VL53L1X_ClearInterrupt(dev);
	status = VL53L1X_StopRanging(dev);
	status = VL53L1_WrByte(&dev, VL53L1_VHV_CONFIG__TIMEOUT_MACROP_LOOP_BOUND, 0x09); /* two bounds VHV */
	status = VL53L1_WrByte(&dev, 0x0B, 0); /* start VHV from the previous temperature */
	return status;
}

It's line 16 that limits the amount of temperature drift we account for. This saves time, but only works if the temperature drift is slow. 

If you have fast changes in temperature, you can stop the chip and re-initialize it. 

Or you can simply remove line 16 and leave the full temperature compensation active. 

if you are using the full driver (STSW_IMG007), look for the VHV functions. It will allow you to set the amount of temp change you account for. 

but if you change this allow a few more milliseconds for each range. It does take longer. 

 

 

Associate II
December 6, 2024

Removing line 16 shows no improvement across temperature. I assume the overshoot at the -10C to 40C transition is the temperature correction in the VL53L1x chip. However it just does not seem to be able to handle the rapid change in temp. Any further thoughts?

Brettjohnson7191_0-1733516346853.png

 

John E KVAM
ST Employee
December 9, 2024

that data looks the same to me. Yet I'm believe you did change the thing I asked you to. And that make no sense to me.

Could you try putting line 16 back in (undoing the change) then stopping the range, re-initializing the sensor and restarting. Do that every now and again. Perhaps once per few degree changes. 

It should get a little off as the temp changes and then snap back as the chip re-compensates during the init. I would think you could see it on your graph. 

Then you could leave it like this - if you have the time, or we could dig into why it wasn't working.

I don't have a temp chamber available, or I'd give it a try. 

Maybe you have to remove line 17 as well as 16. It's really all I can think of.

- john

 

Associate III
December 18, 2024

Interesting experiment. I am new to these sensors but that should indeed be mostly an offset error.

Looking at your diagram that would be around 1.2inch ~= 30mm over the 50°C change giving around 0.6mm per °C.

Didn't see any value specified for the VL53L1X, but for the VL53L4CX they mention an offset change of 1.3mm/°C in the ranging performances section of the datasheet. Maybe an ST expert can share what offset correction value they are using for this sensor.

Brettjohnson7191AuthorBest answer
Associate II
January 2, 2025

Unfortunately, we were unable to get the sensor to fall within tolerance across temperature.

we did however find the temperature induced offset to be consistent across all distances and boards. By stepping through the temperature ranges we were then able to come up with a temperature offset correction formula Correction value = 0.0225*TEMPC-0.4005 and Corrected distance=measured distance-correction value

Using this we added an onboard temperature sensor and correct for it that way. This keeps us within plus or minus 0.1” of the real value which is accurate enough for our use case.  

 

Hopefully this helps someone else down the road.