How does it work?
LightRanger 10 Click as its foundation uses the VL53L4CX, a ToF (Time-of-Flight) optical distance sensor with an extended target detection range from STMicroelectronics. This ToF sensor integrates a VCSEL (vertical-cavity surface-emitting laser), which emits an entirely invisible 940nm IR light, totally safe for eyes (Class 1 certification), and a SPAD (single-photon avalanche diode) array which helps the VL53L4CX to achieve the best ranging performance even when a Click board™ is hidden behind a wide range of cover glass materials.
Specifically designed for long-range and multi-target measurements, the VL53L4CX provides very accurate distance measurements up to 6m with excellent results over short distances and 18° FoV (Field of View), which improves performances under ambient light. Thanks to ST’s patented algorithms, the VL53L4CX can detect multiple objects within the FoV with depth understanding. ST histogram algorithms ensure cover glass crosstalk immunity beyond 80cm and dynamic smudge compensation for targets below 80cm. Like all Time-of-Flight sensors based on ST’s FlightSense technology, the VL53L4CX records an absolute distance measurement regardless of the target color and reflectance.
LightRanger 10 Click communicates with MCU using the standard I2C 2-Wire interface to read data and configure settings with a maximum clock frequency of 1MHz. This Click board™ can be enabled or disabled through the EN pin routed to the CS pin of the mikroBUS™ socket; hence, offering a switch operation to turn ON the initial boot sequence of the VL53L4CX. It also possesses an additional interrupt pin, routed to the INT pin on the mikroBUS™ socket, indicating when a ranging measurement is available.
This Click board™ can be operated only with a 3.3V logic voltage level. The board must perform appropriate logic voltage level conversion before using MCUs with different logic levels. However, the Click board™ comes equipped with a library containing functions and an example code that can be used, as a reference, for further development.
Specifications
Type
Optical
Applications
Can be used for presence (object) detection, distance measurement, industrial ranging, inventory control, and more
On-board modules
VL53L4CX – ToF (Time-of-Flight) optical distance sensor from STMicroelectronics
Key Features
Fast and accurate distance ranging, major improvement in long distance-ranging performance across all targets and light levels, multiobject detection capability, targets beyond 80 cm range are immune to crosstalk from cover glass, and more
Interface
I2C
Feature
No ClickID
Compatibility
mikroBUS™
Click board size
S (28.6 x 25.4 mm)
Input Voltage
3.3V
Pinout diagram
This table shows how the pinout on LightRanger 10 Click corresponds to the pinout on the mikroBUS™ socket (the latter shown in the two middle columns).
Onboard settings and indicators
Label | Name | Default | Description |
---|---|---|---|
LD1 | PWR | – | Power LED Indicator |
LightRanger 10 Click electrical specifications
Description | Min | Typ | Max | Unit |
---|---|---|---|---|
Supply Voltage | – | 3.3 | – | V |
Distance Measurement Range | 0 | – | 6 | m |
Field of View | – | 18 | – | Deg |
VCSEL Wavelength | – | 940 | – | nm |
Operating Temperature Range | -30 | +25 | +85 | °C |
Software Support
We provide a library for the LightRanger 10 Click as well as a demo application (example), developed using MikroElektronika compilers. The demo can run on all the main MikroElektronika development boards.
Package can be downloaded/installed directly from NECTO Studio Package Manager(recommended way), downloaded from our LibStock™ or found on Mikroe github account.
Library Description
This library contains API for LightRanger 10 Click driver.
Key functions
-
lightranger10_get_int_pin
This function returns the INT pin logic state. -
lightranger10_clear_interrupts
This function clears the interrupts. -
lightranger10_get_distance
This function reads the target object distance in millimeters.
Example Description
This example demonstrates the use of LightRanger 10 Click board™ by reading and displaying the target object distance in millimeters.
void application_task ( void )
{
while ( lightranger10_get_int_pin ( &lightranger10 ) );
uint16_t distance_mm;
if ( ( LIGHTRANGER10_OK == lightranger10_clear_interrupts ( &lightranger10 ) ) &&
( LIGHTRANGER10_OK == lightranger10_get_distance ( &lightranger10, &distance_mm ) ) )
{
log_printf ( &logger, " Distance: %u mm rnn", distance_mm );
}
}
The full application code, and ready to use projects can be installed directly from NECTO Studio Package Manager(recommended way), downloaded from our LibStock™ or found on Mikroe github account.
Other Mikroe Libraries used in the example:
- MikroSDK.Board
- MikroSDK.Log
- Click.LightRanger10
Additional notes and informations
Depending on the development board you are using, you may need USB UART click, USB UART 2 Click or RS232 Click to connect to your PC, for development systems with no UART to USB interface available on the board. UART terminal is available in all MikroElektronika compilers.
mikroSDK
This Click board™ is supported with mikroSDK – MikroElektronika Software Development Kit. To ensure proper operation of mikroSDK compliant Click board™ demo applications, mikroSDK should be downloaded from the LibStock and installed for the compiler you are using.
For more information about mikroSDK, visit the official page.