ST UM2884 Manuale utente

Introduction
The purpose of this user manual is to explain how to handle the VL53L5CX Time-of-Flight (ToF) sensor, using the ultra lite driver
(ULD) API. It describes the main functions to program the device, the calibrations, and the output results.
The VL53L5CX is a state of the art, ToF, multizone ranging sensor enhancing the ST FlightSense product family. Housed in
a miniature reflowable package, it integrates a SPAD array, physical infrared filters, and diffractive optical elements (DOE) to
achieve the best ranging performance in various ambient lighting conditions with a range of cover glass materials.
Multizone distance measurements are possible up to 8x8 zones with a wide 63 ° diagonal field of view (FoV) which can be
reduced by software. Each zone of the VL53L5CX measures the distance of the target up to 4 meters, at a maximum frequency
of 60 Hz.
Thanks to ST Histogram patented algorithms, the VL53L5CX is able to detect different objects within the FoV. The Histogram
also provides immunity to cover glass crosstalk beyond 60 cm.
Figure 1. VL53L5CX sensor module
References
1. VL53L5CX datasheet (DS13754)
A guide to using the VL53L5CX multizone Time-of-Flight ranging sensor with
wide field of view Ultra Lite Driver (ULD)
UM2884
User manual
UM2884 - Rev 2 - August 2021
For further information contact your local STMicroelectronics sales office.
www.st.com

1Acronyms and abbreviations
Acronym/abbreviation Definition
DOE diffractive optical element
FoV field of view
I2C inter-integrated cirduit (serial bus)
Kcps/SPAD Kilo-count per second per spad (unit used to quantify the
number of photons into the SPAD array)
RAM random access memory
SCL serial clock line
SDA serial data
SPAD single photon avalanche diode
ToF Time-of-Flight
ULD ultra lite driver
VCSEL vertical cavity surface emitting diode
Xtalk crosstalk
UM2884
Acronyms and abbreviations
UM2884 - Rev 2 page 2/19

2Functional description
2.1 System overview
The VL53L5CX system is composed of a hardware module and the ultra lite driver software (VL53L5CX ULD)
running on a host (see figure below). The hardware module contains the ToF sensor. ST delivers the software
driver which is referred to in this document as "the driver". This document describes the functions of the driver
which are accessible to the host. These functions control the sensor and get the ranging data.
Figure 2. VL53L5CX system overview
2.2 Effective orientation
The module includes a lens over the RX aperture which flips (horizontally and vertically) the captured image of the
target. As a consequence, the zone identified as zone 0 in the bottom left of the SPAD array is illuminated by a
target located at the top right-hand side of the scene.
Figure 3. VL53L5CX effective orientation
UM2884
Functional description
UM2884 - Rev 2 page 3/19

2.3 Schematics and I2C configuration
The communication between driver and firmware is handled by I2C, with a capability of operating up to 1 MHz.
The implementation requires pull-ups on the SCL and SDA lines. Please see VL53L5CX datasheet for more
information.
The VL53L5CX device has a default I2C address of 0x52. However, it is possible to change the default address
to avoid conflicts with other devices, or facilitate adding multiple VL53L5CX modules to the system for a greater
system FoV. The I2C address can be changed using vl53l5cx_set_i2c_address() function.
Figure 4. Multiple sensors on I2C bus
To allow a device to have its I2C address changed without affecting others on the I2C bus, it is important to
disable the I2C communication of the devices not being changed. The procedure is the following one :
1. Power up the system as normal.
2. Pull down the LPn pin of the device that will not have its address changed.
3. Pull up the LPn pin of the device that has the I2C address changed.
4. Program the I2C address to the device using function set_i2c_address() function.
5. Pull up the LPn pin of the device not being reprogrammed.
All devices should now be available on the I2C bus. Repeat the above steps for all the VL53L5CX devices in the
system that require a new I2C address.
UM2884
Schematics and I2C configuration
UM2884 - Rev 2 page 4/19

