Difference between revisions of "LTSpice"
| Line 22: | Line 22: | ||
* https://www.youtube.com/watch?v=hH74uZvEm6I | * https://www.youtube.com/watch?v=hH74uZvEm6I | ||
===Exporting Data for a Spreadsheet Graph=== | ===Exporting Data for a Spreadsheet Graph=== | ||
| + | [[File:LTSpice Export to graph example.png|300px|thumb|right|Sine Wave Example Graph. An expert in graphs will natively understand how data will render in a given form of graph. I'm still working on being able to predict Logarithmic data from Linear data.]] | ||
<pre> | <pre> | ||
how to export waveform data, as in traditional spice? - right click on the graph and | how to export waveform data, as in traditional spice? - right click on the graph and | ||
| Line 35: | Line 36: | ||
and age, you have to be good with graphs as well. there is no reason not to be. | and age, you have to be good with graphs as well. there is no reason not to be. | ||
</pre> | </pre> | ||
| + | |||
=== The .op Function === | === The .op Function === | ||
LTSpice is its own spice. Given that each spice program is slightly different, there | LTSpice is its own spice. Given that each spice program is slightly different, there | ||
Revision as of 00:33, 30 October 2025
LTSpice is a popular simulation package. The successor to LTSpice is qspice, also programmed by the same developer. https://hackaday.com/2023/08/25/qspice-picks-up-where-ltspice-left-us/
Getting Started
- https://learn.sparkfun.com/tutorials/getting-started-with-ltspice/all - some videos here, and they also link to the LT youtube playlist. The forum is DOA, don't bother clicking that. Some high frequency noise on the sprakfun videos. they cover most of what the LT videos cover but in a different interpretation. Both worth watching.
- http://web.archive.org/web/20020909153731/http://www.macs.ee.mcgill.ca/~roberts/SPICE/Welcome1.html - I have come across this book in my used book store browsing, and own a copy of the 2nd edition.
General Notes
0 is a gnd in the netlist. That means you can go to: view - spice netlist, and the path items will be 0 V001 or some variation thereof. The netlists are text files, and easily readable.
AoE uses ICAP/4 Spice. It runs about $3,500 for the base software. There is a free demo for schematics under 20 parts. The X chapters, has a section of spice, but it's not in the 3rd edition. They also list, MicroCap 9, MMICAD, and PSpice. There are some Spice book recommendations in the spice section, and in other sections (e.g. the Power, Regulation, and Control, or Amplifiers). This is all in the appendix.
Tips/Techniques
Amp Hour Podcast Interview with the Programmer
https://theamphour.com/196-an-interview-with-mike-engelhardt-spice-simulator-synteresis/
Simulating a delay
https://www.youtube.com/watch?v=-aQ77YI7inI A competent user of LTSpice. A good video to show usage and a reasonable circuit as well (the circuit is essentially simulating a 555 timer from discrete (well op amps) components).
Guaranteed to Work on Linux (TM)
For 32 bit linux, use LTSpice XVII (which I have running on Devuan/Debian 12).
Stepping Parameters
beginning, end, interval. E.g. test a capacitor from 2nf to 10nf in 2nf steps.
Exporting Data for a Spreadsheet Graph
how to export waveform data, as in traditional spice? - right click on the graph and choose file - export data as text. the data requires a step of processing. you can use sed if you need to automate it but i used mousepad, and a search and replace, copying the empty (some unicode type space) character so it's easy to import into libreoffice calc (slow) or gnumeric (better). you might want to either A) limit the amount of data by zooming into an area or B) use head -n 1000 to limit the lines of output. I had 24,000 lies which was a bit much (graphing that much data is slow). See the image example. of course, this allows you to change the visualization used with the data. in this day and age, you have to be good with graphs as well. there is no reason not to be.
The .op Function
LTSpice is its own spice. Given that each spice program is slightly different, there are some quirks with trying to get functionality from one to translate to another.
If you add .op, it will output a .op.raw file, which will tell you the voltages of everything.
it opens in LTSpice. I'm not sure what encoding it is, (haven't checked yet) as emacs or mousepad has trouble with it.
(I'm following the spice textbook i listed above). the .raw is a waveform file for LTSpice.
This is different from PSpice, where the .op command will be output into the 'overall' spice output file (according to
the textbook).
See Also
- External_Wikis#Electronics - LTSpice Wiki
- http://www.intusoft.com/icap.htm