Vl53L1X Minimum Timing Budget

I am using the Pololu Vl53L1X Arduino Library with an ATMega32u4-based host device (Arduino Leonardo). My use-case requires speed (and hopefully accuracy) within a distance range below 1 meter.

I’m trying to fully understand my limits and necessary considerations in regards to the setMeasurementTimingBudget() function.

I see that in both the README and the ST User Manual it states that 20ms (20000us) is the minimum for ‘Short’ distance mode. However, through testing I see that I am able to specify a value smaller than 20000us with setMeasurementTimingBudget(). In fact, only values below 4528 (“TimingGuard” from Vl53L1X.h) will cause the function to return FALSE (invalid Timing Budget). Furthermore, it does not seem to be the case that values between 4528 and 20000 are being forced to the stated “minimum” of 20000.

Can anyone offer any insight as to why I should use a Timing Budget of 20000us or greater?

Thanks a lot @ the Polulu Team for your work making these tools more accessible.

Hi,

Our library does a lot less error checking and validation of settings than ST’s VL53L1X API, so even if the library does not raise an error or return false with values less than 20000, that doesn’t necessarily mean that setting will work properly. If you try to set a timing budget lower than 20 ms, you might see that the sensor is actually taking more time than that for each measurement, or you might get poor ranging performance or unexpected behavior from the sensor.

Kevin