Main Content

VL53L0X Time of Flight Sensor

Measure distance to a target object

Since R2022a

Add-On Required: This feature requires the Simulink Support Package for Arduino Hardware add-on.

  • VL53L0X Sensor

Libraries:
Simulink Support Package for Arduino Hardware / Sensors
Simulink Support Package for Raspberry Pi Hardware / Sensors

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 I2C module on the Arduino® hardware to communicate with sensor peripherals. For more information on the Arduino pin mapping and modules that hardware boards support, see Pin Mapping for Arduino Timer Independent Blocks.

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 R2022a