VL53L1X Time of Flight Sensor
A Low Cost Laser Range Finder
"Time of Flight" sensors are laser range finders. There are several that are available on breakout boards. We're using the VL53L1X made by ST Microelectronics for detecting walls. The breakout board we're using is provided by Pololu.
The Pololu product page provides a good overview of the sensor. It also provides links to datasheets. This blog post contains the notes I made whilst testing the sensor. I won't repeat information you can find in the datasheet.
This information is not definitive. It's just my impressions from testing a sensor for a few days.
|Distance Mode||Min (mm)||Max (mm)||Max Sunlight (mm)|
The minimum and maximum ranges are the points at which the sensor started reporting errors. In short and medium distance modes the sensor gives incorrect distances below 40 mm but doesn't report any errors.
"Max sunlight" gives the maximum value when the target was lit by direct sunlight through a glass window. The sensor is all but useless if the target or the sensor are in direct sunlight.
The timing budget doesn't seem to affect these distances. The material target is made of has a small effect. White surfaces can probably be detected at a longer range then dark surfaces but the effect is not very significant.
The maximum effective range falls considerably if you reduce the field of view significantly.
|Ambient Light||FOV||Distance Mode||Max (mm)|
There are 3 key configuration parameters that you must set. distance mode timing budget * intermeasurement period
Distance mode determines the maximum range of the sensor. Use Short range if possible. It's faster and more accurate. Medium range is a good all rounder. Use Long range only if you have to. The data sheet says that Short is still effective in bright sunlight but my experience suggests that it isn't.
The timing budget determines how long the sensor records and analyses data. Short timing budgets underestimate the range slightly and the readings are more variable. (The standard deviation is larger.)
The intermeasurement period defines a pause between each sensor reading. Large intermeasurement periods such as 2 seconds are great if you want to save power. In our application we wanted to get readings as fast as possible. In this case there's an optimal period for each timing budget value that maximises the read rate.
|Distance Mode||Timing Budget (ms)||Intermeasurement Period (ms)||Error (%)||Std Dev (mm)||Freq (Hz)|
You should reject measurements unless the measurement status code is 0 - Range Valid.
The sensor will often give reasonable looking ranges even when it's reporting errors. At other times the reported distance can be wildly erratic, swinging between min and max ranges and everything in between. As far as I can tell, the driver does a good job of telling you whether a measurement is usable. My advice is that if the driver rejects the range then you should too!
|0||Range Valid||Successful range||All Ok|
|1||Sigma Fail||The reading is too inaccurate to use. The driver measures the standard deviation (sigma) of the results it's getting as it builds a response. It raises this error if sigma is too high.||Rare under artificial lights. Usually happens in direct sunlight.|
|2||Signal Fail||The driver reports this if the return signal from the target is too weak to be used.||Happens if the distance is too great for the chosen mode. Also common in bright sunlight. I suspect it also happens if there are too many return paths.|
|3||Min Range Fail||?||Never seen it.|
|4||Phase Fail||?||This usually happens when the distance a bit too far for distance mode.|
|5||Hardware Fail||The sensor is not working.||Never seen it.|
|7||No Update||?||You'll see this if you set the timing budget too short. It also occurs occasionally in normal usage.|
All measurements were done on a single sensor using the factory calibration.
We're using the GCC-VL53L1X driver for python. This wraps the C library published by ST Microelectronics which is available from their website. The STM driver version is 2.3.1.