1. Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.
    Dismiss Notice

How to set the voltage controlled switch in Ltspice?

Discussion in 'Circuit Simulation & PCB Design' started by wenqinclch, Jul 24, 2017.

  1. wenqinclch

    wenqinclch New Member

    Joined:
    Jul 24, 2017
    Messages:
    3
    Likes:
    0
    Hi guys,

    I would like to make a simulation of a electric discharge programme with Ltspice. The circuit looks like below:

    At the beginning, switch 1 will be closed and the switch 2 will be opened until the voltage of capacitance Ch Uch is higher than 15kV , then we close switch 2 and open switch 1. When Uch less then 12kV will switch 1 closed and swich 2 openesd again.

    Anyone know how to connect these two switches into the circuit with the tunnels + and -, and how to write the SÖPICE directive for these two switches.

    Thanks a lot in advance.
     

    Attached Files:

    Last edited: Jul 24, 2017
  2. ci139

    ci139 Active Member

    Joined:
    Apr 12, 2012
    Messages:
    389
    Likes:
    34
  3. alec_t

    alec_t Well-Known Member Most Helpful Member

    Joined:
    Jul 10, 2011
    Messages:
    9,247
    Likes:
    1,218
    Location:
    Cardiff, Wales
    Here's your asc file with the switch model statements.
    Btw, where are you going to buy a 24.5G resistor, a 22.4femtofarad capacitor or a 6teraOhm resistor :confused:
     

    Attached Files:

  4. dave

    Dave New Member

    Joined:
    Jan 12, 1997
    Messages:
    -
    Likes:
    0


     
  5. wenqinclch

    wenqinclch New Member

    Joined:
    Jul 24, 2017
    Messages:
    3
    Likes:
    0

    Thanks a lot!!That is really helpful.v
    One more question. Because the switches also work when the voltage is -12kV or -15kV, so, can i add another value for Vt and Vh of two switches?
    like: .model ms1 sw(Roff=1 Ron=1e12 Vt=13.5k Vh=1.5k Vt=-13.5k Vh=-1.5K)
     
  6. alec_t

    alec_t Well-Known Member Most Helpful Member

    Joined:
    Jul 10, 2011
    Messages:
    9,247
    Likes:
    1,218
    Location:
    Cardiff, Wales
    That won't work (try it and see; that's the beauty of simulations :) ).
    You could add two more switches: one in parallel with S1 and the other in parallel with S2. Then use model statements ms3, ms4 incorporating those negative values for vt (but +ve values for vh, otherwise the switch operates more like a potentiometer).
     
  7. wenqinclch

    wenqinclch New Member

    Joined:
    Jul 24, 2017
    Messages:
    3
    Likes:
    0
    Done! Yes, i have tried and solved the problem already.
    Thanks a lot
     

Share This Page