Difference between revisions of "LTSpice"

From Steak Wiki
Jump to navigationJump to search
Line 18: Line 18:
 
* https://github.com/joaocarvalhoopen/LTSpice_on_Linux_Ubuntu__How_to_install_and_use
 
* https://github.com/joaocarvalhoopen/LTSpice_on_Linux_Ubuntu__How_to_install_and_use
 
For 32 bit linux, use LTSpice XVII (which I have running on Devuan/Debian 12).
 
For 32 bit linux, use LTSpice XVII (which I have running on Devuan/Debian 12).
 
 
===Stepping Parameters===
 
===Stepping Parameters===
 
beginning, end, interval. E.g. test a capacitor from 2nf to 10nf in 2nf steps.  
 
beginning, end, interval. E.g. test a capacitor from 2nf to 10nf in 2nf steps.  
 
* https://www.youtube.com/watch?v=hH74uZvEm6I
 
* https://www.youtube.com/watch?v=hH74uZvEm6I
 +
===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.
  
 
[[Category:online_notes]]
 
[[Category:online_notes]]

Revision as of 00:21, 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

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.