Component guide · Intermediate · 3 min read
VL53L4CX, TMF8701, TMF8801 Time-of-Flight Distance Sensors

and VCNL4200 Long-Range Proximity Sensor
By Geekobot Learning Team · Updated 29 Oct 2026
On this page
These I2C time-of-flight sensors measure distance with a laser and a fast timer. The ST VL53L4CX reaches about 6 m and can report several targets at once, such as a glass pane and the wall behind it. The ams TMF8701 covers 1 to 60 cm and the TMF8801 2 to 250 cm with very low power. The Vishay VCNL4200 is a long-range IR proximity and light sensor.
Key specs at a glance
- Range
- 1 mm to 6 m (VL53L4CX), 10 to 600 mm (TMF8701), 20 to 2500 mm (TMF8801)
- Interface
- I2C (0x29 VL53L4CX, 0x41 TMF8x01, 0x51 VCNL4200)
- Field of view
- About 18 to 30 degrees
- Supply
- 3.3 V chip; boards accept 3.3 to 5 V
- Rate
- Up to about 100 Hz
- Multi-target
- Yes on VL53L4CX
Models in this guide
These are alternatives. Pick the one that fits your project; you only need one.
Option 1Adafruit VL53L4CX Time of Flight Distance Sensor – ~1 to 6000mm₹2,307
Option 2Mikroe LIGHTRANGER 10 CLICK (Mikroe-5206) – VL53L4CX ToF Optical Distance Sensor Board, I²C, mikroBUS₹1,689
Option 3DFRobot Fermion TMF8701 ToF Distance Sensor 10–600mm – I2C Breakout₹1,509
Option 4DFRobot Fermion TMF8801 ToF Distance Ranging Sensor (20-2500mm) – I2C Interface₹1,509
Option 5Adafruit VCNL4200 Long Distance IR Proximity and Light Sensor – I2C Interface, STEMMA QT₹1,119
What the VL53L4CX, TMF8701 and TMF8801 ToF sensors is
The ST VL53L4CX and ams TMF8801 are single-zone time-of-flight laser distance sensors measuring a few mm to about 6 m (VL53L4CX) over I2C.
Time-of-flight sensors are much less sensitive to colour than IR triangulation, but bright sunlight shortens their range.
The TMF8x01 chips load a small firmware patch at start-up; use the maker's library, which handles it.
VL53L4CX, TMF8701 and TMF8801 ToF sensors pinout
The pins on the VL53L4CX, TMF8701 and TMF8801 ToF sensors and what each one does.
| Pin | Function |
|---|---|
| VIN | Supply |
| GND | Ground |
| SDA, SCL | I2C |
| XSHUT / EN | Shutdown |
| GPIO / INT | Interrupt |
- VIN
- Supply
- GND
- Ground
- SDA, SCL
- I2C
- XSHUT / EN
- Shutdown
- GPIO / INT
- Interrupt
Wiring the VL53L4CX, TMF8701 and TMF8801 ToF sensors
Connect the VL53L4CX, TMF8701 and TMF8801 ToF sensors like this.
| VL53L4CX, TMF8701 and TMF8801 ToF sensors pin | Arduino Uno | ESP32 |
|---|---|---|
| VIN | 5 V | 3.3 V |
| GND | GND | GND |
| SDA | A4 | GPIO 21 |
| SCL | A5 | GPIO 22 |
- VIN
- Arduino Uno:
- 5 V
- ESP32:
- 3.3 V
- GND
- Arduino Uno:
- GND
- ESP32:
- GND
- SDA
- Arduino Uno:
- A4
- ESP32:
- GPIO 21
- SCL
- Arduino Uno:
- A5
- ESP32:
- GPIO 22
Example code
For the TMF8701 and TMF8801 use the DFRobot_TMF8x01 library.
#include <vl53l4cx_class.h>
VL53L4CX sensor(&Wire, -1); // no XSHUT pin
void setup() {
Serial.begin(115200);
Wire.begin();
sensor.begin();
sensor.InitSensor(0x52); // 8-bit form of 0x29
sensor.VL53L4CX_StartMeasurement();
}
void loop() {
uint8_t ready = 0;
sensor.VL53L4CX_GetMeasurementDataReady(&ready);
if (ready) {
VL53L4CX_MultiRangingData_t d;
sensor.VL53L4CX_GetMultiRangingData(&d);
for (int i = 0; i < d.NumberOfObjectsFound; i++) {
Serial.print(d.RangeData[i].RangeMilliMeter); Serial.print(" mm ");
}
Serial.println();
sensor.VL53L4CX_ClearInterruptAndStartMeasurement();
}
}Setup and tuning
VCC, GND, SDA, SCL and XSHUT; breakouts handle 3.3 or 5 V.
use the STM32duino VL53L4CX or ams TMF8801 library.
use XSHUT to change addresses one by one.
use crosstalk calibration if behind a window.
distance falls on dark targets and in sunlight.
What you need
Shop this list8 of 9 found in our store · ₹8,681
Adafruit VL53L4CX Time of Flight Distance Sensor – ~1 to 6000mm: the part this guide coversAdafruit VL53L4CX Time of Flight Distance Sensor – ~1 to 6000mm₹2,307
Mikroe LIGHTRANGER 10 CLICK (Mikroe-5206) – VL53L4CX ToF Optical Distance Sensor Board, I²C, mikroBUS: another version this guide coversMikroe LIGHTRANGER 10 CLICK (Mikroe-5206) – VL53L4CX ToF Optical Distance Sensor Board, I²C, mikroBUS₹1,689
DFRobot Fermion TMF8701 ToF Distance Sensor 10–600mm – I2C Breakout: another version this guide coversDFRobot Fermion TMF8701 ToF Distance Sensor 10–600mm – I2C Breakout₹1,509
DFRobot Fermion TMF8801 ToF Distance Ranging Sensor (20-2500mm) – I2C Interface: another version this guide coversDFRobot Fermion TMF8801 ToF Distance Ranging Sensor (20-2500mm) – I2C Interface₹1,509
Adafruit VCNL4200 Long Distance IR Proximity and Light Sensor – I2C Interface, STEMMA QT: another version this guide coversAdafruit VCNL4200 Long Distance IR Proximity and Light Sensor – I2C Interface, STEMMA QT₹1,119
ESP32-WROOM-32 38-pin development board: for Wi-Fi logging and dashboardsESP32-WROOM-32 38-Pin Development Board₹389- Uno R3 development board: the controller used in the wiring tableFind this part
0.96 inch OLED display 128x64: to show readings without a computer0.96" OLED Display 128x64₹139Closest match, check the specs
4-channel logic level converter (BSS138): to connect 5 V and 3.3 V signals safely4-Channel Logic Level Converter (BSS138)₹20
Alternatives and when to choose them
- VL53L1X: 4 m, very common.
- VL6180X: short range.
- Multi-zone ToF: 8 x 8 depth grid.
Common mistakes to avoid
- Address conflicts.
- No crosstalk calibration.
- Expecting range in sunlight.
- Dirty cover glass.
Frequently asked questions
How far can the VL53L4CX measure?
Up to about 6 m on bright targets in low ambient light.
Can I use several on one bus?
Yes. Hold others off with XSHUT and give each sensor a new address at start-up.
Why are readings wrong behind glass?
Light reflects inside the cover glass; run the crosstalk calibration.
Is the laser eye-safe?
Yes. It uses a Class 1 laser that is eye-safe under normal use.
Which library should I use?
Use the STM32duino VL53L4CX library or ST's own driver.
Parts for this guide
Keep learning
Sources
Written by the Geekobot team from manufacturer datasheets. Always check the datasheet for the exact part and variant you buy.

