# Automatic test switching

Automatic test system switching test equipment allows for high-speed testing of a device or devices in a test situation, where strict sequences and switching combinations must be observed. Automating the process in this way minimizes test errors and inaccuracies, and only systematic errors are generally encountered due to an incorrectly programmed test condition. This eliminates errors due to human factors and allows the application of a standard test sequence repetitively. The design of a test system’s switching configuration is governed by the test specification derived from the functional tests to be performed.
A typical test system would involve connecting the input and outputs of the device under test to the test equipment, which is usually controlled by an electronic program generated by a computer or a programmable logic controller.

## Switch Relays

The simplest definition of a switch is “a device that opens or closes a circuit.”
A relay is an electronically operated switch. Three relay types are commonly used in automated test system switching:
* Electromechanical relays are the most-often-used type because they have the largest signal range capability of the three. They also have the slowest actuation time and the shortest helpful life. Electromechanical relays are ideal for high-voltage, high-current, and RF applications. A latching feature makes the latching relay type appropriate for low-voltage applications where contact potential can interfere with the measurement.
* Reed relays have actuation times of 0.5 ms to 2 ms and a long life. By design, reed relays can only handle a portion of the signal range that electromechanical relays can offer. However, they provide a useful trade-off between increasing speed and maintaining signal integrity.
* Solid-state relays can switch the fastest and have essentially infinite life. However, they can only handle small signal ranges and suffer from high on-resistance and high offset currents in the nanoamp range compared to picoamps of offset current for the other two types.

## Switching’s Effect on Test System Accuracy

The ideal switch:
* has no current limit during its ON state
* has infinite resistance during its OFF state
* has no voltage drop across the switch during its ON state
* has no voltage limit during its OFF state
* has zero rise time and fall time during state changes
* switches only once without “bouncing” between on and off positions
It’s important to recognize, however, that real-life switches are not ideal, so when calculating the overall system accuracy, the effects of the switch itself and all the switching hardware in the system must be factored in.
As a signal travels from its source to its destination, it can encounter various forms of interference and sources of error, so it may be degraded whenever a signal passes through a connecting cable or switch point. For example, unshielded cabling can introduce leakage currents in low-current and high-resistance, that will degrade measurement accuracy. The unshielded cable can result in noisy readings for low current and high resistance applications, especially if the cabling runs adjacent to equipment generating electromagnetic interference.

## Switch Relay Terminology

Three terms are used to describe the configuration of a relay: pole, throw, and form.
Pole refers to the number of common terminals within a given switch. Throw refers to the number of positions where the switch may be placed to create a signal path or connection. Figure lA illustrates a single-pole, single-throw normally open switch (SPST NO). Figure 1B shows a single-pole, double-throw (SPDT) switch. One terminal is normally-open (NO), and the other is normally-closed (NC). Depending on the state of the switch, one or the other position is connected to the common terminal (COM). One signal path is broken before the other is connected, which is referred to as a break-before-make configuration.
The number of poles increases when more than one common terminal is used. Figure 1C shows a double-pole, single-throw (DPST) switch. Both poles are actuated simultaneously when the relay is energized. In this case, both poles are either always closed or always open. Figure 1D illustrates a double-pole, double-throw (DPDT) switch.
Contact form, or simply form, is the term relay manufacturers use to describe a relay's contact configuration. "Form A” refers to a single-pole, normally open switch. "Form B" indicates a single-pole, normally closed switch, and "Form C" indicates a single-pole, double-throw switch. Virtually any contact configuration can be described using this format.

## Switch System Topology

