A tactile switch is a small push button that clicks when you press it and springs back when you let go, so it only connects while it is held down. This one is the common 6x6mm size with four through-hole legs, and it stands about 5mm from the board to the top of the button. The round button sits clear of the metal top, which makes it easy to press with a fingertip and lets it reach up through a thin case lid. Pick it when your board or parts list calls for a 6x6x5 switch, or when our shorter 4.3mm 4-pin tactile switch would sit too low.
Use it as a reset or mode button on an Arduino or ESP32 project, a menu button beside a small display, or a replacement for a worn button of the same size. It solders into a PCB or perfboard and its legs press into a breadboard across the centre gap. It switches signals up to 12V DC and 50mA, so for a motor or LED strip let the button signal your board and switch the load with a relay module or MOSFET. Sold per switch with a minimum order of 10. We also stock a 2-pin 6x6mm switch in 5mm and 10mm heights and a larger 12x12mm switch that takes push-on caps.
Specifications
Datasheets
Wiring & getting started
- Fit the switch
On a PCB or perfboard, push the four legs through and solder them. On a breadboard, sit the switch across the centre gap and press down firmly until the legs seat.
- Use two diagonal legs
The four legs are two pairs. Each leg is joined inside the switch to the leg straight across the body from it, and pressing the button connects one pair to the other. Two legs at opposite corners always belong to different pairs, so wiring to a diagonal pair works whichever way round the switch sits.
- Connect it to your board
Wire one of those legs to GND and the other to a digital pin, then set that pin to INPUT_PULLUP in your code. That turns on a resistor built into the board, so you need no other parts.
- Check it works
Print the pin to the serial monitor. It shows 1 with the button released and 0 while you hold it down. If it shows 0 all the time, both wires are on the same pair, so move one wire to the opposite corner. If one press registers as several, ignore changes for 20 to 50ms after each press.
