EasyManua.ls Logo

ST VL6180X - User Manual

ST VL6180X
27 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
Loading...
June 2014 DocID026571 Rev 1 1/27
AN4545
Application note
VL6180X basic ranging application note
Introduction
The VL6180X is a proximity sensor based on ST’s patented FlightSense™ technology. The
VL6180X interfaces to your micro-controller via the industry standard I²C bus. The module
also includes an ambient light sensor (ALS).
This application note describes how to set up the VL6180X and perform range
measurements with the sensor.
Note: Settings presented in this document are for test purpose only. Performance and reliability
not guaranteed.
Figure 1. VL6180X
www.st.com
Question and Answer IconNeed help?

Do you have a question about the ST VL6180X and is the answer not in the manual?

Summary

VL6180 X Setup and Initialization

Powering the VL6180 X Module

Connect the 2v8 supply to AVDD/AVDD_VCSEL, and AVSS/AVSS_VCSEL to ground.

VL6180 X I2 C Communication

Details on I2C bus, default address 0x29, and required pull-up resistors.

VL6180 X Initialization Procedure

Recommended steps to load settings and prepare the VL6180X for operation.

VL6180 X Range Measurement Modes

Single-Shot Range Measurement

Procedure for performing a single range measurement and entering software standby.

Continuous Range Measurement Mode

Procedure for performing continuous range measurements until a stop command is issued.

VL6180 X Ranging Output Data Details

VL6180 X Range Error Codes

Explanation of error codes from RESULT_RANGE_STATUS for measurement validity.

Return Array Statistics

Details on signal rate, convergence time, and counts from the return array.

Reference Array Statistics

Details on signal rate, convergence time, and counts from the reference array.

VL6180 X Typical Ranging Performance Analysis

VL6180 X Range Output vs. Target Distance

Graph showing typical ranging output for various reflectances and distances.

Manual Offset Calibration Procedure

Procedure to calibrate offset error for improved ranging accuracy.

VL6180 X Signal Rate Analysis

Understanding return signal rate and its correlation with target distance.

VL6180 X Convergence Time Analysis

Graph showing typical convergence time for various reflectances and distances.

VL6180 X Operation with Cover Glass

Impact of Cover Glass on Range Output

How internal reflections from cover glass affect range measurements.

Cross Talk Calibration Procedure

Steps to calibrate cross talk compensation when using a cover glass.

VL6180 X Range Ignore Function

Enabling and configuring the range ignore feature to filter false detections.

VL6180 X Device Settings and Tuning

VL6180 X Performance Tuning

Adjusting settings to optimize overall system performance and accuracy.

Maximum Convergence Time Setting

Configuring the maximum time allowed for the device to converge.

Inter-Measurement Period Configuration

Setting the delay between consecutive measurements in continuous mode.

Readout Averaging Period

Configuring the sample period for internal readout averaging to reduce noise.

Additional System Error Checks

Enabling extra checks to filter out invalid range measurement results.

VL6180 X Example Code Implementation

VL6180 X Acronyms and Abbreviations Glossary

VL6180 X SR03 Recommended Settings

Document Revision History

Summary

VL6180 X Setup and Initialization

Powering the VL6180 X Module

Connect the 2v8 supply to AVDD/AVDD_VCSEL, and AVSS/AVSS_VCSEL to ground.

VL6180 X I2 C Communication

Details on I2C bus, default address 0x29, and required pull-up resistors.

VL6180 X Initialization Procedure

Recommended steps to load settings and prepare the VL6180X for operation.

VL6180 X Range Measurement Modes

Single-Shot Range Measurement

Procedure for performing a single range measurement and entering software standby.

Continuous Range Measurement Mode

Procedure for performing continuous range measurements until a stop command is issued.

VL6180 X Ranging Output Data Details

VL6180 X Range Error Codes

Explanation of error codes from RESULT_RANGE_STATUS for measurement validity.

Return Array Statistics

Details on signal rate, convergence time, and counts from the return array.

Reference Array Statistics

Details on signal rate, convergence time, and counts from the reference array.

VL6180 X Typical Ranging Performance Analysis

VL6180 X Range Output vs. Target Distance

Graph showing typical ranging output for various reflectances and distances.

Manual Offset Calibration Procedure

Procedure to calibrate offset error for improved ranging accuracy.

VL6180 X Signal Rate Analysis

Understanding return signal rate and its correlation with target distance.

VL6180 X Convergence Time Analysis

Graph showing typical convergence time for various reflectances and distances.

VL6180 X Operation with Cover Glass

Impact of Cover Glass on Range Output

