What component resources do I need?

I’m brand new to KiCad and electronic cad software. I’ve downloaded last night’s v5 nightly build and am trying to capture a schematic (draw a simple LED circuit) and simulate it. I’ve gotten to the point where the Spice Simulator opens, runs and then gives a number of errors like “Unable to find definition of model led - default assumed”.

It sounds like I need a “model” file for the LED for Ngspice. Is that correct? Where would I find that?

Later, I would like to draw more complicated circuits, simulate them, and then create PCBs. I would like to use a chip like a TI LM2678 step down buck converter, which does not appear in the schematic library at all. What files/info do I need to collect to use the chip in KiCad?

I believe I need a KiCad “symbol”, a “footprint”, and a Ngspice/PSpice compatible “model”. Is that correct? Is there a standard place to find these if they are not installed by default? Is there documentation for these file formats and where the files need to be placed or imported to be used by KiCad/Ngspice?

This is going to be the #1 FAQ on simulation, to go along with “where do I find a symbol/footprint for xxx”.
The answer is somewhat similar, you either create your own models, get them from manufacturer web sites, or google for them.

Typically you don’t simulate whole circuits, but only parts of special concern. Because the simulator has some special requirements for netlists, it is better (IMO) to create a separate project for the simulation of each subcircuit.

1 Like

Thank you for your help. I have found a PSpice model from TI for the LM2678. The folder has seven files in various folders with extensions .LIB, .OLB, .DSN, .opj, .sim, .mrk, .prb. I assume I can find something similar for LEDs and for other chips if the manufacturer has created them.

What do I do with these files? I don’t see anything in the Simulator or Library manager for importing the model files.

Which of the TI models are you using? Looking at the “unencrypted transient model”, snvm880.zip, it has only one .lib fie in it, LM2678_TRANS.lib; you can include that with .include. Just put the .lib file in the project directory and add a text item to the schematic that says “.include LM2678_TRANS.lib”

Don’t use “.lib” as that actually requires a particular layout which the TI file doesn’t have.

The TI model however has pspice netlist elements of the form:

EB12V REFV GND VALUE = { IF(V(ILIM_OR_ONOFF,GND) > 1.4 , 1.215 , 0)}

Where the ngspice equivalent is:

EB12V REFV GND VALUE = { V(ILIM_OR_ONOFF,GND) > 1.4 ? 1.215 : 0 }

It’s possible that it will accept the former told to accept pspice syntax (set ngbehavior=ps)

1 Like

https://forum.kicad.info/t/tutorial-ngspice-simulation/11248/9

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.