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

Well, I was hoping that I could directly graph it, but that may not be possible.
Graphing it separately is possible of course but basically being a lazy person I would hope LTspice would do it for me ...

Jan
It can do it for you but then you need to design a generator slowly ramping up amplitude and an analyser (notch filter and level meter) in LTspice as well. Certainly doable (and a nice design excercise ... but worth the effort? I don't think so.
 
AX tech editor
Joined 2002
Paid Member
Probably not. I did what you suggested, used a .step for the level and a .four.
Just copied it into a spreadsheet and graphed it.
I have an app called Dplot where you can cut and paste spreadsheet areas and you get a fully customizeable graph.

Jan
 

Attachments

  • plot.PNG
    plot.PNG
    15 KB · Views: 66
AX tech editor
Joined 2002
Paid Member
For instance, look at the attached. The green curve is with a 1V threshold, intended to limit the output voltage to 1V.
At 1V nominal input, the distortion is alrready about 3.3%.
The red and blue lines are with a 3V threshold, intending to limit the output to nominal 3V. At that 3V, the distortion is less than 1%.

Jan
 

Attachments

  • kk-3.PNG
    kk-3.PNG
    15.4 KB · Views: 60
Last edited:
Administrator
Joined 2007
Paid Member
I wondered if and when that would happen. I didn't think it would have been so soon.

The Beta (well I suppose not Beta now) version of the latest incarnation of LT is hmmm.... not intuitive. I've been playing around with it for a while and tbh its a nightmare keeping track of what it places where. It does have advantages, for example in not indexing all the zillions of small files, something that makes a massive difference for anyone who uses disk imaging... however...

Where you place the place the models I guess depends on how you normally access them. For me the big problem has been carrying over Auto Generated models.
 
Administrator
Joined 2007
Paid Member
A little light relief and totally OT. I asked an AI site what to do ;) Kinda scary... and I guess we might need a new thread at some point.

Human: Hello, who are you?
AI: I am an AI created by OpenAI. How can I help you today?
Human: Should I switch to the latest version of LTspice?
AI: It depends on what you need the software for. The latest version of LTspice may have new features that would be beneficial for your project. If not, then it may be better to stick with the version you have been using.
Human: What benefits does the latest version bring?
AI: The latest version of LTspice has several new features, such as an updated command line interface, a new schematic editor, a waveform viewer, improved integration with other software tools, and support for circuit simulation models.
Human: What is the best way to place model files in the latest version?
AI: The best way to place model files in the latest version of LTspice is to use the "Add Model" command. This command will allow you to easily add and manage model files within the software.
Human: Will the two versions coexist together? AI: Yes, LTspice allows you to install multiple versions of the software on the same computer. This means that you can use both the old and new versions at the same time without any issues.
Human:
 

INDEX

Recent months have seen Linear Technology become absorbed into Analog Devices. The good news is that LTIV remains available (although unsupported) for legacy systems running older operating systems.

The successor to LTIV is LTXVII which is under constant development, just as LTIV used to be. Both these simulators are now hosted on the Analog Devices site.

Users just starting out with LTspice and running modern hardware should consider using LTXVII over the older unsupported version. Much of what is written here is applicable although subtle differences in operation will become apparent as you dig deeper.



1/ Installation. Post #1 (you are here)

2/ Running a simple DC simulation. Post #2 and #3 HERE

3/ Running a simple AC simulation. Post #7 HERE

4/ Simulating a one transistor Amplifier. Post #14 and 16. HERE

5/ Distortion and FFT's. Post #19 and 20 HERE

6/ Squarewave Testing. Post #31 Here

7/ Measuring AC voltages. Post #35 Here


8/ Setting up multiple signal sources and running two simulations in parallel. Post #39 Here

9/ Adding ripple to the PSU. Post #51 Here

10/ Simulating a simple PSU. Post #59 Here

11/ Adding and simulating a voltage doubler and regulator. Post #67 Here

12/ Testing under load and dynamically. Post #71 Here

13/ Adding models to use in a simulation. Post #85 Here

14/ Adding a PSpice 3rd party model to a simulation. Post #146 Here


15/ Measuring amplifier output impedance. Post #214 Here

