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 use a voltage controlled switch with Ltspice

Discussion in 'Circuit Simulation & PCB Design' started by sticks_678, Jul 19, 2017.

  1. sticks_678

    sticks_678 New Member

    Joined:
    Jul 19, 2017
    Messages:
    3
    Likes:
    0
    Hi,

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

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

    ericgibbs Well-Known Member Most Helpful Member

    Joined:
    Jan 4, 2007
    Messages:
    21,187
    Likes:
    644
    Location:
    Ex Yorks' Hants UK
    hi 678,
    Sorry do not see any image.?
    Eric
     
  3. sticks_678

    sticks_678 New Member

    Joined:
    Jul 19, 2017
    Messages:
    3
    Likes:
    0
    You can right click on the picture logo and you click on see in other page !
     
  4. dave

    Dave New Member

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


     
  5. ericgibbs

    ericgibbs Well-Known Member Most Helpful Member

    Joined:
    Jan 4, 2007
    Messages:
    21,187
    Likes:
    644
    Location:
    Ex Yorks' Hants UK

    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 :
    [​IMG]

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

    Inquisitive Super Moderator

    Joined:
    Aug 31, 2011
    Messages:
    924
    Likes:
    86
    Location:
    Georgia, USA
    post-1300685.png

    Mod assist.
     
  7. ericgibbs

    ericgibbs Well-Known Member Most Helpful Member

    Joined:
    Jan 4, 2007
    Messages:
    21,187
    Likes:
    644
    Location:
    Ex Yorks' Hants UK
    Thnx Les, ;)
     
  8. ericgibbs

    ericgibbs Well-Known Member Most Helpful Member

    Joined:
    Jan 4, 2007
    Messages:
    21,187
    Likes:
    644
    Location:
    Ex Yorks' Hants UK
    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
     
  9. alec_t

    alec_t Well-Known Member Most Helpful Member

    Joined:
    Jul 10, 2011
    Messages:
    9,255
    Likes:
    1,218
    Location:
    Cardiff, Wales
    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.
     
    • Agree Agree x 1
  10. ericgibbs

    ericgibbs Well-Known Member Most Helpful Member

    Joined:
    Jan 4, 2007
    Messages:
    21,187
    Likes:
    644
    Location:
    Ex Yorks' Hants UK
    hi,
    This sim showing the effect of Roff may help.
    E
     

    Attached Files:

  11. MikeMl

    MikeMl Well-Known Member Most Helpful Member

    Joined:
    Mar 17, 2009
    Messages:
    11,049
    Likes:
    541
    Location:
    AZ 86334
    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:

    48.png

    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?

    48a.png

    hint: you don't even need to know what the default Ron and Roff are.
     
    Last edited: Jul 19, 2017
  12. sticks_678

    sticks_678 New Member

    Joined:
    Jul 19, 2017
    Messages:
    3
    Likes:
    0
    Thank you for your answers and your councils, it work like I expected ! :)
     

Share This Page