Proximity 5 click
PID:
MIKROE-2984
Weight:
30 g
Proximity 5 click
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 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 the measurements to be picked up with 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 it work?
Proximity 5 click features the VCNL4035X01, 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 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 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 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.
Proximity 5 click 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
Proximity activated surveillance systems, equipment lid closing,
screen backlight adjustments, lux meters, etc.
Applications
On-board
modules
VCNL4035X01, a fully integrated proximity and ambient light
sensor with I2C interface and interrupt function for gesture
applications, from Vishay Semiconductors
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
I2C
Key Features
Interface
Input
Voltage
3.3V,5V
Pinout diagram
This table shows how the pinout on
Proximity 5 click
corresponds to the pinout on the
mikroBUS™ socket (the latter shown in the two middle columns).
Notes
Pin
Pin
Notes
NC
NC
NC
NC
NC
NC
1
2
3
4
5
6
AN
RST
CS
SCK
MISO
MOSI
PWM
INT
RX
TX
SCL
SDA
16
15
14
13
12
11
NC
INT
NC
NC
SCL
SDA
I2C Clock
I2C Data
Interrupt output
Power Supply
Ground
+3V3
GND
7
8
3.3V
GND
5V
GND
10
9
+5V
GND
Power Supply
Ground
Onboard settings and indicators
Label
Name
Default
Description
Logic voltage level selection: left position
3V3, right position 5V
Power indication LED
JP1
VCCIO.SEL.
Left
LD1
PWR
Software support
We provide a library for Proximity 5 click 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™.
Examples 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.