Errors message when I click on simulation

Hello,
I am a beginner user of Kicad 8.0 and I spent a lot of time creating my shematic ( Full bridge linear audio amp for electrostatic loudspeaker with +/- 2,3KV DC power supply).

The schematic is OK, symbols, prints and models are associated.

My problem is that when I click on “simulation” Kicad reply this :

Note: Compatibility modes selected: ps lt a
=> Don’t know what that mean but it seems OK to me

warning, can’t find model ‘varistor’ from line a3 0 n002 n015 n015 n015 n015 6 n015 varistor
=> There is no Varistor in my schematic !

warning, can’t find model ‘varistor’ from line a4 n010 0 n007 n007 n007 n007 4 n007 varistor
=> There is no Varistor in my schematic !

Error: bad syntax in line 111 g6 0 n002 poly(1) 7 6 table( 7 4.3m 10 2.5m 20 1.5m)
=> Line 111 of the netlist is : “.probe p(XTR2)” where TR2 is the high voltage transformer

Error: ngspice.dll cannot recover and awaits to be detached => Fatal error…

Can someone help me understand all this mean and thus help me deal with my errors ?

Thank you
René

I didn’t simulated a lot with KiCad (few days last year). I have never used more complicated models than just capacitors and inductors with parasitic components.
I suppose thta these varistors can be some models used internally in model you used for some other element.

Apparently your schematic is not OK, or else it would not give you problems.
I’ve always found simulations troublesome, don’t have much experience with them and can’t say much. But a simple suggestion is to start with something small. Maybe just a simple RC combination, and get that simulation going. Then extend in small steps into more complex simulations. I am guessing that these varistors are used somewhere inside the models (subcircuits?) for some kind of compensation.

a4 n010 0 n007 n007 n007 n007 4 n007 varistor is a clear indication that you are using a device with a proprietary LTSPICE model (see Undocumented LTspice - LTwiki-Wiki for LTspice). Unfortunately these devices cannot be simulated with any other simulator than LTSPICE.

Thank you Piotr, I didn’t know this was possible.
I’ll double check all my models. Hope I’m able to find them.

BR
René

Hello paulvdh,
You’re certainly right.
I run the ERC and get no error.
How can I find my errors.
I’ll double check my models to find those varistors.
Thank you.
BR
René

Thank you Holger,
I think you are right because I migrate my schematic from LTspice to Kicad 8.0 (manually).
I find all the models I use with Librairy Loader and must have made a mistake.
BR
René

For all : Sorry for the three responses I’ll reply at once next time.

Hi @beginner

Use the @ key then select the name of the member to alert and inform that member. Note I used @beginner .

Much information about the forum workings can be found in the links in this FAQ.

OK, understand.
Thanks
BR

1 Like

@holger,

I use a LT3032 in my schemaric and the model is a LTspice one (…) that contain varistors.
Do you think I can find LT3032 Pspice model for Kicad, and where ?

Thank you

To be honest, I do not know. You may ask Analog Devices directly, if they can provide you with a PSPICE compatible model.

Thank you,
I’ll do that.
:slightly_smiling_face:

You should know that KiCad is not Spice simulator but PCB design software. Because of this many KiCad symbols need not even to have spice models.
ERC probably (I have never run ERC) checks only whether the connections raise any doubts. It can’t rise alarm when something is wrong with spice model as 99% of users (I think) don’t use Spice in KiCad.

@Piotr,
Thank you Piotr, but I’m not sure to understand what do Kicad Users use for their simulations ?

Why you assume KiCad users need simulate anything. Electronic circuits works as you design them and in most cases you need not to check anything.
I was using Protel since 1997 and KiCad since 2017 and didn’t simulated any of the designed circuits.
In 90s I have got PSpice simulator (demo, limited to 30 nets) and in 2002…2008 used it only to simulate supply filters (defining capacitors and chokes with their parasitic components) mainly to see how they behave at 10MHz…1GHz. In 2017 I moved from 32 bit WinXP to 64 bit Win7 PC and my PSpice stop working what I even didn’t noticed. At the end of last year I have done some spice experiments with KiCad, but just to see. A few months ago I had first need. I wanted to see how burst disturbance influence my inputs. So I made separate KiCad configuration where I have no libraries I typically use and made there some libraries with elements with their parazitics. Two library sets have nothing in common. Libraries for PCB have no spice models at all. Libraries for spice have no footprints at all. To use Spice I rename kicad directories at Users\AppData\Roaming to work in different environment. That way I’m sure that at spice schematic I will not use symbol having no spice model and at PCB schematic I will not use symbol having no footprint (all my symbols have footprint assigned and I never change it).

Hello Piotr,
Many thank’s for informations.
My circuit is an audio amp powered by +/- 2 300Vdc that’s 4 600 Vdc rail to rail.
It’s very easy to kill a diyer with this mass destruction weapon. So I don’t want to test it on the bench without first doing some simulations to validate the conception.

I also need to :

  • Control the rise time of the power supply to avoid killing the power mosfets at start on and shut down => calibrate the softstart/softstop.
  • Implement and simulate the security against shorts circuits at the outputs.
  • Control the slew rate of the optocouplers.
    That sort of things.

When I have 24V at PCB I assume I have high voltage :slight_smile:

Your post is tldr, so I’ll just say whether KiCAD users need to or not, it would be nice to have a way that is as at least as reliable and full-featured as the rest of KiCAD, no? For what it’s worth, I find mostly that the difficult part is finding open source component models that work in ngspice. I’ve been tinkering on a multi-amp 10s of kilohertz linear current source and found the availability of mosfet and mosfet gate driver models very lacking.

PSPICE compatible models should do (unfortunately not always for gate drivers which may need some editing). LTSPICE VDMOS models for power MOSFETs will do. You might have a look at Spice models and model parameters for ngspice circuit simulator or scan my examples at Simulation examples for KiCad/Eeschema/ngspice and More simulation examples for KiCad/Eeschema/ngspice for models I have been using.

Unfortunately i don’t think you will see a day when simulation models are easy to come by anytime soon. Because the KiCAD library needs to have a specific license for all its components. Simulation models also need to be tested and verified, so the logical source should be the component vendor.

But the vendor may have license agreements that stops them from being distributed. Also i dont think vendors are specifically interested in all aspects of simulation so even if you get the model form the vendor does not mean it simulates the behavior you want it to simulate.

So how would we even begin to distribute models and who would do and verify them? What would be the testing criteria?