How does it work?
Button 2 Click is based on the TL3215AF160BQ, a member of the TL3215 series of tactile switches from E-Switch. This specific switch, denoted by its part number TL3215AF160BQ, features several key characteristics. The ‘TL’ in the part number indicates it belongs to the TL series, known for its high reliability and consistent performance. The ‘3215’ model is a testament to its robust construction and design. It includes an actuator option (‘A’) with a 2mm actuator, ensuring precise and responsive operation. The ‘F160’ denotes an actuation force of 160gf, providing a balanced tactile feedback that is neither too hard nor too soft, thus preventing accidental presses while remaining user-friendly. The ‘B’ indicates the blue color of the switch, making it easily identifiable, while the ‘Q’ signifies the use of silver contact material, known for its excellent conductivity and durability.
Regarding specifications, the TL3215AF160BQ has an impressive electrical rating of 50mA at 12VDC, and its electrical and mechanical life is rated at 1,000,000 cycles, ensuring longevity and reliability in various applications. Initially, the contact resistance is a maximum of 100mΩ, while the insulation resistance stands at 100MΩ at 500VDC, highlighting its excellent electrical isolation properties. The switch also has a dielectric strength of 250VAC for 1 minute and operates efficiently in a temperature range of -40°C to 85°C. The contact arrangement is single-pole single-throw (SPST), providing straightforward switching functionality. Additionally, the integrated LED in this version operates at a forward current of 20mA with a typical forward voltage of 3V at 20mA. It delivers a typical luminous intensity of 100mcd, ensuring clear visibility of the switch’s status.
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 TL3215AF160BQ 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.
Button 2 Click communicates with the host MCU using only two pins from the mikroBUS™ socket, ensuring a simple and efficient interface. The INT pin is dedicated to detecting button presses, providing an interrupt signal whenever the tactile switch is activated. The LED pin controls the blue LED on the TL3215AF160BQ, lighting up momentarily when the switch is pressed. This configuration allows for easy integration into various projects, enabling both input detection and visual feedback with minimal wiring and setup.
This Click board™ can operate with either 3.3V or 5V logic voltage levels selected via the VCC SEL jumper. This way, both 3.3V and 5V capable MCUs can use the communication lines properly. Also, this 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.
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
Pushbutton/Switches
Applications
Ideal for user interface controls in consumer electronics, industrial equipment, automotive systems, and more
On-board modules
TL3215AF160BQ – TL3215 series of tactile switches from E-Switch
Key Features
High reliability, precise operation, switch with 2mm actuator, 160gf actuation force, silver contact material, lifespan of 1,000,000 cycles, integrated blue LED offers clear visual feedback, Click Snap feature, and more
Interface
GPIO
Feature
Click Snap,ClickID
Compatibility
mikroBUS™
Click board size
M (42.9 x 25.4 mm)
Input Voltage
3.3V or 5V
Pinout diagram
This table shows how the pinout on Button 2 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 |
JP1 | VCC SEL | Left | Power Voltage Level Selection 3V3/5V: Left position 3V3, Right position 5V |
Button 2 Click electrical specifications
Description | Min | Typ | Max | Unit |
---|---|---|---|---|
Supply Voltage | 3.3 | – | 5 | V |
Software Support
We provide a library for the Button 2 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 Button 2 Click driver.
Key functions
-
button2_get_int_pin
This function returns the INT pin logic state. -
button2_toggle_led
This function toggles the button LED state by toggling the LED pin logic state. -
button2_enable_led
This function enables button LED by setting the LED pin to the high logic state.
Example Description
This example demonstrates the use of Button 2 Click board™ by toggling the button LED and switch state on button press.
void application_task ( void )
{
static uint8_t switch_state = BUTTON2_SWITCH_OFF;
if ( BUTTON2_BUTTON_PRESSED == button2_get_int_pin ( &button2 ) )
{
button2_toggle_led ( &button2 );
switch_state ^= BUTTON2_SWITCH_ON;
if ( BUTTON2_SWITCH_ON == switch_state )
{
log_printf ( &logger, " SWITCH ONrnn" );
}
else
{
log_printf ( &logger, " SWITCH OFFrnn" );
}
Delay_ms ( 1000 );
}
}
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.Button2
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.