LTspice model help MMBT2222A / pn2222a eq

Thread Starter

MikeJacobs

Joined Dec 7, 2019
226
Hey guys
I can not for the life of me get this model to run in lt spice
Can anyone see if they can get it to work?

https://www.onsemi.com/support/design-resources/models?rpn=MMBT2222A

I am following these instructions to import the model

https://www.analog.com/en/technical-articles/ltspice-simple-steps-to-import-third-party-models.html#

The model imports, I can put it in a schematic.
no matter how I bias it, it will not turn on.
I was trying to test it in a separate schematic alone with zero success
 

Alec_t

Joined Sep 17, 2013
14,312
I downloaded the MMBT2222ALT1.LIB file from the Analog website and copy/pasted its contents on to the end of LTspice's cmp/standard.bjt file and it works ok.
 

ronsimpson

Joined Oct 7, 2019
3,037
cmp/standard.bjt file
I also edit the "standard.bjt" file. In this case I copied and pasted line ".model 2N2222" so there are two lines. Then changed the name to 2N2222A and changed the numbers to match the file from On Semi.
1576986692723.png
From OnSemi
.MODEL MMBT2222A NPN
+ IS = 1.68844E-13 BF = 192.1 NF = 1
+ BR = 1.98 NR = 1 ISE = 1.250E-14
+ NE = 1.5 ISC = 2.51826E-09 NC = 1.5
+ VAF = 74.03 VAR = 100 IKF = 0.869453
+ IKR = 0.37378 RB = 1.15 RBM = 0.0025
+ IRB = 2.51189E-6 RE = 0.0284 RC = 0.18
+ CJE = 2.179424E-11 VJE = 0.6464066 MJE = 0.3296434
+ CJC = 9.241838E-12 FC = 0.5 VJC = 0.5
+ MJC = 0.2804945 TF = 2.4512E-10 ITF = 0.6
+ VTF = 1.7 XTF = 3 TR = 4.142E-8
+ XTB = 1.32 EG = 0.81 XTI = 3
 

Papabravo

Joined Feb 24, 2006
21,225
I don't understand your problem. I copied the file in as a spice directive and made the characteristic curves.

MMBT2222A.png MMBT2222A_CHAR.png

From the looks of the graphs of Ic versus Vcc at various values of Ib, I would guess there is no problem turning the transistor on.
 

Thread Starter

MikeJacobs

Joined Dec 7, 2019
226
I do not get what I am doing wrong.
I still can't not get this model to run
I am following the video explicitly and all I get is an error that says

In the video he shows a way to open the .lib file in a browser so you can cut and paste the path. No matter how I try and force windows to open it in edge, chrome or internet explorer I will not.
 

Attachments

Papabravo

Joined Feb 24, 2006
21,225
I do not get what I am doing wrong.
I still can't not get this model to run
I am following the video explicitly and all I get is an error that says

In the video he shows a way to open the .lib file in a browser so you can cut and paste the path. No matter how I try and force windows to open it in edge, chrome or internet explorer I will not.
Is there some reason why you are using a MOSFET symbol for a bipolar transistor?

I quote from the help file:

.inc http://www.company.com/models/library.lib
The file "library.lib" will be http-transferred to the circuit directory and included. For subsequence simulations, in the interest of avoiding downloading the file each time you run the simulation, you can edit the .inc statement to
.inc library.lib
Note that if the url you specify doesn't exist, most web servers don't return an error, but return a html web page to be displayed in your web browser that explains the error. LTspice can't always read these pages as error conditions so you may get some cryptic error message when the simulation tries to proceed with the included html language error page included in the simulation as valid SPICE syntax.


Would it really offend your sensibilities to get the file you want and put it in the directory with your schematic
 

Thread Starter

MikeJacobs

Joined Dec 7, 2019
226
I accidentally grabbed the wrong symbol for that one.

here is what I have been trying to do.
I can not for the life of me get the URL of the .lib file
As you see from the screen shot, I got the URL once and now can never get it again
I don't know why windows won't give me the dang URL. I have tried to reset default opening programs and it still won't open the file in a browser so I can get the URL. It will only open in notepad. When I try to force open it in a Browser it won't.

