How does it work?
Cap Touch 4 Click is based on the IQS211B, a single-channel capacitive proximity and touch controller from Azoteq, designed for applications requiring activation or wake-on-touch functionality. The IQS211B uses ProxSense® technology to provide highly sensitive self-capacitance measurements, making it ideal for proximity-activated solutions, human interface devices, and white goods. The onboard touch-sensing pad is marked on the front side of the board, offering a defined circular touch-sensing area, ensuring easy user interaction. Additionally, it includes signal conditioning to compensate for parasitic capacitance and provide accurate signal gain, ensuring reliable touch and proximity detection in varying environmental conditions.
As mentioned, the IQS211B offers advanced features such as automatic detection and environmental compensation through its integrated finite state machine, eliminating the need for constant host MCU interaction. This allows for smooth operation without external interference. It also includes an integrated LDO regulator to enhance immunity against power supply noise, an internal oscillator for consistent performance, and built-in calibration capacitors to maintain accuracy over time.
This Click board™ is designed in a unique format supporting the newly introduced MIKROE feature called “Click Snap.” Unlike the standardized version of Click boards, this feature allows the main sensor area to become movable by breaking the PCB, opening up many new possibilities for implementation. Thanks to the Snap feature, the IQS211B can operate autonomously by accessing its signals directly on the pins marked 1-8. Additionally, the Snap part includes a specified and fixed screw hole position, enabling users to secure the Snap board in their desired location.
Cap Touch 4 Click uses a standard 2-wire I2C interface to communicate with the host MCU. During standard operation, the IQS211B sensor performs capacitance conversions and conserves energy by entering a low-power Sleep mode. The duration of this sleep period is adjustable and controlled by the sample period settings. A key feature of the IQS211B is its ability to activate its wake-up function, enabling it to respond to any activity detected on the I2C bus immediately. Once awakened, the sensor begins conversions without delay, ensuring prompt responsiveness in real-time applications. The device uses a fixed I2C address of 0x47 for ease of integration, simplifying communication setup across various systems.
This Click board™ can be operated only with a 3.3V logic voltage level and activated via the EN pin of the mikroBUS™ socket, providing a power-enabling function. The board must perform appropriate logic voltage level conversion before using MCUs with different logic levels. Also, it comes equipped with a library containing functions and an example code that can be used as a reference for further development.
Click Snap
Click Snap is an innovative feature of our standardized Click add-on boards, introducing a new level of flexibility and ease of use. This feature allows for easy detachment of the main sensor area by simply snapping the PCB along designated lines, enabling various implementation possibilities. For detailed information about Click Snap, please visit the official page dedicated to this feature.
Specifications
Type
Capacitive
Applications
Ideal for human interface devices, proximity-activated solutions, white goods, and similar touch-sensitive applications
On-board modules
IQS211B – single-channel capacitive controller from Azoteq
Key Features
High-sensitivity ProxSense® technology, one touch-sensing pad, internal signal conditioning, low power operation, Click Snap feature, I2C interface, and more
Interface
I2C
Feature
Click Snap,ClickID
Compatibility
mikroBUS™
Click board size
L (57.15 x 25.4 mm)
Input Voltage
3.3V
Pinout diagram
This table shows how the pinout on Cap Touch 4 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 |
Cap Touch 4 Click electrical specifications
Description | Min | Typ | Max | Unit |
---|---|---|---|---|
Supply Voltage | – | 3.3 | – | V |
Software Support
We provide a library for the Cap Touch 4 Click as well as a demo application (example), developed using MIKROE compilers. The demo can run on all the main MIKROE 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 Cap Touch 4 Click driver.
Key functions
-
captouch4_read_system_flags
This function reads the system flags register. -
captouch4_read_cap_counts
This function reads the counts number directly proportional to capacitance. The system is calibrated to make the counts as sensitive as possible to changes in capacitance for relative measurements. -
captouch4_read_lta
This function reads the long-term averate (LTA) value. The LTA is used as reference to compare with capacitance counts.
Example Description
This example demonstrates the use of Cap Touch 4 Click by reading the proximity, touch, and movement events.
void application_task ( void )
{
uint8_t sys_flags = 0;
uint8_t movement = 0;
uint16_t cap_counts = 0;
uint16_t lta = 0;
if ( CAPTOUCH4_OK == captouch4_read_system_flags ( &captouch4, &sys_flags ) )
{
if ( sys_flags & CAPTOUCH4_SYSFLAGS0_PROX )
{
log_printf( &logger, " Proximity detectedrn" );
}
if ( sys_flags & CAPTOUCH4_SYSFLAGS0_TOUCH )
{
log_printf( &logger, " Touch detectedrn" );
}
if ( sys_flags & CAPTOUCH4_SYSFLAGS0_MOVEMENT )
{
if ( CAPTOUCH4_OK == captouch4_read_movement ( &captouch4, &movement ) )
{
log_printf( &logger, " Movement detected: %urn", ( uint16_t ) movement );
}
}
if ( ( sys_flags & CAPTOUCH4_SYSFLAGS0_MOVEMENT ) ||
( sys_flags & CAPTOUCH4_SYSFLAGS0_PROX ) ||
( sys_flags & CAPTOUCH4_SYSFLAGS0_TOUCH ) )
{
if ( CAPTOUCH4_OK == captouch4_read_cap_counts ( &captouch4, &cap_counts ) )
{
log_printf( &logger, " Capacitance counts: %urn", cap_counts );
}
if ( CAPTOUCH4_OK == captouch4_read_lta ( &captouch4, <a ) )
{
log_printf( &logger, " Long-term average: %urnn", lta );
}
}
else
{
log_printf( &logger, " No detected eventsrnn" );
}
}
Delay_ms ( 200 );
}
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.CapTouch4
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 MIKROE compilers.
mikroSDK
This Click board™ is supported with mikroSDK – MIKROE 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.