Electronics 101: Lesson-09 Buttons and Switch Basics

Introduction:

There are a ton of switches out there (such as toggle, dip, rotary, push-button, rocker, etc) with unique characteristics to differentiate them from others like what action flips the switch or how many circuits a switch can control as we are yet to uncover in this tutorial.

 

 

What is a switch?

A switch is a basic electronic component that is used to control the open-ness or closed-ness of an electric circuit. Switches allow control over current flow in a circuit and they are critical in a circuit that requires human/user interaction/control.

Switches exist in only one of two states ie. Open or closed. In the open (off state), a switch looks like an open gap in the circuit preventing current from flowing whereas in the closed (on state), it will act as a piece of conducting wire turning the system ‘on’ allowing current to flow unimpeded through the rest of the system as illustrated in the circuit diagrams below;

 

In the above circuit diagrams of an LED, resistor and a switch, in the first diagram (A), when a switch is closed (turned on), current flows and the LED is illuminated whereas in the second diagram, when the switch is opened (turned off), no current flows through the circuit, hence the LED receives no power.

 

Categorizing Buttons and Switches;

Buttons and Switches can be categorized depending on their defining characteristics such as; Actuation method, their mounting Style, whether they’re momentary or maintained and also by their internal circuitry arrangement.

Actuation Method;

For a switch to change from one state to another, it must be ”actuated” this means some sort of physical action must be performed to “Flip” the switch’s state and the actuation method of a switch is one if it’s most defining characteristics. Let’s have a look at the switch examples below;

Looking at the switch examples above, switch actuation can come from toggling, rotating, pushing, pulling,  snapping, etc or any other physical interaction which can cause the mechanical linkages inside the switch to come into contact or go out of contact.

 

Mounting Style;

Switches and buttons can be mounted in different configurations either surface mount (SMD) or through-hole (PTH).

SMD switches are small and they sit flat on top of a PCB and they usually require a gentle touch since they’re not built to withstand as much force as a through-hole switch requires.

An example of an SMD switch can be seen on the Arduino Mega 2560 as shown below;

 

Through-hole switches are usually large in size as compared to their SMD counterparts. Some are even designed to fit just fine on a breadboard for easy prototyping as shown below.

 

Momentary Vs. Maintained;

All switches may either be momentary or maintained.

Maintained Switches;

A maintained switch is one that retains its state until it’s actuated into a new position/state. A typical example of a maintained switch is your wall switch controlling lights in your house. Maintained switches are great for set-it-and-leave-it applications like turning power on and off.

 

Examples of Maintained Switches;

a). Toggle switches;

These have a long lever which moves in a rocking motion and as they move to a new position, they make a really satisfying ‘snap” when actuated into a new state. These are commonly used in missile launch cover operations.

These can be SPST (two terminals) or SPDT (three terminals) and they can also be SMD or PTH but probably most commonly as panel-mounted.

 

b). Slide Switches;

These have a tiny little nub which protrudes from the switch and it slides across the body into one of two or more positions.

They’re mostly in SPDT or DPDT configurations and the common terminal is usually in the middle and the two select positions are on the outside.

 

c). DIP Switches;

These are through-hole switches that designed in the same way as a through-hole DIP IC. They can be placed directly onto a breadboard in the same manner a through-hole IC might be placed by sitting in the center area.

These switches often come in arrays of eight or more separate SPST switches with tiny little sliding levers.

 

d). Latching/Push Buttons;

Not all push-buttons are momentary, some will latch into place maintaining their state until pressed again latching back to where they started.

Some other examples of maintained switches include;

Pull-chain switches, Key-switches and rotary switches like those on a digital multimeter.

 

Momentary Switches;

(a). Button matrices;

Your typical PC/Mac keyboard and also your door-lock keypad are typical examples of button matrices.

These usually arrange all of their switches into a big matrix where every button on the pad is assigned a row and column.

 

(b). Push Buttons;

These are the classic momentary switches. These switches really have a really nice tactile “clicky” feed-back when pressed. These can also be terminated as through-hole or surface mount or even panel-mount.

These come in different colors, sizes and shapes and are sometimes illuminated (with an LED shining through the button).

 

(c). Joystick Switch;

Not all momentary switches are actuated by push-down, some can be push-sideways like the movement action of most joysticks.

These use four/five micro-switches to sense up, down, left, right and press movements.

 

(d). Reed Switches;

These open and close when exposed to the presence of a magnetic field and these are a great when making a non-contact switch.

 

