Cirkit Designer Logo
Cirkit Designer
Your all-in-one circuit design IDE
Home / 
Component Documentation

How to Use VL53L0X: Examples, Pinouts, and Specs

Image of VL53L0X
Cirkit Designer LogoDesign with VL53L0X in Cirkit Designer

Introduction

The VL53L0X is a time-of-flight (ToF) distance sensor that uses laser technology to measure distances with high accuracy. It can measure distances up to 2 meters and is designed to provide precise and reliable results. This compact and low-power sensor is ideal for applications such as robotics, drones, proximity sensing, gesture recognition, and industrial automation.

The VL53L0X integrates a laser emitter and a single-photon avalanche diode (SPAD) receiver, enabling it to calculate the time it takes for a laser pulse to travel to a target and back. Its small size and low power consumption make it suitable for battery-powered devices and space-constrained designs.

Explore Projects Built with VL53L0X

Use Cirkit Designer to design, explore, and prototype these projects online. Some projects support real-time simulation. Click "Open Project" to start designing instantly!
Arduino UNO with A9G GSM/GPRS and Dual VL53L1X Distance Sensors
Image of TED CIRCUIT : A project utilizing VL53L0X in a practical application
This circuit features an Arduino UNO microcontroller interfaced with an A9G GSM/GPRS+GPS/BDS module and two VL53L1X time-of-flight distance sensors. The A9G module is connected to the Arduino via serial communication for GPS and GSM functionalities, while both VL53L1X sensors are connected through I2C with shared SDA and SCL lines and individual SHUT pins for selective sensor activation. The Arduino is programmed to control these peripherals, although the specific functionality is not detailed in the provided code.
Cirkit Designer LogoOpen Project in Cirkit Designer
Arduino UNO R4 WiFi Laser Module with Distance Sensor
Image of KIT 1: SENSOR KIT: A project utilizing VL53L0X in a practical application
This circuit features an Arduino UNO R4 WiFi connected to a VL53L0X distance sensor via I2C for distance measurement. Additionally, a tube laser module is powered by a battery case and controlled through a rocker switch, with a terminal block connector completing the circuit.
Cirkit Designer LogoOpen Project in Cirkit Designer
ESP8266 NodeMCU-Based Smart Eye Pressure Monitor with OLED Display and Wi-Fi Connectivity
Image of Copy of test 2 (7): A project utilizing VL53L0X in a practical application
This circuit features an ESP8266 NodeMCU microcontroller interfaced with a VL53L0X time-of-flight distance sensor, a 0.96" OLED display, a piezo sensor, and a photodiode for light detection. The ESP8266 collects data from the sensors, displays readings on the OLED, and hosts a web server to present the information. It is likely designed for distance measurement, light intensity detection, and pressure sensing, with the capability to monitor and display these parameters in real-time over WiFi.
Cirkit Designer LogoOpen Project in Cirkit Designer
Adafruit VL53L0X Distance Sensor with OLED Display
Image of VL53L0X Time of Flight Demo: A project utilizing VL53L0X in a practical application
This circuit interfaces an Adafruit VL53L0X distance sensor with an Arduino UNO and an OLED display. The Arduino reads distance measurements from the sensor via I2C communication and displays the results on the OLED screen, providing a visual output of the measured distance in millimeters.
Cirkit Designer LogoOpen Project in Cirkit Designer

Explore Projects Built with VL53L0X

Use Cirkit Designer to design, explore, and prototype these projects online. Some projects support real-time simulation. Click "Open Project" to start designing instantly!
Image of TED CIRCUIT : A project utilizing VL53L0X in a practical application
Arduino UNO with A9G GSM/GPRS and Dual VL53L1X Distance Sensors
This circuit features an Arduino UNO microcontroller interfaced with an A9G GSM/GPRS+GPS/BDS module and two VL53L1X time-of-flight distance sensors. The A9G module is connected to the Arduino via serial communication for GPS and GSM functionalities, while both VL53L1X sensors are connected through I2C with shared SDA and SCL lines and individual SHUT pins for selective sensor activation. The Arduino is programmed to control these peripherals, although the specific functionality is not detailed in the provided code.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of KIT 1: SENSOR KIT: A project utilizing VL53L0X in a practical application
Arduino UNO R4 WiFi Laser Module with Distance Sensor
This circuit features an Arduino UNO R4 WiFi connected to a VL53L0X distance sensor via I2C for distance measurement. Additionally, a tube laser module is powered by a battery case and controlled through a rocker switch, with a terminal block connector completing the circuit.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of Copy of test 2 (7): A project utilizing VL53L0X in a practical application
ESP8266 NodeMCU-Based Smart Eye Pressure Monitor with OLED Display and Wi-Fi Connectivity
This circuit features an ESP8266 NodeMCU microcontroller interfaced with a VL53L0X time-of-flight distance sensor, a 0.96" OLED display, a piezo sensor, and a photodiode for light detection. The ESP8266 collects data from the sensors, displays readings on the OLED, and hosts a web server to present the information. It is likely designed for distance measurement, light intensity detection, and pressure sensing, with the capability to monitor and display these parameters in real-time over WiFi.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of VL53L0X Time of Flight Demo: A project utilizing VL53L0X in a practical application
Adafruit VL53L0X Distance Sensor with OLED Display
This circuit interfaces an Adafruit VL53L0X distance sensor with an Arduino UNO and an OLED display. The Arduino reads distance measurements from the sensor via I2C communication and displays the results on the OLED screen, providing a visual output of the measured distance in millimeters.
Cirkit Designer LogoOpen Project in Cirkit Designer

