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

How to Use TOF laser sensor GY-VL53L0X I2C: Examples, Pinouts, and Specs

Image of TOF laser sensor GY-VL53L0X I2C
Cirkit Designer LogoDesign with TOF laser sensor GY-VL53L0X I2C in Cirkit Designer

Introduction

The GY-VL53L0X is a compact Time-of-Flight (ToF) laser sensor module manufactured by Laskakit (Part ID: LA131093). It uses the I2C interface to measure distances with high precision by emitting laser pulses and calculating the time taken for the reflection to return. This sensor is ideal for applications requiring accurate distance measurement, such as robotics, obstacle detection, gesture recognition, and proximity sensing.

Explore Projects Built with TOF laser sensor GY-VL53L0X I2C

Use Cirkit Designer to design, explore, and prototype these projects online. Some projects support real-time simulation. Click "Open Project" to start designing instantly!
Raspberry Pi 4B and VL53L0X Distance Sensor Integration
Image of inventory management2: A project utilizing TOF laser sensor GY-VL53L0X I2C in a practical application
This circuit connects a VL53L0X V2 time-of-flight distance sensor to a Raspberry Pi 4B. The sensor is powered by the 3.3V supply from the Raspberry Pi and communicates with it via the I2C protocol using GPIO2 (SDA) and GPIO3 (SCL) pins.
Cirkit Designer LogoOpen Project in Cirkit Designer
A-Star 32U4 Mini Controlled Servo with VL53L8CX Time-of-Flight Distance Sensing
Image of Servo con distance sensor: A project utilizing TOF laser sensor GY-VL53L0X I2C in a practical application
This circuit features an A-Star 32U4 Mini microcontroller connected to a VL53L8CX Time-of-Flight distance sensor and a servo motor. The microcontroller powers both the sensor and the servo, and it is configured to communicate with the sensor via I2C (using pins 2 and 3 for SDA and SCL, respectively) and to control the servo via a PWM signal on pin 10. The purpose of the circuit is likely to measure distances and respond with movements of the servo based on the sensor readings.
Cirkit Designer LogoOpen Project in Cirkit Designer
Raspberry Pi 4B Distance Measurement System with VL53L0X Sensor
Image of inventory management 1: A project utilizing TOF laser sensor GY-VL53L0X I2C in a practical application
This circuit connects a Raspberry Pi 4B to a VL53L0X V2 time-of-flight distance sensor. The Raspberry Pi provides power and communicates with the sensor via I2C protocol, enabling distance measurements to be read and processed.
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 TOF laser sensor GY-VL53L0X I2C 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

Explore Projects Built with TOF laser sensor GY-VL53L0X I2C

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 inventory management2: A project utilizing TOF laser sensor GY-VL53L0X I2C in a practical application
Raspberry Pi 4B and VL53L0X Distance Sensor Integration
This circuit connects a VL53L0X V2 time-of-flight distance sensor to a Raspberry Pi 4B. The sensor is powered by the 3.3V supply from the Raspberry Pi and communicates with it via the I2C protocol using GPIO2 (SDA) and GPIO3 (SCL) pins.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of Servo con distance sensor: A project utilizing TOF laser sensor GY-VL53L0X I2C in a practical application
A-Star 32U4 Mini Controlled Servo with VL53L8CX Time-of-Flight Distance Sensing
This circuit features an A-Star 32U4 Mini microcontroller connected to a VL53L8CX Time-of-Flight distance sensor and a servo motor. The microcontroller powers both the sensor and the servo, and it is configured to communicate with the sensor via I2C (using pins 2 and 3 for SDA and SCL, respectively) and to control the servo via a PWM signal on pin 10. The purpose of the circuit is likely to measure distances and respond with movements of the servo based on the sensor readings.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of inventory management 1: A project utilizing TOF laser sensor GY-VL53L0X I2C in a practical application
Raspberry Pi 4B Distance Measurement System with VL53L0X Sensor
This circuit connects a Raspberry Pi 4B to a VL53L0X V2 time-of-flight distance sensor. The Raspberry Pi provides power and communicates with the sensor via I2C protocol, enabling distance measurements to be read and processed.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of Copy of test 2 (7): A project utilizing TOF laser sensor GY-VL53L0X I2C 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

Common Applications

  • Obstacle detection in robotics
  • Gesture-based user interfaces
  • Proximity sensing in smart devices
  • Object tracking and ranging
  • Industrial automation and safety systems

Technical Specifications

The following table outlines the key technical details of the GY-VL53L0X sensor:

