ad space

Making Transistor part with spice simulation model in Proteus

characteristics curve proteus

Proteus and SPICE simulation are powerful tools widely used in the field of electronics to design and analyze electronic circuits. Proteus, a popular electronic design automation (EDA) software, offers a comprehensive environment for circuit design, simulation, and PCB layout. On the other hand, SPICE (Simulation Program with Integrated Circuit Emphasis) is a general-purpose analog electronic circuit simulator known for its accuracy and ability to model complex circuit behavior. Integrating Proteus with SPICE simulation models enhances the capabilities of circuit designers by providing them with accurate and reliable circuit simulations. In this article, we will explore the process of creating Proteus part with spice model so that Proteus can play the part with SPICE simulation models, enabling engineers to design and test and prototype circuits more effectively.

There are couple of ways to make a new part that can be simulated in Proteus. One way is to use the browse file method where you can simple place a transistor and from its properties browse and attach spice model file for that transistor. This was illustrated in Import spice model in Proteus and draw JFET drain curve. Another way is to utilize the child sheet to create first a sub circuit then create a new part that depends on the child sheet circuit. This is illustrated in making simulation part in Proteus. Here will we will create a transistor part that is not available for simulation in the proteus default library. The transistor that will be used for demonstration is the VHF transistor 2N5179. This transistor are used in high frequency communication such as in wireless FM transmitter circuit.

1. To start making the part we will place an any existing transistor part in library. The transistor 2n3705 is placed on the schematic editor.

2. We will now edit this part and attach spice file to change into 2N5179. Right click and click on Make Device to edit the component.

In the first window, edit the name to 2N5179, then click on next.

Next comes package which you can leave alone and click on next.

2n5179-2

 In the next window you will see PACKAGE, PRIMITIVE and MODEL. Delete the Primitive and Model and then click next.

2n5179-3

Click next until you land in the last step where you will be asked for location to save your library part. Here USERDVC library is selected.

2n5179-4

Once you have saved the part, place this new 2N5179 part on the schematic editor and run a simulation. You should see that you will get error "No model specified for Q3" and "Simulation FAILED due to partition analysis error(s)" because the part does not have simulation spice model attached to it. This was done here purposely to ensure that the part 2N5917 is not attached to any other library simulation model.

3. Now we will download 2N5179 spice model file and attach to it. There are two ways you can create the 2n5179 spice model file. One is to download from the internet or open a text editor and write down the following model text.

.MODEL cp317b npn
+IS=1.55467e-17 BF=296.182 NF=0.850014 VAF=10
+IKF=0.00544635 ISE=2.01913e-14 NE=1.54276 BR=19.55
+NR=0.825166 VAR=73.1109 IKR=0.0544635 ISC=1e-16
+NC=2.9688 RB=21.0221 IRB=0.478136 RBM=0.138425
+RE=0.000646335 RC=3.0552 XTB=0.582018 XTI=1
+EG=1.06135 CJE=1.17788e-12 VJE=0.543943 MJE=0.23
+TF=1.12215e-10 XTF=1000 VTF=1.14721 ITF=0.706183
+CJC=1.99841e-12 VJC=0.8 MJC=0.23 XCJC=0.411187
+FC=0.8 CJS=0 VJS=0.75 MJS=0.5
+TR=1e-07 PTF=0 KF=0 AF=1

Copy the above text, paste into the text editor and save the file as 2n5179.lib file.

If you want to download, you can download it from the folllowing link:

 https://my.centralsemi.com/product/partpage2.php?part=2N5179

4.Save the model file 2n5179.lib file in the MODELS folder which is usually in the following directory tree.

C:\Program Files (x86)\Labcenter Electronics\Proteus 8 Professional\DATA\MODELS

5. Now to attach the spice model file to the part, right click on the 2n5179 part in the schematic editor and click on Make Device to edit the part. Click on next button until you reach the Component Properties and Definition section. There we will have to add three properties and definations which are:

a. PRIMITIVE

b. SPICEFILE

c. SPICEMODEL

Add them as follows.

PRIMITIVE with Default Value: ANALOGUE,NPN

spice file

SPICEFILE with Default Value:2n5179.lib

spicefile

SPICEMODEL with Default Value:cp317b

cp317b

 The value cp317b can be found out reading the 2n5179.lib model file as shown below.

model

 Click next and save the modified 2n5179 part. The part is now ready to be simulated. Place the new part on schematic and then click on run. You should get no error this time. 

To ensure that the part is correct and aligns with datasheet data one can graph the characteristics curve for the BJT 2n5179 transistor. Below shows the 2n5179 BJT characteristics curve in Proteus.

characteristics curve proteus

 
2n5179 simulation

Or you can check out the input and output impedance in Proteus and plot frequency response graph in Proteus.

The following video demonstrates how to create new transistor component with spice model in Proteus.


 

Post a Comment

Previous Post Next Post