16/ Stepping a component value. Post #222 Here

17/ Stepping the bias of an amplifier. Post #225 Here

18/ Adding your own Subcircuit Model to LTXV11. Post #2272 Here




Subsection... Ideas and Tutorials submitted by diyAudio members

A/ Using LTSpice simulation command for a DC sweep for resistors. For a worked example see post # 560 Here

(submitted by pr)

B/ Functional LF198/LF298/LF398 Sample and Hold, post #754 here (submitted by FdW)

C/ Limit the length of figures to a set length independent of the exponent while at the same time rounding the number,
post #1915 Here
(submitted by FdW)




*********************************************************************************************

The purpose of this thread is to show how to both install and to use LTspice, hereafter just referred to as LT, the free circuit simulation program from Linear Technology (now Analog.com). I consider myself very much at the beginner end of the spectrum, but I'm hoping that as the thread develops we can gather input from those more seasoned users amongst you all...

A picture... or two or three... are worth a thousand words.

Can you believe it took me many days to figure out how to include a simple model for a device into a simulation. For a newbie it needs to be a click by click instruction with pictures.

Credits... firstly to Bob Cordell and his excellent book "Audio Power Amplifiers". I can say with certainty that I would still be staring at the blank grey workspace of LT had it not been for Bobs excellent introduction to this fantastic program. I would urge anyone with an interest in simulating amplifiers to "go buy the book". You won't regret it.

Thanks also to Keantoken who has a prety comprehensive WIKI on the site. Take a wander over when you've a few minutes spare and have a read.


So lets get started.

LT is best downloaded from Analog.com Be sure to download LT IV (for the purposes of this tutorial), or you may wish to install both versions (LT IV and LTXVII) and retain LT IV as a legacy program.


Old URL which currently redirects correctly to Analog Devices.
Linear Technology - Design Simulation and Device Models

Direct Analog.com URL
LTspice from Analog.com

The version marked for Windows XP is LTIV. All other options are for LTXVII. There is also a Windows and Mac version with this thread being based on the Windows version.

Install LT as you would any other program. On Windows the installer will probably say you have UAC (user account control) enabled and that it may cause issues with file paths. I have used LT on Vista, W7 and W8.1 with no unresolvable issues by leaving UAC on.

When you have installed LT you should find you have a desktop icon to open it... the usual stuff. What you should now is change the icon (or whatever means you yourself use to open programs) to run as administrator. This is important because LT will not run and update correctly if this is not done.

To do this, right click the icon and using the <properties> tab, change the shortcut to "Run as administrator". This picture show it for Windows 8.1, W7 and Vista are similar.



Next thing we do is open LT and set a few basic options. Setting these options as shown ensures that LT doesn't accumulate a lot of temporary files... even then its not foolproof... we'll cover that later.



Nearly there, but first lets get to know where LT lives on your PC and how it handles files and folders. This is important in order to keep your system tidy and to make it easy to keep track of things.

Depending on your operating system, go to the run box and type C:\Program Files.



You should see something like this with LTC being the folder of interest. Click your way through the folder to open it. You will see this.



The <scad3> line is the program shortcut. If you are using W8.1 then this is probably the best place to alter the settings mentioned above to "run as admin". There is a folder of examples in there too, as well as all the models and files LT needs to run.

I recommend that you DONT add to, or change anything in those folders at this stage.

Lets just jump ahead of ourselves at this point because there is something worth mentioning. If you run a simulation (such as from one of the examples), or you create one of your own, then LT by default wants to save it back in the LTC folder in program files when your done or when you close it. My advice... dont let it. Save all your work in a normal folder in your documents. This then leaves all the program files untouched. If you want to use an example as a starting point then I recommend the first thing you do is save the simulation again under a different name and as suggested, save it to documents or some dedicated area away from the LT folder in program files. Doing that preserves the original installation and leaves all the files and examples untouched.

So if you are creating your own simulation and design then I suggest just opening LT first and then click <file> followed by <new schematic> followed by <file> once again and then <save as> giving your intended design both a name and then saving the blank workspace somewhere such as your documents folder.

So we now have LT installed, we can move on to actually using it to do something useful. This will be your first simulation.

