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

@jan.didden , I would rather think that the people behind LTspice have finally figured out that they have many users that have lived with LTspice for 25 years and don't want to loose them for silly reasons like changed icons and keyboard shortcuts, besides basic compatibility of operation (which now finally they managed to implement, after years of intermediate crap versions).
It did come up with a couple "installation" questions, one was use new "more intuitive" keyboard shortcuts or original ones. I'm in favor of improved and better interfaces, but yeah, I've used the original LTspice for so long it feels normal. I taught a short LTspice class 10 years ago, and was reminded how bad it is when seeing someone struggle running a wire and trying to go from horizontal to vertical - "Oh yeah, you have to click where you want to end a line segment, then you can go another direction." It had become so basic to me I forgot to mention it.
 
Member
Joined 2008
Paid Member
Being a once a year, run somebody else's file sort of LTspice user, plus a once a year Windows user, I have never got the hang of navigating directories.

Working on Mac with a current project I have an asc file that was given to me and a tube model I just got yesterday that has a LOT of extra text in it. My question is what to delete from the text so that I can copy and paste it to the asc as a directive? Thanks.

Here's the text of the file:

*7963 LTspice model based on the generic triode model from Adrian Immler, version i2
*A version log is at the end of this file
*Params fitted to measured values of a Sylvania sample by Adrian Immler, Oct. 2018
*The high fit quality is presented at adrianimmler.simplesite.com
*History's best of tube decribing art (plus some new ideas) is merged to this new approach.
*@ neg. Vg, Ia accuracy is similar to Koren or Ayumi models.
*@ small neg. Vg, the "Anlauf" current is considered.
*@ pos. Vg, Ig and Ia accuracy is on a unrivaled level.
*This offers new simulation possibilities like bias point setting with MOhm grid resistor,
*Audion radio circuits, low voltage amps, guitar distortion stages or pulsed stages.
  • anode (plate)
  • | grid
  • | | cathode
  • | | |
.subckt 7963_i2 A G K
.params
*Parameters for the space charge current @ Vg <= 0
  • mu = 46.35 ;Determines the voltage gain @ constant Ia
  • rad = 1000 ;Differential anode resistance, set @ Iad and Vg=0V
  • Vct = -0.119 ;Offsets the Ia-traces on the Va axis. Electrode material's contact potential
  • kp = 329 ;Mimics the island effect
  • xs = 1.65 ;Determines the curve of the Ia traces. Typically between 1.2 and 1.8
*
*Parameters for assigning the space charge current to Ia and Ig @ Vg > 0
  • kB = 1 ;Describes how fast Ia drops to zero when Va approaches zero.
  • radl = 259 ;Differential resistance for the Ia emission limit @ very small Va and Vg > 0
  • tsh = 20 ;Ia transmission sharpness from 1th to 2nd Ia area. Keep between 3 and 20. Start with 20.
  • xl = 1 ;Exponent for the emission limit
*
*Parameters of the grid-cathode vacuum diode
  • Rgi = 35 ;Internal grid resistor. Causes an Ia reduction @ Ig > 0.
  • kg = 100 ;Inverse scaling factor for the Va independent part of Ig (caution - interacts with xg!)
  • Vctg = -0.404 ;Offsets the log Ig-traces on the Vg axis. Electrode material's contact potential
  • xg = 2.4 ;Determines the curve of the Ig slope versus (positive) Vg and Va >> 0
  • VT = 0.128 ;Log(Ig) slope @ Vg<0. VT=k/q*Tk (cathodes absolute temp, typically 1150K)
*
*Parameters for the caps
  • cag = 0p75 ;From datasheet. May lead to gain-decrease @ highest audible frequencies!
  • cak = 0p25 ;From datasheet
  • cgk = 1p6 ;From datasheet
