[VL53L1X] question on #01> correctness of range measurement, #02> Usage of VL53L1_PRESETMODE_LITE_RANGING
Hi ST engineers,
I would like to figure out how to get accurate measured distance value and getting the value with reasonable interval.
[testing environment]
Nordic NRF52840, vl53l1_platform.c file implemented to use nordic I2C api,
SW version: en.STSW-IMG007 (2.3.3)
refered the reference implementation (STM32CubeExpansion_53L1A1_V2.1.0)
I need only short distance measurement(<1m)
user polling only (not using interrupt)
[VL53L1 test items]
#01. Simple mode
status = VL53L1_WaitDeviceBooted(pdev);
status = VL53L1_DataInit(pdev);
status = VL53L1_StaticInit(pdev);
status = VL53L1_SetDistanceMode(pdev, VL53L1_DISTANCEMODE_LONG);
status = VL53L1_SetMeasurementTimingBudgetMicroSeconds(pdev, 50000);
status = VL53L1_SetInterMeasurementPeriodMilliSeconds(pdev, 500);
status = VL53L1_StartMeasurement(pdev);
RESULT:
There are too many measurement errors(checked via RangingData.RangeStatus that is not 0) and the measured distance is not correct.
#02. fast ranging test
status = VL53L1_WaitDeviceBooted(pdev);
status = VL53L1_DataInit(pdev);
status = VL53L1_StaticInit(pdev);
status = VL53L1_SetPresetMode(pdev, VL53L1_PRESETMODE_LITE_RANGING);
status = VL53L1_SetDistanceMode(pdev, VL53L1_DISTANCEMODE_SHORT);
status = VL53L1_SetMeasurementTimingBudgetMicroSeconds(pdev, 20000);
status = VL53L1_SetInterMeasurementPeriodMilliSeconds(pdev, 25);
status = VL53L1_SetUserROI(pdev, &roiData);
status = VL53L1_StartMeasurement(pdev);
RESULT:
The measured distance roughly correct, but the read interval is too long. it seems to me the value updated interval is longer than 1 sec. I have read the user manual and data sheet. Based on the materials, the fast ranging should be much faster than my test result.
#03. other
status = VL53L1_WaitDeviceBooted(pdev);
status = VL53L1_DataInit(pdev);
status = VL53L1_StaticInit(pdev);
status = VL53L1_SetPresetMode(pdev, VL53L1_PRESETMODE_AUTONOMOUS);
status = VL53L1_SetDistanceMode(pdev, VL53L1_DISTANCEMODE_SHORT);
status = VL53L1_SetMeasurementTimingBudgetMicroSeconds(pdev, 10000);
status = VL53L1_StartMeasurement(pdev);
RESULT:
too many measurement error. update interval is much faster than fast ranging test.
And one more thing I found that is after the FOV change to 4x4 (via VL53L1_SetUserROI) the measured distance looks more accurate.
My Questions are as below.
#A. How can I get correct distance value?
#B. How can I get correct distance value with shorter interval ( ex> 100ms)
I have read the Q&A in ST. But I also have confusion of three mode(VL53L1_PRESETMODE_AUTONOMOUS, VL53L1_PRESETMODE_LITE_RANGING, VL53L1_PRESETMODE_LOWPOWER_AUTONOMOUS)
I don't have experience on ST ToF sensor, so any small help or comment will be much helpful for me.
