How does it work?
LightRanger 8 Click as its foundation uses the VL53L3CX, the latest ToF ranging sensor with multi-target detection from STMicroelectronics. The VL53L3CX combines the benefits of a high-performance proximity sensor, with excellent short distance linearity, together with ranging capability up to 3m without getting affected by the target color or reflectance. It embeds third-generation FlightSense patented technology with multi-target distance measurements and automatic smudge correction. Also, it integrates a single-photon avalanche diode array and physical infrared filters to achieve the best ranging performance in various ambient lighting conditions, with a wide range of cover glass windows.
The VL53L3CX contains a laser emitter, 940nm invisible laser, and corresponding analog drive circuitry. The laser output remains within Class 1 laser safety limits under all reasonably foreseeable conditions, including single faults. The histogram algorithms increase cover glass crosstalk immunity and allow real-time smudge compensation, which eventually prevents external contamination from adversely affecting the ranging accuracy. With patented algorithms and ingenious module construction, the VL53L3CX can also detect various objects within the field of view.
LightRanger 8 Click communicates with MCU using the standard I2C 2-Wire interface, with a clock frequency up to 400kHz in the Fast and 1MHz in the Fast Mode Plus. Also, it provides the possibility of the device Power-Up/Boot and interrupt feature routed to the INT pin of the mikroBUS™ socket to optimize ranging operation.
Once a ranging measurement is available, an interrupt generates. Once the host reads the result, the driver clears the interrupt, and the ranging sequence can repeat. If the interrupt is still present, the ranging operation inside the VL53L3CX is on hold. The interrupt behavior allows a good synchronization between the VL53L3CX and the host, avoids losing results if the host is not available to acquire or process the data. On the other side, the Xshutdown pin, labeled as EN and routed to the CS pin of the mikroBUS™ socket, optimizes power consumption and is used for power on/off purposes.
This Click board™ can be operated only with a 3.3V logic voltage level. The board must perform appropriate logic voltage level conversion before use with MCUs with different logic levels. However, the Click board™ comes equipped with a library that contains functions and an example code that can be used, as a reference, for further development.
Specifications
Type
Optical
Applications
Can be used for smart buildings and lighting, service robots, video focus tracking assistance, and many more.
On-board modules
VL53L3CX – latest Time-of-Flight ranging sensor with multi-target detection from STMicroelectronics
Key Features
Fully integrated miniature module, high accuracy linearity, multi-target detection, immune to cover glass cross-talk and fingerprint smudge at long distance with patented algorithms, histogram based technology, 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 8 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 8 Click electrical specifications
Description | Min | Typ | Max | Unit |
---|---|---|---|---|
Supply Voltage | – | 3.3 | – | V |
Ranging Capability | – | – | 3 | m |
Infrared Emitter | – | 940 | – | nm |
Operating Temperature Range | -20 | +25 | +85 | °C |
Software Support
We provide a library for the LightRanger 8 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 8 Click driver.
Key functions:
void lightranger8_cfg_setup ( lightranger8_cfg_t *cfg );
– Config Object Initialization function.LIGHTRANGER8_RETVAL lightranger8_init ( lightranger8_t *ctx, lightranger8_cfg_t *cfg );
– Initialization function.void lightranger8_default_cfg ( lightranger8_t *ctx );
– Click Default Configuration function.
Examples description
This demo application shows an example of distance measurement via VL53L3 ranging sensor.
The demo application is composed of two sections :
A new data ready is checked as soon as possible which signals the time required for the ranging sensor to perform the measurement. An acqured distance is shown on the LOG with the 2 seconds delay so the terminal is possible to read.
void application_task ( void ) { uint16_t distance; while ( lightranger8_new_data_ready( &lightranger8 ) != 0 ) { Delay_1ms(); } distance = lightranger8_get_distance( &lightranger8 ); log_printf( &logger, " ----------------------rn" ); log_printf( &logger, " Distance: %.1f cm rn", ( float )distance / 10 ); Delay_ms( 2000 ); }
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.LightRanger8
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. The terminal available in all MikroElektronika compilers, or any other terminal application of your choice, can be used to read the message.
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.