How does it work?
LightRanger 9 Click as its foundation uses the TMF8828, a dToF wide field of view optical distance sensor module with multizone from ams AG. This sensor is built using a single-photon avalanche diode (SPAD) array, time-to-digital converter (TDC), and histogram technology featuring an associated VCSEL, while the high-quality lens on the SPAD supports a dynamically adjustable field of view up to 63°. The TMF8828 detects the target area in multiple zones with precise measurement results, with a minimum distance of 10mm and a maximum of 5m. It can also detect numerous objects per zone, allowing automated robots to gain additional sensory awareness and provide early alerts to potential obstacles.
The TMF8828 operating principle uses a pulse train of VCSEL pulses defined by the iteration setting. These pulses are spread using an MLA (microlens array) to illuminate the FoI (illumination field). An object reflects these rays to the TMF8828 receiver optics lens and onto an array of SPAD (single-photon avalanche detector). A TDC (time to digital converter) measures the time from the emission of these pulses to their arrival and accumulates the hits into bins inside a histogram. As mentioned before, the TMF8828 comes with a multizone operation.
It has two operating modes, a mode with 3×3, 4×4, or 3×6 zones, or 8×8 zones, which implements its functionality as a sequence of four time-multiplexed measurements of 4×4 zones. As such, the factory calibration sequence, loading the calibration data, reading the result measurements, and the optional histogram readouts must be performed four times in series by the host. Also, unique addition to this Click board™ represents an additional 0.7mm thick protective lens, alongside a 0.38mm air-gap spacer that separates the lens from the sensor, further reducing interference and improving the sensor’s accuracy.
LightRanger 9 Click communicates with MCU using the standard I2C 2-Wire interface supporting Fast Mode operation with a clock frequency of 1MHz. It provides distance information together with confidence values through its serial interface. The internal processor of the TMF8828 (ARM M0+®) executes the AMS algorithm on these histograms, to calculate the target distance of the object presented in mm through the I2C interface for each of the zones.
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 general-purpose I/O signals.
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
TMF8828 – Multizone Time-of-Flight sensor from ams AG
Key Features
Direct ToF technology with high sensitivity SPAD detection, 8×8 configurable multi-zone configuration with multi-object detection, adjustable field of view, high performance on-chip sunlight rejection filter and algorithm, onboard protective lens, and more
Interface
I2C
Feature
No ClickID
Compatibility
mikroBUS™
Click board size
M (42.9 x 25.4 mm)
Input Voltage
3.3V
Pinout diagram
This table shows how the pinout on LightRanger 9 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 9 Click electrical specifications
Description | Min | Typ | Max | Unit |
---|---|---|---|---|
Supply Voltage | – | 3.3 | – | V |
Distance Measurement Range | 10 | – | 5000 | mm |
Field of View | – | – | 63 | Deg |
VCSEL Wavelength | – | 940 | – | nm |
Operating Temperature Range | -30 | +25 | +70 | °C |
Software Support
We provide a library for the LightRanger 9 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 9 Click driver.
Key functions
-
lightranger9_get_int_pin
This function returns the INT pin logic state. -
lightranger9_clear_interrupts
This function reads and clears the interrupt status register. -
lightranger9_get_capture
This function reads and parses a single sub-capture block of 132 bytes.
Example Description
This example demonstrates the use of LightRanger 9 Click board™ by reading and displaying all four sub-captures data measurements on the USB UART.
void application_task ( void )
{
while ( lightranger9_get_int_pin ( &lightranger9 ) );
lightranger9_capture_t capture;
if ( ( LIGHTRANGER9_OK == lightranger9_clear_interrupts ( &lightranger9 ) ) &&
( LIGHTRANGER9_OK == lightranger9_get_capture ( &lightranger9, &capture ) ) )
{
lightranger9_log_results ( capture );
}
}
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.LightRanger9
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.