UM2931 User manual A guide to using the VL53L4CD Ultra Lite Driver (ULD) Introduction The VL53L4CD is a state of the art, Time-of-Flight (ToF), laser-ranging sensor enhancing the ST FlightSense product family. Housed in a miniature reflowable package, it integrates a SPAD array, physical infrared filters, and an integrated firmware to achieve the best ranging performance in various ambient lighting conditions with a range of cover glass materials.
UM2931 Functional description 1 Functional description 1.1 System overview The VL53L4CD system is composed of a hardware module and the Ultra Lite Driver software (VL53L4CD 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.
UM2931 Schematics and I2C configuration Figure 3. Multiple sensors on I2C bus The host hardware design must ensure the sensor XSHUT pins can be controlled individually. Each XSHUT pin must be connected to a host MCU GPIO pin. To change the I2C address, the host must : 1. Put the device in HW standby by setting the XSHUT pin low on all the VL53L4CD devices 2. Raise the XSHUT pin of one of the VL53L4CD (e.g. current_tof) 3. Call VL53LX_SetDeviceAddress(current_tof, newAddress) to program the new address 4.
UM2931 Package content and data flow 2 Package content and data flow 2.1 Driver architecture and content The VL53L4CD Ultra Lite driver package is composed of four folders. The driver is located in folder / VL53L4CD_ULD_API. The following figure represents the driver architecture. Figure 4. Driver architecture User also needs to implement two files located into the /Platform folder. The proposed platform is an empty dummy, and must be filled with dedicated functions. Note: Platform.
UM2931 Calibrations Note: Increasing the number of samples increases the accuracy, but also increases the time for calibration. The time relative to number of samples is linear, and values follow the approximate timeout: • 5 samples ≈ 750 milliseconds • 10 samples ≈ 1000 milliseconds • 20 samples ≈ 1500 milliseconds Users can also call functions VL53L4CD_GetOffset() and VL53L4CD_SetOffset() to get the programmed value, or set a new one. 2.2.
UM2931 Calibrations Figure 6. Valid area for running Xtalk calibration The calibration is performed calling function VL53L4CD_CalibrateXtalk(). The function finds the xtalk, applies the xtalk, and returns the xtalk correction value. It takes a few seconds to be performed. The following table shows the available settings for running Xtalk calibration. Table 2.
UM2931 Ranging flow 2.3 Ranging flow The following figure shows the typical ranging flow to use the VL53L4CD sensor. Figure 7. Ranging flow 2.4 Example of configurations The VL53L4CD sensor can be configured to achieve many usecases. There are several examples of configurations. Best performances can be reached using a high Timing Budget. The average power consumption during ranging can be reduced by changing the InterMeasurement. Table 3.
UM2931 Available features 3 Available features The VL53L4CD ULD API contains several functions in order to tune the sensor, depending of the usecase. All functions available in the driver are described in the sections below. 3.1 Initialization Initialization is the first thing to do to use the VL53L4CD sensor. This operation requires to power on the sensor, then call the function VL53L4CD_SensorInit(). It performs a boot routine, and prepares the sensor. 3.
UM2931 Sigma and signal thresholds The InterMeasurement can be used to reduce the power consumption. The VL53L4CD power consumption depends of the duty cycle Timing Budget/InterMeasurement, so a high InterMeasurement allows to have a low power consumption. The minimum and maximum value of each timing is defined in the following table. Table 4. Minimum and maximum range timing 3.
UM2931 Temperature update 3.5 Temperature update Ambient temperature has an effect on ranging accuracy. In order to ensure the best performances, a temperature update needs to be applied to the sensor. This update needs to be performed when the temperature might have changed by more than 8 degrees Celsius. A dedicated function named ‘VL53L4CD_Start_Temperature_Update()’ has to be used. The function can only be used if the sensor is not ranging.
UM2931 Ranging results 4 Ranging results The VL53L4CD ULD API contains several functions in order to tune the sensor, depending on the usecase. All functions available in the driver are described in the following sections. 4.1 Getting ranging results During the ranging session, there are two ways to know if new ranging data are available : • Polling mode: Continuously use of function VL53L4CD_CheckForDataReady(). The argument gives if a new data is ready.
UM2931 Results interpretation 4.3 Results interpretation The data returned by the VL53L4CD can be filtered in order to take into account the measurement status. A new status is computed for each new measurement. If the sensor is not able to measure a correct distance due to environment conditions, an invalid status is reported. The following table gives the list of available status. Table 7.
UM2931 Revision history Table 8.
UM2931 Contents Contents 1 2 3 4 Functional description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 1.1 System overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 1.2 Schematics and I2C configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 Package content and data flow. . . . . .
UM2931 IMPORTANT NOTICE – PLEASE READ CAREFULLY STMicroelectronics NV and its subsidiaries (“ST”) reserve the right to make changes, corrections, enhancements, modifications, and improvements to ST products and/or to this document at any time without notice. Purchasers should obtain the latest relevant information on ST products before placing orders. ST products are sold pursuant to ST’s terms and conditions of sale in place at the time of order acknowledgement.