VL53L0X ToF

A laser time-of-flight distance sensor that measures absolute range up to 2 m over I2C, independent of the target's color or reflectance.

VL53L0X ToF: Time-of-flight distance

What is the VL53L0X ToF?

The VL53L0X is ST's second-generation FlightSense time-of-flight (ToF) ranging module. Instead of estimating distance from reflected light intensity like an IR proximity sensor, it emits invisible 940 nm laser pulses from a VCSEL and times how long the photons take to return to an on-chip array of Single Photon Avalanche Diodes (SPADs). Because it measures elapsed time rather than brightness, the reported distance stays accurate whether the target is white, black, matte, or glossy.

An embedded microcontroller runs the whole ranging pipeline and exposes results over I2C, so the host only reads a distance in millimeters. The device measures absolute range up to about 2 m with a field of view near 25 degrees, and it is eye-safe (Class 1 laser per IEC 60825-1:2014). Ranging behavior is configurable through timing budget and profiles: the default profile is tuned for speed at shorter range, while long-range and high-accuracy profiles trade measurement rate for reach or precision.

On this GY/CJMCU-style breakout the bare ST silicon sits behind an onboard voltage regulator and I2C pull-ups, so the board runs from a 3.3-5V supply. Two extra pins expose the sensor's control lines: XSHUT for hardware shutdown/reset, and GPIO1 as a programmable interrupt output for data-ready or threshold events.

VL53L0X ToF pinout

PinFunctionType
VCC VCC (3-5V)PowerPower in
GND GNDPowerPower in
SCL SCLI²C SCLBidirectional (GPIO)
SDA SDAI²C SDABidirectional (GPIO)
GPIO1 GPIO1 (INT)Digital interrupt output (open-drain)Digital output
XSHUT XSHUTDigital shutdown / reset, active LOWDigital input

Specifications

Operating voltage
3.3 V (max 5 V)
Interface
I²C
I²C address
0x29
I²C pull-ups
On-board (no external resistors)
Dimensions
25.2 × 5 × 10.6 mm

Verified from the Tinkered component library · GY / CJMCU breakout (ST VL53L0X).

Circuit requirements

  • Power the breakout's VCC from 3.3-5V. The regulator drops it to the ~2.8V the VL53L0X silicon needs, so do not wire 5V straight to a bare chip: the sensor die itself is rated only 2.6-3.5V and is not 5V tolerant.
  • Connect SDA and SCL to the host's I2C bus. The board already carries I2C pull-up resistors, so do not add your own on the same bus. Note the sensor's I/O is referenced to its internal 2.8V rail; if you drive it from a strictly 5V-logic controller, confirm your specific board level-shifts SDA/SCL.
  • The default 7-bit I2C address is 0x29 (written as 0x52 in the datasheet's 8-bit form). Every VL53L0X ships with this same address, and it is volatile: it resets to 0x29 on every power cycle.
  • To run more than one VL53L0X on a single bus, hold each sensor's XSHUT low at boot, then bring the sensors up one at a time and reassign a unique address before enabling the next. Keep XSHUT driven or pulled high for normal operation rather than floating.
  • GPIO1 is an open-drain interrupt output. Use it (with a pull-up, already present on the breakout) for data-ready or window/threshold interrupts instead of polling.
  • After power-up the sensor boots quickly but still needs initialization plus SPAD, offset, and cross-talk calibration for best results. A longer measurement timing budget yields longer range and better accuracy at a lower sample rate.

Board compatibility

The VL53L0X ToF connects to any of the microcontrollers supported in Tinkered. Mind the 3.3 V logic level on 3.3 V boards.

Common VL53L0X ToF mistakes

Feeding 5V to a bare VL53L0X chip

The 3.3-5V rating belongs to the breakout's regulator, not the sensor die. The VL53L0X silicon operates at 2.6-3.5V and its pins are not 5V tolerant. Only the regulated breakout accepts 5V on VCC.

Putting two sensors on one bus at 0x29

All VL53L0X units power up at address 0x29, so a second one causes an address clash. You must use XSHUT to enable them one at a time and reprogram addresses, and repeat that after every reset because the new address does not persist.

Mixing up the 7-bit and 8-bit address

The datasheet lists 0x52 (8-bit), while most Arduino and Python libraries expect the 7-bit form 0x29. Passing the wrong one means the sensor never ACKs and scans come up empty.

Expecting a full 2 m in the default profile

The default ranging profile is optimized for speed and tops out around 1.2 m. Reaching close to 2 m requires the long-range profile, low ambient light, and a reasonably reflective target.

Leaving XSHUT floating

With XSHUT unconnected the sensor may not boot or run reliably. Tie it high for single-sensor use, or drive it from a GPIO when you need shutdown control or multi-sensor addressing.

VL53L0X ToF datasheet

Official VL53L0X ToF datasheetGY / CJMCU breakout (ST VL53L0X)

Popular VL53L0X ToF projects

Robot obstacle avoidance

Mount one or several VL53L0X sensors as forward or side range finders for wall following and collision avoidance, using reflectance-independent readings that beat simple IR proximity modules.

Touchless faucet or dispenser

Detect a hand entering the sensor's cone and fire an interrupt on GPIO1 to trigger a pump or valve, the classic 'hand detection' use case ST designed FlightSense for.

1D gesture control

Read changing distance over time to recognize hand swipes and hover gestures for a contactless dimmer, volume knob, or menu scroller.

Tank and bin level monitor

Aim the sensor down into a container and convert measured distance to fill level for water tanks, feed hoppers, or waste bins, then log or alert over I2C.

Presence and proximity wake

Use the sensor to detect a user approaching a display or laptop and wake it, saving power while people are away.

Build with the VL53L0X ToF.

Drop the VL53L0X ToF into a circuit, write firmware, and simulate it in your browser, then deploy to real hardware. All in one editable Tinkered project.