*
*Calculated parameters
  • Iad = 100/rad ;Ia where the anode a.c. resistance is set according to rad.
  • ks = pow(mu/(rad*xs*Iad**(1-1/xs)),-xs) ;Reduces the unwished xs influence to the Ia slope
  • ksnom = pow(mu/(rad*1.5*Iad**(1-1/1.5)),-1.5) ;Sub-equation for calculating Vg0
  • Vg0 = Vct + (Iad*ks)(1/xs) - (Iad*ksnom)(2/3) ;Reduces the xs influence to Vct.
  • kl = pow(1/(radl*xl*Ild**(1-1/xl)),-xl) ;Reduces the xl influence to the Ia slope @ small Va
  • Ild = sqrt(radl)*1m ;Current where the Il a.c. resistance is set according to radl.
*
*Space charge current model
Bggi GGi 0 V=v(Gi,K)+Vg0 ;Effective internal grid voltage.
Bahc Ahc 0 V=uramp(v(A,K)) ;Anode voltage, hard cut to zero @ neg. values
Bst St 0 V=max(v(GGi)+v(Ahc)/(mu), v(Ahc)/kp*ln(1+exp(kp*(1/mu+v(GGi)/(1+v(Ahc))))));Steering volt.
Bs Ai K I=ft1()/ks*pow(v(St),xs) ;Langmuir-Childs law for the space charge current Is
.func ft1() {1+(1+tanh(4*v(GGi)))/20} ;Finetuning-function for better overall fit at pos Vg
*
*Anode current limit @ small Va
.func smin(x,y,k) {pow(pow(x+1f, -k)+pow(y+1f, -k), -1/k)} ;Min-function with smooth trans.
Ra A Ai 1
Bgl Gi A I=min(i(Ra)-smin(1/kl*pow(v(Ahc),xl),i(Ra),tsh),i(Bgvd)*exp(4*v(G,K))) ;Ia emission limit
*
*Grid model
Rgi G Gi {Rgi} ;Internal grid resistor for "Ia-reduction" @ Vg > 0
.func Ivd(Vvd, kvd, xvd, VTvd) {1/kvd*pow(VTvd*xvd*ln(1+exp(Vvd/VTvd/xvd)),xvd)} ;Vacuum diode function
Bgvd Gi K I=Ivd(v(G,K)+Vctg-1m*sqrt(v(Ahc)), kg, xg, VT) ;Grid-cathode vacuum diode
.func ft2() {7*(1-tanh(3*(v(G,K)+Vg0)))} ;Finetuning-func. improves ig-fit @ Vg near -0.5V, low Va.
Bgr Gi Ai I=ft1()*ivd(v(GGi),ks, xs, 0.8*VT)/(1+ft2()+kB*v(Ahc));Is reflection to grid when Va approaches zero
Bs0 Ai K I=ft1()*ivd(v(GGi),ks, xs, 0.8*VT)/(1+ft2()) - ft1()/ks*pow(v(GGi),xs) ;Compensates neg Ia @ small Va and Vg near zero

*Caps
C1 A G {cag}
C2 A K {cak}
C3 G K {cgk}
.ends
*
*Version log
*i1 :Initial version
*i2 :pin order changed to the more common order „A G K“ (Thanks to Markus Gyger for his tip)
 
Administrator
Joined 2007
Paid Member
Has anyone had any issue with the latest LT update creating a completely new installation in the Program Files rather than the AppData area?

I now have two versions, one new and up to date and one that says it is up to date but isn't. The 'new' version has carried over everything from the original AppData setup.

Could this be because I selected 'Install for everyone using Admin Option' which was the recommended choice rather than the 'Just for me' option although I'm sure I've used that option before. I've added this over on the LT forums because I've seen others complain over this.

Screenshot 2024-04-23 140312.png
 
Administrator
Joined 2007
Paid Member
I've tested this again on a test set up and installing the update using the 'Install for Any User' rather than just the current user does seem to duplicate the installation in c:\program files area.

So this is how I see it :)

