Main Content

VL53L0X Time of Flight Sensor

Measure distance to a target object

  • Library:
  • Simulink Support Package for Raspberry Pi Hardware / Sensors / IMU Sensors

  • VL53L0X Sensor

Description

The VL53L0X Time of Flight Sensor block measures the distance to a target object for a complete field of view (FOV = 25 degrees). This block also provides the option to select one of four ranging modes based on your requirements.

Note

XSHUT connection is required for VL53L0X sensor. Connect the XSHUT pin to vcc.

Ports

Output

expand all

The Distance port outputs the target object distance in millimeters

Data Types: uint16

Parameters

expand all

Specify the module on the board that you are using for I2C communication..

The I2C address of the VL53L0X sensor from which the block reads the values. You can configure this value. The range of I2C address is from 0x08 to 0x77.

Select the distance ranging mode for measuring the distance to the target object. The four ranging modes available are shown in this table.

Ranging modeTiming budgetTypical max rangeTypical application
Default30 ms1.2 mstandard
High accuracy200 ms2 mprecise measurement
Long range33 ms1.2 mlong ranging for dark conditions
High speed20 ms1.2 mhigh speed where accuracy is not priority

The timing budget is the time taken by the sensor to perform one range measurement.

Specify how often this block reads the data from the VL53L0X sensor. When you set this parameter to -1, Simulink determines the best sample time for the block based on the block context within the model.

Version History

Introduced in R2022b