

The VL53L0X is a compact and high-performance time-of-flight (ToF) distance sensor manufactured by STMicroelectronics. It uses laser technology to measure distances with high accuracy and speed, making it ideal for applications requiring precise distance measurements. The sensor can measure distances up to 2 meters and is designed to work in a variety of lighting conditions.








The following table outlines the key technical details of the VL53L0X sensor:
| Parameter | Value |
|---|---|
| Operating Voltage | 2.6V to 3.5V |
| Communication Interface | I²C |
| Measurement Range | 30mm to 2000mm (2 meters) |
| Measurement Accuracy | ±3% (typical) |
| Field of View (FoV) | 25° |
| Operating Temperature Range | -20°C to +70°C |
| Power Consumption (Active) | ~20mW |
| Dimensions | 4.4mm x 2.4mm x 1.0mm |
The VL53L0X sensor has the following pinout:
| Pin Name | Pin Number | Description |
|---|---|---|
| VIN | 1 | Power supply input (2.6V to 3.5V) |
| GND | 2 | Ground |
| SDA | 3 | I²C data line |
| SCL | 4 | I²C clock line |
| XSHUT | 5 | Shutdown pin (active low, used to reset the sensor) |
| GPIO1 | 6 | Interrupt output (optional, configurable) |
0x29. Ensure no other devices on the I²C bus share this address.Below is an example of how to interface the VL53L0X with an Arduino UNO using the Adafruit VL53L0X library:
#include <Wire.h>
#include <Adafruit_VL53L0X.h>
// Create an instance of the VL53L0X sensor
Adafruit_VL53L0X lox = Adafruit_VL53L0X();
void setup() {
Serial.begin(9600); // Initialize serial communication
while (!Serial) {
delay(10); // Wait for the serial port to be ready
}
Serial.println("VL53L0X Test");
// Initialize the sensor
if (!lox.begin()) {
Serial.println("Failed to find VL53L0X sensor!");
while (1) {
delay(10); // Halt execution if the sensor is not found
}
}
}
void loop() {
VL53L0X_RangingMeasurementData_t measure;
// Perform a distance measurement
lox.rangingTest(&measure, false);
// Check if the measurement is valid
if (measure.RangeStatus != 4) { // 4 indicates an out-of-range error
Serial.print("Distance (mm): ");
Serial.println(measure.RangeMilliMeter);
} else {
Serial.println("Out of range");
}
delay(100); // Wait before the next measurement
}
Sensor Not Detected on I²C Bus
0x29) is not conflicting with other devices.Inaccurate Distance Measurements
Sensor Not Responding After Power-Up
Q: Can the VL53L0X measure distances beyond 2 meters?
A: No, the sensor is designed for a maximum range of 2 meters. Measurements beyond this range may be unreliable.
Q: Is the VL53L0X suitable for outdoor use?
A: While the sensor can operate in various lighting conditions, it is not weatherproof and should be protected from moisture and extreme temperatures.
Q: Can multiple VL53L0X sensors be used on the same I²C bus?
A: Yes, but each sensor must have a unique I²C address. This can be achieved by toggling the XSHUT pin and reprogramming the address for each sensor.
Q: What is the typical response time for a distance measurement?
A: The sensor can perform measurements in as little as 30ms, depending on the configuration.
By following this documentation, users can effectively integrate the VL53L0X into their projects and troubleshoot common issues.