ESP32 VL53L1X Time-of-Flight Sensor

VL53L1X Time-of-Flight Sensor image

VL53L1X

Protocol: I2C

Overview

The VL53L1X is a high-accuracy long-distance laser-ranging sensor from STMicroelectronics. It uses a 940nm VCSEL emitter and advanced SPAD detection to measure absolute distances up to 4 meters with millimeter-level precision.

About VL53L1X Time-of-Flight Sensor

📏 VL53L1X Sensor Overview

  • Range: 0cm to 400cm (Max)
  • Interface: I²C digital communication
  • Resolution: 1mm
  • Field of View: 27°
  • Operating Voltage: 2.6V to 3.5V (typically 3.3V)
  • Typical Current: ~20–40mA during ranging
  • Laser Wavelength: 940nm
  • Adjustable timing budget and distance mode
  • Compact 6-pin PCB module with mounting holes

Check Other sensors modules based on VL53L1X Time of Flight Sensor:

Where to Buy

VL53L1X Time-of-Flight Sensor

Starting from

$3.5 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 0cm to 400cm
Blind Zone 0–4cm
Resolution 1mm
Voltage Range 2.6V to 3.5V
Current Consumption ~20–40mA
Interface I²C
Wavelength 940nm
Field of View 27°

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.3V recommended)
  • GND: Ground
  • SCL: I²C Clock
  • SDA: I²C Data
  • GPIO1: Interrupt output
  • XSHUT: Shutdown (active low)

Wiring with ESP32

Typical connection for ESP32 (I²C):

  • VIN → 3.3V
  • GND → GND
  • SDA → GPIO21
  • SCL → GPIO22
  • GPIO1 → Optional
  • XSHUT → Optional (tie to 3.3V to enable)

Troubleshooting Guide

Common Issues

🚫 Sensor Not Detected

📉 Distance Readings Fluctuate

⚠️ Always Reads Maximum

Debugging Tips

🔍 Serial Monitor

⚡ Voltage Checks

Code Examples

Arduino Example

C++
🏠

ESPHome Example

YAML
🐍

MicroPython Example

Python

Conclusion

The ESP32 VL53L1X 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.