Learning Content and Theses

Platform for digital learning at HSHL

Modeling Switches

In this tutorial we only simulate with ideal switches. It is therefore sufficient to model the switch as a switchable resistor. In the simulation tool we specify the ON resistance (switch closed) and the OFF resistance (switch open). A voltage at the control input determines whether the switch is open or closed.

In Multisim (www.multisim.com) the parameters of an SPST switch are set as follows:

Voltage-controlled switch VC_SPST in Multisim with the parameters V_ON, V_OFF, R_ON and R_OFF

If the control voltage between the two left inputs of the switch is 0 V, the switch is open. If it is at least 5 V, the switch is closed. The resistance between the switching terminals at the top and bottom of the switch symbol changes when switching. In the open state (0 V at the control input), the OFF resistance (here 1 MΩ) is present between the switching terminals. If the control voltage exceeds VON = 5 V, the ON resistance of 10 mΩ is present.

In LTspice, the modelling is more complicated. The switch SW in LTspice has 4 terminals. The terminals to the left and right of S1 in the figure below are switched. The resistance between these terminals changes when switching. A voltage source is connected to the control terminals “+” and “−”. If the control voltage of this source exceeds a threshold, the switch closes. If it falls below the threshold, the switch opens.

The switch parameters threshold, ON resistance and OFF resistance are specified globally in the model for all switches.

Voltage-controlled switch in LTspice: SPICE directive .model SW SW(Ron=1m Roff=10Meg Vt=1 Vh=0)
LTspice XVII - [Schalter.asc] = LTspice XVII - [Switch.asc] · Schalter = switch

The figure above shows the switch S1 with its control source V2 in LTspice. In this configuration, a positive voltage of the source V2 closes the switch. A negative voltage of V2 opens the switch. Under the “Edit” tab you will find the “SPICE Directive”, which you place once for all switches on the schematic. Edit the directive and insert the following text:

.model SW SW(Ron=1m Roff=10Meg Vt=1 Vh=0)

The parameter Vt sets the switching threshold that must be present between the control inputs for the switch to change over.

Download course as PDF

The PDF contains all pages of the course. Interactive content is only available on the website.