New B questions

I am a very newbee for KiCad. I just installed KiCad7.0.9 and couldn’t get the simulation going due to errors:

Error reading simulation model from symbol ‘MES1’:
Failed to read simulation model from fields.
Error reading simulation model from symbol ‘Q1’:
Failed to read simulation model from fields.
Error reading simulation model from symbol ‘BT1’:
Failed to read simulation model from fields.
Error reading simulation model from symbol ‘MES2’:
Failed to read simulation model from fields.
Error reading simulation model from symbol ‘U1’:
Failed to read simulation model from fields.

I assume this is because there are no simulation model attached to these components. All components used in the circuits are those came with the installation, no custom component created. I was a bit surprise that the Oscilloscope doesn’t even pass the check.
My question is do I have to assign simulation models for each and every built-in components in KiCad manually?
Is there an easy way to do this once and permanently?

Thanks,

PTS

Yes, you have to set up the simulation and link to compatible ngSpice models manually.

There are very few simulation models integrated in KiCad. It’s a combination of:

  1. Encrypted or models made for specific spice variants that don’t work with ngSpice.
  2. Copyrights and licensing issues.
  3. There are millions of electronic parts out there.
  4. Other?

There are several sources for models compatible with ngSpice. Some libraries are here on the forum, or on github / gitlab. There are a bunch of links on the ngSpice website, and often you can also get models directly from the manufacturers.

But it does take some work to set up a simulation, and if you are unfamiliar with this topic it gets confusing and difficult fast. There are (at least) two threads here with examples. They should work, and are therefore a good way to start.

Another good way to start is to first get familiar with the way ngSpice works and is integrated in KiCad. Just getting a first RC filter going is already a challenge if you don’t have some prior simulation experience.

And also, the interface between ngSpice and KiCad has been significantly improved in the nightlies.
See the https://forum.kicad.info/t/post-v7-new-features-and-development-news/40144 thread for the new features.

There is a bit of a problem that KiCad does not have forward compatibility. Schematics saved in the V7.99 format can not be opened anymore in KiCad V7. You do have the option to:

  1. Draw most of the schematic in KiCad V7.0.9.
  2. Make a copy and use it for simulation in V7.99.
  3. Put the changes made for the simulation back in V7.0.9 for the PCB.

You can of course also use V7.99 for the whole project, but as it is a nigtly version, it is likely to have bugs. Apparently it is already in string freeze, and KiCad V8 is expected in February, so the nigtly should already be somewhat stable and improving…

You can maintain your own library, in which schematic symbols and links to ngSpice models are already combined. Most people using KiCad will have some personal libraries anyway, as KiCad only has a relative small number (30.000) of the total (millions) of parts available.

Thanks Paul

What about kicad specific components such as the oscilloscope? Where is the sim model for something like that?

New B? What happened to the A questions? Will there be C questions? Ah, newbie! :wink:

There is no such thing in KiCad / ngSpice, or at least: In some simulators you add things like a multimeter or an oscilloscope to the schematic to probe things, but not in KiCad. In KiCad you add a line of text for which sorts of simulations to run, then run the simulator, and just enter the names of the signals you want to view. There is also a “probe” button in the simulator, which which you can select a wire to show the voltages on that node, or select it from a list (adding labels helps).

There is a bit of a learning curve but it does work good. Start with some of the examples from the threads I mentioned earlier, then progress to simulating and probing an RC or RLC circuit, and when you are familiar with the interface start adding more complex things such as models. Start with something simple such as an opamp and gradually build up the complexity.

Yes there is an oscilloscope component in Kicad 7. It is avail under Device and you can search for it. Not sure why it is there since it doesn’t seem to be functional. The learning curve here is too much. I rather fall back to LTSpice.