Tableau de proximité à 5 clics
Tableau de proximité à 5 clics
Le Proximity 5 Click Board™ est un dispositif de détection de proximité (PS) et de lumière ambiante (ALS) très précis et fiable, équipé du capteur PS et ALS de pointe. La section de traitement et de conditionnement du signal, trois pilotes de LED IR et le frontal analogique à faible bruit avec les éléments photosensibles PS et ALS sont tous intégrés dans le circuit intégré du capteur, garantissant des lectures très précises et fiables, tout en réduisant la charge de travail du microcontrôleur hôte.
La technologie propriétaire Filtron offre une sensibilité du spectre lumineux proche de celle de l'œil humain et un système d'annulation de la lumière d'arrière-plan de premier ordre pour la section ALS, réduisant ainsi encore davantage la charge de travail du MCU. Enfin, le moteur d'interruption programmable réduit encore davantage la charge de travail du MCU, évitant au MCU hôte d'interroger constamment le capteur pour obtenir des données.
The Proximity 5 Click Board™ is a very accurate and reliable proximity sensing (PS) and ambient light sensing (ALS) device, equipped with the state-of-the-art PS and ALS sensor. The signal processing and conditioning section, three IR LED drivers, and the low noise analog front end with the PS and ALS photo-sensitive elements, are all integrated into the sensor IC, ensuring very accurate and reliable readings, while reducing the workload of the host MCU. The proprietary Filtron™ technology provides near-human eye light spectrum sensitivity and top-class background light cancellation scheme for the ALS section, additionally reducing the workload of the MCU. Finally, the programmable interrupt engine reduces the MCU workload, even more, saving the host MCU of constant polling of the sensor for data.
Another interesting feature of the Proximity 5 Click Board™ is the ability to detect gestures. It is possible to trigger an interrupt every time a gesture cycle ( one measurement per IRED) has completed. This allows measurements to be picked up with the correct timing and allows for the development of an accurate gesture algorithm. Rich with features, this Click board™ can be used for a range of different applications which rely on the accurate and reliable close proximity and ambient light sensing, such as the proximity activated surveillance systems, equipment lid closing, screen backlight adjustments, lux meters, and by utilizing gesture detection, it can be used for various types of simple HID interfaces.
How Does The Proximity 5 Click Board™ Work?
The Proximity 5 Click Board™ features the VCNL4035X01 J, a fully integrated proximity and ambient light sensor with I2C interface and the interrupt function for gesture applications, from Vishay Semiconductors. This sensor features very advanced 16bit Ambient Light Sensor (ALS) which makes use of the proprietary Filtron™ technology, providing spectral response sensitivity near to human eye. The ALS sensor also effectively cancels out infrared light, has immunity to the flickering of fluorescent light sources and has a programmable detection range, with the resolution of up to 0.004 lux per count.
The Proximity Sensing (PS) section of the VCNL4035X01 J IC implements several solutions for the improved proximity detection of objects of any color. It relies on detection of the reflected IR light from the emitting LEDs. Features such as the immunity to a red glow, intelligent crosstalk phenomenon reduction, smart persistence scheme, programmable IR LED current, and selectable sampling resolution, help in achieving a reliable and accurate proximity detection. The processed readings of the ALS and PS sections can be fetched from the respective registers via the I2C interface. The I2C bus lines are routed to the respective mikroBUS™ I2C pins: SCL is the I2C clock and SDA is the I2C data line.
The VCNL4035X01 J sensor IC integrates three independent LED drivers, which can drive the external IR LEDs with up to 200mA, allowing a wide range of external IR LEDs to be used. Proximity 5 click uses the VSMY2850RG LEDs, 850nm IR LEDs with lenses, from Vishay. These IR LEDs are operating within the wavelength range which is recommended by the sensor manufacturer. The IR LEDs can be driven by the variable duty cycle, which affects the total power consumption, as well as the PS response time.
The VCNL4035X01 J sensor IC is powered by the 3.3V rail from the mikroBUS™ directly. However, since it uses the I2C communication protocol, it is possible to choose the voltage for the I2C pull-up resistors between 3.3V and 5V. This is accomplished by moving the SMD jumper labeled as VCCIO SEL to the appropriate position. This jumper allows communication with both 3.3V and 5V MCUs.
The Proximity 5 Click Board™ offers programmable interrupt engine. The INT pin is routed to the mikroBUS™ INT pin and it is pulled up by the onboard resistor. When asserted, it is driven to a LOW logic level. The interrupt can be programmed for a wide range of events for both ALS and PS sections: ALS threshold window with two 16bit values for the upper and lower threshold levels, ALS Persistence which affects the integration time before an interrupt is triggered. The PS section offers similar interrupt sources, with the addition of the object detection which triggers an interrupt if the object is detected and PS Active Force mode. This last mode is used when more conservative power consumption is required, as it allows one reading to be made, before reverting back to the standby mode. When the interrupt event occurs, a flag is set in the status register.
To detect a gesture, the Gesture Enable bit has to be set, and the sensor has to be configured to work in the PS Active Force mode. When a trigger bit for the reading is set, all three LEDs will be sequentially triggered. The result will be flagged by the gesture data ready flag and the data can be read from the appropriate register. Also, the interrupt line can be asserted if set so.
The provided library offers functions used to read the data and configure the Proximity 5 click in an easy way. The provided example application demonstrates using these functions. It can be used as a reference for a custom design.
Specifications
Type | Proximity |
Applications | Proximity activated surveillance systems, equipment lid closing, screen backlight adjustments, lux meters, etc. |
On-board modules | VCNL4035X01, a fully integrated proximity and ambient light sensor with I2C interface and interrupt function for gesture applications, from Vishay Semiconductors |
Key Features | Advanced ambient light sensor and proximity detection sensor with 3 IR LED drivers, signal processing and conditioning, Filtron™ technology for realistic ambient light detection, gesture detection, immunity to interferences |
Interface | I2C |
Compatibility | mikroBUS |
Click board size | M (42.9 x 25.4 mm) |
Input Voltage | 3.3V or 5V |
Pinout diagram
This table shows how the pinout on the Proximity 5 Click Board™ corresponds to the pinout on the mikroBUS™ socket (the latter shown in the two middle columns).
Notes | Pin | Pin | Notes | ||||
---|---|---|---|---|---|---|---|
NC | 1 | AN | PWM | 16 | NC | ||
NC | 2 | RST | INT | 15 | INT | Interrupt output | |
NC | 3 | CS | RX | 14 | NC | ||
NC | 4 | SCK | TX | 13 | NC | ||
NC | 5 | MISO | SCL | 12 | SCL | I2C Clock | |
NC | 6 | MOSI | SDA | 11 | SDA | I2C Data | |
Power Supply | +3V3 | 7 | 3.3V | 5V | 10 | +5V | Power Supply |
Ground | GND | 8 | GND | GND | 9 | GND | Ground |
Proximity 5 click maximum ratings
Description | Min | Typ | Max | Unit |
---|---|---|---|---|
Supply voltage | 2.5 | 3.3 | 3.6 | V |
Ambient light range | 0.004 | - | 4192 | lx |
Operation temperature range | -40 | +105 | °C | |
Supply current | 300 | µA | ||
IRED driving current | 200 | mA | ||
Full ALS counts | 65535 | steps | ||
Full PS counts | 4096/65535 | steps | ||
I2C clock (std mode / fast mode) | 10/10 | 10/400 | kHz | |
Measurement distance | 0 | 50 | cm |
Onboard settings and indicators
Label | Name | Default | Description |
---|---|---|---|
JP1 | VCCIO.SEL. | Left | Logic voltage level selection: left position 3V3, right position 5V |
LD1 | PWR | Power indication LED |
Software Support
We provide a library for the Proximity 5 Click Board™ on our Libstock page, as well as a demo application (example), developed using MikroElektronika compilers and mikroSDK. The provided click library is mikroSDK standard compliant. The demo application can run on all the main MikroElektronika development boards.
Library Description
This library provides generic functions for working with the Click board™.
Key Functions
void proximity5_init();
- Main initialization function for the Click board™.void proximity5_getValues(uint16_t *proxVal);
- Function for returning proximity values from the Click board™.
Example Description
The application is composed of three sections:
- System Initialization - Initializes GPIO, I2C and log structures.
- Application Initialization - Configures the microcontroller for communication
and initializes the Click board™. - Application Task - (code snippet) -The proximity data is read from the sensor and it is printed to the UART.
void applicationTask() { char text[10]; proximity5_getValues(&bff); mikrobus_logWrite("PS1 ",_LOG_TEXT); WordToStr(bff[0],text); mikrobus_logWrite(text,_LOG_LINE); mikrobus_logWrite("PS2 ",_LOG_TEXT); WordToStr(bff[1],text); mikrobus_logWrite(text,_LOG_LINE); mikrobus_logWrite("PS3 ",_LOG_TEXT); WordToStr(bff[2],text); mikrobus_logWrite(text,_LOG_LINE); Delay_ms(500); }
The full application code, and ready to use projects can be found on our Libstock page.
Other mikroE Libraries used in the example:
- I2C Library
- UART Library
- Conversions Library
- C_String Library
Additional Notes and Information
Depending on the development board you are using, you may need a 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
The Proximity 5 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.
Software Support
We provide a library for the Proximity 5 Click Board™ on our Libstock page, as well as a demo application (example), developed using MikroElektronika compilers and mikroSDK. The provided click library is mikroSDK standard compliant. The demo application can run on all the main MikroElektronika development boards.
Library Description
This library provides generic functions for working with the Click board™.
Key Functions
void proximity5_init();
- Main initialization function for the Click board™.void proximity5_getValues(uint16_t *proxVal);
- Function for returning proximity values from the Click board™.
Example Description
The application is composed of three sections:
- System Initialization - Initializes GPIO, I2C and log structures.
- Application Initialization - Configures the microcontroller for communication
and initializes the Click board™. - Application Task - (code snippet) -The proximity data is read from the sensor and it is printed to the UART.
void applicationTask() { char text[10]; proximity5_getValues(&bff); mikrobus_logWrite("PS1 ",_LOG_TEXT); WordToStr(bff[0],text); mikrobus_logWrite(text,_LOG_LINE); mikrobus_logWrite("PS2 ",_LOG_TEXT); WordToStr(bff[1],text); mikrobus_logWrite(text,_LOG_LINE); mikrobus_logWrite("PS3 ",_LOG_TEXT); WordToStr(bff[2],text); mikrobus_logWrite(text,_LOG_LINE); Delay_ms(500); }
The full application code, and ready to use projects can be found on our Libstock page.
Other mikroE Libraries used in the example:
- I2C Library
- UART Library
- Conversions Library
- C_String Library
Additional Notes and Information
Depending on the development board you are using, you may need a 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
The Proximity 5 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.
Tableau de proximité à 5 clics
Frequently Asked Questions
Have a Question?
Be the first to ask a question about this.