How does it work?
LightRanger 5 Click as its foundation uses the TMF8801, an actual direct time-of-flight (ToF) sensor system in a single modular package from AMS-TAOS. It offers highly accurate depth accuracy detection through a sub-nanosecond light pulse and an antialiasing “stop-watch” method to measure the round-trip time of the pulse. It comes with an integrated microprocessor (Cortex M0) featured with all algorithms included on-chip with no need for external optics and an emitter that offers high dynamic range and detection sensing measurements from 20 to 2500 mm distances. Alongside these features, it also provides single-zone detection of an object irrespective of color, reflectivity, and texture.
The TMF8801 utilizes highly sensitive Single-Photon Avalanche Diode (SPAD) detection with fast, compact time-to-digital converters to make highly accurate distance measurements within ±5%. It is capable of operation in dark environments and the presence of sunlight. A built-in histogram is featured to detect cover glass and report object distances, operating with the highest Signal-to-Noise Ratio (SNR) while compensating for dirt and smudges contaminants on a product cover glass to produce artifact-free measurement. The histogram delivers dynamic cover glass calibration, and crosstalk compensation and background light noise are minimized through on-chip sunlight rejection filters.
LightRanger 5 Click communicates with MCU using the standard I2C 2-Wire interface supporting Fast Mode operation with a clock frequency up to 1MHz. Also, it provides the possibility of the device Power-Up feature (Enable) routed to the CS pin of the mikroBUS™ socket, interrupt feature on the INT pin of the mikroBUS™ to optimize ranging operation, and two pins on the RST and PWM pins of the mikroBUS™ socket used as a general GPIO output signal.
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 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, optical switch, and many other applications.
On-board modules
TMF8801 – dToF (direct time of flight) optical distance sensor achieving up to 2500mm target detection distance from AMS-TAOS
Key Features
Direct ToF technology with high sensitivity SPAD detection, fast Time-to-Digital Converter (TDC) architecture, enables dark and sunlight environment distance measurement within ±5%, 20mm to 2500mm distance sensing, 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 5 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 5 Click electrical specifications
Description | Min | Typ | Max | Unit |
---|---|---|---|---|
Supply Voltage | – | 3.3 | – | V |
Distance Measurement Range | 2 | – | 2500 | mm |
Wavelength | – | 940 | – | nm |
Operating Temperature Range | -30 | +25 | +70 | °C |
Software Support
We provide a library for the LightRanger 5 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 5 Click driver.
Key functions:
lightranger5_cfg_setup
– Config Object Initialization function.lightranger5_init
– Initialization function.lightranger5_default_cfg
– Click Default Configuration function.
Examples description
This is an example that demonstrates the use of the LightRanger 5 click board. This demo application shows an example of distance measurement.
The application is composed of three sections :
void application_task ( void ) { if ( lightranger5_check_data_ready( &lightranger5 ) == LIGHTRANGER5_DATA_IS_READY ) { uint16_t distance_mm = lightranger5_measure_distance( &lightranger5 ); if ( distance_mm ) { log_printf( &logger, " Distance : %ld mmrn", distance_mm ); } else { log_printf( &logger, " Out of range rn", distance_mm ); } log_printf( &logger, "------------------------------rn" ); } Delay_ms( 1000 ); }
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.LightRanger5
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.