Circuit Simulation With Spice

Download as pdf or txt
Download as pdf or txt
You are on page 1of 6

ES154 Lab #4

Yang Fall 2007

ES154 Lab #4
Circuit Simulations with Spice

Objective
To learn how to use PSpice and Capture to run DC, AC, and transient simulations on
analog circuits

Deliverables
Typed lab report due in class on December 4th. Please answer all questions.

Introduction
Computer Simulations of electronic circuits have become a typical and necessary part of
the design process. Both for integrated circuits as well as circuits constructed from
discrete components, time, money, and performance may be gained by simulating a
circuit before constructing it.

Computer simulations allow users to test a circuit with more advanced models of circuit
elements (e.g. op-amp models have input voltage offsets) to test to see if circuits actually
meet specifications with some non-idealities taken into account. Simulations may also
serve to give a designer insight into the intricacies of how a circuit works and may reveal
trade-off relationships that were not noticed before, which can allow for changes in
design before fabrication. However, circuit simulations cannot substitute an engineer
with a thorough understanding of circuit analysis. Paper calculations and analysis are still
necessary in the design process, simulations can only serve to test the ideas and the
choices of components that come from paper and pencil ideas early in the design process.

The simulation program that we will use is called SPICE (Simulation Program with
Integrated Circuit Emphasis). SPICE is an open source program that was developed in
the 1970s. PSpice is a commercial product made by ORCAD that is SPICE packaged
with a graphical-user-interface circuit design program and is what we will use in this
course.
ES154 Lab #4
Yang Fall 2007

Designing and Simulating Simple Circuits in ORCAD


Getting Started with ORCAD:

1. Open Orcad Capture – Lite Edition on your Computer.


2. Click File>>New>>Project.
3. Name your project and choose to use Analog or Mixed A/D.
4. Enter the location of the folder where the schematics and simulation results will
be saved. (Make this folder under ES154-student-file-save directory.)
5. Choose to “Create a blank project.”

Putting Together a Simple Circuit

1. Click Place>>Part
2. Add the libraries of parts that we will be using. (C:\Program Files\OrcadLite\
Capture\Library\PSpice\analog, source, and eval)

Now, add a resistor(R, analog), a Capacitor(C, analog), and a sinusoidal voltage


source (VSIN, source) to your schematic.

To wire the circuit together, click Place>>Wire and to lay a wire simply point from
one node to the next and the “Esc” button to end the wire.

To define ground, click Place>>Ground and add GND/CAPSYM. Double Click on


the ground and change its name to ‘0”.

Create the simple circuit shown below:

R1

0V 0V
1k
V
C1
VOFF = 0
VAMPL = 1 1n
FREQ = 1e3
0V

You can change the property of components by double clicking them.

Calculate the transfer function of the circuit, sketch the Bode Plot, and note the f3db
point.
ES154 Lab #4
Yang Fall 2007
Transient Analysis

First, we will perform Time Domain (Transient Analysis). Set the time domain such
that it is appropriate for the frequency of your input signal.

Open PSpice AD Lite Edition.

Back in Orcad Capture:

1. Start a new simulation profile. Click PSpice>>New Simulation Profile.


2. Enter the name for the simulation. (for example: tran)
3. Choose Time Domain (Transient) for Analysis type. And enter simulation run
time.
4. Place a “Marker” on the node between the Capacitor and the resistor. Click
PSpice>>Markers>>Voltage Level.
5. Click PSpice>>Run to run the simulation.
Inspect your results in PSpice AD Lite Edition.

Run the simulation at different frequencies and with different DC offsets and note the
response.

AC Response

Replace VSIN with a VAC source. VAC is a source that is used to measure the
response of a circuit at a range of frequencies.

R1

0V 0V
1k
V

V3 C1
1Vac
1n
0Vdc

0V

Start a new simulation profile. Click PSpice>>New Simulation Profile.


In the simulation profile window, select AC Sweep/Noise.

Set the range of frequencies such that it covers several decades above and below the
f3db point.

Inspect the results of the simulation and comment.

Now, add a diode (d, eval) to the circuit such that the new circuit has the
configuration shown below:
ES154 Lab #4
Yang Fall 2007
D1 R1

1k
V

V1
1Vac C1
0Vdc 1n

Perform transient and AC analysis on this circuit and comment on both.

In case you get errors like:

Unable to open index file C:\Program Files\OrcadLite\Capture\Library\PSpice\


nom.ind
Unable to make index for library file C:\Program Files\OrcadLite\Capture\Library\
PSpice\nom.lib

1. Copy C:\Program Files\OrcadLite\Capture\Library\PSpice\nom.lib to your local


working directory.
2. Click Pspice>>Edit Simulation Profile>>Libraries.
3. Delete existing nom.lib* file and add the nom.lib file under your local working
directory. (use Add to Design button to add the library)
4. Click OK.
ES154 Lab #4
Yang Fall 2007

Biasing and the Small Signal Model of a Common Source Amplifier


Open the Orcad file in the Sedra/Smith Folder marked Chapter 4. We will analyze
the circuit that appears in your text book on page 357.

Common Source Amplifier

P ARAM E T ERS:

CCI = 10u
CCO = 10u
CS = 10u

RD = 4.2K
RG1 = 2E6
RG2 = 1.3E6
RL = 50K
RS = 630 VDD VDD
Rsig = 10K

W = 22u
L = 0.6u {RG1} {RD}

VDD = 3.3
{CCO}
OUT

{Rsig} {CCI} {RL}


IN W = {W}
VDD L = {L}

0
1Vac
0Vdc
DC = {VDD} {RG2} {RS}
{CS}

0 0 0 0 0

1. Before we begin our simulations, by hand determine if the circuit above is in


Saturation mode or Triode Mode. Determine the value of the drain current. And
draw the small signal model.

2. Set the value of RD such that the gain of the circuit is 6V/V

3. The circuit has been previously constructed for you and is under ES154-student-
file-save\spice circuits\CHAPTER4 folder. Copy this folder under your working
directory and run the simulation under your working directory.

4. Use PSpice to extract the DC voltages and currents through each node and branch
of the circuit. Compare the values to those you calculated by hand. Check to
make sure that the circuit is in saturation mode. (If you get the same errors as
before, try to follow the same procedure with sedra.lib file.)

5. Perform AC analysis on the circuit and plot the results such that it represents the
Bode Plot of the amplifier. What is the mid-band gain of the circuit?
ES154 Lab #4
Yang Fall 2007
6. What causes the flattening of the gain in the mid-band?

7. Repeat the measurement of the Bode Plot of the amplifier for several different
values of CS. Explain your results. What effect does CS have on the Bandwidth?
What effect does CS have on the Gain? Is there a relationship between the
bandwidth and the gain?

Designing and testing your own Amplifier


This part of the lab you will do individually and at home on your PC with ORCAD.
Your text books came with a free version; if you need a version or a PC to use for this
assignment please see me.

The problem:

Implement an amplifier using the standard Common Source configuration (see fig. 4.49a
in the text). Let RD=15kΩ, ro=150kΩ, and RL=10kΩ.

1. By hand, find C2 that will ensure that the associated break frequency is at, or
below, 10Hz.
2. With the C2 that you calculated, show that your circuit has a break frequency that
is in fact at or below 10Hz using AC analysis in PSpice.
3. The goal now is to maximize the amount of power being delivered to RL, while
keeping the break frequency at, or below 10Hz. Try reducing RD and ro by a
factor of 2,3,4, etc.. Report and show the change in the corner frequency and the
amount of power being delivered to RL.

You might also like