How to use a voltage controlled switch with Ltspice

Status
Not open for further replies.

sticks_678

New Member
Hi,

I would like to make a simulation with 3 voltage controlled switches with Ltspice. Below, the circuit :

But, there is a problem. If I put 1V or 0V, like in the picture, in input of the switch there is something in both output. I don't understand why.

Any ideas ?
Thank you in advance.

ericgibbs

Well-Known Member
hi 678,
Sorry do not see any image.?
Eric

sticks_678

New Member
You can right click on the picture logo and you click on see in other page !

ericgibbs

Well-Known Member
hi,
This is all I can see on your post.
E
I would like to make a simulation with 3 voltage controlled switches with Ltspice. Below, the circuit :

But, there is a problem. If I put 1V or 0V, like in the picture, in input of the switch there is something in both output. I don't understand why.

Any ideas ?
Thank you in advance.

Mod assist.

Thnx Les,

ericgibbs

Well-Known Member
hi 678,
The Roff value of 1meg means that the 'switch' is equivalent to a 1meg resistor, so if use a high impedance voltmeter you will measure close to the input voltage to the switch.
Try a Roff = 100meg.

E

alec_t

Well-Known Member
As V2=0, Interrupteur2 is OFF. However, as V5 = 1V, this 1V will be fed via 1Meg (the OFF resistance of the switch) to Output2. Try putting a load resistor (say 10k) from Output2 to ground.

ericgibbs

Well-Known Member
hi,
This sim showing the effect of Roff may help.
E

Attachments

• 34.2 KB Views: 62

MikeMl

Well-Known Member
It makes no sense to use a switch that way. In the real world, the output node would be tied to some sort of load, the other end of which would be tied to a voltage source, or ground... Only if there is a load on the switch will you see a voltage change at the node as the switch opens and closes... For example:

You will understand the Spice switch component only when you can explain why it switches when V(s) changes sign, and why V(out) is only half of V(in) when the switch is closed...

With the load missing, can you see why V(out) is identical to V(in), regardless of the switch state?

hint: you don't even need to know what the default Ron and Roff are.

Last edited:

sticks_678

New Member
Thank you for your answers and your councils, it work like I expected !

Artiom

New Member
Hello Guys,

I have a similar problem to solve. May you help me how to connect switch/es to control Capacitor's charge and discharge to the upper and lower limits? lets say I need to charge the cap to 8V, then connect to ground for discharging to 4V and then again connect a switch to charge up to 8V and so on. Should be a loop between 8V and 4V using its own voltage for monitoring.

Thanks

Artiom

New Member
Hello Guys,

I have a similar problem to solve. May you help me how to connect switch/es to control Capacitor's charge and discharge to the upper and lower limits? lets say I need to charge the cap to 8V, then connect to ground for discharging to 4V and then again connect a switch to charge up to 8V and so on. Should be a loop between 8V and 4V using its own voltage for monitoring.

Thanks