maybe someone can explain me why when I change ROI (range of interest) parameter of VL53L1x sensor then I got different distance to the same object (for example to table plane)? If I use 16x16 ROI settings then distance is correct but if I change ROI to smaller then 16x16 then results is unpredictable for different ROI's and distance varies between 5-40%.
For ROI changing I'm using library source code function: set_custom_roi
Maybe need to do something more if I changing ROI that the distance measurement will be correct?
Here I below I provide the results when I changed the ROI to 4x4 and moved this square in different places in the 16x16 matrix:
81 92 77 64
76 85 60 44
52 77 73 50
57 78 89 73
Distance provided in millimeters. For this test I used these settings:
status = VL53L1_SetDistanceMode(Dev, VL53L1_DISTANCEMODE_SHORT); status = VL53L1_SetMeasurementTimingBudgetMicroSeconds(Dev, 200000); status = VL53L1_SetInterMeasurementPeriodMilliSeconds(Dev, 250);
I'm little bit shocked about the results.
I got similar results when used official VL53L1X_Gui software. Please see attached files with 3 different ROI settings (full_roi.jpg, middle_roi.jpg, small_roi.jpg)
Measurements environment is in measurement_setup.jpg photo.
Real distance to object was 6.1cm
The question is why have such bad distance results when changing ROI?
Maybe need to do something more after changing ROI settings to have correct distance measurement?
P.S. for tests I used X-CUBE-53L1A1 + NUCLEO-F401RE