OFF
MIKROE-1906
27 g
Status:
TouchKey Click is a compact add-on board with four capacitive pads explicitly designed for touchpad controls. This board features the TTP224, a four key touch pad detector from TonTouch. In addition to different operating modes (fast, low, direct, toggle, and more), the TTP224 also has an adjustable sensitivity by the capacitance outside for each touchpad. Capacitive buttons like these can be toggled even when placed under a layer of glass or paper. This Click board™ makes the perfect solution for touch-activated lighting controls, touch-activated control panels, and other applications that need a switch or a button to power or reset the device.
TouchKey Click is supported by a mikroSDK compliant library, which includes functions that simplify software development. This Click board™ comes as a fully tested product, ready to be used on a system equipped with the mikroBUS™ socket.
This product is no longer in stock
Availability date:
TouchKey Click is based on the TTP224, a four key touch pad detector from TonTouch. The TTP224 has a stable sensing method that can cover diverse conditions and acts as a human interface control panel through non-conductive dielectric materials. It features auto-calibration for life, with a re-calibration period of about 4 seconds when a key has not been touched. The TouchKey Click can detect all four pad activations at once. There are two operating modes, Low Power and Fast mode. Unlike the Low Power operating mode, which has a slower response for the first touch, the Fast mode, in addition to a much faster response, also has a slightly higher consumption. When working in Fast mode, if no touch is detected after 8 seconds, the board automatically switches to Low Power mode.
The TouchKey Click has four pads labeled A, B, C, and D. To communicate with the host MCU, the TTP224 uses four digital inputs of the mikroBUS™ socket, labeled just as the pads above, A, B, C, and D. Every touch on the corresponding pad will send the digital state to its assigned pin.
The TTP224 has various features that can be addressed on this Click board™ over four solder jumpers. The Low Power or Fast mode option can be set over an LPMB solder jumper (Low Power as a default), while the TOG jumper sets output mode, direct or toggle (direct as a default). Depending on the output state needs, this Click board™ can use active High or Low over the AHLB solder jumper, where the active High is set by default. Objects used to cover the sensor pads can cause a change in sensing detection. To prevent this change, the maximum key duration time can be set from 16 seconds to infinite via the MOT0 solder jumper (infinite is set as default). Open drain or CMOS output can also be set via the OD solder jumper, with CMOS as the default. The last is an SM solder jumper used to set single or multi-key options, with the multi-key set as the default.
This Click board™ can operate with either 3.3V or 5V logic voltage levels selected via the PWR SEL jumper. This way, both 3.3V and 5V capable MCUs can use the communication lines properly. However, the Click board™ comes equipped with a library containing easy-to-use functions and an example code that can be used, as a reference, for further development.
Type
Capacitive
Applications
Can be used for touch activated lighting controls, touch activated control panels, toys and any other applications that need a switch or a button for powering or resetting a device
On-board modules
TTP224 - a four key touchpad detector from TonTouch
Key Features
Four capacitive touch pads, four touch-detection interrupt signals, various operating possibilities, stable sensing even under cover conditions, low power consumption, fast response time, and more
Interface
GPIO
Compatibility
mikroBUS
Click board size
L (57.15 x 25.4 mm)
Input Voltage
3.3V or 5V
This table shows how the pinout on TouchKey Click corresponds to the pinout on the mikroBUS™ socket (the latter shown in the two middle columns).
Label | Name | Default | Description |
---|---|---|---|
LD1 | PWR | - | Power LED Indicator |
JP1 | PWR SEL | Left | Logic Level Voltage Selection 3V3/5V: Left position 3V3, Right position 5V |
J1 | AHLB | Unpopulated | Output Active Selection 0/1: Populated position 1, Unpopulated position 0 |
J2 | TOG | Unpopulated | Output Type Selection Direct/Toggle: Populated position Toggle, Unpopulated position Direct |
J3 | LPMB | Unpopulated | Mode Selection Low Power/Fast: Populated position Fast mode, Unpopulated position Low Power mode |
J4 | SM | Unpopulated | Key Operation Selection Multi/Single key: Populated position Single key, Unpopulated position Multi key |
J5 | OD | Unpopulated | Output Drain Selection Open Drain/CMOS: Populated position CMOS, Unpopulated position Open Drain |
J6 | MOT0 | Unpopulated | Maximum Key Duration Selection 16s/Infinite: Populated position 16s Max, Unpopulated position Infinite |
Description | Min | Typ | Max | Unit |
---|---|---|---|---|
Supply Voltage | 3.3 | - | 5 | V |
We provide a library for the TouchKey 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 TouchKey Click driver.
Key functions
Function gets state of "a" (RST) pin on TouchKey Click board.
Function gets state of "b" (AN) pin on TouchKey Click board.
Function gets state of "c" (PWM) pin on TouchKey Click board.
Function gets state of "d" (INT) pin on TouchKey Click board.
Example Description
This application has four capacitive pads powered by TTP224, a touchpad detector IC. Capacitive buttons like these can be toggled even when placed under a layer of glass or paper.
void application_task ( void )
{
key_state = touchkey_a( &touchkey ) | touchkey_b( &touchkey ) | touchkey_c( &touchkey ) | touchkey_d( &touchkey );
if( key_state == 1 && key_state_old == 0 )
{
log_info( &logger,"Pressed : " );
if( touchkey_a( &touchkey ) )
{
log_info( &logger, "A " );
}
if( touchkey_b( &touchkey) )
{
log_info( &logger, "B " );
}
if( touchkey_c( &touchkey ) )
{
log_info( &logger, "C " );;
}
if( touchkey_d( &touchkey ) )
{
log_info( &logger, "D " );
}
log_info( &logger, "" );
key_state_old = 1;
}
if ( key_state == 0 && key_state_old == 1 )
{
key_state_old = 0;
}
}
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:
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.
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.