3Package content and data flow
3.1 Driver architecture and content
The VL53L5CX ULD package is composed of four folders. The driver is located in folder /VL53L5CX_ULD_API.
The driver is composed of mandatory and optional files. Optional files are plugins used to extend ULD features.
Each plugin starts with the word “vl53l5cx_plugin” (e.g vl53l5cx_plugin_xtalk.h). If the user does not want
the proposed plugins, they can be removed without impacting the other driver features. The following figure
represents the mandatory files and the optional plugins.
Figure 5. Driver architecture
The user also needs to implement two files located in the /Platform folder. The proposed platform is an empty
shell, and must be filled with dedicated functions.
Note: Platform.h file contains mandatory macros to use the ULD. All the file content is mandatory to correctly use the
ULD.
UM2884
Package content and data flow
UM2884 - Rev 2 page 5/19

3.2 Calibration flow
Crosstalk (xtalk) is defined as the amount of signal received on the SPAD array which is due to VCSEL light
reflection inside the protective window (cover glass) added on top of the module. The VL53L5CX module is
self-calibrated, and can be used without any additional calibration.
Xtalk calibration may be required if the module is protected by a coverglass. The VL53L5CX is immune to xtalk
beyond 60 cm thanks to an histogram algorithm, but at short distances below 60 cm, xtalk can be larger than the
actual returned signal, giving a false target reading or making targets appear closer than they really are. All xtalk
calibration functions are included in a xtalk plugin (optional). The user needs to use the file ‘vl53l5cx_plugin_xtalk’.
The xtalk can be calibrated once, and data can be saved to be re-used later. A target at fixed distance, with a
known reflectance is required. The minimum distance required is 600 mm, and the target must cover the whole
FoV. Depending on the setup, the user can modify settings in order to adapt the Xtalk calibration, as proposed in
the following table.
Table 1. Available settings for calibration
Setting Min Proposed by ST Max
Distance [mm] 600 600 3000
Number of samples 1 4 16
Reflectance [%] 1 3 99
Note: Increasing the number of samples increases the accuracy, but it also increases the time for calibration. The time
relative to the number of samples is linear, and values follow the approximate timeout:
• 1 sample ≈ 1 second
• 4 samples ≈ 2.5 seconds
• 16 samples ≈ 8.5 seconds
The calibration is performed using function vl53l5cx_calibrate_xtalk(). This function can be used at any time.
However, the sensor must be initialized first. The following figure represents the Xtalk calibration flow.
Figure 6. Xtalk calibration flow
UM2884
Calibration flow
UM2884 - Rev 2 page 6/19

3.3 Ranging flow
The following figure represents the ranging flow used to get measurements. Xtalk calibration and optional function
calls must be used before starting the ranging session. The get/set functions cannot be used during a ranging
session, and 'on-the-fly' programming is not supported.
Figure 7. Ranging flow using VL53L5CX
UM2884
Ranging flow
UM2884 - Rev 2 page 7/19

4Available features
The VL53L5CX ULD API includes several functions which allow the user to tune the sensor, depending on the
usecase. All functions available for the driver are described in the following sections.
4.1 Initialization
Initialization must be done before using the VL53L5CX sensor. This operation requires the user to:
1. Power on the sensor (VDDIO, AVDD, LPn pins set to High, and pin I2C_RST set to 0)
2. Call the function vl53l5cx_init(). The function copies the firmware (~84 kbytes) to the module by loading the
code over the I2C interface and performing a boot routine to complete the initialization.
4.2 Sensor reset management
To reset the device, the following pins needs to be toggled:
1. Set pins VDDIO, AVDD, and LPn pins to low.
2. Wait 10 ms.
3. Set pins VDDIO, AVDD, and LPn pins to high.
Note: Toggling only I2C_RST pin resets the I2C communication.
4.3 Resolution
The resolution corresponds to the number of available zones. The VL53L5CX sensor has two possible
resolutions: 4x4 (16 zones) and 8x8 (64 zones). By default the sensor is programmed in 4x4.
The function vl53l5cx_set_resolution() allows the user to change the resolution. As the ranging frequency
depends on the resolution, this function must be used before updating the ranging frequency. Moreover, changing
the resolution also increases the traffic size on the I2C bus when results are read.
4.4 Ranging frequency
Ranging frequency can be used to change the measurement frequency. As the maximum frequency is different
between 4x4 and 8x8 resolutions, this function needs to be used after choosing a resolution. The minimum and
maximum allowed values are listed in the following table.
Table 2. Minimum and maximum ranging frequencies
Resolution Min ranging frequency [Hz] Max ranging frequency [Hz]
4x4 1 60
8x8 1 15
Ranging frequency can be updated using function vl53l5cx_set_ranging_frequency_hz(). By default, the ranging
frequency is set to 1 Hz.
UM2884
Available features
UM2884 - Rev 2 page 8/19

