VL53L1X time-of-flight distance sensor (up to 4 m)
VL53L1X time-of-flight sensor pinout (VIN, GND, SCL, SDA, GPIO1, XSHUT), address 0x29, short/long distance modes, ROI and running several sensors.
Community draft — report a mistake
3.3 V or 5 V? Breakouts with a VIN pin have a 2.8 V regulator and level shifting, so ESP32, Pico and Uno all work. Bare-chip boards without a regulator are 2.6–3.5 V only — check for the regulator before giving it 5 V.
The VL53L1X fires invisible 940 nm laser pulses and times the reflected photons. It reads 4 cm to about 4 m (long mode, indoors) with millimetre resolution — about twice the range of the VL53L0X, in the same tiny package. It’s used for water-level gauges mounted above a tank, people counters, robot obstacle sensing and parking aids.
Distance modes: Short (up to about 1.3 m) works best in bright light; Long (up to 4 m) needs a dark or indoor scene. A longer timing budget (20–500 ms) gives steadier readings. The sensor also lets you shrink the region of interest to aim its 27° cone more narrowly.
Unlike ultrasonic sensors, it doesn’t care about soft or angled surfaces as much, but it is fooled by clear glass and black matt objects, a calm water surface can give unstable readings (test it in your own tank), and dust on the cover window adds error. Keep the window clean and add a cover glass only if it’s a proper IR-transparent one.
Prices are indicative (Nov 2026) and vary by seller.
Pinout
| Pin | What it does |
|---|---|
VIN | 2.6–5.5 V supply (about 20 mA while ranging) |
GND | Ground |
SCL | I2C clock |
SDA | I2C data |
GPIO1 | Interrupt output — goes active when a new measurement is ready (optional) |
XSHUT | Shutdown input, active LOW (pulled up on the board). Drive LOW to turn the sensor off — used to give several sensors different addresses. |
I2C address:0x29
Library
VL53L1X by Pololu
Arduino IDE → Library Manager → search the name above. Each guide lists the exact version we compile against.
Use it with
Common errors
Reads 0 or random values beyond about 1.3 m
Switch to long distance mode (setDistanceMode(VL53L1X::Long)) and lengthen the timing budget to 50 ms or more. Bright sunlight cuts range sharply — indoors it reaches 4 m on a white wall.
Only one of two sensors works
Both start at 0x29. Hold every XSHUT LOW, release one, call setAddress(0x30), then release the next. The new address is lost at power-off, so do this in every setup().
VL53L0X code doesn’t find it
The VL53L1X has a different register map. Use the VL53L1X library, not the VL53L0X one.