LTspice - How to simulate switches closing at different time

Thread Starter

grace1234

Joined Nov 16, 2020
3
Hi guys!

I need to model a RCL circuit with two switching that are closing at different time.
How can I do it?
I tried computing initial conditions but is very time consuming.
Is there another way to model them?
May a use one of the available switches in the library?

Thanks!
1605544921630.png
 

crutschow

Joined Mar 14, 2008
26,974
May a use one of the available switches in the library?
Yes, you can use the SW model from the library (icon below).
It's controlled by the + and - inputs.
You also need a Spice directive (shortcut key "S") such as .model sw SW(Ron=0.001 Roff=100Meg Vt=0.5 Vh=.01 for the switch.
Then you apply a voltage (pulse) source to the control inputs where any voltage above 0.5V closes the switch contacts, and any voltage below 0.5V opens the contacts.

1605545875568.png
 

Thread Starter

grace1234

Joined Nov 16, 2020
3
Yes, you can use the SW model from the library (icon below).
It's controlled by the + and - inputs.
You also need a Spice directive (shortcut key "S") such as .model sw SW(Ron=0.001 Roff=100Meg Vt=0.5 Vh=.01 for the switch.
Then you apply a voltage (pulse) source to the control inputs where any voltage above 0.5V closes the switch contacts, and any voltage below 0.5V opens the contacts.

View attachment 222384
Hi crutschow,
Thank you for your help!

I'm trying with a very simple circuit.

I generated a voltage pulse that starts form zero and at t = 0.4s goes to 1V.

How can I close the switch at that time?

In this way is not working, the current is always zero...

1605547343873.png
 
Top