Sie sind auf Seite 1von 9

HOWTO Use a SPICE Model File in OrCAD 10.

5 Demo
1. Obtain the SPICE model for the part you wish to simulate. For example, I obtained the
following SPICE model for a 2N3905 BJT from the Fairchild Semiconductor website:
.model 2N3905 PNP(Is=1.41f Xti=3 Eg=1.11 Vaf=18.7 Bf=90.35 Ne=1.5 Ise=0
+
Ikf=80m Xtb=1.5 Br=5.502 Nc=2 Isc=0 Ikr=0 Rc=2.5 Cjc=9.728p
+
Mjc=.5776 Vjc=.75 Fc=.5 Cje=8.063p Mje=.3677 Vje=.75 Tr=35.05n
+
Tf=179.3p Itf=.4 Vtf=4 Xtf=6 Rb=10)
*
Fairchild
pid=66
case=TO92
*
88-09-09 bam creation
Listing 1 Downloaded SPICE model for a 2N3905 bipolar junction transistor.

2. For the purposes of this HOWTO, create a new folder for the OrCAD project files (e.g.,
C:\My_PSpice_Projects\ModelDemo).
Note: The OrCAD software does not support folder names or file names that have
spaces in them. So be sure to specify folders and files that do not have spaces in
their names.
3. Open a Windows Explorer window (a.k.a. My Computer) and browse to the folder
you created in step 2 (e.g., C:\My_PSpice_Projects\ModelDemo\). On the Windows
Explorer window, open the File menu and select the options New Text Document.
Rename the newly created file 2N3905.mod. When Windows pops up the Rename
dialog (Figure 1), click on Yes.
Note: The file extension on your PSpice model file must be .mod.

Figure 1

Figure 2

4. Using any text editor program (e.g., NOTEPAD.EXE), open the file 2N3905.mod and
copy the contents of Listing 1 into the file. (Dont close the text editor yet)

Note:

In SPICE, name fields must begin with a letter. In Listing 1 the model name is
2N3905. This model name is invalid because it does not start with a letter; it
starts with the number 2.

Note: In SPICE, BJT transistor names start with the letter Q.


5. Using the text editor, change the model name from 2N3905 to Q2N3905 (see
Listing 2). Save the file and exit the text editor program.
.model Q2N3905 PNP(Is=1.41f Xti=3 Eg=1.11 Vaf=18.7 Bf=90.35 Ne=1.5 Ise=0
+
Ikf=80m Xtb=1.5 Br=5.502 Nc=2 Isc=0 Ikr=0 Rc=2.5 Cjc=9.728p
+
Mjc=.5776 Vjc=.75 Fc=.5 Cje=8.063p Mje=.3677 Vje=.75 Tr=35.05n
+
Tf=179.3p Itf=.4 Vtf=4 Xtf=6 Rb=10)
*
Fairchild
pid=66
case=TO92
*
88-09-09 bam creation
Listing 2 Invalid model name 2N3905 changed to the valid model name Q2N3905.

6. If the OrCAD Capture CIS Demo program is not running, start it now. (Start All
Programs OrCAD 10.5 Demo Capture CIS Demo)
7. On the Capture CIS Demo Edition window, open the File menu and select the
options New Project.
8. On the New Project dialog, type the name MyDemo into the Name field, select the
option Analog or Mixed A/D, and in the Location field specify the folder that you
created in step 2.
Note: On the New Project dialog there cannot be any spaces in either the Name field
or in the Location field.
Note: On the New Project dialog, you must specify the project type as Analog or
Mixed A/D if you want to perform PSpice simulations. The project type
Schematic is strictly for schematic capture; you cannot perform PSpice
simulations with a Schematic project.

Figure 3 New Project dialog

9. On the Create PSpice Project dialog, select the options shown below and click on OK.

Figure 4 Create PSpice Project dialog

Note: Normally, you would now use the PSpice Model Editor program to convert the
contents of your .mod file into a PSpice model library file (.lib). However, the
PSpice Model Editor Demo program supports only diodes; you cannot use it to
create PSpice libraries containing transistor models. So the procedure below is a
kludge that works around this limitation in the OrCAD demo software.
10. On the Capture CIS Demo Edition window, on the project view child window,
expand the folder PSpice Resources:

Figure 5 Project view window PSpice Resources folder.

