Switches

<< Click to Display Table of Contents >>

Navigation:  Designing a PCB with the DEX PCB Designer > Designs > PCB Design > Spice Simulation > Devices >

Switches

In SPICE (Simulation Program with Integrated Circuit Emphasis), switches are components that can be used to represent the opening or closing of a connection in a circuit. Switches allow you to model changes in circuit topology over time, such as toggling a component on or off, changing the path of current, or introducing and removing components based on certain conditions. SPICE provides various types of switches that you can use in your circuit simulations.

Here are the common types of switches in SPICE:

Voltage-Controlled Switch (S)

The voltage-controlled switch models a switch that opens or closes based on the voltage across its controlling nodes.

Syntax: S<name> <node1> <node2> <control_voltage_node1> <control_voltage_node2> <model>

Example: S1 N1 N2 Vctrl1 Vctrl2 SW1

Current-Controlled Switch (CS)

The current-controlled switch models a switch that opens or closes based on the current through its controlling nodes.

Syntax: CS<name> <node1> <node2> <control_current_node1> <control_current_node2> <model>

Example: CS1 N3 N4 Ictrl1 Ictrl2 SW2

Transmission Line Switch (SW)

The transmission line switch models a switch that can be used in transmission line simulations.

Syntax: SW<name> <node1> <node2> <model>

Example: SW1 N5 N6 TransmissionLineSwitch

Diode Switch (DS)

The diode switch models a diode-like switch that can turn on or off based on a controlling voltage.

Syntax: DS<name> <node_anode> <node_cathode> <control_voltage_node> <model>

Example: DS1 Anode Cathode Vctrl DiodeSwitchModel

Switches can be used to simulate various circuit scenarios, such as toggling components on and off, simulating the opening or closing of a circuit path, and modeling dynamic circuit behavior. The controlling nodes determine when the switch opens or closes based on specified conditions. It's important to provide an appropriate model for the switch to accurately represent its behavior.

 

When using switches, be sure to understand the behavior of the specific switch type and how it integrates with the rest of your circuit components.