How does it work?
Proximity 16 Click as its foundation uses the VL53L5CX, an 8×8 multi-zone Time-of-Flight sensor with wide FoV for each zone from STMicroelectronics. The VL53L5CX offers multi-target detection and distance measurement in each zone up to 4 meters. It integrates a SPAD array, physical infrared filters, and diffractive optical elements to achieve the best-ranging performance in various ambient lighting conditions. Also, with ST’s patented histogram algorithms, the VL53L5CX detects multiple objects within the FoV and ensures immunity to cover glass crosstalk beyond 60cm.
Using diffractive optical elements above the vertical cavity surface emitting laser (VCSEL) allows a square field-of-view of 45°x45° (63° diagonal) to be projected onto the scene, where the receiver lens focuses the light reflection onto a SPAD array. The VL53L5CX can range up to 8×8 zones at 15Hz for higher resolution or 4×4 zones at 60Hz for faster-ranging measurements.
Proximity 16 Click communicates with MCU using the standard I2C 2-Wire interface to read data and configure settings, supporting Fast Mode Plus Mode up to 1MHz. Also, this Click board™ provides the ability to use I2C communication in Low-Power mode, which activates via the setting of the LP pin routed to the PWM pin on the mikroBUS™ socket. Besides, it provides an intelligent interrupt function that generates every time a ranging measurement is available, alongside an I2C Reset feature routed to the RST pin on the mikroBUS™ socket, which resets the sensor I2C communication only. Once the host reads the result, the interrupt is cleared, and the ranging sequence can repeat.
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
Proximity
Applications
Can be used for multizone and multi-object distance detection, content management, gesture recognition, and various consumer and industrial applications
On-board modules
VL53L5CX – multi-zone Time-of-Flight sensor from STMicroelectronics
Key Features
Fast and accurate multizone distance ranging sensor, fully integrated module, wide field of view, ranging output with either 4×4 or 8×8 separate zones, low-power mode with programmable interrupt, up to 400cm ranging, 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 Proximity 16 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 |
Proximity 16 Click electrical specifications
Description | Min | Typ | Max | Unit |
---|---|---|---|---|
Supply Voltage | – | 3.3 | – | V |
Operating Range | – | – | 4 | m |
Ranging Frequency | – | – | 60 | Hz |
Operating Temperature Range | -30 | +25 | +85 | °C |
Software Support
We provide a library for the Proximity 16 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 Proximity 16 Click driver.
Key functions
-
proximity16_get_int_pin
This function returns the INT pin logic state. -
proximity16_get_resolution
This function gets the current resolution (4×4 or 8×8). -
proximity16_get_ranging_data
This function gets the ranging data, using the selected output and the resolution.
Example Description
This example demonstrates the use of Proximity 16 Click board™ by reading and displaying 8×8 zones measurements on the USB UART.
void application_task ( void )
{
if ( !proximity16_get_int_pin ( &proximity16 ) )
{
proximity16_results_data_t results;
uint8_t resolution, map_side;
err_t error_flag = proximity16_get_resolution ( &proximity16, &resolution );
error_flag |= proximity16_get_ranging_data ( &proximity16, &results );
if ( PROXIMITY16_OK == error_flag )
{
map_side = ( PROXIMITY16_RESOLUTION_4X4 == resolution ) ? 4 : 8;
log_printf ( &logger, "rn %ux%u MAP (mm):rn", ( uint16_t ) map_side, ( uint16_t ) map_side );
for ( uint16_t cnt = 1; cnt <= resolution; cnt++ )
{
log_printf ( &logger, " %ut", results.distance_mm[ cnt - 1 ] );
if ( 0 == ( cnt % map_side ) )
{
log_printf ( &logger, "rn" );
}
}
log_printf ( &logger, " Silicon temperature : %d degCrn", ( int16_t ) results.silicon_temp_degc );
}
}
}
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.Proximity16
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.