Installing and using LTspice IV (now including LTXVII), From beginner to advanced

@dgta
Maybe your spelling? Be sure your include directive matches the name of the XXXX.XXX file and the "value" in your triode symbol matches the subckt being called in your include file.

.subckt 6CG7_GE

then your triode symbol "value=6CG7_GE"

If you change the name of the subckt, the .ENDS XXXX line has to match the .SUBCKT XXXX line or just .ENDS without anything following.

edit: We cross posted. Glad you got it straightened out. :)
 
Last edited:
Sound Technology ST-1000A FM stereo modulator sim

Hello folks,

One of my projects on the go is a FM stereo modulator. My goal is a very low distortion fm stereo generator to be used with a very low distortion RF gen. I have two rf sg, a HP8656B which is around 0.1% thd, even with a very low thd ext osc, as I measure using a hp 8901A. i also have the 8901A test source, 11715A that I would like to use as my fm st gen
I have not decided exactly how I was going to do the fm st gen, since reading up, there are a few ways to do it. Some methods are dead simple, just a small mcu. I saw some advance methods of using a dual DDS to create the 19 & 38KHz signals, since phase is an important in having a clean signal. that is another project for sure

In my search I came across the ST 1000A design and tried to simulate it, well it looks like I have it running properly.
Thought that I would contribute this simulation to the mix, since it even uses some logic. Maybe others can help me and see ways we can improve on it. I am not a expert, but I think that the output filter can be improved upon, any filter experts out there?
I know ST sold the 1000A with an optional improved output filter but I can not find that information. I guess the answer is to add more poles to the filter.
Also reduction the 19Khz and 38KHz components is desirable.
Enjoy
 

Attachments

  • ST-1000A.asc
    21.1 KB · Views: 70
Hi folks,

Anyone have a GOOD model for J310 FET over 30mA IDSS?

Here are two. I don't know if they are 'good' models though.
Code:
********** 
*SRC=J310P;J310P;JFETs N;VHF/UHF;25V 10mA 
.MODEL J310P NJF (VTO=-4.25 BETA=2.33E-03 LAMBDA=.035 
+ RD=3.50E+00 RS=3.15E+00 IS=7.90E-15 
+ PB=1.00 FC=.5 CGS=6.50E-12 CGD=2.50E-12 AF=1 KF=1.4208E-17) 
* Siliconix  25 Volt   25 mA  25.0 ohm  Dep-Mode N-Channel  
* VHF/UHF AMP  07-14-1990 
**********
Code:
.model J310 NJF(Beta=3.384m Betatce=-.5 Rd=1 Rs=1 Lambda=17m Vto=-3.409 
+        Vtotc=-2.5m Is=193.9f Isr=1.881p N=1 Nr=2 Xti=3 Alpha=7.533u 
+        Vk=74.1 Cgd=6.2p M=.4647 Pb=1 Fc=.5 Cgs=6.2p Kf=46.34E-18 
+        Af=1) 
*        National     pid=92        case=TO92 
*        88-07-14 bam    BVmin=25 
*$
 
Mooly,
I read your tutorial on adding 3d party models, and I watched the LT video as well, but I'm stuck on the learning curve.
I'm trying to add the model for a mosfet, specifically IRF820. Problem is, the model I got from Vishay's site is a .subckt not a .model. But a .subckt doesn't work on an intrinsic component, i.e. transistors, diodes, etc.
Is there a way around this? I don't want to have to create a new symbol every time I need to use a new component. Is there a simple way to translate the .subckt into a .model?
Vishay model below, with some comments removed for brevity:


