2019-06-05 04:08 AM
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 */
2019-06-05 04:09 AM
2019-06-05 04:10 AM
2019-06-05 04:10 AM
2019-06-05 05:00 AM
Hi JR,
To get better repeatability, increase the timing budget. Try 200 ms of timing budget.
Julien
2019-06-05 06:48 AM
Hi Julien,
I changed that parameter, but this problem didn´t disappear. I am going to attach one example:
This ripple appears in short distances, from 100 to 200 mm. I also have changed the ROI but to no avail.
The sensors that I´m using, are working in a closed metalic box , in the next graph I turned on a hairdryer: (sample nº 880)
It seems that the measure degenerates as time goes by, for this reason I think the problem ca be in the temperature.
The sensor is working continously, I never stop the ranging measure. Should I stop the sensor to avoid this noise?
Thanks for your response.