How internal reflections from cover glass affect range measurements.

Cross Talk Calibration Procedure

Steps to calibrate cross talk compensation when using a cover glass.

VL6180 X Range Ignore Function

Enabling and configuring the range ignore feature to filter false detections.

VL6180 X Device Settings and Tuning

VL6180 X Performance Tuning

Adjusting settings to optimize overall system performance and accuracy.

Maximum Convergence Time Setting

Configuring the maximum time allowed for the device to converge.

Inter-Measurement Period Configuration

Setting the delay between consecutive measurements in continuous mode.

Readout Averaging Period

Configuring the sample period for internal readout averaging to reduce noise.

Additional System Error Checks

Enabling extra checks to filter out invalid range measurement results.

VL6180 X Example Code Implementation

VL6180 X Acronyms and Abbreviations Glossary

VL6180 X SR03 Recommended Settings

Document Revision History

Overview

The VL6180X is a proximity sensor that utilizes ST's proprietary FlightSense™ technology, offering both ranging and ambient light sensing (ALS) capabilities. This device is designed to interface with a microcontroller via the industry-standard I²C bus, making it suitable for integration into various electronic systems. The primary function of the VL6180X is to perform accurate distance measurements, complemented by its ability to detect ambient light levels.

Function Description

The core function of the VL6180X is proximity sensing, achieved through its FlightSense™ technology. This technology enables the sensor to measure the time it takes for a light pulse to travel to a target and return, thereby calculating the distance. The device operates in two main modes for range measurements: single-shot mode and continuous mode. In single-shot mode, the VL6180X performs a single range measurement and then enters a software standby state, conserving power. This mode is ideal for applications requiring intermittent distance readings. For continuous monitoring, the device can be configured for continuous mode, where it performs back-to-back range measurements at a user-defined rate until a stop command is issued. This flexibility allows the VL6180X to adapt to diverse application needs, from simple presence detection to more complex navigation or object avoidance systems.

In addition to ranging, the VL6180X incorporates an ambient light sensor (ALS). This feature allows the device to measure the surrounding light conditions, which can be valuable for applications that need to adjust their behavior based on environmental illumination, such as display brightness control or dynamic power management.

The VL6180X communicates with a host microcontroller using the I²C bus, which simplifies integration by requiring only two data lines (SDA and SCL) in addition to power and ground. The device has a default 7-bit I²C address of 0x29, which can be reconfigured by the user to any other 7-bit address by writing to a specific register. This address flexibility helps avoid conflicts in systems with multiple I²C devices. The VL6180X uses a 16-bit register index for accessing its internal settings and data.

The device also provides various ranging outputs beyond just the distance value. After each range measurement, the VL6180X returns an error code, which can be used to diagnose issues or validate the measurement. These error codes indicate conditions such as no error (valid measurement), system errors, early convergence estimate failures, maximum convergence time exceeded (no target detected), range ignore (threshold check failed), high ambient conditions (measurement invalidated), and raw/ranging algorithm underflow or overflow (indicating out-of-range conditions, typically around 200 mm).

Furthermore, the VL6180X offers detailed return array statistics, including the return signal rate, return convergence time, return signal count, and return ambient count. The return signal rate indicates the signal strength from the return array during a measurement, which can be converted into Mcps (Mega-counts per second) by dividing the raw register value by 128. The return convergence time, measured in microseconds, represents the time it took for the return array to settle on a target distance. If this time equals the maximum convergence time, it suggests that no target was detected. The return signal count provides the number of counts recorded during the convergence time from the return array, while the return ambient count indicates the number of ambient counts recorded during the same period. These statistics provide valuable insights into the measurement quality and environmental conditions.

Similarly, the device provides reference array statistics, including the reference signal rate, reference convergence time, reference signal count, and reference ambient count. These statistics are analogous to the return array statistics but pertain to the internal reference array, offering a baseline for comparison and further analysis of the measurement environment.

Usage Features

To ensure proper operation, the VL6180X requires an initial setup procedure. This involves powering the module with a 2.8V supply connected to AVDD and AVDD_VCSEL, with AVSS and AVSS_VCSEL connected to ground. It is crucial to pull GPIO-0 high, as it is configured as a shutdown pin by default, to prevent the device from shutting down. Additionally, AVDD_VCSEL must be applied either before or concurrently with AVDD to ensure the internal error check on the IR emitter passes successfully.