A variety of switching configurations are commercially available for test system development:
* Scanner
The scanner (Figure 2) sequentially connects multiple inputs to a single output. Only one relay is closed at any one time. In its most basic form, relay closure proceeds from the first channel to the last, but some scanner systems allow skipping channels. Typical scanner-switching applications include component burn-in testing, monitoring time and temperature drift in circuits, and taking data on system variables like temperature, pressure, flow, etc.
* Multiplexer
Like a scan configuration, multiplex switching can connect one instrument to multiple devices (1:N) or multiple instruments to a single device (N:1). Still, it offers much more flexibility than the scanner configuration because it permits multiple simultaneous connections and both sequential and non-sequential switch closures. Typical applications of multiplex switching include capacitor leakage, insulation resistance, and contact resistance test systems for multiple devices.
* Matrix
The matrix switch configuration is the most versatile because it can connect multiple inputs to multiple outputs. A matrix is useful when connections must be made between several signal sources and a multipin device, such as an integrated circuit or resistor network.
Using a matrix switch card allows connecting any input to output by closing the switch at the intersection (crosspoint) of a given row and column. The most common terminology to describe the matrix size is M rows by N columns (MxN). Matrix switch cards generally have two or three poles per crosspoint. As shown in Figure 3, a 5VDC source can be connected to any two terminals of the device under test (DUT). A function generator supplies pulses between two terminals. Operation of the DUT can be verified by connecting an oscilloscope between two other terminals. The DUT pin connections can easily be programmed, so this system can be used to test a variety of components.
Some performance tradeoffs are typically necessary when choosing a matrix card with mixed signals. For example, if both high-frequency and low-current signals must be switched, take extra care when reviewing the card's specifications. The card chosen must have wide bandwidth, good isolation and low offset current. A single matrix card may not satisfy both requirements, so the system builder must decide which switched signal is more critical.
Card types should not be mixed in a system with multiple cards if their outputs are connected. For example, a general-purpose matrix card with its output connected in parallel with a low-current matrix card will degrade the performance of the low-current card.

## Expanding a Matrix

A large test system may require more rows and/or columns than a single switch card can accommodate, but it’s possible to expand a matrix by joining several cards' rows and/or columns. Depending on the switch card and mainframe selected, the rows of the cards may be connected through the backplane of the mainframe or the rows may be wired externally.

## Isolated switching

The isolated, or independent, switch configuration consists of individual relays, often with multiple poles, with no connections between relays. Isolated relays are commonly used in power and control applications to open and close different circuit parts that are at substantially different voltage levels. Applications for isolated relays include controlling power supplies, turning on motors and annunciator lamps, and actuating pneumatic or hydraulic valves. Figure 4 illustrates a single isolated relay or actuator, in which a single-pole normally open relay controls the voltage source's connection to the lamp. This relay connects one input to one output. An isolated relay can have more than one pole and can have normally closed contacts as well as normally open contacts.
Isolated relays are not connected to any other circuit, so adding some external wiring makes them suitable for building very flexible and unique combinations of input/output configurations.
Given that the relays are isolated from each other, the terminals of each channel on the switch card are independent of the terminals of the other channels. As shown in Figure 5, each isolated Form A relay has two terminals. Two-pole isolated relays would have four terminals (two inputs and two outputs). A Form C isolated relay would have three terminals.

## Cold vs. Hot Switching

The term cold switching indicates that a switch is activated with no signal applied. Therefore, no current will flow when the switch is closed, and no current will be interrupted when the switch is opened. In contrast, in hot switching, voltage is present and current will flow immediately once the contacts close. When the switch is opened, this current will be interrupted and can cause arcing.
Cold switching allows power to be applied to the device under test in a controlled manner. Its primary advantage is a longer switch life than hot switching (up to a thousand times more cycles than hot switching). Cold switching also eliminates arcing at the relay contacts and any radio frequency interference that might be caused by arcing. Hot switching might be necessary if close control must be exercised between the application of power and the making of the measurement. For example, hot switching is typically used where digital logic is involved, because devices might change state if power is interrupted even for a moment.
Hot switching may be necessary to ensure good contact closure with relatively large relays. The connection may not be reliable without the “wetting” action of the current through the contacts.