4
\$\begingroup\$

I have a few transistor (example 2n3906, 2n2222, etc) models and have used them with ngspice & gnucap with no issues.

I would like to use another transistor (example 2n4401) but I am not able to find the model for that transistor that is ngspice compatible.

What parameters I should change from my 2n3906 or 2n2222 model + datasheet to create a model for 2n4401?

Is there a translator available that would translate pspice models to ngspice?

\$\endgroup\$

3 Answers 3

2
\$\begingroup\$

You can, rather easily, hand translate it. The biggest headache is making sure you've got the correct variables defined.

Going off of this: http://www.youspice.com/ys/bjtfromdatasheet.3sp

And comparing it to one of the LTSpice models that is in this: LTSpice

It looks like LTSpice follows the same conventions as PSpice models, so my assumption is that the model information housed in the LTSpice link is correct for more than just LTSpice (haven't tested against NGSpice, but it's just a Berkley Spice program so it shouldn't be any different), you just need to add a new BJT with those model parameters that are outlined in the links.

EDIT: Looking even further, even AIM-Spice has the same model setup for a BJT. I'm extremely confident that as long as you translate parameters correctly you can take any spice model and move it from one spice program to another, assuming it's at least using the basic Berkley Spice setup

\$\endgroup\$
0
0
\$\begingroup\$

I found some spice models for LTSpice that include 2N4401.

\$\endgroup\$
2
  • \$\begingroup\$ 2N4401 was used as an example. Are you suggesting that LTSPICE models will work with NGSPICE? \$\endgroup\$ Commented Feb 12, 2013 at 19:47
  • \$\begingroup\$ I don't know if it the models are directly compatible. I assume the parameters could be copied over to the different format. \$\endgroup\$
    – cmartin0
    Commented Feb 22, 2013 at 21:42
0
\$\begingroup\$

The original SPICE program was written in Fortran and thus really only wanted to see uppercase letters inside the model lines ... and I recall PSPICE allowed net names to be a mix of upper and lowercase letters, which was quite handy. PSPICE has some advanced models, but most of the ones you will find for discretes are 'low-tech' models and thus no issue in translating.

When using models in ngspice, make sure to check the order of the pins and how they get netlisted by gnetlist ... THE ORDER MUST MATCH THE MODEL.

I just found a model for the 2N4401 on MIT website ... look there.

\$\endgroup\$
1
  • \$\begingroup\$ This answer does not answer the OP's question. Please leave a link to online findings if they are relevant. Please keep in mind that links alone are not sufficient to answer a question alone. \$\endgroup\$
    – Hackstaar
    Commented Dec 31, 2019 at 7:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.