After power-up, the latest Standard Ranging (SR) settings must be loaded onto the VL6180X. The recommended initialization procedure includes checking if the device has powered up (by verifying a specific register value), loading the SR settings, applying other specific settings (such as cross-talk compensation, GPIO configurations, and maximum convergence time), and then clearing a reset flag to indicate that settings have been loaded. This initialization sequence must be repeated if the VL6180X undergoes a power cycle or if GPIO-0 is toggled.

The VL6180X's range output is designed to be linear with distance for various targets. However, an offset error might occur, which can be corrected through a manual offset calibration procedure. This procedure involves clearing any existing system offset, placing a target at a known distance (e.g., 50mm, with recommended reflectance of 17% or higher), collecting multiple range measurements to calculate the mean, determining the required offset (Target Distance - Average range), and then writing this calculated offset value to a specific register. For calibration with a cover glass, a target with 88% or higher reflectance is recommended to minimize cross-talk errors.

The signal rate output from the VL6180X provides information on how efficiently and reliably the device is performing. Generally, the return signal rate follows an inverse square law as the target moves away from the sensor. However, at very close distances (below 10mm), the target can block the optical path, reducing the signal level and potentially preventing a successful range measurement.

The convergence time, another key output, indicates the time taken for the VL6180X to settle on a target distance. This information is useful for optimizing device settings for efficiency and reliability.

The VL6180X can be used with a cover glass, which may introduce internal reflections, detected as unwanted signals known as cross-talk. To mitigate this, a cross-talk calibration procedure is recommended. This involves performing offset calibration, placing a dark target at a known distance (e.g., 100mm, with low reflectance like 3%), ensuring cross-talk compensation is initially set to zero, collecting range measurements and return signal rates, calculating the cross-talk value based on average return rate and range, and then writing this value to the cross-talk compensation register. The cross-talk value depends on the glass type and its placement, so recalibration is necessary if these factors change.

To further enhance reliability when using a cover glass, the range ignore function can be enabled. This function flags a range ignore error if the return signal rate falls below a specified ignore threshold, which is recommended to be at least 1.2 times the calculated cross-talk. This helps in removing false detections caused by the cover glass.

For performance tuning, users can adjust the maximum convergence time. Reducing this time can decrease the maximum range and power consumption, especially when no target is present. A value of 30ms is suggested as a suitable starting point. The maximum convergence time directly influences the minimum signal rate required for a valid range measurement. If the return signal is below this minimum, the device will report a range of 255 and flag a max convergence error.

The inter-measurement period in continuous mode can also be configured. This period, set via a specific register, determines the delay between consecutive measurements and must be greater than the full ranging cycle period (max convergence time + 5ms) to ensure correct operation.

Finally, the readout averaging period can be adjusted to balance noise reduction with increased convergence time and power consumption. Increasing this period reduces noise but extends processing time. The default setting provides a sampling period of 4.4ms.

Maintenance Features

The VL6180X includes additional system error checks that can be enabled or disabled to filter out invalid range results. These checks contribute to the overall reliability of the measurements and can be configured as per the application's requirements.

The device's initialization procedure serves as a fundamental maintenance step, ensuring that the sensor is correctly configured after power-up or reset. This systematic approach helps in maintaining consistent performance.

Calibration procedures, such as manual offset calibration and cross-talk calibration, are crucial for maintaining the accuracy of the VL6180X, especially when environmental factors or physical setup (like the addition of a cover glass) change. These steps allow the user to adapt the sensor's performance to specific operating conditions, ensuring reliable distance measurements.

The ability to tune parameters like maximum convergence time, inter-measurement period, and readout averaging period provides a means to optimize the sensor's performance for specific application demands, balancing factors like speed, power consumption, and accuracy. This flexibility allows for ongoing adjustment and refinement of the device's operation.

The provision of various statistical outputs, including signal rates and convergence times for both return and reference arrays, offers diagnostic capabilities. By monitoring these parameters, users can gain insights into the sensor's operational health and the quality of its measurements, which is essential for troubleshooting and ensuring long-term reliability.

In summary, the VL6180X is a versatile proximity and ambient light sensor designed for ease of integration and robust performance. Its detailed outputs, configurable settings, and calibration procedures enable users to achieve accurate and reliable measurements across a wide range of applications, while also providing the tools necessary for ongoing maintenance and optimization.

ST VL6180X Specifications

General IconGeneral
RangeUp to 100 mm
InterfaceI2C
Field of View25°
Ambient Light ImmunityUp to 100 klux
Operating Temperature-20°C to +70°C
TypeTime-of-Flight distance sensor
EmitterVCSEL (Vertical Cavity Surface Emitting Laser)
Package4.8 x 2.8 x 1.0 mm

Related product manuals