Note on updating LTspice. Updates to the library files are frequent. By default LT seems to warn you after 60 days have elapsed that you have not updated the installation. These updates are mainly for database of models adding new ones as they become available. The updates are incremental and simply add new items to the already installed files. The update typically takes around 3 minutes to complete, however you must be logged on as an administrator (in Windows) for the update to run correctly.

To manually check for and install updates

1/ Open LT with elevated privileges. In Windows this means right clicking the icon you use to launch the program and selecting the 'run as admin' option.

2/ Under 'Tools' there is a dropdown menu. Select 'Sync release to allow LT to check for and install updates.

When the update is complete the program automatically closes with a message saying the update was successful.



(note... this thread isn't something that can be completed quickly. I shall add things to it as and when I have the time)

I have a question I have it for a longer time. When I use parts like here the mosfet drivers it work fine with one half of the amplifier, but when I want to get 5 level I copy it and paste it in the schematic for a btl with a 90 degree shift. I have as result thet the copy do not work at all, I get strange things but the original do work still fine, the pic is the nice working one, When I do not use the ic,s but just switch symbols it work fine. Is this because of the ic,s mosfet driver LTC4440 or do I something wrong. I have feeling that copy parts schematic from other designs do let ltspice getting errors. The pic is one half, and works, when copy schematic and paste it then the copy do not work, I have done the nets such that there are no copy,s maybe in the part itselfs labels are doubled. thanks.
 

Attachments

  • ScreenHunter 1990.jpg
    ScreenHunter 1990.jpg
    462.6 KB · Views: 73
Newbie....

Have used spice a while back on an `work owned laptop'. Just playing around with sim of Pass amps etc. I am now retired and have more time and I am looking to buy a cheap PC (under 400 all in), for LTSpice. I have alternate Mac means for surfing and email etc., but I didn't get on with the Mac/LtSpice interface. I am looking at refurbished desktops as space is not an issue and they seem to offer more bang for the buck. Has anyone got any pointers or recommendation for hardware requirements they can share before I buy? All guidance appreciated.
 
I wondered if and when that would happen. I didn't think it would have been so soon.

The Beta (well I suppose not Beta now) version of the latest incarnation of LT is hmmm.... not intuitive. I've been playing around with it for a while and tbh its a nightmare keeping track of what it places where. It does have advantages, for example in not indexing all the zillions of small files, something that makes a massive difference for anyone who uses disk imaging... however...

Where you place the place the models I guess depends on how you normally access them. For me the big problem has been carrying over Auto Generated models.
In the past I added older models, to the ones that came with LTS in cmp, using LTSpice itself or using Notepad.
Now I was advised at the LTSpice community not to do so. In fact I did, and the transistors I wanted to use did not appear listed as usual.
I was advised to add the .model xxx that was not listed in the simulation work area itself, something I always hated to do.
Why as this changed in later revisions?
 
Administrator
Joined 2007
Paid Member
I tend to just paste my own model file into the root of the C drive and add a 'include file name statement on each sim. There are lots of different ways to do all this but I like to keep the LT install default so that it is easier for when you set a new installation up.

Recently I had weird results using LTS models for BC550 and BC560, and things seemed to solve using Bob Cordell's models for those transistors.
Hard to say. It may be a sim right on the edge somewhere. If swapping generic type transistors around seems to improve or worsen something dramatically then that might point to an issue with the basic design somewhere maybe...
 
  • Like
Reactions: 1 user
https://www.ti.com/lit/zip/slvmc40

under

https://www.ti.com/product/LM317?keyMatch=LM317&tisearch=search-everything&usecase=GPN

Remember that LM317 and other "3 terminal regulators" are super simplified for applications where precision is not an issue. If you want precision, you need to use something where the feedback network is not also the chip bias supply, ie more pins. You can also drive a LM317 with an op-amp so that you have the op-amp precision and the internal protection of the LM317.

The linear chip LT1117 is an 800mA similar chip, however I found the difference can be significant. Generally, a linear regulator is useful to reduce high voltage down to op-amp limits, but the LM317 is hardly better, save the HV version, so a simple discrete pass regulator is usually a better choice, without the voltage limitations of 3-terminal regulator.