Parameter Specification
Operating Voltage 2.6V to 5.5V
Communication Interface I2C (7-bit address: 0x29 by default)
Measuring Range 30mm to 2000mm (2 meters)
Accuracy ±3% (typical)
Field of View (FoV) 25°
Operating Temperature -20°C to +70°C
Power Consumption 20mW (typical)
Dimensions 10mm x 13mm x 4mm

Pin Configuration and Descriptions

The GY-VL53L0X module has six pins, as described in the table below:

Pin Name Description
VIN Power supply input (2.6V to 5.5V)
GND Ground connection
SDA I2C data line
SCL I2C clock line
XSHUT Shutdown pin (active low, optional for power saving)
GPIO1 Interrupt output (optional, configurable)

Usage Instructions

Connecting the GY-VL53L0X to an Arduino UNO

To use the GY-VL53L0X with an Arduino UNO, follow these steps:

  1. Wiring: Connect the sensor to the Arduino as shown below:

    • VIN → 5V (Arduino)
    • GND → GND (Arduino)
    • SDA → A4 (Arduino I2C data line)
    • SCL → A5 (Arduino I2C clock line)
    • Optionally, connect XSHUT to a digital pin for shutdown control.
  2. Install the VL53L0X Library:

    • Open the Arduino IDE.
    • Go to SketchInclude LibraryManage Libraries.
    • Search for "VL53L0X" and install the library by Pololu.
  3. Upload Example Code: Use the following example code to read distance measurements from the sensor:

    #include <Wire.h>
    #include <VL53L0X.h>
    
    VL53L0X sensor;
    
    void setup() {
      Serial.begin(9600); // Initialize serial communication
      Wire.begin();       // Initialize I2C communication
    
      // Initialize the VL53L0X sensor
      if (!sensor.init()) {
        Serial.println("Failed to initialize VL53L0X sensor!");
        while (1); // Halt execution if initialization fails
      }
    
      sensor.setTimeout(500); // Set timeout for measurements
      Serial.println("VL53L0X sensor initialized successfully.");
    }
    
    void loop() {
      // Read distance in millimeters
      uint16_t distance = sensor.readRangeSingleMillimeters();
    
      // Check for timeout errors
      if (sensor.timeoutOccurred()) {
        Serial.println("Sensor timeout occurred!");
      } else {
        Serial.print("Distance: ");
        Serial.print(distance);
        Serial.println(" mm");
      }
    
      delay(100); // Wait 100ms before the next reading
    }
    

Important Considerations

  • Power Supply: Ensure the sensor is powered within its operating voltage range (2.6V to 5.5V). For 5V systems like Arduino UNO, no level shifter is required.
  • I2C Address: The default I2C address is 0x29. If multiple sensors are used, you must change their addresses programmatically.
  • XSHUT Pin: Use the XSHUT pin to reset or power down the sensor when not in use to save power.
  • Ambient Light: Avoid direct exposure to strong ambient light sources, as they may affect measurement accuracy.

Troubleshooting and FAQs

Common Issues and Solutions

  1. Sensor Not Detected on I2C Bus:

    • Ensure the SDA and SCL lines are correctly connected.
    • Verify that pull-up resistors (typically 4.7kΩ) are present on the I2C lines if required.
    • Check the I2C address (default: 0x29) and ensure no conflicts with other devices.
  2. Incorrect or Fluctuating Distance Readings:

    • Ensure the sensor is not exposed to strong ambient light or reflective surfaces.
    • Verify that the target object is within the sensor's measurement range (30mm to 2000mm).
    • Check for stable power supply voltage.
  3. Timeout Errors:

    • Increase the timeout value in the code using sensor.setTimeout().
    • Ensure the sensor is not obstructed or facing a highly absorbent surface.
  4. Multiple Sensors on the Same I2C Bus:

    • Use the XSHUT pin to reset each sensor individually and assign a unique I2C address.

FAQs

Q: Can the GY-VL53L0X measure distances beyond 2 meters?
A: No, the maximum range of the sensor is 2 meters. For longer distances, consider using a different ToF sensor model.

Q: Is the GY-VL53L0X suitable for outdoor use?
A: While the sensor can operate in a wide temperature range, strong sunlight or rain may affect its performance. Use protective enclosures and filters for outdoor applications.

Q: How do I change the I2C address of the sensor?
A: Use the XSHUT pin to reset the sensor, then programmatically assign a new address using the VL53L0X library.

Q: Can I use this sensor with a 3.3V microcontroller?
A: Yes, the sensor is compatible with both 3.3V and 5V systems. Ensure proper wiring for the I2C lines.

By following this documentation, you can effectively integrate the GY-VL53L0X sensor into your projects for accurate and reliable distance measurements.