.SUBCKT irf820 1 2 3
************************************** ************************************** * Model generated on Oct 8, 96 * MODEL FORMAT: SPICE3 * Symmetry POWER MOS Model (Version 1.0) * External Node Designations * Node 1 -> Drain * Node 2 -> Gate * Node 3 -> Source M1 9 7 8 8 MM L=100u W=100u * Default values used in MM: * The voltage-dependent capacitances are * not included. Other default values are: * RS=0 RD=0 LD=0 CBD=0 CBS=0 CGBO=0 .MODEL MM NMOS LEVEL=1 IS=1e-32 +VTO=3.95482 LAMBDA=0.00203054 KP=1.6629 +CGSO=3.23133e-06 CGDO=1e-11 RS 8 3 0.0001 D1 3 1 MD .MODEL MD D IS=1.35726e-09 RS=0.0288686 N=1.42862 BV=500 +IBV=0.00025 EG=1 XTI=1 TT=0 +CJO=3.47265e-10 VJ=2.94875 M=0.9 FC=0.5 RDS 3 1 2e+07 RD 9 1 2.40348 RG 2 7 1.89774 D2 4 5 MD1 * Default values used in MD1: * RS=0 EG=1.11 XTI=3.0 TT=0 * BV=infinite IBV=1mA .MODEL MD1 D IS=1e-32 N=50 +CJO=6.41487e-10 VJ=1.26169 M=0.9 FC=1e-08 D3 0 5 MD2 * Default values used in MD2: * EG=1.11 XTI=3.0 TT=0 CJO=0 * BV=infinite IBV=1mA .MODEL MD2 D IS=1e-10 N=0.4 RS=3.00001e-06 RL 5 10 1 FI2 7 9 VFI2 -1 VFI2 4 0 0 EV16 10 0 9 7 1 CAP 11 10 6.72093e-10 FI1 7 9 VFI1 -1 VFI1 11 6 0 RCAP 6 10 1 D4 0 6 MD3 * Default values used in MD3: * EG=1.11 XTI=3.0 TT=0 CJO=0 * RS=0 BV=infinite IBV=1mA .MODEL MD3 D IS=1e-10 N=0.4 .ENDS irf820
 
Administrator
Joined 2007
Paid Member
From what I understand this is not possible. The .model of a FET is really a first line simple model that has relatively few set variables that LT can understand. That limiting number of variables is written into the program itself for .models and so it just wouldn't understand what the other variables were.

The .subckt allows a far more complex part to be built up but I think you do have to create a new symbol for that part.
 
Administrator
Joined 2007
Paid Member
The easy options are to either use something 'similar' such as an IRF240 or take a model such as the IRF240 and simply alter the parameters in the text file substituting values that you know to be radically different. Depending on your circuit, you might be surprised just how little difference having the correct model makes... give or take.

Places like the Yahoo LTspice users group is probably the best place to ask for specific models.
 
I think I have a clue to possible resolution of this issue.
When I use tubes, I simply pick "Triode" from the "MISC" folder. It's a generic triode and I can link it to a .subckt. In fact I can probably use a triode and link it to the IRF820 .subckt. Apparently the items in the "MISC" folder are considered circuits and not simple components, even though most are components. Unfortunately there is no generic mosfet, or transistor of any kind, in that folder.
That seems like a gross oversight on LT's part, doesn't it?
So it seems all I need to do is generate a generic MOSFET and put it in the "MISC" folder. Trouble is, I don't know how to do that. Has anyone created generic components that work in the "MISC" folder?
 
Ok, continuing my learning here, now the IRF820 model I got from the Vishay site doesn't work. Can someone look at it and tell me what the errors are?

