65
\$\begingroup\$

I am wondering why some tactile switches have 4 terminals instead of two? For example, take a look at these switches, like the image below:

Tactile Switches
(source: pranelectronics.com)

What is the use of the two remaining pins? If the pins of the exact opposite side are always shorted then why don't they have just 2 pins?

\$\endgroup\$
3
  • 6
    \$\begingroup\$ It does actually say in the blurb "4 Pin layout can be used as jumper leads." Possibly a clue there. \$\endgroup\$ Commented Feb 21, 2014 at 20:55
  • 11
    \$\begingroup\$ mechanical stability \$\endgroup\$
    – jippie
    Commented Feb 21, 2014 at 20:56
  • 18
    \$\begingroup\$ As @JImDearden says, it makes it possible to build an inexpensive matrix keypad using a single-sided PCB, without requiring a lot of wire jumpers. \$\endgroup\$
    – Dave Tweed
    Commented Feb 21, 2014 at 21:00

5 Answers 5

80
\$\begingroup\$

I'm going to put David Tweed's comment into an answer, which it deserves.

The dual shorted pins allow inexpensive single-sided boards to be used for X-Y matrices of switches without requiring jumpers.

Here (from an NKK datasheet) are a couple examples of such layouts:

X-Y matrix (This would typically be scanned by a microcontroller or ASIC):

enter image description here

Common line (one side of each switch common, typically it might be connected to Vss or Vdd and a pullup or pulldown resistor (perhaps internal to a chip) would be required for each switch.

enter image description here

\$\endgroup\$
3
  • 1
    \$\begingroup\$ Would your average autorouter be aware of this "trick", or is it human engineering experience to optimize? \$\endgroup\$
    – jippie
    Commented Jul 7, 2015 at 20:14
  • 3
    \$\begingroup\$ @jippie I don't think so.. my tact switch symbols have four pins and the netlist needs to contain information on which pin goes where (exactly, not just A or B). But autorouters are about useless on single-sided boards anyway! \$\endgroup\$ Commented Jul 7, 2015 at 20:31
  • \$\begingroup\$ There's a nifty tool at least in EAGLE. You can assign more than one pad of a package to one pin of the part. EAGLE's autorouter will then route to either of them and in most cases will use that to allow crossing of nets without using another layer. \$\endgroup\$
    – Ariser
    Commented Jan 18, 2023 at 18:37
16
\$\begingroup\$

Mechanical stability. When soldered down with four leads the part is can't move in any direction. The shorted pins makes the pinout slightly more versatile when routing a PCB. When introducing 2 extra pins for mechanical stability is probably cheaper (and more rugged) to build shorted pins than to add unconnected pins.

\$\endgroup\$
6
\$\begingroup\$

Think of a switch as being two staples (held in place by the plastic base) and something that can bridge between them. Such a design requires two non-moving pieces of metal plus a moving contact which doesn't have to flex much and a coil spring to keep that contact away from the pins. Such a design is more mechanically robust than using a flexible contact which is integral with one of the pins. Further, if one needs at least three solder connections on the board for mechanical stability, it's easier to use two identical "U"-shaped pieces of metal than it would be to have contacts which were only connected to one pin, and then need other pieces of metal for the other mechanical connections.

\$\endgroup\$
2
  • \$\begingroup\$ Yet three pin and two pin switches are also common. \$\endgroup\$
    – Passerby
    Commented Feb 22, 2014 at 3:29
  • \$\begingroup\$ @Passerby: Different switches have different requirements with regard to cost, compactness, key-bounce, reliability, etc. The design I described isn't ideal in all applications, but it's pretty common. \$\endgroup\$
    – supercat
    Commented Feb 22, 2014 at 16:45
4
\$\begingroup\$

My guess is that 4 pins are for mechanical stability. Then since they are there anyway, someone in marketing had the brilliant idea to feature them as jumpers too. Think about it though, If you only had two pins there would be less of a need for a jumper.

\$\endgroup\$
1
  • 10
    \$\begingroup\$ No, you think about it: How would you lay out a large NxN matrix of buttons on a single-sided PCB without jumpers? It would require N-1 tracks to pass between the two pins of some of the switches. Having at least one split pin on each switch makes it trivial. \$\endgroup\$
    – Dave Tweed
    Commented Feb 21, 2014 at 21:41
0
\$\begingroup\$

Other responses are very detailed and accurate, but there is a much simpler and more to-the-point answer...

The reference images you provided not only have different numbers of pins, but also differently shaped ones. Four pin switches are commonly used on breadboards and have kinks in the pins for that purpose. Two pin switches, or any other number with straight pins, are intended for soldering to a PCB (printed circuit board).

\$\endgroup\$
1
  • 3
    \$\begingroup\$ Welcome to EE.SE. I don't know of any components designed for breadboards. The volume would be so small compared with PCB mounting products that it wouldn't be worth anyone's while. The kinks are generally to provide an accurate PCB insertion stop to give consistent, repeatable height above the PCB. The switches in the OP's photos have legs with springy grips so they remain in place after insertion. In this case it appears that the body of the switch is supposed to contact the PCB. \$\endgroup\$
    – Transistor
    Commented Nov 23, 2018 at 22:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.