Connect with us

LTspice .model help

Discussion in 'Electronic Design' started by amdx, Mar 6, 2007.

Scroll to continue with content
  1. amdx

    amdx Guest

    The following is a Q and A and Q I posted on a Yahoo group. I didn't
    get the info I needed to procede. Please read the exchange and see if you
    could help with my lack of info.
    ...............................................................................................
    Q.
    I have noted the switch (SW) that comes with Ltspice has ½ ohm
    of resistance between contacts. I would like to modify it to be an
    ideal switch. When I do a control/right click, the sw has no value or
    spiceline attributes. zero ohms, zero capacitance, etc. may not
    compute, so I could set them very low.
    I have the printed users manual in front of me and still can't figure
    it out.

    Please describe how to display and change the qualities of the SW or
    any other device. Step by step advice would best help me.
    Thanks, Mike
    ...................................................................................................
    A.
    The switch (SW) requires a .model line. In this line you can set the Ron
    and Roff values (and other parameters)..
    This is an example taken from the help file:
    ..model MySwitch SW(Ron=.1 Roff=1Meg Vt=0 Vh=-.5 Lser=10n Vser=.6)

    The following are the default values of the parameters

    Voltage Controlled Switch Model Parameters


    name parameter units default
    ---------------------------------------------
    Vt threshold voltage Volts 0.
    Vh hysteresis voltage Volts 0.
    Ron on resistance Ohms 1.
    Roff off resistance Ohms 1/gmin
    Lser series inductance Henry 0.
    Vser series voltage Volts 0.
    ilimit current limit Amps infin.

    To get an almost ideal switch put Ron=1u and Roff=1000G
    .............................................................................................
    Q.
    I am sorry, but I don't know where to put this info.
    I've tried opening the component atribute editor, changing the
    prefix to X and adding the info to the spiceline, among other things
    without success.
    Where do I install a .model?
    And then how do I pull it up to make a schematic?

    Thanks again, Mike
     
  2. D from BC

    D from BC Guest

    See Vswitch.asc example file that came with switchercadIII.
    One possible path is....
    C:\Program Files\LTC\SwCADIII\examples\Educational
    D from BC
     
  3. amdx

    amdx Guest

     
    Last edited by a moderator: Jan 4, 2013
  4. amdx

    amdx Guest

    Thanks D, I'll look at that.
     
  5. Genome

    Genome Guest

    Well, it might be easier than that..... but then I'd have to try and work it
    out..... or you could have a fiddle yourself.

    You can edit the standard files in......

    C:\Program Files\LTC\SwCADIII\lib\cmp

    Which are really text files and have lots of .model statements in them. And
    you can add more .model statements to them.

    So, if you make your own text file in that directory and call it standard.sw
    and then put a load of .model myswitcha/b/s sw(my idea of a switch) stuff in
    it then LTspice might pick that lot up as a standard file it will include
    for you and allow you to pick one from your list.

    It might just work... but I'm not going to try it because there might be a
    bit more work involved and I'm a lazy bum.

    If it does work like that you may buy yourself fourteen free beers and smile
    a lot.

    DNA
     
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day

-