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

How to Use VL53L4CX: Examples, Pinouts, and Specs

Image of VL53L4CX
Cirkit Designer LogoDesign with VL53L4CX in Cirkit Designer

Introduction

The VL53L4CX is a time-of-flight (ToF) distance sensor manufactured by Adafruit (Part ID: 5425). It utilizes advanced laser technology to measure distances with high accuracy and precision. This sensor is capable of detecting objects at distances up to 6 meters and operates reliably in various lighting conditions, including complete darkness. Its compact design and low power consumption make it ideal for applications in robotics, drones, automation, and proximity sensing.

Explore Projects Built with VL53L4CX

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 VL53L4CX 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
A-Star 32U4 Mini Controlled Servo with VL53L8CX Time-of-Flight Distance Sensing
Image of Servo con distance sensor: A project utilizing VL53L4CX 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
Cellular-Enabled IoT Device with Real-Time Clock and Power Management
Image of LRCM PHASE 2 BASIC: A project utilizing VL53L4CX in a practical application
This circuit features a LilyGo-SIM7000G module for cellular communication and GPS functionality, interfaced with an RTC DS3231 for real-time clock capabilities. It includes voltage sensing through two voltage sensor modules, and uses an 8-channel opto-coupler for isolating different parts of the circuit. Power management is handled by a buck converter connected to a DC power source and batteries, with a fuse for protection and a rocker switch for on/off control. Additionally, there's an LED for indication purposes.
Cirkit Designer LogoOpen Project in Cirkit Designer
Nucleo 401RE Controlled Robotic Motor with Vibration Feedback and ADXL345 Accelerometer
Image of MLKIT: A project utilizing VL53L4CX in a practical application
This circuit features a Nucleo 401RE microcontroller as the central processing unit, interfacing with an ADXL345 accelerometer and an INA219 current sensor over an I2C bus for motion sensing and power monitoring, respectively. A DC motor with an encoder is driven by an L298N motor driver, with speed control potentially provided by a connected potentiometer and vibration feedback through a vibration motor. The system is powered by a 12V battery, with voltage regulation provided for the various components.
Cirkit Designer LogoOpen Project in Cirkit Designer

Explore Projects Built with VL53L4CX

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 VL53L4CX 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 Servo con distance sensor: A project utilizing VL53L4CX 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 LRCM PHASE 2 BASIC: A project utilizing VL53L4CX in a practical application
Cellular-Enabled IoT Device with Real-Time Clock and Power Management
This circuit features a LilyGo-SIM7000G module for cellular communication and GPS functionality, interfaced with an RTC DS3231 for real-time clock capabilities. It includes voltage sensing through two voltage sensor modules, and uses an 8-channel opto-coupler for isolating different parts of the circuit. Power management is handled by a buck converter connected to a DC power source and batteries, with a fuse for protection and a rocker switch for on/off control. Additionally, there's an LED for indication purposes.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of MLKIT: A project utilizing VL53L4CX in a practical application
Nucleo 401RE Controlled Robotic Motor with Vibration Feedback and ADXL345 Accelerometer
This circuit features a Nucleo 401RE microcontroller as the central processing unit, interfacing with an ADXL345 accelerometer and an INA219 current sensor over an I2C bus for motion sensing and power monitoring, respectively. A DC motor with an encoder is driven by an L298N motor driver, with speed control potentially provided by a connected potentiometer and vibration feedback through a vibration motor. The system is powered by a 12V battery, with voltage regulation provided for the various components.
Cirkit Designer LogoOpen Project in Cirkit Designer

Common Applications

  • Obstacle detection in robotics and drones
  • Proximity sensing in automation systems
  • Gesture recognition
  • Distance measurement in industrial equipment
  • Smart home devices (e.g., automatic doors, lighting systems)

Technical Specifications

The VL53L4CX offers robust performance and flexibility for a wide range of applications. Below are its key technical details:

Parameter Value
Operating Voltage 2.6V to 3.5V
Communication Interface I²C
Measurement Range 0.1m to 6m
Accuracy ±5mm (typical)
Field of View (FoV) 18° (typical)
Power Consumption 20mW (active mode)
Operating Temperature -20°C to +85°C
Dimensions 4.4mm x 2.4mm x 1.0mm

