LTspice - How to simulate switches closing at different time

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!

ericgibbs

Joined Jan 29, 2010
18,072
hi grace,
Welcome to AAC.
What are the timings?
E

crutschow

Joined Mar 14, 2008
32,946
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.

grace1234

Joined Nov 16, 2020
3
hi grace,
Welcome to AAC.
What are the timings?
E
Hi Eric!

In my circuit there are two switches.
I need to close the first one after 0.1s and the second one after 0.4s!

Still trying to do it!

G

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,

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...

ericgibbs

Joined Jan 29, 2010
18,072
hi grace,
This is an example.
E