You are on page 1of 9

ELEX Digital Techniques 1 LAB 2 Resource

1117 for ECET SPDT Switches and Logic Sources

Terminology

Logic source - A circuit that outputs a two-state (digital) signal in response to whatever it is monitoring.
This signal is intended for use as an input to a logic circuit.

Logic state - The state of a logic source (or logic circuit). Depending on the application, the logic states
can be referred to as ON/OFF or TRUE/FALSE or 1/0 or HIGH/LOW.

Logic level - The voltage used to represent a given logic state. The logic levels used in this course are 0V
and +5V, and sometimes 0V and +3.3V.

Active high I - When the higher logic state (i.e. ON, TRUE, HIGH) is represented by the higher logic level
(+5V or +3.3V). Logic sources that are active high are also referred to as non-inverting logic sources.

Active low - When the higher logic state (i.e. ON, TRUE, HIGH) is represented by the lower logic level
(0V). Logic sources that are active low are also referred to as inverting logic sources.

SPDT Switches

In Lab 2 and beyond, we will be using Grayhill SPDT (single pull, double throw) switches to implement
both inverting and non-inverting logic sources.

Switches are used to provide logical 1’s and 0’s to our logic circuit. The output of the switch is the input
to the logic circuit.

Grayhill switches like the one shown above include 4 individual single pole double throw (SPDT)
switches. “Single pull” refers to a single handle to activate/deactivate the switch. “Double throw” refers
to two sets of contacts (illustrated below). We use this type of switch because we can easily wire them to
give us both inverting (active low) and non-inverting (active high) logic sources.

In the photo above, the two switches on the left are in the active position (handle up) and the two
switches on the right are in the inactive position (handle down). Another term for inactive position is
“normal” position.

BCIT ECET Page 1-1 Rev. [Publish Date]


ELEX Digital Techniques 1 LAB 2 Resource
1117 for ECET SPDT Switches and Logic Sources

If we look at the pinout of the Grayhill switch, we can see that there are three contacts for each switch: a
normally open contact, normally closed contact, and a common pin. The contact positions are always
drawn when the switch is in its “normal” state, that is, handle is down.

Let’s look at the switch on the righthand side first. Pins 6, 7, and 8 are the contacts for this switch. Pin 8
is called a normally closed contact (N.C.) and pin 7 is called a normally open contact (N.O). Pin 6 is the
common contact (this is indicated on the physical package with “C4”).

Watch this video for Grayhill Switch

https://www.youtube.com/watch?v=M-uB9ag1nvA

Logic Sources

There are a few different ways to wire an SPDT switch to give us logical 1’s and 0’s. Students new to
digital logic often configure the switch as shown below. This configuration is undesirable and should not
be used:

+5V

8 A Output of
logic
7 6 source

There are two issues here:

BCIT ECET Page 1-2 Rev. [Publish Date]


ELEX Digital Techniques 1 LAB 2 Resource
1117 for ECET SPDT Switches and Logic Sources

1. There is no short circuit protection if the output of the logic source is connected to common (the
positive terminal of the power supply would be connected directly to ground).
2. The output state is undefined during the transition of the switch between states.

The industry standard for a non-inverting (active high) logic source is shown here:

+5V

1k

Output of
A
logic
7 8 source

If the condition is true, then the logic source produces +5V and if the condition is false the logic source
produces 0V. The output is never anything other than 0V or +5V.

Note that a resistor is used to prevent a short circuit from Vcc to Com. When the resistor is connected to
the positive voltage, is it called a pull-up resistor. When the resistor is connected to the circuit common it
is called a pull-down resistor.

This is the standard for an inverting (active low) logic source:

+5V

1k

Output of
A
logic
8 7 source

BCIT ECET Page 1-3 Rev. [Publish Date]


ELEX Digital Techniques 1 LAB 2 Resource
1117 for ECET SPDT Switches and Logic Sources

If the condition is true, then the logic source produces 0V and if the condition is false the logic source
produces +5V. The output is never anything other than 0V or +5V.

A single SPDT switch can be used as both an inverting and non-inverting logic source. This is useful as we
no longer require an IC to invert the signal (NOT gate), which saves us time (no need to wire another IC),
money (don’t need to buy an IC), and space (can fit more/different components on our breadboards).

This is the industry standard for a dual-function logic source:

+5V

1k 1k

A A
8 7

This configuration uses one switch to provide both an inverting and non-inverting logic sources. This is
often desirable as it can reduce the number of gates used in our circuit.

A few notes on labelling logic sources:

1. The switches are drawn in their deactivated state