Technical Specifications

  • Operating Voltage: 2.6V to 3.5V (logic level compatible with 3.3V systems)
  • Current Consumption:
    • Active: ~20 mA
    • Standby: ~5 µA
  • Measurement Range: 30 mm to 2000 mm (2 meters)
  • Accuracy: ±3% under optimal conditions
  • Field of View (FoV): 25°
  • Communication Interface: I²C (7-bit address, default: 0x29)
  • Operating Temperature: -20°C to +70°C
  • Dimensions: 4.4 mm x 2.4 mm x 1.0 mm

Pin Configuration and Descriptions

The VL53L0X module typically has the following pins:

Pin Name Description
VIN Power supply input (2.6V to 5V, typically connected to 3.3V or 5V).
GND Ground connection.
SDA I²C data line for communication with the microcontroller.
SCL I²C clock line for communication with the microcontroller.
XSHUT Shutdown pin (active low). Pull low to put the sensor in shutdown mode.
GPIO1 Interrupt output pin (optional, configurable for advanced use cases).

Usage Instructions

How to Use the VL53L0X in a Circuit

  1. Power Supply: Connect the VIN pin to a 3.3V or 5V power source and the GND pin to ground.
  2. I²C Communication: Connect the SDA and SCL pins to the corresponding I²C pins on your microcontroller. Use pull-up resistors (typically 4.7 kΩ) on the SDA and SCL lines if not already present on the module.
  3. Shutdown Control: Optionally, connect the XSHUT pin to a GPIO pin on your microcontroller to enable or disable the sensor programmatically.
  4. Interrupt Pin: If needed, connect the GPIO1 pin to a microcontroller GPIO for interrupt-based distance measurement.

Important Considerations and Best Practices

  • Ensure the sensor is not exposed to direct sunlight or reflective surfaces, as these can interfere with measurements.
  • Avoid placing objects too close to the sensor (<30 mm), as this may result in inaccurate readings.
  • Use a stable power supply to minimize noise and ensure reliable operation.
  • If multiple VL53L0X sensors are used on the same I²C bus, configure unique I²C addresses for each sensor.

Example Code for Arduino UNO

Below is an example of how to use the VL53L0X with an Arduino UNO. This code requires the Adafruit VL53L0X library, which can be installed via the Arduino Library Manager.

#include <Wire.h>
#include <Adafruit_VL53L0X.h>

// Create an instance of the VL53L0X sensor
Adafruit_VL53L0X lox = Adafruit_VL53L0X();

void setup() {
  Serial.begin(9600); // Initialize serial communication at 9600 baud
  while (!Serial) {
    delay(10); // Wait for the serial connection to be established
  }

  Serial.println("VL53L0X Test");

  // Initialize the sensor
  if (!lox.begin()) {
    Serial.println("Failed to initialize VL53L0X! Check connections.");
    while (1); // Halt execution if initialization fails
  }
}

void loop() {
  VL53L0X_RangingMeasurementData_t measure;

  // Perform a distance measurement
  lox.rangingTest(&measure, false);

  // Check if the measurement is valid
  if (measure.RangeStatus != 4) { // 4 indicates an out-of-range error
    Serial.print("Distance (mm): ");
    Serial.println(measure.RangeMilliMeter);
  } else {
    Serial.println("Out of range");
  }

  delay(100); // Wait 100 ms before the next measurement
}

Troubleshooting and FAQs

Common Issues

  1. Sensor Not Detected on I²C Bus:

    • Ensure the SDA and SCL lines are correctly connected to the microcontroller.
    • Verify that pull-up resistors are present on the I²C lines.
    • Check the sensor's I²C address (default: 0x29) and ensure no address conflicts.
  2. Inaccurate Distance Measurements:

    • Ensure the sensor is not too close to the target (<30 mm).
    • Avoid reflective or transparent surfaces in the sensor's field of view.
    • Check for environmental interference, such as strong ambient light.
  3. Sensor Not Responding:

    • Verify the power supply voltage and connections.
    • Ensure the XSHUT pin is not held low (shutdown mode).

FAQs

Q: Can the VL53L0X measure distances beyond 2 meters?
A: No, the maximum range of the VL53L0X is 2 meters. For longer distances, consider using other ToF sensors with extended range capabilities.

Q: How do I use multiple VL53L0X sensors on the same I²C bus?
A: Use the XSHUT pin to individually enable each sensor and change its I²C address before enabling the next sensor. This ensures no address conflicts.

Q: Can the VL53L0X operate in low-light conditions?
A: Yes, the VL53L0X uses an internal laser emitter and is not affected by low-light environments. However, strong ambient light may interfere with measurements.

Q: Is the VL53L0X eye-safe?
A: Yes, the VL53L0X uses a Class 1 laser, which is safe for human eyes under normal operating conditions.