How does it work?
Proximity 17 Click as its foundation uses the TMD2635, a miniature close-range proximity sensor module from ams AG. The TMD2635 implements a 940nm infrared VCSEL (Vertical Cavity Surface Emitting Laser) factory calibrated for IR proximity response, alongside a digital I2C serial interface. The proximity detection feature provides object detection (e.g., close proximity) by photodiode detection of reflected IR energy sourced by the integrated VCSEL emitter. The proximity engine also features a wide range offset adjustment to compensate for unwanted IR energy reflection at the sensor. The results are further improved by automatic ambient light subtraction.
The TMD2635 does not require a specific Power-Up sequence but requires a supply voltage of 1.8V to work correctly. Therefore, a small regulating LDO is used, the MAX8511, providing a 1.8V out of both 5V and 3.3V mikroBUS™ power rails. Also, it can be shut down through software with a low standby current, allowing the power rails to remain powered at all times.
Proximity 17 Click communicates with MCU using the standard I2C 2-Wire interface with a maximum clock frequency of 400kHz, fully adjustable through software registers with a 14-bit proximity result stored in a PDATA register. Since the sensor for operation requires a power supply of 1.8V, this Click board™ also features the PCA9306 and SN74LVC1T45 voltage-level translators. The I2C interface bus lines are routed to the voltage-level translators allowing this Click board™ to work with both 3.3V and 5V MCUs properly. Also, it uses an interrupt pin, the INT pin of the mikroBUS™ socket, used for when an interrupt occurs to alert the system when proximity result crosses upper or lower threshold settings.
This Click board™ can operate with both 3.3V and 5V logic voltage levels selected via the VCC SEL jumper. This way, it is allowed for both 3.3V and 5V capable MCUs to use the communication lines properly. However, the Click board™ comes equipped with a library that contains easy-to-use functions and an example code that can be used, as a reference, for further development.
Specifications
Type
Proximity
Applications
Can be used for consumer and industrial applications
On-board modules
TMD2635 – miniature close-range proximity sensor module from ams AG
Key Features
Low power consumption, enables superior proximity detection, integrated factory calibrated 940nm IR VCSEL, crosstalk and ambient light cancellation, dual photodiode architecture, shutdown and interrupt feature, and more
Interface
I2C
Feature
No ClickID
Compatibility
mikroBUS™
Click board size
S (28.6 x 25.4 mm)
Input Voltage
3.3V or 5V
Pinout diagram
This table shows how the pinout on Proximity 17 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 |
JP1 | VCC SEL | Left | Logic Level Voltage Selection 3V3/5V: Left position 3V3, Right position 5V |
Proximity 17 Click electrical specifications
Description | Min | Typ | Max | Unit |
---|---|---|---|---|
Proximity 17 Click | 3.3 | – | 5 | V |
Wavelenght | – | 940 | – | nm |
Operating Temperature Range | -30 | +25 | +85 | °C |
Software Support
We provide a library for the Proximity 17 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 17 Click driver.
Key functions
-
proximity17_get_int_pin
This function returns the INT pin logic state. -
proximity17_read_proximity
This function reads the raw proximity data. The higher the value, the closer the detected object is. -
proximity17_soft_reset
This function executes the defice software reset command.
Example Description
This example demonstrates the use of Proximity 17 Click board™ by reading and displaying the proximity data on the USB UART.
void application_task ( void )
{
uint16_t proximity;
if ( PROXIMITY17_OK == proximity17_read_proximity ( &proximity17, &proximity ) )
{
log_printf ( &logger, " Proximity: %urnn", proximity );
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.Proximity17
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.