How does it work?
LDC Touch Click as its foundation uses the LDC3114-Q1, a hybrid multichannel, high-resolution inductance-to-digital converter from Texas Instruments. This inductive sensing device enables touch button design for a human-machine interface (HMI) by measuring small deflections of conductive targets using a coil implemented on a printed circuit board. Button presses form micro-deflection in the conductive targets, which cause frequency shifts in the resonant sensors, and measures such frequency shifts determining when button press occurs. With adjustable sensitivity per input channel, the LDC3114-Q1 can reliably operate with a wide range of physical button structures and materials.
The LDC3114-Q1 offers two main modes of operations: raw data access mode and button algorithm mode, which is controlled by register settings. The button mode can automatically correct any deformation in the conductive targets and offers well-matched channels allowing for differential and ratiometric measurements, which enable compensation of environmental and aging conditions such as temperature and mechanical drift. On the other hand, it also implements a raw data access mode, where MCU can read directly the data representing the effective inductance of the sensor and implement further post-processing.
This Click board™ communicates with MCU using the standard I2C 2-Wire interface to read data and configure settings, supporting a Fast Mode operation up to 400kHz. Also, the LDC3114-Q1 requires a voltage of 1.8V for its power supply to work correctly. Therefore, a small regulating LDO, the TLV700, provides a 1.8V out of 3V3 mikroBUS™ power rail.
As mentioned earlier, this board contains four touch buttons, representing the only elements on the upper-top side of the board. Each of these buttons has its own LED indicator representing the activity in that field. If a touch event is detected on one of these onboard pads, the state of the corresponding LED will be changed, indicating an activated channel; more precisely, touch has been detected on that specific field.
Alongside LED indicators, data from these channels can be processed via the MCU through four pins labeled from S0 to S3, routed to the AN, RST, CS, and PWM pin of the mikroBUS™ socket, respectively. Besides, there is an additional interrupt signal routed on the INT pin of the mikroBUS™ socket indicating when a specific interrupt event occurs (touch detection, available new data, and such), alongside two power modes of operation. A Normal Power Mode for active sampling at 10, 20, 40, or 80SPS, and a Low Power Mode for reduced current consumption at 0.625, 1.25, 2.5, or 5SPS selectable through an onboard switch labeled as MODE SEL.
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
Inductance
Applications
Can be used for human-machine interface and precise linear position sensing of metal targets for automotive, consumer, and industrial applications
On-board modules
LDC3114-Q1 – hybrid multichannel, high-resolution inductance-to-digital converter from Texas Instruments
Key Features
AEC-Q100 qualified, multiple modes of operation, configurable scan rates, advanced button press detection algorithms, low power consumption, and more
Interface
I2C
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 LDC Touch 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 |
LD2-LD5 | LD0-LD3 | – | Touch Buttons LED Indicator |
SW1 | MODE SEL | Right | Power Mode Selection LP/NP: Left position LP, Right position NP |
LDC Touch click electrical specifications
Description | Min | Typ | Max | Unit |
---|---|---|---|---|
Supply Voltage | – | 3.3 | – | V |
Resonant Frequency | 5 | – | 30 | MHz |
Sampling Rate | 0.625 | – | 160 | SPS |
Operating Temperature Range | -40 | +25 | +120 | °C |
Software Support
We provide a library for the LDC Touch 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 way), downloaded from our LibStock™ or found on Mikroe github account.
Library Description
This library contains API for LDC Touch Click driver.
Key functions
-
ldctouch_get_int_pin
This function returns the INT pin logic state. -
ldctouch_get_data
This function reads status, out_state, and all buttons raw data. -
ldctouch_set_operation_mode
This function sets the operation mode.
Example Description
This example demonstrates the use of LDC Touch Click board™ by configuring the buttons to trigger on finger press, and reading the buttons state in the loop.
void application_task ( void )
{
static bool button_active = true;
if ( !ldctouch_get_int_pin ( &ldctouch ) )
{
ldctouch_data_t button_data;
if ( LDCTOUCH_OK == ldctouch_get_data ( &ldctouch, &button_data ) )
{
button_active = true;
log_printf ( &logger, " Active button: -" );
for ( uint8_t cnt = 0; cnt < 4; cnt++ )
{
if ( button_data.out_state & ( 1 << cnt ) )
{
log_printf ( &logger, " %u - ", ( uint16_t ) cnt );
}
}
log_printf ( &logger, "rn Button 0 raw data: %drn", button_data.ch0_raw_button );
log_printf ( &logger, " Button 1 raw data: %drn", button_data.ch1_raw_button );
log_printf ( &logger, " Button 2 raw data: %drn", button_data.ch2_raw_button );
log_printf ( &logger, " Button 3 raw data: %drnn", button_data.ch3_raw_button );
Delay_ms ( 200 );
}
}
else
{
if ( button_active )
{
button_active = false;
log_printf ( &logger, " Active button: - none -rn" );
}
}
}
The full application code, and ready to use projects can be installed directly from NECTO Studio Package Manager(recommended way), downloaded from our LibStock™ or found on Mikroe github account.
Other Mikroe Libraries used in the example:
- MikroSDK.Board
- MikroSDK.Log
- Click.LDCTouch
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.