Hello, I can do this, it’s quite easy, but when it comes to attaching some complex microcircuit, for example tl494 with LTspice, then problems begin, since there are subcircuits and they all need to be moved somehow into one file, and only then attached, plus you need to take into account the syntax of LTspice and Ngspice.
The subcircuits do not have to be in a single file. Each schematic symbol can have it’s spice symbol in a separate file. I suggest you start with very simple things, and then slowly extend to more complex simulations, and build up your knowledge of how all the parts fit together along the way.
I can add spice models for transistors, operational amplifiers that I downloaded from the Internet, but I can’t add TL494, I tried, I couldn’t, because in the spice file itself there are subcircuits that refer to other files. I also want to ask, how fundamental is the difference in the syntax of NGspice and LTspice? I tried to add the model itself from LTspice, in KiCAD, but it simply did not work, as I understood, this is because there is simply different syntax
ngSpice does support subcircuits, after all they are just a netlist that combine more primitive models. Apparently it’s even common to a subcircuit for a single (power) transistor to use for example two transistors and some passives to better emulate the BJT in some specific instances.
But there are also encrypted spice models, with which ngSpice can not do anything. I am also busy with a relative serious attempt to get to know ngSpice a bit better myself, after a bit of searching you find 6 models for the same transistor, and those models are all different, have 20+ parameters, and I have no idea what those parameters mean yet… So I have some work to do.
I found the model below in Bordodynovs library. I have not tested it myself and don’t know if it works.
Библиотека личных моделей Валентина Яковлевича Володина
It will not work, as construct like the A1 cited above are specific to LTSPICE only.
It seems to be hand-crafted by Bordodynov for LTSPICE.
The only way will be to replace these A1 - A8 by ngspice code models (we need OR, AND, Dflop and Schmitt-Trigger) to create a model of TL494 specific for ngspice.
TI does not offer a model on its web pages. But you may ask them for a unencrypted PSPICE compatible model.
As I wrote before, I’m still pretty much a beginner with all this spice stuff myself and a bit overwhelmed by both the diversity and chaotic distribution of information. Mix in some lack of knowledge of things like syntax and such and you’re in for some serious ear scratching or hair pulling.