How does it work?
IR Gesture 3 Click is based on the ADPD1080, a photometric front-end from Analog Devices. It is a multifunction photometric front-end with fully integrated AFE, ADC, LED drivers, and timing core that enables ambient light rejection capability without photodiode optical filters. The drivers can deliver 370mA of peak current for LED, with flexible, multiple, and short LED pulses per optical sample. Its 14-bit ADC and 20-bit burst accumulator enable up to 20 bits per sample period, with sampling frequency ranging from 0.122Hz to 2700Hz.
The ADPD1080 operates as a complete optical transceiver stimulating the SFH4249, a high-power infrared emitter from ams OSRAM, as a light source that works at 940nm and has a short switching time. The front-end IC then measures the return in the analog block through the separate current inputs, storing the results in discrete data locations. This data can be read by the host MCU. The ADPD1080 has a 1.8V analog/digital core; for this purpose, IR Gesture 3 Click uses the BH18PB1WHFV, a CMOS LDO regulator from Rohm Semiconductor.
As current inputs, the ADPD1080 uses the ADPD2140, an infrared light angle sensor from Analog Devices. It consists of a silicone P-type, intrinsic, N-type photodiode that provides a linear measurement of incident infrared light angle in four separate channels. The 2-axis light angle measurement is available in both x and y directions, where the resulting quantities are ratios related to angles through a constant term. The ADPD1080 front-end is connected with the ADPD2140 angle sensor via its four photodiode current inputs and a common photodiode cathode bias. The photodiode current inputs get analog data over the ADPD2140 analog outputs.
While in State Machine operation, the ADPD1080 can operate in Standby, program, and Normal modes. The Normal mode follows a specific pattern set up by a state machine. The pattern consists of LED pulse and sample, intersample averaging, data read, and repeat. The LED pulse and sample pattern allow each data sample to be constructed from the user-configurable sum of pulses (1-255). The intersample averaging pattern samples in an average of 2 to 128 samples in powers of 2.
With gesture recognition, a user interface can detect hand movements and patterns and translate them into commands. It should consist of three basic functions. The first is the ability to detect a gesture’s beginning and end, thus identifying what part of the gesture makes a command. The track of the hand movement during the gesture is the second part. The third is to identify the gesture based on the hand movement, its beginning and end.
IR Gesture 3 Click uses a standard 2-Wire I2C interface to communicate with the host MCU, supporting up to 1Mbps data transfers. In addition to the I2C interface pins, the ADPD1080 uses two pins of the mikroBUS™ socket, IO0, and IO1 pins, for interrupts and various clocking options. For example, the external 32kHz clock signal can be provided over the IO1 pin of the mikroBUS™ socket.
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
Motion
Applications
Can be used for the development of various gesture-sensing applications, from hand swipe gestures (left, right, up, down, wave), air click, and flicks to multizone proximity detection
On-board modules
ADPD1080, – a photometric front end from Analog Devices
ADPD2140 – an infrared light angle sensor from Analog Devices
SFH4249 – a high-power infrared emitter from ams OSRAM
Key Features
Flexible gesture-sensing solution, low power consumption, supports swiping, waving, and proximity, detects a gesture under direct sunlight, and even when exposed to bright ambient light, and more
Interface
I2C
Feature
ClickID
Compatibility
mikroBUS™
Click board size
M (42.9 x 25.4 mm)
Input Voltage
3.3V
Pinout diagram
This table shows how the pinout on IR Gesture 3 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 |
---|---|---|---|
LD4 | PWR | – | Power LED Indicator |
IR Gesture 3 Click electrical specifications
Description | Min | Typ | Max | Unit |
---|---|---|---|---|
Supply Voltage | – | 3.3 | – | V |
IR LED Wavelength | – | 940 | – | nm |
Detection Range | 2 | – | 10 | cm |
Field of View | – | ±35 | – | deg |
Software Support
We provide a library for the IR Gesture 3 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), downloaded from our LibStock™ or found on Mikroe github account.
Library Description
This library contains API for IR Gesture 3 Click driver.
Key functions
-
irgesture3_set_mode
This function sets the device operating mode. -
irgesture3_set_adc_fsample
This function sets the sample frequency of the device. -
irgesture3_get_gesture
This function waits up to IRGESTURE3_MAX_NUM_SAMPLES for an object to be detected and then calculates its gesture.
Example Description
This example demonstrates the use of IR Gesture 3 Click board™ by processing the incoming gestures and displaying them on the USB UART.
void application_task ( void )
{
uint8_t gesture = 0;
if ( IRGESTURE3_OK == irgesture3_get_gesture ( &irgesture3, &gesture ) )
{
log_printf( &logger, "rn Gesture: " );
switch ( gesture )
{
case IRGESTURE3_GESTURE_CLICK:
{
log_printf( &logger, "CLICKrn" );
break;
}
case IRGESTURE3_GESTURE_SWIPE_UP:
{
log_printf( &logger, "SWIPE UPrn" );
break;
}
case IRGESTURE3_GESTURE_SWIPE_DOWN:
{
log_printf( &logger, "SWIPE DOWNrn" );
break;
}
case IRGESTURE3_GESTURE_SWIPE_LEFT:
{
log_printf( &logger, "SWIPE LEFTrn" );
break;
}
case IRGESTURE3_GESTURE_SWIPE_RIGHT:
{
log_printf( &logger, "SWIPE RIGHTrn" );
break;
}
default:
{
log_printf( &logger, "UNKNOWNrn" );
break;
}
}
}
else
{
log_printf( &logger, "rn No gesture detected!rn" );
}
}
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.IRGesture3
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.