PSPICE model for a: Voltage controlled Single Pole change over switch

Papabravo

Joined Feb 24, 2006
21,225
What does your documentation say about that? A voltage-controlled switch is a basic SPICE element. You might need to construct a ".model" card for it.
 

Papabravo

Joined Feb 24, 2006
21,225
What happens during the transition of Vcontrol? Is the transition governed by "make before break", or some other régime?
 

crutschow

Joined Mar 14, 2008
34,445
What happens during the transition of Vcontrol?
In LTspice, that's controlled by the hysteresis value (Vh).
Selection of its value and the Vcontrol rise/fall times determines the transition between on and off, so can be used to generate either make-before-break or break-before-make operation.
 

Papabravo

Joined Feb 24, 2006
21,225
In LTspice, that's controlled by the hysteresis value (Vh).
Selection of its value and the Vcontrol rise/fall times determines the transition between on and off, so can be used to generate either make-before-break or break-before-make operation.
I'm not that familiar with PSPICE either and I wasn't assuming the TS was familiar with any other simulation package. If PSPICE does not support the hysteresis option, then you need an alternative way to implement the regime that is appropriate for the application. We still don't know what that might be.
 

Thread Starter

rowlandwhiffin

Joined Mar 10, 2023
11
Thanks for your comments. I'm trying to model a Ti part: SN74LVC1G3157DCKR

I've managed to get a subckt working to a degree.

I need to invert the Control input, which is 0 to 5 volts.

What i need to write in the model is something like:
define Control_Invert

If (Control > 2.5)
Control_Invert = 0
else
Control_Invert = 5

Is this possible , if it is, what would it look like?

Many thanks.
 

Thread Starter

rowlandwhiffin

Joined Mar 10, 2023
11
I've created this, but NOC1 is not working:

*************************************************
.SUBCKT SPCO NOC1 NSC2 common control PARAMS: ResOn=1 ResOff=1Meg
.PARAMS control2=5

.model swon SW(Ron=ResOn Roff=ResOff Vt=2.5)

.control
control2=5
if (control > 2.5)
begin
control2=0
end
.endc

S1 common NOC1 control2 0 swon
S2 common NSC2 control 0 swon
*S2 common NSC2 0 control swon

.ENDS SPCO
**************************** EOF

Any help welcome....
 
Top