cancel
Showing results for 
Search instead for 
Did you mean: 

VL53L1X with cover glass needs calibration

pthakkar
Associate II

Hi

I am using Vl53L1X to measure dark surface upto 1000 cm far.. I am using a split cover glass(specifications attached). The benefits of using the split cover is that it prevents crosstalk. But even after attaching the cover, the distance measured by the sensor decreases when the object moves away from the sensor.  Do I still need crosstalk calibration with cover glass or the cover is not ok.

I have configured my sensor as follows:

status = VL53L1X_SetDistanceMode(dev, 2); /* 1=short, 2=long */
status = VL53L1X_SetTimingBudgetInMs(dev, 100000); /* in ms possible values [20, 50, 100, 200, 500] */
status = VL53L1X_SetSignalThreshold(dev, 1024);//500);
VL53L1X_SetROI(dev, 16, 16);  // Full FoV (start here)

 vl53l1x_cover.jpeg

 

4 REPLIES 4
John_Kvam
Senior II

That coverglass does prevent crosstalk. And when using it - you should not have to do any crosstalk calibration. 

It's designed to adhere to the PC board and it fit's snuggly over the sensor. 

It works. (It was designed jointly by ST and www.Hornix.com.tw although several companies resell it.)

But here's the trick... It does cost you. Every time a flash of light goes through a medium it's going to have some photons be absorbed. if you look, it's 96% transparent. That means 4% of the light is going to be lost on the way out and another 4% lost on the way back. And that's about the best you can do. 

The VL53L1X has a range of 3M plus. But there is a trick. To get that far, you are going to need a 88% reflective target. (Think a white sheet of paper.) At 17% - dull gray - you can only get to a Meter or so. 

If you define a 'dark surface' as black matte spray paint, you are only getting 5% of the photons returned. 

So if you lose 4% out and 4% back in and only get 5% of the total photons reflected, you are not going to get a meter.

If you absolutely cannot make the VL53L1X work, I want you to switch to the VL53L1 (no X). It's software is more complex, as it does post processing on your MCU, but using it you can dig out more signal. And that gives you more distance.

Don't worry. The parts are interchangeable hardware-wise. Just swap out the driver and other than your program being larger, you won't notice a difference. 

(In fact, you can try it on the VL53L1X design to see if you like it, but please do not go into production like that. Swapping the software without the hardware change is not guaranteed to work.)

Oh - change the function calls from VL53LX_SetTimingBudgetInMs to VL53L_SetTimingBudgetInMS (no X).

- john

 

If this or any post solves your issue, please mark them as "Accept as Solution". It really helps the next guy.
And if you notice anything wrong do not hesitate to "Report Inappropriate Content".
I am a recently retired ST Employee. My former username was John E KVAM.

Hi

Thanks for the explanation. The issue I am facing is happening with white surfaces as well...I was also of the view that crosstalk calibration will not be required when using the cover glass....But for me even for white surface the distance returned by sensor starts reducing around 180mm....

I thought maybe something is wrong with the way I am using the sensor... Just to clarify how I am using the sensor:

The sensor is used in a battery based application so we remove the power from the sensor when the sensor is not in use...When we need to read the sensor we do the initialization again in the following manner:

VL53L1X_ERROR VL53L1X_SensorInit(const struct i2c_dt_spec *dev)
{
	VL53L1X_ERROR status = 0;
	uint8_t Addr = 0x00, tmp;
	int16_t error_count = 0;

	for (Addr = 0x2D; Addr <= 0x87; Addr++){
		status |= VL53L1_WrByte(dev, Addr, VL51L1X_DEFAULT_CONFIGURATION[Addr - 0x2D]);
	}

	status = VL53L1X_SetDistanceMode(dev, 2); /* 1=short, 2=long */
  	status = VL53L1X_SetTimingBudgetInMs(dev, 100000); /* in ms possible values [20, 50, 100, 200, 500] */
	status = VL53L1X_SetSignalThreshold(dev, 1024);
	VL53L1X_SetROI(dev, 16, 16);  // Full FoV (start here)
	if(status)
	{
#ifdef LOG_TYPE_DEBUG
		printk("VL53L1X_SetInterMeasurementInMs failed with status %u\n", status);
#endif		
	}
	status |= VL53L1X_StartRanging(dev);
	tmp  = 0;
	while(tmp==0){
			status |= VL53L1X_CheckForDataReady(dev, &tmp);
			if(status != 0)
			{
				error_count++;
				if(error_count >100)
					break;
			}
	}
	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;
}

After this we read the data returned during ranging...

status = VL53L1X_GetRangeStatus(dev_i2c1, &RangeStatus);
status = VL53L1X_GetDistance(dev_i2c1, &Distance);
status = VL53L1X_GetSignalRate(dev_i2c1, &SignalRate);
status = VL53L1X_GetAmbientRate(dev_i2c1, &AmbientRate);
status = VL53L1X_GetSpadNb(dev_i2c1, &SpadNum);
status = VL53L1X_ClearInterrupt(dev_i2c1); 

After this we disable the power and when we need to read again we enable power and call the above functions.

Hi John

In another post of mine you have higlighted the following:

Alas you really cannot tell. The VL53L1 (no X) is the VL53L1X that's guaranteed to run the more demanding histogram code. I think they all start out as the same chip until some are selected to be able to run the Histogram code. In fact lots of the VL53L1X chips WILL run the tougher code, but you have no guarantee they will run it forever. 

In very small batches or for experiments, you can treat them all as the (no X) chip, but if you are going into production you might be unhappy with the failure rate. 

Or treat them all as if they were all VL53L1X chips - that works. The non-histogram code works on both chips. Guaranteed!

So now I feel that I am stuck as in I have no guarantee that the chip I bought is correct or not and whether it will work in the actual scenario.

Zhiyuan.Han
ST Employee

Hi

With L1X and cover glass o top of it, about you issue "the distance measured by the sensor decreases when the object moves away from the sensor", it was sounded like cross talk impact on ranging data. we expect the split cover glass has quite low cross talk, but maybe this sample quality is not good enough.

you can try to remove the cover glass and check if ranging data increase with target distance increase, then we can confirm the issue comes from cover glass or not. 

or you can try a new cover glass and make sure it is assembled well on top of TOF sensor to see if help.

if you confirmed this is cover glass related, then cross talk calibration is needed. 

 

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.