Ngspice simulation models

hi all

I love the new feature to call ngspice from eeschema. I was playing with a schematic with an NE5532 opamp in it. And now I wonder where the association with the NE5532 spice model is.

This is probably a silly question…
In general, how and where are schematic symbols from the library associated with their appropriate spice models? Do I have to include the spice models I use in a eeschema text box?
Would it not be great to build a library of spice models?

m

Creating Spice models is complex and a lot harder than creating footprints and symbols. I have only ever seen Tina and LTSpice models for the NE5532.

It is, yes. I would not dare to take up that task for most of the components.

As far as my example goes, the NE5532, I have collected several models for the NE5532, one of them by TI, as you mentioned.

However, I am sure we as a community have collected a lot of spice models during the past years and I figured it would be great to get them all together in a database, such that they are easy to access from KiCAD. It would be the next logical step to take after the integration of ngspice, I think.
It would also save all of us a lot of work, because searching for spice models can be a pain.

m

Be aware of copyright though. I’m not 100% certain you are allowed to redistribute such models. (Might depend on who created them.)

If you want to create an open source repo (under gpl for example) you need to ensure that the creators of the models have their models licensed accordingly.
(Maybe a mixed license approach? Or a per model license model? I’m not sure if something like this is possible.)

1 Like

If I’m looking for a SPICE model, I start with the Yahoo “LTSpice User Group” at https://groups.yahoo.com/neo/groups/LTspice/info The “Files” section is quite extensive, and the group’s moderators generate a searchable index for the group’s contents from time to time.

Collecting simulation models into a usable database is a task at least as challenging as collecting footprints. Probably even more challenging, since several simulation models may be created for a single part depending on the simulation objectives. (E.g., models for nominal performance, models for worst-case performance for several definitions of “worst”, models optimized for accuracy at high and low temperature extremes, models optimized for particular operating conditions such as low supply voltage, high supply voltage, etc.)

[quote] As far as my example goes, the NE5532, I have collected several models for the NE5532, one of them by TI, as you mentioned.
[/quote]
Refresh my memory - isn’t the NE5532 a dual version of the '5534, with the compensation and offset pins removed, and internal (over-)compensation added for unity stability? If so, a decent manufacturer’s SPICE model should give you good results in routine applications.

The presence of those compensation and offset pins on the '5534 made it attractive to exceptionally skilled analog artisans who exploited not only the part’s maximum potential, but also created unique applications where you wouldn’t expect to find a monolithic opamp. Unfortunately, I don’t recall ever seeing a simulation model that tried to accurately model the behavior of the compensation and offset pins.

Dale

1 Like

It would be a large task, I agree. But the community has doen it before, so it can be done again. This will not be finished by the end of the year, but that is not a reason not to start :wink:

Yes there is the question of copyrights etc., but we could of course ask the vendors to cooperate. Perhaps they will.

Your memoy serves you well dchisholm. I know that spice models in general doe not simulate actual behaviour, but, at most, behaviour the vendors like to sell. Simulation cannot replace prototyping. It is better than nothing though. It does have its place in the engineering process, I believe, as long as the engineer is aware of the limitations. The closer one is to the boundaries of the possible, the less reliable the simulation becomes.

1 Like

That’s an insightful statement. I don’t think I’ve ever heard it said so well.

Dale

3 Likes