ESP32 VL53L0X V2 Time-of-Flight Sensor

VL53L0X V2 Time-of-Flight Sensor image

VL53L0X V2

Protocol: I2C

Overview

The VL53L0X V2 (GY-VL53L0XV2) is a high-accuracy Time-of-Flight (ToF) laser ranging sensor that can measure distances up to 2 meters. It's ideal for gesture sensing, obstacle detection, and IoT applications requiring compact, low-power, and precise distance measurement. The VL53L0X V2 (GY-VL53L0XV2) is functionally similar to V1 but offers improved signal stability and build quality. While both versions use the same ST VL53L0X chip, the V2 module typically features a slightly larger PCB (25x13mm) with better trace routing, additional capacitors, and more robust pull-ups. It's more plug-and-play friendly for modern ESP boards and includes clear labeling for I²C, XSHUT, and GPIO pins.

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:

Where to Buy

VL53L0X V2 Time-of-Flight Sensor

Starting from

2.64$ per unit

Amazon com
Amazon.com Ships worldwide
View Price
Amazon de
Amazon.de Ships to EU
View Price
Aliexpress
AliExpress Best value
View Price

Prices are subject to change. We earn from qualifying purchases as an Amazon Associate.

Technical Specifications

Operating Range 30mm to 2000mm
Resolution 1mm
Voltage Range 3V to 5V
Current Consumption ~20–40mA
Interface I²C
Wavelength 940nm
Field of View ~25°
Board Dimensions 25mm × 13mm × 3mm

Pinout Configuration

The VCC pin is used to supply power to the sensor, and it typically requires 3.3V or 5V (refer to the datasheet for specific voltage requirements). The GND pin is the ground connection and must be connected to the ground of your ESP32.

  • VIN: Power supply (3.0V–5.0V)
  • GND: Ground
  • SCL: I²C Clock
  • SDA: I²C Data
  • XSHUT: Reset pin
  • GPIO: Interrupt output (optional)

Wiring with ESP32

Typical ESP32 connection:

  • VIN → 3.3V or 5V
  • GND → GND
  • SDA → GPIO21
  • SCL → GPIO22
  • XSHUT → Optional (reset)
  • GPIO → Optional (interrupt)

Troubleshooting Guide

Common Issues

🚫 Sensor Not Detected

📉 Inaccurate or Unstable Readings

⚠️ Always Reads Maximum Distance

Debugging Tips

🔍 Serial Monitor

⚡ Voltage Checks

Code Examples

Arduino Example

C++
🏠

ESPHome Example

YAML
🐍

MicroPython Example

Python

Conclusion

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.

For optimal performance, ensure proper wiring and follow the recommended configuration for your chosen development platform.

Always verify power supply requirements and pin connections before powering up your project to avoid potential damage.