VL53L0X Time-of-Flight Distance Sensor

Measure distance to a hand or wall in millimetres using a 940 nm laser pulse — no ultrasonic ping, no triangulation.

Difficulty: Breadboard. Estimated build time: about 30 minutes. Estimated parts cost: about US$6.00. 3-line bill of materials. Compare supplier offers when available. A solid-state laser rangefinder built from the ST VL53L0X, a single-chip time-of-flight sensor about the size of a grain of rice.

Wire the breakout to your Arduino

Connect V_IN to 3.3 V (the breakout has an LDO; 5 V is also tolerated on the V_IN pin), GND to GND, SDA to A4, SCL to A5. Most VL53L0X breakouts have on-board pull-ups, so you don’t need to add your own.

Install Adafruit_VL53L0X and run the example

Library Manager, search “Adafruit VL53L0X”. Open File > Examples > Adafruit_VL53L0X > vl53l0x. Upload, open Serial Monitor at 115200 baud. The sketch prints distance in mm at 5 Hz. Hold your hand 100 mm away and watch the number track.

Switch to high-speed mode

Call lox.setMeasurementTimingBudgetMicroSeconds(20000); for 50 Hz output instead of the default 33 ms timing budget. Accuracy drops slightly but the sample rate is fast enough for gesture detection.

Detect a hand wave

Read distance in a loop, track the last few samples in a small ring buffer, and trigger an LED when the value drops below 200 mm. This is the foundation of touchless light switches, hand-wave UI controls, and contactless faucet sensors.