Orcad PSpice Designer
Orcad PSpice Designer
that it can run on personal computers. PSPICE Demo Version which is also called LITE version
is available free from Cadence Design and you can install it with the ORCAD Capture editor. LITE
version has some limitations as given below.
Choose option # 2: OrCAD PSpice Designer 17.2-2016 Lite (Capture and PSpice only)
The lite versions of OrCAD Capture and PSpice A/D products have the following limits with
design size and complexity. If your design exceeds these limits, you will not be able to save your
work or take your design through the flow.
You cannot save designs that have more than 75 nets, including the hierarchical blocks in
the design. You can still view or create larger designs.
You cannot save a design with more than 60 parts, including the hierarchical blocks in
the design. You can still view or create larger designs.
You cannot have more than 1000 parts in the Capture CIS database.
The Internet Component Assistant (ICA) tab in the CIS Explorer window opens the
About Active Parts page (www.activeparts.com) and not the component search page.
You cannot create parts with more than 100 pins.
The Capture FPGA flow is not available.
2
You cannot use Level 3 of Core model (Tabrizi), MOSFET BSIM 3.2, or MOSFET
BSIM 4 models.
Displays only simulation data created using the lite version of the simulator.
Magnetic Parts Editor allows you to design power transformers only. The database
shipped with Magnetic Parts Editor cannot be edited and contains a single core.
The Model Import Wizard supports parts and simulation models that have a maximum of
two pins or two terminals, respectively.
The maximum nodes in a digital circuit can be equal to or less than 250.
The non-ideal Tline is limited to 4.
ELECTRICAL CIRCUITS
STARTUP
To start PSPICE, run CAPTURE STUDENT or ORCAD CAPTURE file. You will see the following
ORCAD Capture opening screen
Screen layout is very basic with toolbar and file menu on top of the screen. Under toolbar there is
PSPICE simulation menu that will be active once you will have a circuit design. On right hand
side there is tool column that you will need to design a circuit. There are three steps to simulate a
circuit,
3
(i) Draw or design the circuit
(ii) Simulate it
(iii) Plot or print the results
CIRCUIT DRAWING
Click on the left most button from toolbar menu to open a NEW PROJECT dialog box. You can
also do this by going to FILE NEW PROJECT. Choose Analog or Mixed A/D, give a name
to your project and select the location where you want to save it.
When you will click OK it will show you the following dialog box
4
Figure 3: Options to Create PSPICE Project
Choose Create a blank project and click OK. This will create a project file (.opj) and a design file
(.DSN) under the desired folder with the name that you chose. Once blank project window is
opened, you will see your schematic page to draw circuit and some more choices will be added to
the file menu. PSICE simulation menu toolbar and design toolbar will also be active now. Design
toolbar on right hand side is the same as actions under PLACE menu.
5
Suppose we want to draw the circuit shown in figure 5.
R1
1k
C1
Vs L1
12Vdc 1n
10uH
To start drawing this circuit, go to the file menu, PLACE PART, you will see Place Part window
will appear on right hand. To place any parts, first you have to include appropriate libraries where
those parts are located. To draw circuit from figure 5, you will need Source library (source.olb)
and Analog library (analog.olb). Add these two libraries by clicking Add Library button located
next to ‘X’ under Libraries.
Analog library contains analog components including resistor, inductor, and capacitor that you
need for your design from figure 5. Choose R and place it on the design schematic. To proceed
6
with the other parts, right click your mouse and choose End Mode to stop putting any more resistors
or simply press Escape. Now choose C and L and put them on the schematic too. You can select
any component by left click of your mouse and then perform several operations by right clicking
it. Right click on C and L and rotate them so they will be vertical as shown in figure 5. Now from
Source library choose Vdc. Now you have all the components that you require for figure 5 on the
design schematic.
To connect all the components, choose either wire from Place or choose wire button from the right
panel (second one from the top). Click left mouse button to select one of the terminals of a
component to start wiring and move your mouse to one of the terminals of any other component
and left click it again. Once you are done wiring all the components, right click your mouse and
choose End Wire (or simply press Esc). You should have the following circuit by now
7
Figure 8: Connected Circuit from Figure 5
You can move around label and value of any component on your schematic by holding it with left
mouse button and dragging it. To change the value of any component, double click on the value
and change it from the dialog box. To change the value of DC voltage source to 12V as shown in
figure 5 double click on ‘0Vdc’ to open the following dialog box,
8
Figure 9: Display Properties’ Dialog Box for Voltage Source
You can see different options in this dialog box. Change the value to ‘12Vdc’. The final thing that
you have to do is to add a ground to your circuit in order to simulate it properly. Ground represents
the reference voltage point in the circuit with respect to which any other node voltage is measured.
To select ground, either go to Place menu and select Ground or use Ground button from the right
panel. Choose the default ground that appears (0/CAPSYM) and make sure that you have ‘0’ under
Name
9
Connect ground to your circuit and you have your first complete circuit that is ready to be
simulated.
Note: You can add more design schematics to the same project by right clicking on the design
name and choosing New Schematic. This will be useful if you are working on your homework or
exam and you have two or three different circuits; you can create all different circuits on different
schematics under the same project and turn in one project file. Make sure that if you have multiple
schematics under the same project, the one that you are simulating has to be the Root Schematic.
To change any schematic to root, right click on its name and select Make Root. Also, note that you
have to open a new page under any new simulation that you create to design your circuit.
10
EXERCISE- 1
In your current project, add a new schematic and create the following circuit on a new page.
Change component values as shown in the circuit. Save your circuit after you are done designing
it.
R1 R3 R5 R7
2k 1k 100
1k
V1
R2 R4 R6
10Vdc
200 100 300
In engineering, most of the values are represented in engineering units and corresponding prefixes.
Likewise, in circuit analysis, components have their values expressed in engineering units using
prefixes. Table 1 shows the prefixes that you can use for different engineering notations.
Note: Be very careful with mega and milli. Do not use lowercase ‘m’ for milli and uppercase ‘M’
for mega. Both uppercase and lowercase M are used for milli.
11
DC Circuit Simulation
Before we start simulating a circuit, let’s discuss a common mistake that many students make when
they are creating projects. Since Schematic is the default option under New Project window, many
students do not pay attention and create new project with Schematic instead of Analog or Mixed
A/D. Under Schematic, you can only create schematic or design of a circuit but you cannot simulate
it. Your simulation buttons will not be highlighted if you create a project using Schematic option.
If your simulation buttons are not highlighted, copy your circuit, open a new project and choose
Analog or Mixed A/D, and paste you circuit in the schematic window. You should have the
simulation buttons highlighted now.
The circuit that you created in figure 12 can be simulated to get DC Bias Points of the circuit, i.e.
DC(Direct Current)voltage points at each node, current flowing through each branch, and power
dissipated in each component. First, make this circuit schematic as your Root schematic. Then,
from the PSPICE menu choose New Simulation Profile (first button on the left). New simulation
dialog box will pop up
Choose a name for your simulation and press Create. Simulation Settings dialog box will pop up.
Under Analysis Type choose Bias Point and click OK
12
Figure 14: Simulation Setting Dialog Box
Now run your simulation from PSPICE menu using RUN (►). PSpice A/D window will open and
shows you messages about simulation (errors or not, completed etc.) as shown in figure 15.
13
When you are performing Bias Point simulation, simulation data do not appear in the simulation
window; rather bias point values appear right on the circuit. You can go back to your schematic to
see the node voltages, branch currents, and power in different components by pressing voltmeter
(V), ammeter (I), and wattmeter (W) buttons. You can also open simulation output file (.out) in
PSPICE A/D window to check if there are any errors and other details. Your circuit should have
node voltages and branch currents (if you select V and I, respectively) as shown in the following
figure
Figure 16: Node Voltages and Brach Currents for Exercise – 1 Circuit
14
EXERCISE – 2
Draw the RLC circuit as shown below and carry out DC Bias Point simulation. Discuss different
voltages, currents, and power dissipations
R2
200
L4
R1 R3
10uH
L3
Note: You can check the description of your simulated results from the output file created during
the simulation, as mentioned earlier. To open the output file, go to PSpice A/D window and press
the View Simulation Output File button from the left vertical menu bar or from the file menu select
open. Change the file type as output file (.out). Go to the folder where your simulation is being
saved and open the .out file that has the same name as your simulation
15
DC Sweep Analysis
DC sweep analysis refers to the analysis of different voltages and currents when you are changing
the value of your power supply over a range of values. Suppose we want to evaluate voltages at
different nodes and current through the circuit shown in figure 18 when we increase the input
voltage from 5V to 10V gradually in steps of 0.5V
R1 R2
200 300
Vs
5V R3
500
Start new simulation profile for your circuit and choose blank project as usual. In Simulation
Settings window under Analysis Type choose DC Sweep. Under Sweep Variable select voltage
source and enter name of your source (Vs in our case). Choose Sweep Type to be Linear and enter
start value, end value, and increment that you need (5V, 10V, and 0.5V in our case).
16
While doing DC sweep analysis, first you have to determine the node at which you want to check
the voltage change (with respect to ground) or component across which you want to check voltage
change (voltage drop) when input voltage is changed. To select node or a component, we use
probes.
There are four probes in the simulation menu as shown in figure 20. From left to right, first probe
is to find node voltage (with respect to ground), second is to plot voltage drop or potential drop
across a component, third is to plot current flow through a branch, and last one is to plot power
delivered or dissipated in a component
Suppose you want to see how voltage at the junction of R2 and R3 will change when you change
the input voltage. Place voltage probe (first one from left in figure 20) at the junction of R2 and
R3 as shown in figure 21
R1 R2
200 300
V
Vs
5V R3
500
When you run your simulation, PSpice A/D window will open and show you simulation results.
17
Figure 22: Simulation Result for DC Sweep between Vs and R3
This graph represents how node voltage at the junction of R2 and R3is changing with respect to
ground (or in other words voltage across R3) when you change voltage of the input source.
Horizontal axis is input voltage source and vertical axis is voltage across R3.
If you want to measure voltage across any component you have to use the probe with two ends
(potential difference probe) from the list. Suppose you want to measure voltage drop across R2;
choose double-ended probe and place one end (positive end) at the beginning of R2 and the other
end (negative end) at the end of R2 as shown in the following figure. Here you cannot use single-
ended probe as none of the terminals of R2 is grounded.
R1 R2
200 300
V+ V-
Vs
5V R3
500
18
When you run your simulation you will see voltage across R2 versus input voltage Vs graph.
Similarly you can create a graph for the current flowing through a component (choose current
probe and put it at the positive terminal of the component) and power dissipating through a
component (choose power probe and put it on the component). You can also plot voltage drop
across multiple components, current flowing through multiple components and power dissipated
through multiple components versus change in the input voltage. For example if we want to check
how power dissipation is changing through all three resistors versus input voltage, here’s how we
are going to place power probes,
R1 R2
200 300
W W
Vs
5V R3
500
W
When you run your simulation you will see the following result. To view simulation on full screen
as shown in figure 25 press Alternate Display button from the file menu. This button is the last one
in the menu next to Help menu.
NOTE: In figure 25, background color is white. Default background color for PSpice simulation is
black. To change background, foreground, and probes colors, go to Tools Options Color
Settings in your PSpice A/D window. Background and foreground color can change as soon as you
choose any new color; however, probes’ colors will only change when you remove probes, close
your design and then re-open it. There is another option to copy your simulation to clipboard except
print screen option; go to Window Copy to Clipboard. Make sure to explore this option too.
19
Figure 25: Simulation Results using Multiple Power Probes
EXERCISE – 3
For the RLC circuit that you created in Exercise 2, find the change in current values through R1,
R2, and R4 when you change the input voltage from 0 to 10 V with interval of 0.1V
R2
200
L4
R1 R3
R4
470 10mH 330
1k
V1
10V C1
1uF
10uH
L3
20
There is another way to check DC sweep across different components. In simulation window, go
to Trace menu at the top and select Add Trace. For example if you want to perform DC sweep
analysis on the circuit from figure 18 and do not put any probe on the circuit, your Pspice A/D
window will open with a blank plot. From this window select Trace and Add Trace, you will see
the following dialog box,
In this window you can see list of all the node voltages, currents and power dissipations for which
your sweep plot is available. Select whichever you want and press OK to check their DC sweep
plot. If you want to see voltage drop across some component then write down its expression in
Trace Expression filed and press OK. For example, if you want to plot voltage drop across R1,
write down V(R1:1)-V(R1:2) in the Trace Expression field and press OK. You will see the plot of
voltage drop across R1 vs. input voltage in the trace window of PSpice A/D.
NOTE: To delete any trace, select its label and hit delete from your keyboard. To delete all traces,
go to Trace Delete All traces from menu bar
21
Transient Analysis
Transient Analysis refers to the change in electrical quantities with respect to time. Transient
analysis can be done for DC (Direct Current) circuits that contain capacitors and inductors or it
can be done for any AC (Alternating Current) circuit. Voltage, current and power values for pure
DC resistive circuits do not change over time.
Let’s start with the transient analysis of a simple RL circuit as shown in figure 28. Transient
analysis with constant DC sources requires a switch that can either open or close at a specific time.
These switches can be found in eval library (eval.olb). Switch that is used in the following circuit
will close at time t = 0 sec.
L1
TCLOSE = 0
1 2
U1
10mH
V
Vs
10V R1
10
To analyze transient analysis, create new simulation profile for the circuit and from Simulation
Settings dialog box, choose Analysis Type to be Time Domain (Transient). Enter the values for
total run time and maximum step size in the dialog box and run the simulation. You should see the
voltage change across the resistor R1 from zero to 6 ms. as shown in figure 30
22
Figure 29: Dialog Box for Transient Analysis
10V
8V
6V
4V
2V
0V
0s 0.4ms 0.8ms 1.2ms 1.6ms 2.0ms 2.4ms 2.8ms 3.2ms 3.6ms 4.0ms 4.4ms 4.8ms 5.2ms 5.6ms 6.0ms
V(L1:2)
Time
23
EXERCISE – 4
For the circuit shown in figure 31, find the transient voltage acrossR3 when the switch will open
at 6 ms Plot the transient voltage for 20 ms with maximum step size to be 0.01ms
R1 R2 R3
500 400 1k
V+ V-
1
TOPEN = 6ms
U1
C1
2
Vs 1u R5
1k
10V
R4
1k
24
Transient Analysis with AC Sources
AC (Alternating Current) sources are the ones that change their polarity (positive and negative
voltage sides) with respect to time. These sources can comprised of square waves, sinusoidal
waves, triangular waves or any other type of periodic function. Remember that not every
alternating source is AC. If source’s value is changing but not its polarity then it is not an AC
source, it is an alternating DC source.
Let’s use a sinusoidal AC source and plot its transient response for some circuit component.
Consider circuit given in figure 32. Voltage source used is VSIN under source library.
R1 R2
200 500
R3
300
V1
VOFF = 0
VAMPL = 5V
FREQ = 1k
AC =
When you simulate it and compare the voltage drop of R2 against the source, you will see the
following transient output
6.0V
4.0V
2.0V
0V
-2.0V
-4.0V
-6.0V
0s 0.2ms 0.4ms 0.6ms 0.8ms 1.0ms 1.2ms 1.4ms 1.6ms 1.8ms 2.0ms 2.2ms 2.4ms 2.6ms 2.8ms 3.0ms
V(V1:+) V(R2:1,R2:2)
Time
25
To find different values of waveforms, you can use cursors. For example, maximum or peak value
of output voltages can be found out by pressing cursor button and choosing cursor peak (first
button from left in the cursor menu). According to cursor values, peak value of the output voltage
is 2.5V as shown in figure 34
Figure 34: Cursor Peak showing Peak values of Input and R2 Voltages
Likewise you can grab cursor lines and move them around to find voltage for any corresponding
time or vice versa. There are two cursors, Cursor 1(red) and Cursor 2 (green). These are default
colors of cursors. Cursor 1 is operated by left mouse button whereas cursor 2 is operated by right
mouse button. Colors of cursors can be changed from Tools options Cursor Settings
NOTE: If you want to change phase shift of the AC sinusoidal source and its field is not given to
you, go to the properties by double clicking on the source and add New Column. Name this new
column as Phase and choose any value (in degrees) to change the phase shift. For example if you
want a cosine source instead of sinusoidal, use phase shift to be 90.
26
EXERCISE – 5
Create the following circuit in PSpice and carry out transient analysis. Trace the following voltages
for 10 ms with step-size of 0.01ms: (i) Input voltage (ii) vL1(iii) vL2
L1
C1 R3
V1
VOFF = 0
VAMPL = 5V
FREQ = 1k 100mH
AC = R1 R2 L2
100 150
Observe voltage values for all the three voltages at the following time instances
(i) t = 2.3ms
(ii) t = 5.2ms
(iii) t = 9.0ms
27
EXERCISE – 6
Perform transient analysis on the circuit shown in figure 36 and find the voltage across C1 and L1
at 2.5ms and 7.7ms. Note that sinusoidal current sources (ISIN) instead of voltage sources are used
in this circuit. Run the simulation for 8ms with step-size of 0.01ms.
C2
10u
L1
2H
I1
I2
IOFF = 0 10 100u 50
IAMPL = 1A R1 C1 1H R2 IOFF = 0
FREQ = 1K L2 IAMPL = 2A
FREQ = 1K
28
EXERCISE - 7
Design a series RLC circuit with R = 1KL = 100H, and C = 1nF. Use a square waveform as
your input with zero to 5 volt, keep time delay, rise time and fall time, all to be zero, pulse width
is 6.75 s and to make a square wave, time period of the waveform should be double of pulse
width.
Simulate your circuit for transient analysis. Keep your run time to be twice of the time period and
step-size to be 0.01s. Trace input voltage (square wave) and voltage across capacitor.
AC Sweep Analysis
As it was discussed earlier, DC sweep analysis corresponds to change of voltage, current or power
across a component in DC circuit when input voltage is changed from one value to another. AC
Sweep Analysis corresponds to change of voltage, current, or power when frequency of AC
sinusoidal voltage is changed from one value to another. Hence AC sweep analysis is a graph
between voltage, current, or power versus frequency.
Let’s analyze the following first order RC Low-pass passive filter for its frequency response. Make
sure to use VAC instead of VSIN for AC sweep analysis. Set the AC voltage to be 10V.
R1
100
V
V1
10Vac
0Vdc C1
1u
Create a new simulation profile and choose AC Sweep/Noise in the Simulation Settings window
under Analysis Type. You can use frequency scale to be either linear or logarithmic. C hoose
logarithmic scale and give values for start frequency, end frequency and points per decade.
29
Figure 39: Simulation Settings for AC Sweep Analysis
8V
6V
4V
2V
0V
10mHz 30mHz 100mHz 300mHz 1.0Hz 3.0Hz 10Hz 30Hz 100Hz 300Hz 1.0KHz 3.0KHz 10KHz 30KHz 100KHz 300KHz 1.0MHz
V(R1:2)
Frequency
30
EXERCISE – 8
For the following RC band-pass filter, perform AC sweep analysis to trace the frequency response
across load resistor RL. Start at 1Hz and trace up to 1MHz. Use logarithmic sweep.
C1 R1
10u 100
C2 RL
1u 150
V1
5Vac
0Vdc
Electronic Circuits
This part of tutorial deals with circuits containing basic semiconductor components including
diodes and transistors. Let’s start with diodes. There are different types of diodes including, but
not limited to, rectifier diodes, zener diodes, photo diodes, light emitting diodes (LED), and Schmitt
trigger diodes. Diodes are two terminal devices like resistors, capacitors or inductors. However,
unlike resistors, inductors and some types of capacitors, two terminals of diodes play important
and very different role in the conduction of current. Figure 42 shows circuit symbol of a PN
junction rectifier diode with its positive (anode) and negative (cathode) sides.
Anode Cathode
31
When anode of diode is more positive than cathode, it is said to be in forward biased region. In
forward biased region when voltage difference between anode and cathode exceeds a certain
voltage, called junction voltage (0.7V for silicon diodes and 0.3V for germanium diodes), diode
starts conducting. Voltage across diode becomes almost constant (either 0.7 or 0.3, based on which
diode is being used) and current keeps on increasing exponentially if input voltage keeps on
increasing. Ideally it is assumed that diodes always conduct in forward bias configuration, ignoring
junction voltage drop, to keep circuit analysis simple.
When diode’s cathode is more positive than anode, it is said to be in reverse biased region. In this
region diode does not conduct any current (except very small reverse saturation current) until
voltage becomes very large. If it becomes very large and exceeds what is called breakdown
voltage, a large amount of current starts flowing through diode. Generally rectifier diodes are not
operated in breakdown region as they get damaged. However zener diodes are generally operated
in breakdown region.
Let’s analyze diode characteristics from a simple circuit. Create the circuit shown in figure 43.
Diode is present in the free eval library or you can add diode library (full version).
D1
D1N4002
V1
10V R1
100
Create a new simulation profile and choose DC Sweep simulation type. Sweep the input voltage
from -10V to 10V and observe the voltage across diode
32
2V
0V
-2V
-4V
-6V
-8V
-10V
-10V -9V -8V -7V -6V -5V -4V -3V -2V -1V 0V 1V 2V 3V 4V 5V 6V 7V 8V 9V 10V
V(D1:1,D1:2)
V_V1
Voltage Characteristics of diode, as shown in figure 44, depicts that it does not conduct until
approximately 0.6-0.7V, at which point it starts conducting and voltage across it almost becomes
constant.
Let’s plot both voltage and current characteristics of diode in two sub-plots. From top menu, go to
PLOT ADD PLOT TO WINDOW. This will add another trace window on the same plot. Put a
current probe on any component and it will show you how current is changing in the circuit as
shown in the following figure.
100mA
50mA
SEL>>
0A
I(D1)
5V
0V
-5V
-10V
-10V -9V -8V -7V -6V -5V -4V -3V -2V -1V 0V 1V 2V 3V 4V 5V 6V 7V 8V 9V 10V
V(D1:1,D1:2)
V_V1
33
Figure 45 shows that as long as diode is not conducting (off), there is no current in the circuit.
Once diode starts conducting around 0.7V, current starts increasing in the circuit with the increase
of input voltage.
Let’s perform transient analysis of the same circuit with sinusoidal AC source. Circuit is shown
in figure 46 and simulation is shown in figure 47.
D1
D1N4002
V+ V-
V1
VOFF = 0 1k
V
VAMPL = 5 R1
FREQ = 100
AC =
0V
-5.0V
V(D1:1,D1:2)
5.0V
0V
SEL>>
-5.0V
0s 2ms 4ms 6ms 8ms 10ms 12ms 14ms 16ms 18ms 20ms 22ms 24ms 26ms 28ms 30ms
V(R1:1)
Time
Figure 47: Top Window: Diode Voltage Drop; Bottom Window: Voltage Drop across R1
It can be observed from figure 47 that as long as diode is OFF, i.e. when voltage from anode to
cathode is less than 0.7 V approximately, there is no voltage drop across output resistor as there is
no current flow in the circuit. All the voltage is dropped across diode. When diode is ON an d
current is flowing in the circuit, there is a voltage drop across output resistor. Observe that there is
no negative voltage cycle across output resistor at any time, hence we say that output voltage has
been rectified from AC to pulsating DC. Since diode is conducting (ON) only half of the input
34
voltage cycle, this circuit is called Half-wave Rectifier. Output of half-wave rectifier can be made
smoother using some signal processing.
There are rectifier circuits where diode conducts during the whole input voltage cycle. Those
circuits are called Full-wave Rectifiers and their performance is better than the half-wave rectifier
circuits. Some of the commonly used full-wave rectifier circuits are center-tapped transformer
full-wave rectifiers and full-wave bridge rectifiers. Bridge rectifier is the subject of exercises 9 and
10.
EXERCISE – 9
Create Full-wave Bridge Rectifier circuit as shown in figure 48 and perform transient analysis to
trace voltage across RL versus input source for 5ms
D1N4002
D1 D3
D1N4002
V1 RL
VOFF = 0V
VAMPL = 5V
1k
FREQ = 1kHz
AC = D1N4002
D2 D4
D1N4002
EXERCISE – 10
For the full-wave bridge rectifier that you designed in exercise 9, add a capacitor in parallel to RL.
Choose its values as follows: 1F, 10F, and 100F, one by one, and trace the voltage across RL
vs. input voltage source. Observe how the Alternating DC voltage is converted into almost constant
DC voltage across RL.
35
Transistor Circuits
Transistor is another very commonly used semiconductor component. Unlike any other component
that has been discussed so far, transistor has three terminals. There are two major types of
transistors; Bipolar Junction Transistor (BJT) and Field Effect Transistor (FET). FET is further
improved into another type of transistor called Metal-Oxide Semiconductor Field Effect Transistor
(MOSFET).
Let’s start our discussion with BJT circuits. Three terminals of BJT are named as Base (B),
Collector (C), and Emitter (E). BJT is a current-controlled-current device where base current
controls flow of current from emitter to collector. There are three regions of operation of BJT;
Active Region (BE forward biased and BC reverse biased), Saturation Region (both BE and BC
forward biased), and Cut-off Region (both BE and BC reverse biased). Two most common
applications of transistors are amplification and switching. There are two types of BJTs; NPN and
PNP. Figure 49 shows both types of transistor circuit symbols with their terminal names
NPN PNP
Let’s create BJT circuit shown in figure 50 and perform DC Bias analysis. BJT can be found in
the free eval library or bipolar library (full version).
R2
1K
Q1
R1
100K
Q2N3904
10V
V1 V2
5V
36
As it can be seen from the DC bias point values (figure 51), since voltage VCE = 3.00V, BJT is
operating in active region. For the transistor to be in saturation region, VCE is approximately equal
to 0.2V (for the sake of simplicity we take it as 0V) and cut-off region, when no current is flowing
through BJT, VCE is approximately equal to the value of voltage source V2 and current is very close
to zero.
To check different regions of BJT operation, let’s perform DC sweep analysis with value of source
V1 changing from -1 to 10 volt and trace the voltage VCE. Result is shown in figure 52.
10V
8V
Cut-off region
6V
Saturation region
4V
Active region
2V
0V
-1V 0V 1V 2V 3V 4V 5V 6V 7V 8V 9V 10V
V(Q1:c,Q1:e)
V_V1
37
Transient Analysis of Transistor Circuits
R2
750
Q1
R1 V
107K
Q2N3904
V
10V
V2
V3
VOFF = 0V
VAMPL = 0.1V
FREQ = 1KHz
AC =
V4
5V
When you perform transient analysis and observe the voltage gain between base and collector of
the circuit, you will see the following trace
716.5mV
716.0mV
715.5mV
715.0mV
V(Q1:b)
5.1V
5.0V
4.9V
SEL>>
4.8V
0s 0.2ms 0.4ms 0.6ms 0.8ms 1.0ms 1.2ms 1.4ms 1.6ms 1.8ms 2.0ms 2.2ms 2.4ms 2.6ms 2.8ms 3.0ms
V(Q1:c)
Time
Figure 54: Voltage Amplification from Base to Collector; Blue Waveform is the Base Voltage &
Red is the Collector Voltage
Observe how voltage is amplified from base to collector (Voltage Gain = vc(p-p)/vb(p-p) ≈
228mV/1.38mV = 165). Also, observe that voltage at collector is inverted compared to the base
voltage. This is why it is also called an inverting voltage amplifier.
38
EXERCISE – 11: Design the common emitter amplifier as shown in figure 55 and calculate the
v
voltage gain RL from transient analysis of the circuit
v2
V1
12V
RC
1k
R1
22k C3
Q1 1u
C1
1u
Q2N3904
V2
VOFF = 0V
VAMPL = 10mV R2 RE RL
FREQ = 1kHz 6.8k 560 C2 1k
AC = 10u
MOSFET is the class of field effect transistors that are voltage-controlled-current devices.
MOSFET has three terminals; Gate (G), Source(S), and Drain(D). There are two types of
MOSFETs; n-channel and p-channel. For field effect transistors, voltage applied between gate and
source controls the flow of current between drain and source. There is also a fourth connection in
MOSFET which is called body or substrate. For n-channel MOSFET, body is held at the most
negative voltage in the circuit and for p-channel MOSFET, it is held at the most positive voltage
in the circuit. In order for current to flow through MOSFET channel, voltage applied between gate
and source should exceed a specific value called threshold voltage (VGS> VTR)
Based on if threshold voltage of MOSFET is positive or negative, MOSFET can further be divided
into four categories,
39
Figure 56: MOSFET Circuit Symbols
Like BJT, there are three regions of operation for MOSFET. These regions are characterized as
follows,
1. Triode region: VDS< VGS-VTR (current and voltage has square relationship)
2. Constant Current or Saturation region: VDS> VGS-VTR(current is constant in this region)
3. Cut-off region: VGS ≤ VTR (no current flows in this region)
Let’s design a circuit with 2N7000 enhancement mode n-channel MOSFET. This MOSFET can
be located in several libraries including PHIL_FET, FAIRCHILD, and PWRMOS.
R1
1k
VDD
R2 M1 5V
1Meg
M2N7000
VGS
0V
40
Perform DC Sweep analysis and choose both Primary Sweep and Secondary Sweep. For Primary
Sweep choose source VGS and for Secondary sweep choose VDD.
(a)
(b)
41
10mA
5mA
0A
ID(M1)
10V
5V
SEL>>
0V
0V 0.5V 1.0V 1.5V 2.0V 2.5V 3.0V 3.5V 4.0V 4.5V 5.0V
V(M1:d,M1:s) V(M1:g)
V_VGS
In figure 59, top set of the characteristic curves is current flowing from drain to source. When
there is no current, that region corresponds to the cutoff region, curved region corresponds to the
ohmic or triode region, and when current becomes constant, this is the saturation region. Bottom
set of characteristic curves (green) shows how values of VDS are changing for each value of VGS
(red line)
NOTE: If your simulation gives error regarding MOSFET, go to the simulation editor, select
configuration files tab and add the library that you are using for MOSFET (figure 60). This library
will be located in "…\Cadence\SPB_16.5\tools\PSpice\Library”. For example, if you are using
MOSFET M2N7000 from pwrmos library, select this library and press Add to Design
42
EXERCISE– 12:
A very basic electronic circuit is an inverter. An inverter is a circuit that reverses the input at its
output, i.e. if input is high, output is low and vice-versa. Inverter basically comes under the
category of digital circuits that are discussed in the next section. Most of the practical inverters are
made up of complementary MOSFET (CMOS) circuits. CMOS circuits are the ones that employ
both NMOS and PMOS in a specific configuration.
Design the following CMOS inverter circuit and perform DC sweep analysis at output (vout). Sweep
the input voltage source (only primary sweep) from 0V to 5V and trace the output voltage. Be very
careful to connect the drain of PMOS to the drain of NMOS, as shown by arrows. You will have
to flip the PMOS vertically to connect both drains.
PMOS
M2N6851
VDD
Vin
Vout 5V
0Vdc
NMOS
M2N7000
Digital Circuits
In this part of the tutorial we will concentrate on digital gates and digital circuits. Digital circuits
can take two types of inputs, either high (1) or low (0), and can generate three types of outputs,
high, low, or floating. Floating means that output logic level is neither high nor low. For every
gate or IC, high and low levels correspond to certain voltages. For example, it could mean that any
voltage between 3.5V to 5V will be considered as high level or 1, and any voltage from 0.2V to
1V will be considered as low level or 0. Any other voltage will be considered as floating also
known as high-Z or high-impedance.
43
For most of the gates and ICs, input high level is supplied through a 5V DC supply and low level
is ground or zero voltage. Let’s start our analysis with basic digital gates. There are three basic
gates including NOT or INVERTER, AND, and OR. From these basic gates, four more gates have
been derived, NOR, NAND, EXOR or XOR, and EXNOR or XNOR. Circuit symbols of all of the
gates are shown in figure 62
1
1 1
3 4 3 3 3 1 3 3
2
2 2
Simulation of digital gates and circuits is quite different from analog circuits. All gates are present
in a number of libraries. The one we are going to use is 74LS. There are three types of signal
sources we are going to use to give high or low inputs. Two sources are present in Place Ground
library that we use to place ground in every circuit. If your input is a constant high signal, you can
use $D_HI/SOURCE from Place Ground library and if it constant low then you can use
$D_LO/SOURCE. If you want to use a square waveform (clock) signal or you want to define your
own signal, you will have to use DigStim1 from SOURCSTM library.
Let’s create a simple digital circuit to analyze NOT gate. Get 74LS04 from 74LS library and
DigStim1 from SOURCESTM library and put them together as shown in figure 63.
U1A
DSTM1 1 2
S1
Implementation = 74LS04
44
DSTM1 stands for Digital Stimulus for single input. Implementation is the name of signal to be
defined and used by stimulus. Let’s define two signals that can be used by DSTM1. Select DSTM1
by left mouse click and then right click your mouse to select Edit PSpice Stimulus. Stimulus Editor
will open and New Stimulus dialog box will pop up. Choose a name for your stimulus. This name
will be used under Implementation if you want to use this stimulus. First, let’s define a clock signal
by choosing CLOCK in the dialog box and pressing OK
When you press OK, clock attributes dialog box will pop up. Choose frequency of clock. Keep
duty cycle to be 0.5 to have a symmetric clock, i.e. half of the time low and half of the time high.
45
You can set length of your signal by changing Axis Setting under Plot menu. Set your axis to be
10ms long with Time Resolution to be 0.1ms.
Now let’s define one of our own signal that can go high and low at any time that we want. From
Stimulus menu choose New, New Stimulus dialog box will pop up. Give a name to your stimulus
and choose Signal under Digital and press OK. You will see a new line will appear in the stimulus
editor window. Initial value of this signal is zero at all time. From toolbar menu, choose the last
button from left that shows high-low signal. Once you press this button, your mouse will change
into a pencil. Put this pencil on different parts of your signal and click it to change level of your
signal (Observe SIG_1 in figure 66).
Once you are done with defining your signal, press Esc to get out of signal drawing mode.
Let’s simulate our circuit with both of our stimuli one by one. Let’s choose CLK_1 as our input
signal first. Name your Implementation field CLK_1. Create a new simulation profile and choose
transient analysis. Run transient analysis for 10ms. Place voltage probe at the output of stimulus
and output of gate.
STM1:OUT
U1A:Y
0s 1ms 2ms 3ms 4ms 5ms 6ms 7ms 8ms 9ms 10ms
Time
Figure 67: Input and Output of NOT gate for CLK_1 Signal
Now let’s use signal SIG_1 as our input to AND gate. Change name of your Implementation field
to SIG_1 and perform transient analysis again.
STM1:OUT
U1A:Y
0s 1ms 2ms 3ms 4ms 5ms 6ms 7ms 8ms 9ms 10ms
Time
Figure 68: Input and Output of NOT gate for SIG_1 Signal
46
NOTE:
(i) If your simulation does not run and you get an error “Subcircuit 74LS04 used by X_U1A
is undefined” in the output file, make sure to add 74ls library under Configuration tab
of Simulation Settings window.If you still get simulation error and in your output file
you see, “Model IO_LS used by X_U1A.U1 is undefined”, add dig_io library under
configuration tab of Simulation Settings window.
(ii) If you see red lines in your simulation window instead of green signal lines, check if
your stimulus fileis present under configuration tab (configuration category
stimulus). If it is not there, add it from your current schematic folder.
EXERCISE – 13
Simulate an XOR gate with one of its inputs having clock with frequency 1KHz and other with a
constant high signal. Circuit and waveforms are shown in figure 69 and figure 70
A
S1
A U1A
V
1
3 X
2
B V
HI 74LS86A
A:OUT
$D_HI
U1A:Y
47
EXERCISE – 14
Design logic circuit shown in figure 71. Choose A to be a clock signal with frequency 1KHz. B
and C as your own signals as shown in figure 72. Simulate it for transient analysis for 4ms. Keep
maximum step size to be 0.01ms.
A
S1
A U1A
1
3
2
B U2A
S1
2
74LS00
B 1
3
74LS02
U3A
C 1 2
S1
C 74LS04
48