Knowledge Base
...
Applied PIC Micro Development
Basics: Working With Hardware

The Tactile Switch

7min

Lead In

Tactile switches are incredibly common in all forms of electronics. They are available in forms of sizes, orientations, colors, and mounting packages. Employed in reset circuits, and keypads they are ideal for momentary touch requirements for user interfaces.

They are however low-power devices and are usually used in DC circuits. Since they are not high-power devices, they should not be used to either interrupt or carry large currents.

Document image
๏ปฟ

Engineering

Owing to their construction and manufacture, when depressed, the switching action is noticed by a perceptible click.

Complements Omron Corporation
Tactile Switch
๏ปฟ

Engineering Drwing

Document image
๏ปฟ

Usage Examples

Basic User Interaction

A basic UI can be constructed with roughly 4 tactile switches. One for enter, one for select, and two for up and down. However, that is a close call to the number of I/O that would be needed to implement a keypad, which is more intuitive.

Reset Switch

The tactile switch is ideal as a reset switch. When used in a microcontroller circuit, the switch is connected in the "Normally Open" configuration. This ties the reset pin to the ground, with the pull-up resistor typing it to Vcc. When the switch is depressed, this pulls the voltage on the !RESET to ground, resetting the microcontroller.

There are more complex variations on the circuit below, but that is the simplest. Ideally, you do not want anything to cause the voltage rise time on the reset pin to take too long as this can cause the Microcontroller's program counter to not start correctly or go into Brown out reset.

While microcontrollers differ in how they deal with and prevent brown-out reset. The basic requirement is a fast rise time for Vreset from Vgnd to VCC.

๏ปฟ

Document image
๏ปฟ

๏ปฟ

Keypads

For user input requirements, a keypad can be constructed by combining a number of switches in a matrix. As shown below the switches are connected to a header allowing the micro to interact with the keypad and process the user input.

Tactile Switch Matrix
Tactile Switch Matrix
๏ปฟ

Lead Out

The tactile switch is a robust and useful part of a project. The switches are fairly hardy and endure significant use.