3.6.4 Setting threshold and detection mode
In addition to the regular ranging features, the sensor also has the capability to detect a target with predefined
detection criteria. When the preconfigured criteria are matched the sensor raises an interrupt and returns the
distance.
Use the VL53L1X_ERROR VL53L1X_SetDistanceThreshold (dev, ThreshLow, ThreshHigh, Window,
IntOnNoTarget) to configure the detection criteria.
• ThreshLow is the low distance threshold in millimeters
• ThreshHigh is the high distance threshold in millimeters
• Window :
– Window = 0: Below a certain distance
◦ If object distance > ThreshLow or no object found: no report
◦ If object distance < ThreshLow and object found: report
– Window = 1: Beyond a certain distance
◦ If object distance < ThreshHigh or no object found: no report
◦ If object distance > ThreshHigh and object found: report
– Window = 2: Out of distance range (min/max), "out of Window"
◦ ThreshLow < object distance < ThreshHigh: no report
◦ ThreshLow > object distance > ThreshHigh: report
– Window = 3: Within the distance range (min/max), "inside Window"
◦ ThreshLow > object distance > ThreshHigh: no report
◦ ThreshLow < object distance < ThreshHigh: report
• IntOnNoTarget is no longer used, set to 1
To go back to the regular ranging mode, write 0x20 to the 0x46 register (8 bits).
3.6.5 Setting ROI
The receiving SPAD array of the sensor consists of 16x16 SPADs which cover the full FoV.
It is possible to program a smaller ROI, with a smaller number of SPADs, to reduce the FoV for applications which
require a narrow FoV.
Use the function VL53L1X_SetROI (dev, X, Y).
• X is the ROI width from 4 to 16, if X < 4 the Firmware limits the width to 4
• Y is the ROI height from 4 to 16, if Y < 4 the Firmware limits the height to 4
VL53L1X_GetROI returns the current ROI.
Note: Lowering the number of SPADs limits the maximum ranging distance. Some experimentation is required.
UM2510
Optional functions
UM2510 - Rev 1
page 8/26