When this occurs I found the existing install in AppData consistently and incorrectly reports as being up to date when it is not. The all shiny and new install in program files is the new version. If you use the 'Install just for me' option the AppData program updates as expected and nothing is written to the program files area in c:\programs

Apparently (I haven't tried this) .asc's saved under the older non updated install actually still open that version when clicked... what a mess.

It might be worth anyone checking that you have only one install of LT present (if that is what you expect and are not deliberately running multiple installations).
What I have assumed to be the default and recommended one is the one in AppData. You should see this if you search this file path:

Code:
%userprofile%\AppData\Local\Programs\ADI\LTspice


Screenshot 2024-04-24 110847.png


If you also look in:
Code:
C:\Program Files

there should be no entry under 'ADI' if you are using and expecting only the AppData location to be the only version in use.
 
  • Like
Reactions: 1 user
Member
Joined 2010
Paid Member
Hi Mooly,
I have been thinking about giving LTspice a go. Since I am a beginner, should I download the LTsplce IV to learn the basics from your tutorials, or can your tutorials be used with the latest LTXVIII version ?.

I am sure that the amount of spice involvement I would be using would be covered by LTspice IV, but I may as well use the latest supported version.

Thanks,
MM
 
Hi All


The new LTspice has clearly a bug, or it does conflict with some programs I have also installed.

The pc is not the cause.

What it does is after some time simulating and stop, simulating again etc, it suddenly does not simulate again, it start and is ready instandly.

I did see it does first not simulate when start and push the pause button it start again berfore it stops completely.

I have to exit program and start again wil let it work again, for some time before it happens again.

scrolling is quite slow, and annoying.
 
@Mooly,

I just allowed LTspice24 to update its model files and noticed that the models were updated in the AppData folder, but that the lib.zip and Examples.zip files under "Program Files/ADI/LTspice" were not. Those files carried a date of April 18, while those same files show the current date in the AppData location. So it appears that the Program Files location is not being updated but that the AppData location is. As an experiment, I have deleted the lib.zip and Examples.zip files from the "Program Files/ADI/LTspice" folder and will see what happens on the next update. Deleting these files did not appear to "break" anything when I launched LTspice24 afterward.

It's also worth noting that the Program Files location does not contain the actual model files; it only has the ZIP files which contain the model files, along with the LTspice.exe application and its supporting files.

At least this is what I am seeing. I don't see any evidence of a second installation.

EDIT: My installation is for all users even though I am the only user on this computer.
 
Last edited:
Administrator
Joined 2007
Paid Member
Thanks @Ray Waters , it is a strange one. I have nothing in Program Files at all for ADI or LTspice as I clean installed W11 a couple of weeks back and installed LT onto that Windows installation. Might you have a 'carry over' install from several months ago I wonder.

I'm just looking back at the notes from AD on the main difference of what was the 2023 versions of LT that launched well over a year ago now. I see they mentioned:

  • Improved Installation. LTspice library files are stored in users’ %LOCALAPPDATA% directories, instead of My Documents

Which is from post #1 here:
https://www.diyaudio.com/community/...-2023-version-of-ltspice.394676/#post-7240021

I do know that running the latest update as 'For All Users' did create a duplicate install and left the AppData install not updated.

Really don't know what to make of it tbh. This is what another user found and I added my findings later in the thread:

https://ez.analog.com/design-tools-...ce/f/q-a/581877/new-program-install-directory
 
It's puzzling, to be sure. On my computer, the Program Files folder just contains the executable, help files, and log files. It contains no library or user files; see screen shot below. This seems consistent with other Windows program installations.

Program FIles.png

My AppData location contains only library files and no executables; see screen shot below. This is also what I would expect a "normal" Windows application to do.

AppData.png

Since I don't see any duplicate installations when looking at applications that can be uninstalled I will leave my installation alone for now and see what happens on either the next model update or the next program update. My installation seems to be working OK at this time.