11. Open a Windows Explorer window and browse to the OrCAD project folder you created
in step 2.
12. Using Microsoft Windows drag-and-drop feature, drag the file 2N3905.mod from the
Windows Explorer window and drop it onto the Model Libraries folder on the Capture
CIS Demo Edition window.
13. Minimize or close the Windows Explorer window to get it out of the way.

14. On the Capture CIS Demo Edition window, on the Capture CIS dialog (Figure 6),
click on Yes to confirm that you want to drop the file 2N3905.mod onto the Model
Libraries folder.

Figure 6

15. On the Select File Type dialog, select the option Unknown and then click on OK.

Figure 7

16. On the Capture CIS Demo Edition window, verify that the file 2N3905.mod is now
listed under the PSpice Resources Model Libraries folder:

Figure 8

Note: OrCADs generate part feature also appears to be disabled in the demo version,
so we cannot use it (as one would normally) to create a schematic capture library
(.olb) for the 2N3905 part. The procedure below is another kludge that works
around this limitation in the OrCAD demo software.

17. On the Capture CIS Demo Edition window, expand the folders Design Resources
<project_name>.dsn SCHEMATIC1 and double-click on PAGE1 (see Figure 9).

Figure 9 Project view window Design Resources folder mydemo.dsn SCHEMATIC1 PAGE1.

18. On the Capture CIS Demo Edition window, locate the Place Part text entry field on
the toolbar (see the red arrow on Figure 10), type in the part number QbreakP as
shown and then press the ENTER key on the keyboard.

Figure 10 Enter the part number QbreakP into the place part text-entry tool on the toolbar.

19. Using the mouse, place one QbreakP part onto the schematic capture window. Press
the escape (ESC) key on the keyboard to exit the part placement mode.

Figure 11

20. On the Capture CIS Demo Edition window, in the Place Part text entry field on the
toolbar (see the red arrow on Figure 12), type in the part number 0 (press the numeric
zero key on the keyboard) as shown and then press the ENTER key on the keyboard.

Figure 12

21. Using the mouse, place one 0 (zero, a.k.a. reference ground) part slightly below the
transistors emitter leg (see Figure 13). Press the escape (ESC) key on the keyboard to
exit the part placement mode.
22. Press the W key to activate wiring mode, and wire the transistors collector, base, and
emitter terminals to the ground reference part. When finished, press the escape (ESC)
key to exit the wiring mode.
Note: This wiring scheme is admittedly weird. However, the goal at this point is to
verify that the Q2N3905 model file will actually simulate with PSpice. So we just
need a simple, valid circuit (which this circuit is), and not necessarily a real
world circuit.

Figure 13 A contrived but valid test circuit for the Q2N3905 part.

23. On the Capture CIS Demo Edition window, click on the QbreakP part with the
mouse to select it.

Figure 14

24. On the Capture CIS Demo Edition window, open the Edit menu and select the
Properties option (or press Ctrl+E).
25. On the Property Editor window, change the value of the Implementation property
from QbreakP to Q2N3905 and then close the Property Editor window.

Figure 15 Change the QbreakP parts implementation property to Q2N3905.

26. On the Capture CIS Demo Edition window, verify that the label next to the PNP
transistor now reads Q2N3905 (and not QbreakP).

Figure 16

27. On the Capture CIS Demo Edition window, click on the blue Run PSpice button on
the toolbar (see Figure 17).

Figure 17 Run PSpice button the on Capture CIS Demo Edition window toolbar.

28. After a few seconds the PSpice A/D Demo window will appear and show you the
results of the PSpice bias point simulation (see Figure 18). If PSpice simulates the circuit
successfully, the last line of output on the AMS Simulator window should be a warning
message saying All terminals are grounded in this circuit (see Figure 18).

Figure 18 AMS Simulator 210 output showing the results of the PSpice simulation using the Q2N3905 part.

29. A more comprehensive test might be a circuit and a simulation profile1 that produces a
set of -IC versus VEC curves for the 2N3905 PNP transistor (see Figure 19 and Figure 20).

Figure 19 Test circuit for generating some IC vs. VEC curves for the 2N3905 PNP transistor.

10mA

5mA

0A
0V

1.0V

2.0V

3.0V

4.0V

5.0V

... -IC(Q1)
VEC

Figure 20 Some -IC vs. VEC curves for the Q2N3905 PNP transistor

Hint: Configure the simulation profile for DC Sweep with voltage source V1 as the primary
sweep [0,5,10m], and current source I1 as the parametric sweep [0,100u,10u].

Das könnte Ihnen auch gefallen