4.5 Ranging mode
Ranging mode allows the user to choose between ranging in high performance or low power consumption.
There are two modes proposed:
• Continuous: The device continuously grabs frames with a ranging frequency defined by user. The VCSEL
is enabled during all ranging, so maximum ranging distance and ambient immunity are better. This mode is
advised for fast ranging measurements or high performances.
• Autonomous: This is the default mode. The device continuously grabs frames with a ranging frequency
defined by the user. The VCSEL is enabled during a period defined by the user, using function
vl53l5cx_set_integration_time_ms(). As the VCSEL is not always enabled, the power consumption is
reduced. The benefits are more obvious with a reduced ranging frequency. This mode is advised for low
power applications.
The ranging mode can be changed using function vl53l5cx_set_ranging_mode().
4.6 Integration time
Integration time is a feature only available using Autonomous ranging mode (refer to Section 4.5 Ranging
mode). It allows the user to change the time while VCSEL is enabled. Changing integration time if Ranging mode
is set to continuous has no effect. The default integration time is set to 5 ms.
The effect of integration time is different for 4x4 and 8x8 resolutions. Resolution 4x4 is composed of one
integration time, and 8x8 resolution is composed of four integration times. The following figures represent the
VCSEL emission for both resolutions.
Figure 8. Integration time for 4x4 autonomous
Figure 9. Integration time for 8x8 autonomous
The sum of all integration times + 1 ms overhead must be lower than the measurement period, otherwise the
ranging period will be automatically increased.
UM2884
Ranging mode
UM2884 - Rev 2 page 9/19

4.7 Power modes
Power modes can be used to reduce the power consumption when the device is not used. The VL53L5CX can
operate in one of the following power modes:
• Wake-up: The device is set in HP idle (high power), waiting for instructions.
• Sleep: The device is set in LP idle (low power), the low power state. The device cannot be used until set in
Wake-up mode. This mode retains the firmware and the configuration.
The power mode can be changed using function vl53l5cx_set_power_mode(). The default mode is Wake-up.
Note: If the user wants to change the power mode, the device must not be in a ranging state.
4.8 Sharpener
The signal returned from a target is not a clean pulse with sharp edges. The edges slope away and may affect the
distances reported in adjacent zones. The sharpener is used to remove some or all of the signal caused by veiling
glare.
The example shown in the following figure represents a close target at 100 mm centered in the FoV, and another
target, further behind at 500 mm. Depending on the sharpener value, the close target may appear in more zones
than the real one.
Figure 10. Example of scene using several sharpener values
Sharpener can be changed using function vl53l5cx_set_sharpener_percent(). The allowed values are between
0 % and 99 %. The default is 5 %.
UM2884
Power modes
UM2884 - Rev 2 page 10/19
Questo manuale è adatto per i seguenti modelli
1
Indice
Altri manuali ST Accessori

ST
ST VL53L1X API Manuale utente

ST
ST VL53L4CX Manuale utente

ST
ST X-NUCLEO-53L3A2 Manuale utente

ST
ST STEVAL-RFPLUG01 Manuale utente

ST
ST STEVAL-IOD04KT1 Manuale utente

ST
ST VL6180X Istruzioni per l'installazione e il funzionamento

ST
ST X-CUBE-MEMS1 Manuale utente

ST
ST VL6180 Manuale utente

ST
ST LPS331AP Istruzioni per l'installazione e il funzionamento

ST
ST LPS25H Istruzioni per l'installazione e il funzionamento
























