Professional Documents
Culture Documents
Labs
UE Electronics and microwave circuits andfunctions
Level INPD1
Lab – N°1
CAD training of NPN Transistor
1. Lab objectives
2. LTspice tool
LTspice is a tool for simulation program with integrated circuit emphasis (SPICE) that is
produced by the semiconductor manufacturer Analog Devices (originally by Linear
Technology). Students will practice CAD with analog circuits while understanding LTspice use
to design and simulate circuits. To download LTSpice, go to :
https://www.analog.com/en/design-center/design-tools-and-calculators/ltspice-simulator.html
Figure 1
The steps are :
Add the component current source I1 as shown in Figure 1 by searching for “cur” in
the component library and place the device where it is located in the circuit. Make sure
to rotate the component so that the arrow is facing up, as that is the current direction
we want. To rotate a component, select it and apply Ctrl+r.
Add the component transistor Q1 as in Figure 1. Search for “npn” in the component
library and place it as seen in Figure 1. The input current is then connected to the base
leg of the NPN transistor. Next, change the name of the transistor (not NPN, but
myNPN) by right-clicking it as in Figure2. Name the transistor something unique and
easy. This custom name will be used in a particular spice command that lets the
transistor behave as any model in the program’s library, but can be edited quickly.
Figure 2
Before adding the command, right-click the transistor and press the “Pick New
Transistor” button shown in Figure 3. This will bring up the list of all the models the
program installs with by default as in Figure 4. Choose 2N2219A for this lab.
Figure 3
Figure 4
Make sure that in the SPICE model column that the transistor has a beta factor to edit
(will be called Bf= in that line somewhere).Then, use the ctrl+c to “copy” attributes to
the transistor in the diagram, click OK confirm the choice and press the “S” key to bring
the spice command window up named “Edit Text on the Schematic” with “SPICE
directive” selected. Once the command window is open, paste and modify to obtain
“.Model my NPNako: 2N2219A NPN (Bf=255.9)”. This allows us to quickly edit any
parameter of the 2N2219Atransistor in the library (for example, replace 2N2219A with
any other name to test different versions). In this case, we are only interested in the
beta factor as that is a main key factor in a bipolar transistor. The “Bf=” can be any
number lower than original Bf value in the transistor list of Figure 4.
Complete the schematic in Figure 1 by adding the component voltage, the resistor, the
ground and the wires.
Save the schematic as “TP1_characteristic”.
3.2 Simulation
To obtain the output characteristic on the virtual oscilloscoper (o-scope), a special simulation
must be used. The DC Sweep will be used to sweep both of our sources: the input linear
fashion while the current source is stepped with significant µA stages. To achieve this, click
run and go to the “DC Sweep” tab and edit the “1stSource” as shown in Figure 5.V1 is the
source we sweep, we are using linear interpolation, start at 0V, end at 16V (can be any number
of preference), and increment each 0.1V. This will create a smooth linear input voltage rise.
Figure 5
Then, edit the “2nd Source” tab to edit the values for the current source I1 as in Figure 6.The
second source is stepped in significant stages with linear interpolation. Begin with 10 µA and
end with somewhere 40 µA (can be more or less, depends on transistor choice and beta value).
Use an increment value of 10 µA steps or any value under40 µA. Smaller steps will take longer
for it to simulate but will be more accurate. Larger steps will take less time, but will not be a
good representation of data. Click OK.
Figure 6
Click “Simulate” tab then “run”, a plot plane is opened. Right click on it and select “add traces”
then add “Ic(Q1)”. To get the output characteristic, you can also probe the current on the leg
where the 1k line goes into the transistor (the collector). A special symbol will show up if
one floats over the leg. Here is the output we get with a beta factor of 255.9 on a 2N2219A
transistor. The obtained results are in Figure 7 after changing the x-axis to have VCE instead of
V1.
Figure 7
From Figure 7, for example, it takes around a 12V input to obtain a 7.2 mA boosted signal from
an input of 40 µA. We notice that measured is just 180 instead of theoretical value of 255.9.
One final detail to mention is that can actually be represented visually in LTspice. Thus, right
click on the O-Scope area and click Add Traces (Figure 8).
Figure 8
In “Expression(s) to add”, type Ic(Q1)/Ib(Q1) (or click the data points and add a / between
them) to plot (Figure 9). Besides, change DC sweep sources in the “Edit simulation
command” to better show howvaries in terms of I1 and V1.
Figure 9
VCC
IC
R1 RC
C
B VCE
E
R2 RE
Figure 11
Figure 12
a. Draw the equivalent scheme of the circuit in Figure.
b. Determine the voltage gain, the input impedance impedance. Suppose that the hybrid
parameter h22-1(rce)is infinite and h11(rbe)=5K
c. Insert the circuit as shown in Figure 12 in LTspice. Set the signal generator as follows:
Waveform: sine, frequency: 1 kHz, voltage: 200 mV
d. Measure the voltage gain and compare it to the theoretical value obtained in question
b.
e. Increase the voltage sine input signal to 500mV. What are your conclusions?
f. Measure the input impedance and compare it to the theoretical value obtained in
question b.