So last resort, I just tried to save the .lib file locally.
I did a .lib with the local path and go the same error.

I can post the asc file as Eric asked but its the same one you are getting from the website as me
 

Thread Starter

MikeJacobs

Joined Dec 7, 2019
226
So I just switched computers and it still wont open the file.
Windows just brings up an active X error window.
this is on windows 10 now on 2 different machines.
How are you guys getting the URL of the file.
 

Thread Starter

MikeJacobs

Joined Dec 7, 2019
226
Is there some reason why you are using a MOSFET symbol for a bipolar transistor?

I quote from the help file:

.inc http://www.company.com/models/library.lib
The file "library.lib" will be http-transferred to the circuit directory and included. For subsequence simulations, in the interest of avoiding downloading the file each time you run the simulation, you can edit the .inc statement to
.inc library.lib
Note that if the url you specify doesn't exist, most web servers don't return an error, but return a html web page to be displayed in your web browser that explains the error. LTspice can't always read these pages as error conditions so you may get some cryptic error message when the simulation tries to proceed with the included html language error page included in the simulation as valid SPICE syntax.


Would it really offend your sensibilities to get the file you want and put it in the directory with your schematic
I have tried this also, I get the same error message
 

Papabravo

Joined Feb 24, 2006
21,225
I have tried this also, I get the same error message
I went to the link and the link is OK but windows throws up a download screen. My guess is the handshake is something LTSpice cannot handle. So be a good dooby and just download the file to the directory with the .asc file and have a better day.
 

Audioguru again

Joined Oct 21, 2019
6,688
I also have a new computer and it has Windows 10 Pro. I downloaded LTspice.
When I click on an asc file I get this error.
But if I open LTspice and ask it to open an asc file it works perfectly.
Do you have this problem? Can anyone fix this problem?
 

Attachments

TeeKay6

Joined Apr 20, 2019
573
I also have a new computer and it has Windows 10 Pro. I downloaded LTspice.
When I click on an asc file I get this error.
But if I open LTspice and ask it to open an asc file it works perfectly.
Do you have this problem? Can anyone fix this problem?
@Audioguru again
Try this. Using Windows Explorer find any .asc file. Right click on the filename. Click on "Open With".
If choices are shown, choose LTspiceXVII... LTspice should immediately open the file and with the 1909 Win10 release (perhaps other releases as well) the .asc file type will be associated with LTspice permanently (unless you change the association). Thereafter, just double-click .asc files to open them in LTspice.
If LTspice is not one of the choices shown in the "Open With" pop-up, search the pop-up to find a hyperlink message with the meaning "find other apps" (I believe I have seen variations in the message that appears). Do not choose "Find an app in the [Microsoft Windows] Store." Click the "find other apps" link. Another pop-up will then give other choices--possibly including the desired LTspiceXVII (if so, select it)--otherwise, scroll to the bottom of the list to find yet another hyperlink msg similar to "find more apps" and click it. Ideally you will then be shown a Windows Explorer pop-up already pointing to "C: Program Files" or "C: Program Files(86)" (omit space after C:, AAC editor insists on converting to emoji!). In one of those folders find the subfolder LTC (assuming you installed LTspice to its default location!). Click LTC to expand the folder and show a subfolder LTspiceXVII. Click LTspiceXVII to expand the files list. In the list find the appropriate file, either XVIIx64.exe (if your computer is 64bits) or XVIIx86 (if your computer is 32bits) and click that filename once. Then click "Open" at the bottom of the Windows Explorer pop-up. LTspiceXVII should then open the .asc file you first clicked. Thereafter, .asc files should be associated with LTspiceXVII. There are other paths to this result and in my experience every one of them varies in some detail. Ideally you would be able to use the Windows "default apps" facility to set this association (that is the purpose of that utility!). However, in my experience that does not work. When you take that route you eventually get to a choice of only two apps--both inappropriate--and are offered no way to look for other apps. Well, by the time Windows22 is released, Microsoft will have fixed that bug...I hope.
 
Last edited:
Top