Lab Manual
Lab Manual
Lab Manual
Electric Circuit I
Lab Manual Session # 2
Electric Circuit I
Lab Manual
Session #52
Introduction to PSpice
1
Information Engineering & Technology
Electric Circuit I
Lab Manual Session # 2
Objective:
The objective of this experiment is to be familiar with Pspice (learn how to connect circuits, do DC
analysis).
1. Introduction:
SPICE is a powerful general purpose analog and mixed-mode circuit simulator that is used to verify circuit
designs and to predict the circuit behavior. This is of particular importance for integrated circuits. It was
for this reason that SPICE was originally developed at the Electronics Research Laboratory of the
University of California, Berkeley (1975), as its name implies: Simulation Program for Integrated Circuits
Emphasis. PSpice is a PC version of SPICE (which is currently available from OrCAD Corp. of Cadence
Design Systems, Inc.). The PSpice Light version has the following limitations: circuits have amaximum of
64 nodes, 10 transistors and 2 operational amplifiers. SPICE can do several types of circuit analysis. Here
are the most important ones:
2
Information Engineering & Technology
Electric Circuit I
Lab Manual Session # 2
In addition, PSpice has analog and digital libraries of standard components (such as NAND, NOR,
flip-flops, MUXs, FPGA, PLDs and many more digital components). This makes it a useful tool for a
wide range of analog and digital applications.
All analysis can be done at different temperatures. The default temperature is 300K.
3
Information Engineering & Technology
Electric Circuit I
Lab Manual Session # 2
➢ The values of elements can be specified using scaling factors (upper or lower case)
▪ T or Tera (= 1E12);
▪ G or Giga (= E9);
▪ MEG or Mega (= E6);
▪ K or Kilo (= E3);
▪ M or Milli (= E-3);
▪ U or Micro (= E-6);
▪ N or Nano (= E-9);
▪ P or Pico (= E-12)
▪ F of Femto (= E-15)
Types of Simulations:
Pspice have four main types of simulation:
1. Bias Point analysis.
2. DC Analysis.
3. AC Analysis.
4. Time domain (transient)
4
Information Engineering & Technology
Electric Circuit I
Lab Manual Session # 2
DC analysis
Performs a DC sweep. The DC sweep analysis calculates the circuit biaspoint over a range of values.
The results can be displayed on a graphical representation using the Voltage or Current Markers
which are specified inFigure 2. In the graphical representation the X-axis is the voltage or current
source that is specified in the simulation profile.
AC analysis
Calculates the small-signal frequency response of the circuit (linearized around the bias point) over
a range of frequencies. The results can be displayed on a graphical representation using the
Voltage or Current Markers which are specified in Figure 2.
Transient analysis
Calculates the behavior of the circuit over time. The results can be displayed on a graphical
representation using the Voltage or Current Markers which are specified in Figure 2.
5
Information Engineering & Technology
Electric Circuit I
Lab Manual Session # 2
Figure 2
2. Procedures:
Getting Started:
To use the Orcad Pspice, the following steps must be followed:
1. Click start ->Programs ->Orcad->Capture CIS Lite Edition.
2. Click->File->New->Project.
3. Give the project a name and select “Analog or Mixed A/D”. You will also be prompted to
enter the location you would like to create the file. Put it in your folder created above. Then
click “OK.” This is shown in the following figure.
6
Information Engineering & Technology
Electric Circuit I
Lab Manual Session # 2
4. You will then be shown a screen which has two options. Choose the option which says
“Create a blank project” as shown in figure 4. Then click “OK”.
5. Now you should be on a screen, as shown, which has grid dots located on it. If you do not
see a tools box on the right hand side of the page then left click on the mouse and one
should appear at this time.
Figure 5
8
Information Engineering & Technology
Electric Circuit I
Lab Manual Session # 2
40 V 20 kΩ
Figure 6: Example
1. First, to get the resistors, you can either select the second box in the toolbar on the right
or by clicking “Place” from the top of the screen followed by “Part.” Both methods will lead
to a screen, shown in Figure 7, where you will be prompted for the part name.
2. NOTE: There is a library box containing the libraries which hold the required parts. At this
time, ensure that the two main libraries that you will be using are in this box. The two
libraries are: a) Analog. b) Source.
Figure 7
9
Information Engineering & Technology
Electric Circuit I
Lab Manual Session # 2
If these are not shown here, you must click “Add library” and these two libraries along with
some others will appear. Click on the two libraries mentioned above from the shown
Libraries in Figure 8.
Figure 8
3. To get the resistors, ensure that you have highlighted “Analog” library as shown in Figure
9. Then, you can type “R” or “r” in the place part box and you should see a picture of a
resistor in the graphic box. Click “Ok” Or, the resistance could also be obtained by scrolling
10
Information Engineering & Technology
Electric Circuit I
Lab Manual Session # 2
Figure 9
4. To place the resistor, drag it to the desired position and then “left click the mouse.” As
shown in Figure 10, if more than one resistor is required, simply, move the mouse (with
the resistor symbol still attached) to the next resistor position and “left click” again. Once
all required resistors are placed in this fashion, “right click” on the highlighted resistor and
then “End mode” which is clear in Figure 10 in the highlighted menu. At this time it is
important to note that Capacitors and Inductors also fall in the “Analog” library and are
represented by “C” and “L”, respectively.
5. To rotate a part, click on the part to get it highlighted and then “right click” and hit rotate.
A faster way though is by highlighting and typing “CTRL R”
Example, in figure 10 to do this with resistor R1. Note the whole part, not just a label, must be
highlighted.
11
Information Engineering & Technology
Electric Circuit I
Lab Manual Session # 2
Figure 10
6. Both the voltage source and current source (“V DC” and “IDC”, respectively) are located in
the “Source” library. To place them, follow the same processas for the resistor (or capacitor
or inductor). However, be sure that the “Source” library is highlighted in the place part box.
Also, once the placement of each source is made, don't forget to "End Mode".
12
Information Engineering & Technology
Electric Circuit I
Lab Manual Session # 2
Figure 11
7. The next step is to wire the circuit. To get the wire, there are two places you can go. Either
the third box on the Toolbar menu on the right or again in the “Place -> Part ->Wire from
the top of the screen. The first option is more convenient.
Figure 12
13
Information Engineering & Technology
Electric Circuit I
Lab Manual Session # 2
8. Once the wire box is activated by "left clicking the mouse" it is connected to a part on the schematic
by “left clicking” on either end of the part and then moving the wire to wherever you would like it
joined to. Note here that the wire may be changed from "side to side" to "up and down" by left
clicking while moving the wire. As with all parts, to stop the wire function “right click” on the mouse
and choose “End Wire”.
9. Once the wiring is complete, a ground must be added. The ground is found in the toolbar on the
right where it says “GND”. When you click on it, a window named “place ground” will be opened.
Press “Add library” tab, open PSpice folder, choose library named “source”. It will appear in the
place ground window, choose the symbol named “0” and press OK. This will be the ground of your
circuit. Place the ground in the desired position. The best place for this circuit is where it is shown
on Figure 13.
Figure 13
10. Next, the value of each element in the circuit must be edited. Left click on the default value of any
element and then “right click->edit properties” to get to the "Edit Properties" screen. Type the
required value in the "Value" box. (Note that a "Display Properties" screen can also be reached by
double left-clicking on the default value.) There are various options here for what may be displayed
14
Information Engineering & Technology
Electric Circuit I
Lab Manual Session # 2
with the particular element. For now, use the default. The name of an element may be changed by
double clicking on the name (e.g. R1) and editing as was done for the numerical "Value".
Figure 14
Congratulations, you have just built your first circuit !! Now, save the schematic to your course
directory.
1) If all the previous steps have been properly followed, the circuit is nowready for
simulation.
Note: Before starting the simulation process, the values of voltage, current and power associated
with each resistor should be hand-calculated so thatthey are used to check the PSpice results (for
this initial circuit only).
2) Choose “PSpice” from the top toolbar and click “New simulation Profile”. Supply any
convenient name when the prompt to do so appears. Then click “Create”. Now a screen appears
which asks for the type of analysis. For this circuit, choose the “Bias Point” analysis by clicking the
drop box and selecting “Bias Point”. Then click “Ok”.
3) The simulation is now ready to run. To do so, click PSpice->Run on the top tool bar. A few
seconds will elapse while the netlist and output files arebeing generated. A simulation box,
15
Information Engineering & Technology
Electric Circuit I
Lab Manual Session # 2
indicating that the simulation is complete should then appear. If there are errors associated with
your circuit, the simulator will inform you if there are errors in the circuit at this phase and your
circuit will not simulate properly. If no errors are reported, then close this screen to return to the
schematic.
4) The voltages and currents in the circuit may be displayed on the schematic by clicking on the
big “V” and big “I” in the top tool bar. There is also a “W” which will also show the power in watts.
The currents and voltages may be verified against the hand calculations. Figure 15 shows the circuit
after simulation with the voltages, currents, and power displayed. If you press on the “V”, “I” and
“W” buttons one more time, the values read willdisappear.
Figure 15
Note: There are quick buttons, in the upper toolbar, shown in the following figure,to be used for
opening a new simulation profile (the left button) or editing the simulation profile (the middle
one) or running the simulation (the right one).
Figure 16
16
Information Engineering & Technology
Electric Circuit I
Lab Manual Session # 2
DC Sweep:
1) For the same circuit, we will do a DC sweep which is used to calculate various currents or
voltages over a certain range of values swept of a certain controlling device.
2) To change the type of simulation from DC bias point to DC sweep, open the PSpice tab in the
upper tool bar and open “Edit Simulation Profile”.
3) Set the type of simulation to DC sweep.
4) Set primary sweep to voltage source.
5) Set voltage name to V1 which is the name of the voltage source in the circuit and set the start
and end values and the increment 0, 10 and 1V as shown in Figure 17 then press Ok. (i.e, This means
that the component that we will sweep its values is V1 and the values range is from 0V to 10V with 1V as
an increment).
17
Information Engineering & Technology
Electric Circuit I
Lab Manual Session # 2
8)
Figure 18
18
Information Engineering & Technology
Electric Circuit I
Lab Manual Session # 2
Figure 19
Figure 20
➢ Now apply those steps on the given Experiments in your lab report
19