.SUBCKT irf820 1 2 3
* External Node Designations
* Node 1 -> Drain
* Node 2 -> Gate
* Node 3 -> Source
M1 9 7 8 8 MM L=100u W=100u
* Default values used in MM:
* The voltage-dependent capacitances are not included. Other default values are:
* RS=0 RD=0 LD=0 CBD=0 CBS=0 CGBO=0
.MODEL MM NMOS LEVEL=1 IS=1e-32 +VTO=3.95482 LAMBDA=0.00203054 KP=1.6629 +CGSO=3.23133e-06 CGDO=1e-11 RS 8 3 0.0001 D1 3 1 MD
.MODEL MD D IS=1.35726e-09 RS=0.0288686 N=1.42862 BV=500 +IBV=0.00025 EG=1 XTI=1 TT=0 +CJO=3.47265e-10 VJ=2.94875 M=0.9 FC=0.5 RDS 3 1 2e+07 RD 9 1 2.40348 RG 2 7 1.89774 D2 4 5 MD1
* Default values used in MD1:
* RS=0 EG=1.11 XTI=3.0 TT=0
* BV=infinite IBV=1mA
.MODEL MD1 D IS=1e-32 N=50 +CJO=6.41487e-10 VJ=1.26169 M=0.9 FC=1e-08 D3 0 5 MD2
* Default values used in MD2: * EG=1.11 XTI=3.0 TT=0 CJO=0 * BV=infinite IBV=1mA
.MODEL MD2 D IS=1e-10 N=0.4 RS=3.00001e-06 RL 5 10 1 FI2 7 9 VFI2 -1 VFI2 4 0 0 EV16 10 0 9 7 1 CAP 11 10 6.72093e-10 FI1 7 9 VFI1 -1 VFI1 11 6 0 RCAP 6 10 1 D4 0 6 MD3
* Default values used in MD3: * EG=1.11 XTI=3.0 TT=0 CJO=0 * RS=0 BV=infinite IBV=1mA
.MODEL MD3 D IS=1e-10 N=0.4
.ENDS


I get the following messages, plus many more:
* Unrecognized parameter "d1" -- ignored
* Unrecognized parameter "md" -- ignored

The other messages pretty much imply pin/terminal mismatch, like it thinks the mosfet has 7, 8 or 9 pins. Perhaps the syntax of the line that starts with M1 is wrong? I have no idea what that line says.
The model is labeled with a remark that it was written for Spice3, Not sure that's LT or other spice.
 
Last edited:
Ex-Moderator
Joined 2011
Ok, continuing my learning here, now the IRF820 model I got from the Vishay site doesn't work. Can someone look at it and tell me what the errors are?
You have many scrambled lines, so LTSpice cannot read them properly, you must copy the text file exactly as shown on Vishay's website or fix them yourself...

Here is just one example, you should be able to fix the rest.
Code:
.MODEL MD1 D IS=1e-32 N=50 
+CJO=6.41487e-10 VJ=1.26169 M=0.9 FC=1e-08 
D3 0 5 MD2
 
Thanks Jazbo, that was helpful. Unfortunately the Vishay site has the file all in one line, no line breaks at all. That didn't work when used as is. I separated the lines mostly by guessing, since I don't know how spice syntax works.
Here it is for anyone who needs it, I did try it and it works now:

.SUBCKT irf820 1 2 3
* External Node Designations
* Node 1 -> Drain
* Node 2 -> Gate
* Node 3 -> Source
M1 9 7 8 8 MM L=100u W=100u
* Default values used in MM:
* The voltage-dependent capacitances are not included. Other default values are:
* RS=0 RD=0 LD=0 CBD=0 CBS=0 CGBO=0
.MODEL MM NMOS LEVEL=1 IS=1e-32
+VTO=3.95482 LAMBDA=0.00203054 KP=1.6629
+CGSO=3.23133e-06 CGDO=1e-11
RS 8 3 0.0001
D1 3 1 MD
.MODEL MD D IS=1.35726e-09 RS=0.0288686 N=1.42862 BV=500
+IBV=0.00025 EG=1 XTI=1 TT=0
+CJO=3.47265e-10 VJ=2.94875 M=0.9 FC=0.5
RDS 3 1 2e+07
RD 9 1 2.40348
RG 2 7 1.89774
D2 4 5 MD1
* Default values used in MD1:
* RS=0 EG=1.11 XTI=3.0 TT=0
* BV=infinite IBV=1mA
.MODEL MD1 D IS=1e-32 N=50
+CJO=6.41487e-10 VJ=1.26169 M=0.9 FC=1e-08
D3 0 5 MD2
* Default values used in MD2: * EG=1.11 XTI=3.0 TT=0 CJO=0 * BV=infinite IBV=1mA
.MODEL MD2 D IS=1e-10 N=0.4 RS=3.00001e-06
RL 5 10 1
FI2 7 9 VFI2 -1
VFI2 4 0 0
EV16 10 0 9 7 1
CAP 11 10 6.72093e-10
FI1 7 9 VFI1 -1
VFI1 11 6 0
RCAP 6 10 1
D4 0 6 MD3
* Default values used in MD3: * EG=1.11 XTI=3.0 TT=0 CJO=0 * RS=0 BV=infinite IBV=1mA
.MODEL MD3 D IS=1e-10 N=0.4
.ENDS
 