Pin Configuration

The VL53L4CX sensor module typically comes with the following pinout:

Pin Name Description
1 VIN Power supply input (2.6V to 3.5V)
2 GND Ground connection
3 SDA I²C data line
4 SCL I²C clock line
5 XSHUT Shutdown pin (active low, optional for power saving)
6 GPIO1 Interrupt output (optional, configurable)

Usage Instructions

Connecting the VL53L4CX to an Arduino UNO

To use the VL53L4CX with an Arduino UNO, follow these steps:

  1. Connect the VIN pin of the sensor to the 3.3V pin on the Arduino.
  2. Connect the GND pin of the sensor to the GND pin on the Arduino.
  3. Connect the SDA pin of the sensor to the A4 pin on the Arduino (I²C data line).
  4. Connect the SCL pin of the sensor to the A5 pin on the Arduino (I²C clock line).
  5. Optionally, connect the XSHUT pin to a digital pin on the Arduino for power management.

Sample Arduino Code

Below is an example Arduino sketch to read distance measurements from the VL53L4CX using the Adafruit VL53L4CX library:

#include <Wire.h>
#include <Adafruit_VL53L4CX.h>

// Create an instance of the VL53L4CX sensor
Adafruit_VL53L4CX vl53l4cx;

void setup() {
  Serial.begin(115200);
  while (!Serial) {
    delay(10); // Wait for Serial Monitor to open
  }

  // Initialize I2C communication
  if (!vl53l4cx.begin()) {
    Serial.println("Failed to initialize VL53L4CX sensor!");
    while (1) {
      delay(10); // Stay in loop if initialization fails
    }
  }
  Serial.println("VL53L4CX sensor initialized successfully.");
}

void loop() {
  VL53L4CX_MultiRangingData_t rangingData;

  // Perform a distance measurement
  if (vl53l4cx.rangingTest(&rangingData)) {
    Serial.println("Error during ranging test!");
    return;
  }

  // Print distance measurement for each detected object
  for (uint8_t i = 0; i < rangingData.NumberOfObjects; i++) {
    Serial.print("Object ");
    Serial.print(i + 1);
    Serial.print(": Distance = ");
    Serial.print(rangingData.RangeMilliMeter[i]);
    Serial.println(" mm");
  }

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

Important Considerations

  • Ensure the sensor is not exposed to direct sunlight or reflective surfaces, as these may affect accuracy.
  • Use pull-up resistors (typically 4.7kΩ) on the SDA and SCL lines if not already included on the breakout board.
  • The XSHUT pin can be used to put the sensor into a low-power state when not in use.
  • Avoid placing the sensor too close to objects (<10cm), as this may reduce measurement accuracy.

Troubleshooting and FAQs

Common Issues

  1. Sensor not detected on I²C bus:

    • Ensure the wiring is correct and matches the pinout.
    • Verify that the I²C address (default: 0x29) is not conflicting with other devices on the bus.
    • Check for proper pull-up resistors on the SDA and SCL lines.
  2. Inaccurate distance measurements:

    • Ensure the sensor is perpendicular to the target surface.
    • Avoid reflective or transparent surfaces, as they may cause measurement errors.
    • Check for obstructions in the sensor's field of view.
  3. Sensor initialization failure:

    • Confirm that the sensor is powered correctly (2.6V to 3.5V).
    • Ensure the Adafruit VL53L4CX library is installed and up to date.

FAQs

Q: Can the VL53L4CX measure distances in complete darkness?
A: Yes, the sensor uses an infrared laser for distance measurement, making it independent of ambient light.

Q: What is the maximum range of the VL53L4CX?
A: The sensor can measure distances up to 6 meters under optimal conditions.

Q: Can I use multiple VL53L4CX sensors on the same I²C bus?
A: Yes, but you must change the I²C address of each sensor using the XSHUT pin to avoid address conflicts.

Q: Is the VL53L4CX eye-safe?
A: Yes, the sensor complies with Class 1 laser safety standards, making it safe for use in consumer applications.