How does it work?
Proximity 19 Click is based on the RPR-0720, a miniature digital optical proximity sensor from ROHM Semiconductor that integrates an infrared VCSEL (IrVCSEL) and an IC with an I2C interface in a tiny package. This IC includes a built-in infrared receiver and VCSEL driver, enabling the sensor to detect human presence or objects by reflecting IrVCSEL light. The detection range of the proximity sensor is adjustable from approximately 1 to 15mm. Additionally, it is equipped with an ambient light canceling function, making it ideal for use in wearable and AR/VR devices, among other applications.
Proximity 19 Click uses a standard 2-wire I2C interface to communicate with the host MCU, supporting Standard mode with up to 400kHz of frequency clock. The I2C interface and registers allow for controlling various sensor functions, such as operating mode control, interrupt system management for interrupt signals available on INT pin, and adjusting offset and threshold values for proximity sensor data. This flexibility ensures precise and customizable operations tailored to specific application needs.
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. Also, it 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
Ideal for wearable devices, AR/VR systems, smart home applications, and industrial automation
On-board modules
RPR-0720 – digital optical proximity sensor from ROHM Semiconductor
Key Features
Combining an infrared VCSEL (IrVCSEL) and an IC in one package, adjustable detection range from 1 to 15mm, ambient light canceling function, control over various sensor functions such as operating mode, interrupt system, and offset/threshold adjustments, operates exclusively with a 3.3V logic voltage level, and more
Interface
I2C
Feature
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 19 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 19 Click electrical specifications
Description | Min | Typ | Max | Unit |
---|---|---|---|---|
Supply Voltage | – | 3.3 | – | V |
Distance Measurement Range | 1 | – | 15 | mm |
Software Support
We provide a library for the Proximity 19 Click as well as a demo application (example), developed using MIKROE compilers. The demo can run on all the main MIKROE development boards.
Package can be downloaded/installed directly from NECTO Studio Package Manager (recommended), downloaded from our LibStock™ or found on MIKROE github account.
Library Description
This library contains API for Proximity 19 Click driver.
Key functions
-
proximity19_get_distance
This function reads the distance measured by the sensor in millimeters by using the I2C serial interface. -
proximity19_set_ps_gain
This function adjusts the gain of the sensor’s sensitivity to light reception. -
proximity19_set_period
This function sets the desired data measurement period value.
Example Description
This example demonstrates the use of the Proximity 19 Click board™ by measuring and displaying the distance data.
void application_task ( void )
{
float distance = 0;
if ( PROXIMITY19_OK == proximity19_get_distance( &proximity19, &distance ) )
{
log_printf( &logger, " Distance: %.2f [mm] rnn", distance );
}
Delay_ms( 100 );
}
The full application code, and ready to use projects can be installed directly from NECTO Studio Package Manager (recommended), downloaded from our LibStock™ or found on MIKROE github account.
Other MIKROE Libraries used in the example:
- MikroSDK.Board
- MikroSDK.Log
- Click.Proximity19
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 MIKROE compilers.
mikroSDK
This Click board™ is supported with mikroSDK – MIKROE 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.