Thanks Jazbo, that was helpful. Unfortunately the Vishay site has the file all in one line, no line breaks at all. That didn't work when used as is. I separated the lines mostly by guessing, since I don't know how spice syntax works.
@dgta It looks like you opened the link in your browser and copied and pasted the text. That would explain the 'all in one line' issue. It would be much better to right click and choose "save link as" and download the library (.lib) file to your computer. ;)

When you post a spice file, go advanced and use code tags ('#' Wrap
Code:
 tags around selected text). That should eliminate any word wrap issues, as I have done below:
[CODE]*Feb 22, 2010
*Doc. ID: 90227, Rev. A
*File Name: part irf820_sihf820_PS.txt and part irf820_sihf820_PS.spi
*This document is intended as a SPICE modeling guideline and does not
*constitute a commercial product datasheet.  Designers should refer to the
*appropriate data sheet of the same number for guaranteed specification
*limits.
.SUBCKT irf820 1 2 3
**************************************
*      Model Generated by MODPEX     *
*Copyright(c) Symmetry Design Systems*
*         All Rights Reserved        *
*    UNPUBLISHED LICENSED SOFTWARE   *
*   Contains Proprietary Information *
*      Which is The Property of      *
*     SYMMETRY OR ITS LICENSORS      *
*Commercial Use or Resale Restricted *
*   by Symmetry License Agreement    *
**************************************
* Model generated on Oct  8, 96
* MODEL FORMAT: SPICE3
* Symmetry POWER MOS Model (Version 1.0)
* External Node Designations
* Node 1 -> Drain
* Node 2 -> Gate
* Node 3 -> Source
M1 9 7 8 8 MM L=100u W=100u
* Default values used in MM:
* The voltage-dependent capacitances are
* not included. Other default values are:
*   RS=0 RD=0 LD=0 CBD=0 CBS=0 CGBO=0
.MODEL MM NMOS LEVEL=1 IS=1e-32
+VTO=3.95482 LAMBDA=0.00203054 KP=1.6629
+CGSO=3.23133e-06 CGDO=1e-11
RS 8 3 0.0001
D1 3 1 MD
.MODEL MD D IS=1.35726e-09 RS=0.0288686 N=1.42862 BV=500
+IBV=0.00025 EG=1 XTI=1 TT=0
+CJO=3.47265e-10 VJ=2.94875 M=0.9 FC=0.5
RDS 3 1 2e+07
RD 9 1 2.40348
RG 2 7 1.89774
D2 4 5 MD1
* Default values used in MD1:
*   RS=0 EG=1.11 XTI=3.0 TT=0
*   BV=infinite IBV=1mA
.MODEL MD1 D IS=1e-32 N=50
+CJO=6.41487e-10 VJ=1.26169 M=0.9 FC=1e-08
D3 0 5 MD2
* Default values used in MD2:
*   EG=1.11 XTI=3.0 TT=0 CJO=0
*   BV=infinite IBV=1mA
.MODEL MD2 D IS=1e-10 N=0.4 RS=3.00001e-06
RL 5 10 1
FI2 7 9 VFI2 -1
VFI2 4 0 0
EV16 10 0 9 7 1
CAP 11 10 6.72093e-10
FI1 7 9 VFI1 -1
VFI1 11 6 0
RCAP 6 10 1
D4 0 6 MD3
* Default values used in MD3:
*   EG=1.11 XTI=3.0 TT=0 CJO=0
*   RS=0 BV=infinite IBV=1mA
.MODEL MD3 D IS=1e-10 N=0.4
.ENDS irf820