Maker Pro
Maker Pro

LTspice .model help

A

amdx

Jan 1, 1970
0
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
 
D

D from BC

Jan 1, 1970
0
See Vswitch.asc example file that came with switchercadIII.
One possible path is....
C:\Program Files\LTC\SwCADIII\examples\Educational
D from BC
 
A

amdx

Jan 1, 1970
0
Genome said:
amdx said:
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



Thanks for your help, of course I didn't want to type it in every time I
use it,
but if it's that simple great!
I'll probably use the name MySwitch, I like that better.
Mike
 
Last edited by a moderator:
A

amdx

Jan 1, 1970
0
D from BC said:
See Vswitch.asc example file that came with switchercadIII.
One possible path is....
C:\Program Files\LTC\SwCADIII\examples\Educational
D from BC

Thanks D, I'll look at that.
 
G

Genome

Jan 1, 1970
0
amdx said:
Thanks for your help, of course I didn't want to type it in every time I
use it,
but if it's that simple great!
I'll probably use the name MySwitch, I like that better.
Mike

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
 
Top