Component guide · Intermediate · 3 min read
VL53L1X ToF sensor

Pinout, Wiring and Code
By Geekobot Learning Team · Updated 29 Oct 2026
On this page
The VL53L1X is a laser time-of-flight distance sensor that measures up to about 4 m with millimetre resolution over I2C (address 0x29). It times invisible 940 nm light pulses, so it works on most surfaces and colours and has a narrow 27 degree field of view. Choose short, medium or long distance modes depending on range and ambient light.
Key specs at a glance
- Range
- Up to about 4 m (long mode, dark), 1.3 m in short mode
- Resolution
- 1 mm
- Field of view
- 27°, adjustable region of interest (down to 4x4 SPADs)
- Rate
- Up to 50 Hz
- Interface
- I2C, address 0x29 (changeable in software)
- Supply
- 2.6 to 3.5 V chip; most modules accept 3.3 to 5 V
Models in this guide
These are alternatives. Pick the one that fits your project; you only need one.
Option 1TOF400C VL53L1X Laser Ranging Sensor Module – I2C Interface₹559
Option 2Waveshare VL53L1X ToF Distance Sensor 4m Range – I2C Interface₹1,629
Option 3Adafruit VL53L1X Time of Flight Distance Sensor – ~30 to 4000mm – STEMMA QT / Qwiic₹2,506
Option 4SparkFun VL53L1X ToF Distance Sensor Breakout – 4-Meter Range, Qwiic & I2C₹4,179
Option 5Pimoroni VL53L1X Time of Flight (ToF) Distance Sensor Module – I2C Interface₹1,773
What the VL53L1X ToF sensor is
A time-of-flight sensor sends short laser pulses and counts how long the light takes to bounce back. The VL53L1X is the longer-range sibling of the VL53L0X, reaching about 4 m indoors.
It suits robot obstacle detection, people counting at doorways, liquid level in tanks and drone height hold, where ultrasonic sensors are too wide or too slow.
VL53L1X ToF sensor pinout
The pins on the VL53L1X ToF sensor and what each one does.
| Pin | Function |
|---|---|
| VIN | 3.3 to 5 V (module) |
| GND | Ground |
| SDA | I2C data |
| SCL | I2C clock |
| XSHUT | Shutdown input, LOW = off (used to set addresses) |
| GPIO1 (INT) | Data ready interrupt |
- VIN
- 3.3 to 5 V (module)
- GND
- Ground
- SDA
- I2C data
- SCL
- I2C clock
- XSHUT
- Shutdown input, LOW = off (used to set addresses)
- GPIO1 (INT)
- Data ready interrupt
Wiring the VL53L1X ToF sensor
For several sensors, hold all XSHUT pins LOW, then enable them one at a time and give each a new address before enabling the next.
| VL53L1X ToF sensor pin | Arduino Uno | ESP32 |
|---|---|---|
| VCC | 5V (or 3.3V) | 3V3 |
| GND | GND | GND |
| SDA | A4 | GPIO 21 |
| SCL | A5 | GPIO 22 |
| XSHUT | D4 (optional) | GPIO 4 (optional) |
- VCC
- Arduino Uno:
- 5V (or 3.3V)
- ESP32:
- 3V3
- GND
- Arduino Uno:
- GND
- ESP32:
- GND
- SDA
- Arduino Uno:
- A4
- ESP32:
- GPIO 21
- SCL
- Arduino Uno:
- A5
- ESP32:
- GPIO 22
- XSHUT
- Arduino Uno:
- D4 (optional)
- ESP32:
- GPIO 4 (optional)
Example code
Install the Pololu VL53L1X library. Longer timing budgets give more stable readings at long range.
#include <Wire.h>
#include <VL53L1X.h> // Pololu VL53L1X library
VL53L1X tof;
void setup() {
Serial.begin(115200);
Wire.begin();
Wire.setClock(400000);
if (!tof.init()) { Serial.println("VL53L1X not found"); while (1); }
tof.setDistanceMode(VL53L1X::Long);
tof.setMeasurementTimingBudget(50000); // µs
tof.startContinuous(50); // ms between readings
}
void loop() {
Serial.print(tof.read());
Serial.println(" mm");
}Setup and tuning
short mode resists sunlight best; long mode reaches furthest indoors.
a protective window causes reflections and needs crosstalk calibration; keep it clean and close to the sensor.
on new modules, or readings stay short.
at 4 m the 27° cone is about 1.9 m wide; narrow the ROI to aim at smaller targets.
What you need
Shop this list6 of 7 found in our store · ₹8,668
TOF400C VL53L1X laser ranging module: low-cost breakoutTOF400C VL53L1X Laser Ranging Sensor Module – I2C Interface₹559Closest match, check the specs
Waveshare VL53L1X ToF sensor 4 m: Waveshare boardWaveshare VL53L1X ToF Distance Sensor 4m Range – I2C Interface₹1,629Closest match, check the specs- Adafruit VL53L1X ToF sensor (STEMMA QT): plug-in cableFind this part
SparkFun VL53L1X ToF breakout (Qwiic): Qwiic cableSparkFun VL53L1X ToF Distance Sensor Breakout – 4-Meter Range, Qwiic & I2C₹4,179
Pimoroni VL53L1X ToF module: Breakout Garden boardPimoroni VL53L1X Time of Flight (ToF) Distance Sensor Module – I2C Interface₹1,773Closest match, check the specs
ESP32-WROOM-32 38-pin development board: for Wi-Fi logging and dashboardsESP32-WROOM-32 38-Pin Development Board₹389
0.96 inch OLED display 128x64: to show readings without a computer0.96" OLED Display 128x64₹139Closest match, check the specs
Alternatives and when to choose them
- VL53L0X: shorter range (about 2 m), cheaper.
- HC-SR04 ultrasonic: wider beam, cheaper, works on glass.
- LiDAR distance sensors: TF-Luna and others for 8 m and beyond.
Try it: I2c pullup calculator
Change the values and the diagram and results update as you type.
Common mistakes to avoid
- Leaving the protective film on the sensor.
- Using long mode in bright sunlight.
- Connecting several sensors without changing addresses.
- Mounting it behind a scratched or dusty window.
Frequently asked questions
What is the maximum range?
About 4 m indoors on a white target in long mode; less in sunlight or on dark surfaces.
VL53L1X or VL53L0X?
VL53L1X for range up to 4 m and adjustable ROI; VL53L0X for up to 2 m at lower cost.
Can I use several on one bus?
Yes. Use the XSHUT pins to start them one by one and assign new I2C addresses.
Does it work outdoors?
Yes, but range shrinks in bright sunlight; use short distance mode.
Is the laser safe?
Yes. It is a Class 1 laser, eye-safe in normal use.
Does it work at 3.3 V?
Yes. Most modules accept 3.3 to 5 V.
Parts for this guide
Calculators
Terms in this guide
Projects that use it
Put this into practice: 12 step-by-step builds in our project library use parts from this guide.
Keep learning
Sources
- VL53L1X time-of-flight long distance ranging sensor datasheet (STMicroelectronics)
- Pololu VL53L1X Arduino library
Written by the Geekobot team from manufacturer datasheets. Always check the datasheet for the exact part and variant you buy.
