How does it work?
Proximity 2 Click is based on the MAX44000, a wide-dynamic range ambient light sensor with an integrated infrared proximity sensor from Analog Devices. Designed using proprietary BiCMOS technology, the MAX44000 combines three optical sensors, two A/D converters, and digital functionality into one package. A MAX44000’s photodiode array converts the light to a current, processed by low-power circuitry into a digital value which is then stored in an output register and later read by an I2C serial interface. This feature allows the MAX44000 to replicate the human eye’s optical response in various environments.
The infrared proximity photodiodes are optimized for better sensitivity for near-infrared signals, specifically 850nm, and can be used for proximity sensor measurements. The proximity sensing uses an external, pulsed infrared LED source, the SFH 4651-Z, to emit controlled amounts of infrared radiation. When the SFH 4651-Z reflects some of this infrared radiation to the MAX44000, it is detected by the integrated light detector and then used to determine the object’s proximity to the sensor. It is essential to note that different objects at the same distance from the sensor can reflect different amounts of infrared radiation depending on their texture and color.
The MAX44000 communicates with the MCU using the standard I2C 2-Wire interface with a maximum frequency of 400kHz. This Click board™ also supports a programmable interrupt feature, routed to the INT pin on the mikroBUS™ socket, that simplifies and improves system efficiency by eliminating the need to poll a sensor for a data (ambient light or proximity receive interrupt has occurred), resulting in a significant power saving.
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 consumer and industrial applications, such as handheld accessories, presence and ambient light detection, and more
On-board modules
MAX44000 – ambient light sensor with an integrated infrared proximity sensor from Analog Devices
Key Features
Wide-dynamic range, low power consumption, close proximity sensing up to 2cm, I2C interface, programmable interrupt, high accuracy and performance, 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 2 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 |
LD2 | IR | – | IR LED Emitter |
PROXIMITY 2 Click electrical specifications
Description | Min | Typ | Max | Unit |
---|---|---|---|---|
Supply Voltage | – | 3.3 | – | V |
Operating Range | – | – | 20 | mm |
ALS Range | 0.03 | – | 65.535 | lux |
IR Wavelength | – | 850 | – | nm |
Operating Temperature Rangee | -40 | +25 | +100 | °C |
Software Support
We provide a library for the Proximity 2 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 2 Click driver.
Key functions
-
Read PROX Data Register function.
-
Read ALS Data Registers function.
Example Description
This is an example that shows the most important functions that Proximity 2 click has.
void application_task ( void )
{
proxi_val = proximity2_read_prox ( &proximity2 );
ambient = proximity2_read_als ( &proximity2 );
log_printf( &logger, " Distance : %d rn", (uint16_t)proxi_val );
log_printf( &logger, " Light : %d rn", ambient );
log_printf( &logger, "------------------rn" );
Delay_ms( 300 );
}
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.Proximity2
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.