ECE 326 Cadence PSD 14.2 Tutorial
By Tim York
Southern Illinois University Edwardsville - Dept. of Electrical and Computer Engineering
PART I: Setup
1) To start Cadence, press the Windows start button, then go to Programs\CAD
Programs\Cadence PSD 14.2\Capture CIS. A window will pop up that says
“Studio Suite Selection” and asks you to select the suite from which to check out
the capture CIS feature. Select Capture CIS and click OK.
2) Once the program loads, go to File/New/Project. A menu comes up that asks for
the name of the project, the type of project, and the location of the project. Give
this project the name “Tutorial”, select the project type “Analog or Mixed A/D”,
and for the location, put it on your SOENT home directories. This is the Z: drive.
I suggest you make a folder called “ECE 326”, another one called “Tutorial”
underneath that, and place the project there. Click OK.
3) A new window pops up and asks you to “Create PSpice Project” and gives you
two options: “Create based upon an existing project” or “Create a blank project”.
Since there is no existing project, choose “Create a blank project” and press OK.
4) A blank schematic window will now pop up. Before building your circuit, you
will need to set a few preferences. Go to the Options/Preferences menu. To
make it easier to place parts, click on the Grid Display tab, and make sure the
“Pointer snap to grid” option is checked. Next, go to the Miscellaneous tab, and
uncheck the “Automatically reference placed parts” option if it is checked. If this
option were selected, then the first resistor you placed would be called R1, the
next R2, and so on. Also under Miscellaneous, make sure the “Enable Intertool
Communication” box is checked. We are done setting preferences, so click OK
and close the dialog box.
5) Now we need to format the schematic document. Click on Options/Design
Template, and click on the Title Block tab. For the title of the schematic, put
“Tutorial” followed by your name in parentheses. So, for example, I would put
“Tutorial (Tim York)”. The rest of the fields don’t really matter that much for
what we are doing, but you may want to take note of them for the future. Next,
click on the Page Size tab. For the size of your sheet, choose “Custom” and then
use a width of 8.5 inches and a height of 11.0 inches. Click OK to commit the
changes. Finally, go to File/Print Setup, click on “Landscape” and click OK.
You are now ready to actually begin designing a circuit.
PART II: Design
1) We are going to be simulating an integrator made with op-amps. An integrator is
a circuit that performs the mathematical operation of integration. You will see
this later when you are done simulating. This circuit is actually an inverting
integrator, since the source voltage is driving the inverting input of the op amp. It
is shown below:
2) The first thing is placing the parts. Go to the Place > Part menu. A dialog box
should come up. All of the parts in Cadence are stored in different libraries, so
we will need to add a few libraries to the design to be able to place the parts we
need. Click on the Add Libraries button, and a window will pop up. There will
be a bunch of files with an .olb extension. These are the Cadence library files.
They contain the data Cadence needs to accurately simulate the circuit. Most
have descriptive enough names. Like, the “diode.olb” file contains almost any
diode you could think of, including the 1N4001 that we use in lab. Add the
“analog.olb” library to the design. This is the generic analog library, and contains
all of the standard analog parts like resistors, capacitors, etc. The next library to
add is the “source.olb” library. This contains all of the different types of voltage
sources that provide the stimulus for your design. If you don’t see these libraries,
they are under the pspice directory. To get the library for the op-amps, you will
have to go to the advanls directory and select the “opa.olb” library. This one
contains the op-amps.
3) To actually place a part in the design, click on the library which contains the part
in the lower left hand corner. So, let’s place a resistor. Click on the ANALOG
list in the libraries. Click on “R” in the above window, and click OK. You now
have a resistor to place on your schematic sheet. To place it, just place it where
you want to, and click. It’s that easy. The rest of the parts are just as simple.
Now add the op-amp. Click on the OPA library, and find the LM741. If you
know what part you are using, you can also just type it into the “Part” field. To
place the op-amp so that the negative terminal is on top, right click on it, and
select “Mirror Vertically”, then left click to place it. You can also place it, click
on it to select it, right click to bring up the menu, and select “Mirror Vertically”.
Finally, add the capacitor. The capacitor is the big C in the ANALOG library. If
at any time you make a mistake and place the wrong part, all you have to do is
click on the part to select it, and hit the “Delete” key.
4) Now, you should have one resistor, one capacitor, and one op-amp in your circuit.
You need two more resistors to complete the design. Another way to place parts,
once you have already used them, is in the dialog box underneath the menu. It
shows the last part you placed. It should say “C” right now. To place your other
resistor, just type “R” into the box and hit enter. You should now have another
resistor to place. To place the final, vertical resistor, just click on the box and hit
enter to get another resistor. Just like with the op-amp, right click on it, select
“Rotate” and place it.
5) With all of the components placed, next on the list is placing grounds. The easiest
way to place a ground is to click on the ground button on the right hand side. It
looks like this . This will bring up a menu. It asks for what type of ground you
wish to place. Select the one that says “0/SOURCE” and click OK. If there is not
one that says “0/SOURCE”, then you will need to click on the “Add Libraries”
button on the side of the menu, and add the “source.olb” library. Ground is now
simply called “0”. You should now have a ground element to place in the
schematic. You can place as many as you need to, they are all 0 volts.
6) Right now, you are probably wondering, “what about the voltage sources?” The
op-amps need to be powered by something, and the overall circuit needs an input
voltage. So, let’s add them now. To add a source, go to the Place>Part menu.
The sources are located in the “SOURCE” library. Seems obvious, doesn’t it.
Let’s add the input voltage source. Find the “VPULSE” source and place it in
your schematic. Don’t worry about all the values, we’ll set them later.
7) To add the power sources for the op-amp, don’t add them directly to the op-amp.
We are going to do something called net aliasing, and it is a feature of Cadence.
You will notice on the above schematic, the power supplies for the op-amp are
wires with “VCC” and “VDD” printed above them. These are actually wires that
are connected to another part of the schematic. The whole schematic looks like
Notice how the power sources for the op-amp, V+ and V- are placed away from
the actual circuit. This is to save room, because the space around the op-amp
tends to get a little cramped. To place a DC source, go to Place>Part and select
the “SOURCES” library. The source you want to place now is the “VDC” source.
Place two of them away from the main circuit, like in the above schematic.
8) Now, we need to connect all of the parts with wire. Just like placing parts, there
are all sorts of ways to place wire. You can go to the Place>Wire menu, hit
Shift+W, or you can click on this button on the right side. When you do any
of these, the cursor looks like a cross. This means that now you will be in wire
placing mode. All of the parts you placed should have little squares on the end of
them. Once you have the wire cursor up just click on a square. When you move
the mouse, you will see a wire extending from the square in the direction you
move. To join two parts, drag the wire to the other part until you see a red dot.
The red dot means that a connection will be made. When you see it, just click
again, and the wire should be drawn. Make sure to leave ample space in between
your components, as one wire cannot be looped over another wire. Now, connect
the rest of your schematic, except for the op-amp power supplies and offset. If
you need to move a part, click on the part itself, and it should select the part.
Like, to select a capacitor, click on the two plates. Then, it should move around
when you move the mouse.
9) The power supplies for the op-amp are still not connected. To do so, first you will
need to create a wire that goes from the positive end of the voltage source, with
the other end of the wire unconnected. Do this for both sources. We are about to
make a virtual connection called a net alias. On the right hand side, there is a
button that looks like this . When you click on it, a menu pops up. Under the
alias field type “VCC” and click OK. When you do that, you will see a little
rectangle for the cursor. Move the rectangle to wire above your power supply.
When one side of the rectangle is placed directly on top of the wire, the wire
should change color. When this happens, click the mouse, and VCC should
appear above the wire. The alias for this wire is now VCC, and any other wire
that you give the alias VCC is connected to this. We need to power the op-amp,
so we will need to alias its positive power supply to VCC. First, draw an
unconnected wire from the positive supply. Then click on the net alias button
again, and make sure “VCC” is in the alias field in the pop up window. Now, just
like you did with the power supply, place the rectangle above the unconnected
wire until the color changes, and click. VCC will appear above the wire, and the
connection will be made. In the above circuit, there are two more aliases, VDD
and GND. VDD is the negative power supply, and GND is just an alias for
ground. Alias both of these just like in the schematic above.
10) The final thing to do before simulation is to give the parts names and values. All
of your resistors should have the name “R?” right now. Let’s change the name of
the load resistor. To change the name, double click on text “R?”. A menu should
come up, with a field that has the text R?. You can now edit this text. Change the
name to RL and click OK. Now, go and rename all of the other resistors.
Renaming the capacitor is just as easy. Double click on “C?” and change it to C.
The op-amp also needs a name. Double click on “U?” and change it to “U1”.
Finally, give all of the voltage sources names. Give the input voltage the name
“Vs”, and give the power supply voltages names. You can call the one supply
VCC and the other VDD. It doesn’t matter if the names are the same as the net
aliases. It is important that every part in the schematic have a name, otherwise
you will not be able to simulate it. Now, to change the values. Changing the
values works exactly like changing the name. Just double click on the value, and
enter the new one. So, to change the value of the load resistor, RL, from its
default 1K to 10K, just double click on the “1K” text to bring up the menu. Then,
just enter the text, “10K” in the value field, and click OK. The value of the load
should now change to 10K. Change the values of the other resistors. Change the
value of the capacitor from “1n” to “15n”. Change the positive voltage supply
from “0Vdc” to “15Vdc”, and the negative supply to “-15Vdc”. Now, to set up
the voltage source. Notice how it has 7 different fields. Double click on V1, and
change the value in the dialog box to 0. This is the initial value of the pulse.
Change V2 to 1, this is the value where the pulse ends up. Change TD to 0. TD
is the delay time of the pulse. We don’t want a delay, so we leave it 0. Next, TR
is the rise time of the pulse. Change this to “0.5ms – 1ns”. Do NOT put a space
in between the minus sign and the numbers, for some reason this causes errors.
This says that it takes the pulse one half of a millisecond minus 1 nanosecond to
rise. Change TF, the fall time, to the same “0.5 ms – 1ns”. PW is the pulse
width. We only want our pulse to be 1ns wide, so change PW to 1ns. Finally,
PER is the period of the wave. Change PER value to “1ms”. What we have just
created is a triangle wave. The circuit is now complete, and we are ready for
PART III: Simulation
1) To do a simulation, we first need to set up the type of simulation we are doing.
Go to the PSpice>New Simulation Profile menu. It asks you to name your
simulation. Since we are doing a triangle wave, name it TRIANGLE, and click
Create. The simulation settings box pops up under the Analysis tab. Make sure
analysis type is “Time Domain (Transient)”. The next field of interest is the “Run
to time:” field. This value is how long your simulation runs. Since the period of
our waveform is 1ms, a value of 5ms seems reasonable, so change the value in the
field to 5m. This will encompass five periods of the input. The “Start saving data
after:” field says when the simulation will begin. Just leave it at 0. Finally, go
down to the “Maximum step size:” field. This tells the simulator how often to
calculate values. There are tradeoffs to entering values to this field. If you make
the step size too large, the data will have poor resolution, and it won’t be an
accurate simulation. If you make it too small, the simulation will take a long time
to run. A good tradeoff for this case is to make the step size about 1 microsecond.
This way, over the course of 5ms, the simulation will run for 5 thousand values.
This should be plenty, and it doesn’t take too long to run. So change the value in
the field to “1u”.
2) Click on the “Probe Window” tab. Make sure the “Display Probe Window” field
is checked, and that the “after simulation has completed” option is selected. Also,
make sure that under “Show”, the “All markers on open schematics” option is
selected. Click OK to close the Simulation Settings box.
3) The simulation is all set to run. But, we have not specified which voltages to
view. Under the PSpice menu, there is a Markers menu. Go down to it, and you
will see all sorts of markers to place. Select “Voltage Level” and you will now
have a marker to place on your schematic. This marker is like an oscilloscope
probe in real life. It will show you the voltage on whichever wire you place it.
Place this one on the wire coming from Vs. Place another marker on the output
wire, just above the load resistor.
4) To run the simulation, just click the button below the part field in the toolbar.
If all your components have names, and everything is connected correctly, the
simulation will pop up the PSpice A/D window. If there are errors, it will tell
you. When the window pops up, PSpice will also check for errors in the design.
If there are none, it will run. You can see a progress indicator in the lower right
5) When it is done running, it will display graphs. One of the graphs will be your
input, and the other will be your output. They should look like this:
The triangle wave is your input, and the rounded, sinusoidal wave is your output.
So, is it integrating? Well, the integral of a line is a parabola. If you look at the
first 0.5 ms, the input is a line, while the output is a negative parabola. This
makes sense, since the op-amp is an inverting integrator. During the next half
period, when the input is a negative line, the output is a positive parabola. So, the
circuit is integrating.
6) You can do certain kinds of things with the trace. You can put a cursor on the
trace, and it will tell you what voltage is present at what time. Go to the
Trace>Cursor>Display menu. A cursor will appear on the graph. You can move
it around, and it displays the voltage. Print a copy of this out by clicking on the
7) If you go back to the schematic window, you will see the DC voltages tagged at
each node in the circuit. Now print out a copy of your original schematic. We are
done with transient analysis. Let’s move on to frequency analysis.
PART IV: Frequency Simulation
1) Change the schematic so that it becomes just a simple inverting op-amp. Get rid
of the capacitor, and connect the non-inverting(+) input of the op-amp to ground.
Place a marker on the output only. Select the PULSE source, and delete it. Add
an AC source by typing “VAC” into the part field. Just leave the value as 1V.
Don’t forget to rename it from “V?” to “Vs”, else the simulation won’t run. The
final circuit should look like this:
2) Now, go to PSpice>New Simulation Profile to create a new simulation profile.
Call this one ACSweep, and click Create. Under the “Analysis Type” change it
from “Time Domain” to “AC Sweep/Noise”. Notice how the options change.
Under “AC Sweep Type” select the “Logarithmic/Decade” option. Now, set the
start frequency to 1, the ending frequency to 1000000 (sorry, you can’t use 1M as
a shortcut), and the number of points per decade as 10. Everything else should
still be set up, so click OK to close the box.
3) Run the simulation. You should see a graph like this:
Notice how the gain is 10, and that you can see the gain start to trail off a little
after 10KHz. Let’s put the graph in dB to find the actual 3dB point.
4) To do so, get rid of all previous traces. Click on Trace>Delete All Traces to
remove the previous trace. Now, click on Trace>Add Trace. This will bring up a
pop up window. Under the “Trace Expression” field, type “DB(V(Rf:2))”. This
says to take the voltage on the second pin of the resistor Rf., and graph it using a
dB scale. When you are done, you will see what looks like the same trace, but the
scale on the Y-Axis will be different. Now, the max is 20 and the min is -10.
These are the voltage values in dB.
5) Let’s add a cursor. Move it to about 100Hz. Notice how the value says 100, 20.
This tells you at 100 Hz, the value in dB is 20. Now, move the cursor over until
the value changes from 20 to 17. This is the 3dB point. It should be around 81
6) Change the value of the gain. Go back to the schematic and change the value of
Rf to 2K. Keep the same simulation settings, and rerun the schematic. Delete the
previous trace, and add a new trace on a dB scale. Notice now how the value of
the mid-band gain is 6 dB, instead of 20dB. Now find the new 3dB point, which
will be where the value on the cursor changes from 6 to 3. This is now around
300 KHz. Just like in lab, when we reduced the gain, the 3dB frequency came
much later. Now we have a way of visualizing and simulating this before even
touching a breadboard.
That concludes the tutorial. I hope you learned how to create and simulate circuits using
Cadence. If you have extra time, you can go down to lab, build the integrator, and
compare the results in lab with what you simulated in PSpice. I’ll bet they are almost the