2. The output of a logic source is labelled for its ACTIVE state
a. For a non-inverting logic source the output has the same label as the switch
b. For an inverting logic source the output label has a bar over top (indicating inversion)
3. It is best practice to label your switches D, C, B, A (from left to right), so that switch A is always
your least significant bit (LSB). Your truth table should match this order to maintain consistency.

BCIT ECET Page 1-4 Rev. [Publish Date]


ELEX Digital Techniques 1 LAB 2 Resource
1117 for ECET SPDT Switches and Logic Sources

Few more terms to understand these basics:

There are few terms in the Lab prep which students will have problem with. Refer to this
document to understand these in simple words;
Normally open and Normally closed. Refer to the following diagrams to better understand it.

Normally-open and Normally-closed

For instance, the following diagram shows a normally-open and normally closed pushbutton
switch controlling a lamp on a 120 volt AC circuit (the “hot” and “neutral” poles of the AC
power source labeled L1 and L2, respectively):

BCIT ECET Page 1-5 Rev. [Publish Date]


ELEX Digital Techniques 1 LAB 2 Resource
1117 for ECET SPDT Switches and Logic Sources

Active high and active low:

For sake of example, assume a circuit operates on 5 volts.

If the circuit uses "active high" logic, 5 volts represents a digital "1" and 0 volts represents a
digital "0".

If the circuit uses "active low" logic, 5 volts represents a digital "0" and 0 volts represents a
digital "1".

It's completely arbitrary and up to the circuit designer to decide which convention to use. Some
circuits use a combination of the two conventions. For instance, if you have an IC with an active
LOW reset pin, you would need to keep it HIGH during use of it, and make it LOW when you
wanted to reset.

Active-LOW button means that when you press/close the switch, then the signal sent to the MCU
will be LOW. As you can see from the figure 1, when the switch is open, the signal sent to MCU
is actually HIGH, and when the switch is closed, the MCU pin will be directly connected to
GND. That is why this kind of configuration is Active-LOW configuration. (Pull-up resistors
are resistors which are used to ensure that a wire is pulled to a high logical level in the absence of
an input signal). SO see which is the pull up resistor here in the figure 1.

BCIT ECET Page 1-6 Rev. [Publish Date]


ELEX Digital Techniques 1 LAB 2 Resource
1117 for ECET SPDT Switches and Logic Sources

Figure 1: Active low using pull up resistor. NOTE: MCU here is Microcontroller Unit (refers to
output)

Figure 2: Active high signal using pull down resistor


Active-HIGH button means that when you press/close the switch, then the signal sent to the
MCU will be HIGH. As you can see from the figure 2, when the switch is open, the signal sent to
MCU is actually LOW, and when the switch is closed, the MCU pin will be directly connected to

BCIT ECET Page 1-7 Rev. [Publish Date]


ELEX Digital Techniques 1 LAB 2 Resource
1117 for ECET SPDT Switches and Logic Sources

VCC. That is why this kind of configuration is Active-HIGH configuration. (The pull-down
resistor holds the logic signal near to zero volts (0V) when no other active device is connected).

What is SPDT Switch : Working & Its Applications

Switches are the most essential devices in an electric field. The main function of a switch is to
open or close an electrical circuit. Generally, the electric circuits change from simple make or
simply break circuits to multi make or multi-break circuits. Although the logic is very simple, so
the appropriate circuit must be selected for the application. There are different types of
switches available in the market like SPST, DPST, SPDT & DPDT. So this article discusses one
of the types of switches like SPDT switch & its working with examples.
What is SPDT Switch?

A switch that has a single input and two dissimilar outputs is known as SPDT. The term SPDT
stands for Single Pole Double Throw Switch which is used to control two dissimilar circuits
through a similar single input.

SPDT Switch Structure

The basic structure of this switch is shown below. This structure includes pole, throw, open and
close.

Pole
The pole within the switch is the controller. Generally, we use a single pole or double pole to
explain how many separate circuits are controlled through the switch. (Pole is not common)

BCIT ECET Page 1-8 Rev. [Publish Date]


ELEX Digital Techniques 1 LAB 2 Resource
1117 for ECET SPDT Switches and Logic Sources

Throw
When the circuit is controlled through the pole then it is called throw. Generally, we use single
or double throw to explain how many different circuits will be controlled through a single Pole.

Open
If the pole is detached by a single throw, then the condition of this throw is known as an open or
open state.

Close
If the pole is attached to a single throw, then the condition of this throw is known as the close or
close state.

BCIT ECET Page 1-9 Rev. [Publish Date]

You might also like