Internal Circuitry Arrangement;

The internal circuit arrangement of a switch is one of the most important switch characteristics.

Earlier-on we used terms like SPDT, SPST, and DPDT and if you’re wondering what these mean, then worry not. Grab a cup of coffee and let’s roll. For us to better understand how the internal circuitry of a switch works, let’s first understand what Poles and Throws are.

Poles and Throws;

Any given switch must have at least two terminals, one for the current to potentially go in and the other to come out. At least this describes the simplest version of a switch. Often times, you’ll see that some switches have more than two pins/terminals, so how do all those terminals line up with the internal workings of a switch? Now this is where knowing how many poles and throws a switch has is essential.

Poles;

The number of poles on a switch defines how many separate circuits the switch can control. So a switch with one pole, can only influence one single circuit. A four-pole switch can separately control four different circuits.

Throws;

The number of throw-counts on a switch defines how many positions each of the switch’s poles can be connected to. For-instance if a switch has two throws, each circuit (pole) in the switch can be connected to one of two terminals.

So therefore knowing how many poles and throws a switch has, it helps us to specifically classify them and often times you’ll see switches defined as “Single-Pole, Single-Throw”, “Single-Pole, Double-Throw”, “Double-Pole, Double-Throw”, and are abbreviated as SPST, SPDT and DPDT respectively.

Let’s look at these configurations in more detail;

 

  1. SPST;

A single-pole, single-throw (SPST) switch has one input and one output. This switch will either be closed or completely disconnected and they are perfect for on/off switching. They’re also a very common form of momentary switches.

A Circuit symbol for an SPST switch in the off position & a through-hole, maintained SPST rocker switch .

 

  1. SPDT;

The other common switch-type is the Single-Pole, Double-Throw (SPDT) switch and these have three terminals that is, one common pin and two pins which vie for connection to the common. These type of switches are great for selecting between two power sources, swapping inputs or whatever it is you do with two circuits trying to go one place. Most slide switches are of the SPDT variety.

An SPDT slide switch and a circuit symbol for an SPDT switch in one of the two positions.

 

  1. DPDT;

When we add another pole to the SPDT switch we create a Double-Pole, Double Throw (DPDT) switch with six terminals. So basically a DPDT switch is a combination of two SPDT switches which can control two separate circuits but are always switched together by a single actuator.

A 6 terminal DPDT rocker switch and a circuit symbol for a DPDT switch…

 

  1. XPYT;

Once we get past one or two poles/throws, we just start sticking numbers in the abbreviation. Switches with more than two poles or throws are not common but they’re out there with weirdly shaped configurations. Take for-instance a 4PDT switch, it can control four separate circuits that is two positions per circuit.

A physically big 4PDT toggle switch with its circuit symbol…

 

Normally Open (NO) & Normally Closed (NC);

This is also another switch characteristic that is worth talking about, when a momentary switch is not actuated, it’s in a normal state and depending on how the button is constructed, its normal sate can either be an open circuit or a short circuit.

So when a button is open until actuated, it’s said to be Normally Open (abbreviated as “NO”) and when you actuate an NO switch, you’re closing the circuit which is why they are also called “Push-to-make” switches.

On a contrary, if a button usually acts like a short circuit unless actuated it’s called a Normally-Closed (NC) switch. NC switches are “Push-to-break”, and actuating the switch creates an open circuit.

Often times you’re most likely to encounter a normally open momentary switch.

 

Switch Applications;

  1. User input;

For-instance if you want to connect a switch to a microcontroller input pin you would connect the MCU input pin to a switch with a resistor in between to act as a pull-up resistor to bias the input high and prevent a short to ground when the switch is closed. When the switch is open, the MCU pin is connected through the resistor to 5V.

  1. On/Off control

This is the most obvious application of a switch and an on/off switch can be implemented by simply sticking an SPST switch in series with a power-line and usually will be maintained like a toggle or slide switch.

 

Conclusion:

By now you should be well acquainted with the defining characteristics of switches, how they are actuated, how they are mounted, and the different examples of monetary and maintained switches and how their internal circuitry is arranged. We also know what the abbreviations like SPST, SPDT and DPDT mean.


 

 

 

Tum Kurtzman
Author: Tum Kurtzman

Computer Engineer, Ugandan Life Hacker, Tech Blogger, YouTuber, Founder & Lead Engineer at SONALABS.ORG... Tum completed his BSc. in Computer Engineering from Makerere University and you can reach him via e-mail at tum@sonalabs.org.

Leave a Reply