VL53L0X V2 Time-of-Flight Sensor

View on Amazon
Overview
About VL53L0X V2 Time-of-Flight Sensor
📏 VL53L0X V2 Sensor Overview
- Range: 3cm to 200cm (Max)
- Interface: I²C digital communication
- Resolution: 1mm
- Field of View: ~25°
- Operating Voltage: 3V to 5V
- Typical Current: ~20–40mA
- Compact Board Size: 25mm × 13mm × 3mm
- I²C Pins + XSHUT + GPIO (interrupt/reset)
Check Other sensors modules based on VL53L0X Time of Flight Sensor:
Get Your VL53L0X V2
💡 Prices are subject to change. We earn from qualifying purchases as an Amazon Associate.
VL53L0X V2 Pinout
The VL53L0X V2 pinout includes I2C communication pins (SDA, SCL), power supply (VIN, GND), reset pin (XSHUT), and interrupt pin (GPIO) with improved build quality over V1.
Visual Pinout Diagram

Pin Types
Quick Tips
V2 version with better signal stability,Measurement range: 30 mm to 2000 mm (2 meters),Resolution: 1 mm,Field of View: ~25°
voltage: 3.0V to 5.0V,Larger PCB (25mm × 13mm) with better trace routing,Additional capacitors for improved stability
robust pull-up resistors,I2C address: 0x29 (default),Better plug-and-play compatibility with modern boards
Pin Descriptions
| Pin Name | Type | Description | Notes |
|---|---|---|---|
1 VIN | Power | Power supply input (3.0V to 5.0V) | Typically 3.3V or 5V |
2 GND | Ground | Ground connection | Common ground |
3 SCL | I2C Clock | I2C Serial Clock line | Clock signal (requires pull-up) |
4 SDA | I2C Data | I2C Serial Data line | Bidirectional data (requires pull-up) |
5 XSHUT | Control | Reset pin (active low) | Used to reset sensor or change I2C address |
6 GPIO | Interrupt | Interrupt/reset output pin | Optional for event-driven measurements |
Wiring VL53L0X V2 to ESP32
Connect the VL53L0X V2 to your ESP32 via I2C (SDA and SCL pins). This V2 version features improved build quality with better signal stability compared to the original VL53L0X. Pull-up resistors are included on the module.
Visual Wiring Diagram

Connection Status
Protocol
Pin Connections
| VL53L0X V2 Pin | Connection | ESP32 Pin | Description |
|---|---|---|---|
1 VIN Required | 3.3V or 5V | Power supply (3.0V to 5.0V) | |
2 GND Required | GND | Ground connection | |
3 SDA Required | GPIO21 | I2C data line (with pull-up) | |
4 SCL Required | GPIO22 | I2C clock line (with pull-up) | |
5 XSHUT Optional | GPIO (optional) | Reset control for address changing | |
6 GPIO Optional | GPIO (optional) | Interrupt output for measurement ready |
offers improved signal stability over V1
build quality with larger PCB and improved routing
address: 0x29 (default, changeable via XSHUT)
resistors included on module (more robust than V1)
plug-and-play friendly for ESP32 boards
pin labeling for easy connection
same libraries as V1 (Adafruit_VL53L0X)
allows multiple sensors on same I2C bus
performance with modern ESP boards
over V1 for new projects
shiny, transparent, or very dark surfaces for best accuracy
VL53L0X V2 Troubleshooting
Common issues and solutions to help you get your sensor working
Common Issues
Issue: VL53L0X not showing on I²C bus.
Solution: Check that XSHUT is tied high and that SDA/SCL are correctly connected. Scan for address with I²C scanner.
Issue: Sensor gives fluctuating values.
Solution: Try averaging measurements and avoid reflective or dark objects too close to the sensor.
Issue: Constant 2000 mm or 0 mm readings.
Solution: Ensure object is within range and directly in front of the sensor. Add a delay between readings.
Debugging Tips
Use the Serial Monitor to check for error messages and verify the sensor's output. Add debug prints in your code to track the sensor's state.
Use a multimeter to verify voltage levels and check for continuity in your connections. Ensure the power supply is stable and within the sensor's requirements.
Additional Resources
VL53L0X V2 Programming Examples
Ready-to-use code examples for different platforms and frameworks
Wrapping Up VL53L0X V2
The ESP32 VL53L0X V2 Time-of-Flight Sensor is a powerful distance sensor that offers excellent performance and reliability. With support for multiple development platforms including Arduino, ESP-IDF, ESPHome, PlatformIO, and MicroPython, it's a versatile choice for your IoT projects.
Best Practices
For optimal performance, ensure proper wiring and follow the recommended configuration for your chosen development platform.
Safety First
Always verify power supply requirements and pin connections before powering up your project to avoid potential damage.
Ready to Start Building?
Now that you have all the information you need, it's time to integrate the VL53L0X V2 into your ESP32 project and bring your ideas to life!
Explore Alternative Sensors
Looking for alternatives to the VL53L0X V2? Check out these similar sensors that might fit your project needs.

HC-SR04 Ultrasonic Distance Sensor
The HC-SR04 is a versatile ultrasonic distance sensor capable of measuring distances up to 4 meters with high precision. It is widely used...

JSN-SR04T Waterproof Ultrasonic Distance Sensor
The JSN-SR04T is a waterproof ultrasonic distance sensor ideal for outdoor and industrial applications. With a measuring range of up to 6...

TOF050C Time-of-Flight Sensor
The TOF050C is a short-range laser-ranging sensor using the VL6180 chip, offering highly accurate distance measurements up to 50 cm. It is...
