Relay

Old Content - visit altium.com/documentation

Model Kind

General

Model Sub-Kind

Spice Subcircuit

SPICE Prefix

X

SPICE Netlist Template Format

@DESIGNATOR %1 %2 %3 %4 %5 @MODEL #|PARAMS:| ?PULLIN|PULLIN=@PULLIN| ?DROPOFF|DROPOFF=@DROPOFF| ?CONTACT|CONTACT=@CONTACT| ?RESISTANCE|RESISTANCE=@RESISTANCE| ?INDUCTANCE|INDUCTANCE=@INDUCTANCE|

Parameters (definable at component level)

The following component-level parameters are definable for this model type and are listed on the Parameters tab of the Sim Model dialog. To access this dialog, simply double-click on the entry for the simulation model link in the Models region of the Component Properties dialog.

Pullin

contact pull in voltage (in Volts).

Dropoff

contact drop off voltage (in Volts).

Contact

contact resistance (in Ohms).

Resistance

coil resistance (in Ohms).

Inductance

coil inductance (in Henrys).

Notes

A relay is not one of the built-in SPICE engine models. It is a complex device and, as such, is defined using the hierarchical sub-circuit syntax.

All of the parameters will normally have a default value assigned. The default should be applicable to most simulations. Generally you do not need to change this value. Entering a value for a parameter on the Parameters tab of the Sim Model dialog will override its specified value in the sub-circuit file.

To check the default values of a relay, open the appropriate sub-circuit (.ckt) file. You can view the content of this file for the model specified on the Model Kind tab of the Sim Model dialog, by clicking on the Model File tab at the bottom of the dialog. The default parameter values are listed in the .SUBCKT line.

Examples

Consider the relay in the above image, with the following characteristics:

  • Pin1 is connected to net OUT
  • Pin2 is connected to net P2
  • Pin3 is connected to net P1
  • Pin4 is connected to net In
  • Pin5 is connected to net GND
  • Designator is RLY1
  • The linked simulation sub-circuit file is 12VSPDT.ckt, with the following content:

*Generic relay pins: COM NC NO T1 T2
*SPDT Relay Subcircuit Parameters
*PULLIN     = Pull in voltage
*DROPOFF    = Drop off voltage
*CONTACT    = Contact resistance
*RESISTANCE = Coil resistance
*INDUCTANCE = Coil Inductance 
*AC/DC relay
.SUBCKT 12VSPDT 1 2 3 4 5 
+ PARAMS: PULLIN=9.6 DROPOFF=0.1 CONTACT=1m RESISTANCE=1000 INDUCTANCE=10m
L1 4 6 {(INDUCTANCE/2)}
L2 5 7 {(INDUCTANCE/2)}
R1 6 7 {RESISTANCE}
BNO 8 0 V={PULLIN}-abs(v(6,7))
SW1 2 1 8 0 SWNC ON
BNC 9 0 V=abs(v(6,7))
SW2 3 1 9 0 SWNO OFF
.MODEL SWNC SW(VT={DROPOFF} RON={CONTACT} )
.MODEL SWNO SW(VT={(PULLIN*0.98)} RON={CONTACT} )
.ENDS SPDTRELAY

  • Pullin = 8.4V - set on the Parameters tab of the Sim Model dialog.

The entries in the SPICE netlist would be:

*Schematic Netlist:
XRLY1 OUT P2 P1 IN 0 12VSPDT PARAMS: Pullin=8.4V
.
.
*Models and Subcircuit:
.SUBCKT 12VSPDT 1 2 3 4 5 PARAMS: PULLIN=9.6 DROPOFF=0.1 CONTACT=1m
+ RESISTANCE=1000 INDUCTANCE=10m
L1 4 6 {(INDUCTANCE/2)}
L2 5 7 {(INDUCTANCE/2)}
R1 6 7 {RESISTANCE}
BNO 8 0 V={PULLIN}-abs(v(6,7))
SW1 2 1 8 0 SWNC ON
BNC 9 0 V=abs(v(6,7))
SW2 3 1 9 0 SWNO OFF
.MODEL SWNC SW(VT={DROPOFF} RON={CONTACT} )
.MODEL SWNO SW(VT={(PULLIN*0.98)} RON={CONTACT} )
.ENDS SPDTRELAY

The Netlister will evaluate the formulae in the sub-circuit definition using the value for the Pullin parameter specified in the Sim Model dialog (which overrides the default) and the default values for all other parameters, as defined in the 12VSPDT.ckt file.

You are reporting an issue with the following selected text and/or image within the active document:
ALTIUM DESIGNER FREE TRIAL
Altium Designer Free Trial
Let’s get started. First off, are you or your organization already using Altium Designer?

If would like to speak with a representative, please contact your local Altium office.
Copyright © 2019 Altium Limited

In that case, why do you need an evaluation license?

If would like to speak with a representative, please contact your local Altium office.
Copyright © 2019 Altium Limited

Got it. You actually don’t need an evaluation license for that.

Click the button below to download the latest Altium Designer installer.

Download Altium Designer Installer

If would like to speak with a representative, please contact your local Altium office.
Copyright © 2019 Altium Limited

Please fill out the form below to get a quote for a new seat of Altium Designer.

By clicking “Get Your Free Trial”, you are agreeing to our Privacy Policy.
You may receive communications from Altium and can change your notification preferences at any time.

If you are on Altium Subscription, you don’t need an evaluation license.

If you are not an active Altium Subscription member, please fill out the form below to get your free trial.

By clicking “Get Your Free Trial”, you are agreeing to our Privacy Policy.
You may receive communications from Altium and can change your notification preferences at any time.

Why are you looking to evaluate Altium Designer?

If would like to speak with a representative, please contact your local Altium office.
Copyright © 2019 Altium Limited

You came to the right place! Please fill out the form below to get your free trial started.

By clicking “Get Your Free Trial”, you are agreeing to our Privacy Policy.
You may receive communications from Altium and can change your notification preferences at any time.

Sounds exciting! Did you know we offer special discounted student licenses? For more information, click here.

In the meantime, feel free to request a free trial by filling out the form below.

By clicking “Get Your Free Trial”, you are agreeing to our Privacy Policy.
You may receive communications from Altium and can change your notification preferences at any time.

Got it. You can download a free Altium Designer Viewer license which is valid for a 6 months.

Please fill out the form below to request one.

By clicking “Get Your Free Trial”, you are agreeing to our Privacy Policy.
You may receive communications from Altium and can change your notification preferences at any time.

That’s great! Making things is awesome. We have the perfect program for you.

Upverter is a free community-driven platform designed specifically to meet the needs of makers like you.

Click here to give it a try!

If would like to speak with a representative, please contact your local Altium office.
Copyright © 2019 Altium Limited

Got it. You can download a free Altium Designer Viewer license which is valid for a 6 months.

Please fill out the form below to request one.

By clicking “Get Your Free Trial”, you are agreeing to our Privacy Policy.
You may receive communications from Altium and can change your notification preferences at any time.