0% found this document useful (0 votes)
42 views

Lab1 - Pspce Tutorial and CS Amplifier

This document provides instructions for using PSpice simulation software to analyze electronic circuits. It discusses how to open PSpice, draw circuit schematics, add components, connect components with wires, add voltage and current probes, set up DC and transient analyses, and measure results. Types of analysis covered include DC sweeps, bias point details, and transients using voltage sources like VDC, VAC, VSIN, and VPULSE. The document aims to equip readers with the basic skills for using PSpice's schematic capture and simulation capabilities.

Uploaded by

Adnan Hossain
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
42 views

Lab1 - Pspce Tutorial and CS Amplifier

This document provides instructions for using PSpice simulation software to analyze electronic circuits. It discusses how to open PSpice, draw circuit schematics, add components, connect components with wires, add voltage and current probes, set up DC and transient analyses, and measure results. Types of analysis covered include DC sweeps, bias point details, and transients using voltage sources like VDC, VAC, VSIN, and VPULSE. The document aims to equip readers with the basic skills for using PSpice's schematic capture and simulation capabilities.

Uploaded by

Adnan Hossain
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 15

EEE 202 LAB

ELECTRONIC CIRCUIT II LAB


PSPICE AND CS AMPLIFIER

Dr. Mohammad Mojammel Al Hakim


PSPICE Tutorial

I. Opening PSpice
II. Drawing the circuit
A. Getting the Parts
B. Placing the Parts
C. Connecting the Circuit
D. Changing the Name of the Part
E. Changing the Value of the Part
F. Making Sure You Have a GND
G. Voltage and Current Bubbles
III. Probe
A. Before you do the Probe
B. To Start the Probe
C. Graphing
D. Adding/Deleting Traces
E. Finding Points
IV. Analysis Menu
A. DC Sweep
B. Bias Point Detail
C. Transient
V. Voltage Sources
A. VDC
B. VAC
C. VSIN
D. VPULSE
VI. Measuring DC Analysis
VII. Exercise
I. Opening PSpice
Find PSpice on the C-Drive. Open Schematics or you can go to PSpice A_D and then
click on the schematic icon .
You will see the window as shown in Figure 1.

Figure 1

II. Drawing the circuit


A. Getting the Parts:
The first thing that you have to do is get some or all of the parts you need.
This can be done by
o Clicking on the 'get new parts' button , or
o Pressing "Control+G", or
o Going to "Draw" and selecting "Get New Part..."
Once this box is open, select a part that you want in your circuit. This can be done by
typing in the name (part name) or scrolling down the list until you find it
Figure 2
An important prerequisite to building a schematic is the availability of the necessary
parts (in the form of symbols) for assembly. Schematics have an extensive symbol
libraries and a fully integrated symbol editor for creating your own symbols or
modifying existing symbols. For the labs you will be using the existing symbols.
Some common parts are:
o R - resistor
o C - capacitor
o L - inductor
o D - diode
o GND_ANALOG or GND_EARTH -- this is very important, you MUST have
a ground in your circuit
o VAC and VDC
o Q2N – bipolar transistor
o VSIN –Transient sine voltage source
Upon selecting your part (you will also see description of the part below part name
and you can see the symbol of that part when you click on advanced in the above
figure), click on the place button (you will see the part attached to the mouse pointer)
then click where you want it placed (somewhere on the white page with the blue
dots), if you need multiple instances of this part click again, once you have selected
that part right click your mouse the part will not be attached to the mouse pointer.
Don't worry about putting it in exactly the right place, it can always be moved later.
If you want to take a part and close then you just select the part and click on place&
close.
Once you have all the parts you think you need, close that box. You can always open
it again later if you need more or different parts. (The parts you have selected will be
listed on the menu bar for quick access)
B. Placing the Parts
You should have most of the parts that you need at this point.
Now, all you do is put them in the places that make the most sense (usually a
rectangle works well for simple circuits). Just select the part (It will become Red) and
drag it where you want it.
To rotate parts so that they will fit in you circuit nicely, click on the part and press
"Ctrl+R" (or Edit "Rotate"). To flip them, press "Ctrl+F" (or Edit "Flip").
If you have any parts left over, just select them and press "Delete".
C. Connecting the Circuit
Now that your parts are arranged well, you'll have to attach them with wires.
Go up to the tool bar and
o Select "Draw Wire" or
o "Ctrl+W" or
o Go to "Draw" and select "Wire".
With the pencil looking pointer, click on one end of a part, when you move your
mouse around, you should see dotted lines appear. Attach the other end of your wire
to the next part in the circuit.
Repeat this until your circuit is completely wired.
If you want to make a node (to make a wire go more than one place), click somewhere
on the wire and then click to the part (or the other wire). Or you can go from the part
to the wire.
To get rid of the pencil, right click.
If you end up with extra dots near your parts, you probably have an extra wire, select
this short wire (it will turn red), then press "Delete".
If the wire doesn't go the way you want (it doesn't look the way you want), you can
make extra bends in it by clicking in different places on the way (each click will form
a corner).
D. Changing the Name of the Part
You probably don't want to keep the names C1, C2 etc., especially if you didn't put
the parts in the most logical order. To change the name, double click on the present
name (C1, or R1 or whatever your part is), and then a box will pop up (Edit Reference
Designator) see Figure 3. In the top window, you can type in the name you want the
part to have.
Figure 3

Note that if you double click on the part or its value, a different box will appear.
E. Changing the Value of the Part
If you only want to change the value of the part (if you don't want all your resistors to
be 1K ohms), you can double click on the present value and a box called "Set
Attribute Value" will appear see Figure 4. Type in the new value and press OK. Use u
for micro as in uF = microFarad.

Figure 4

F. Making Sure You Have a GND


This is very important. You cannot do any simulation on the circuit if you don't have a
ground. If you aren't sure where to put it, place it near the negative side of your
voltage source.
G. Voltage and Current Bubbles
These are important if you want to measure the voltage at a point or the current going
through that point.
To add voltage or current bubbles, go to the right side of the top tool bar and select
"Voltage/Level Marker" (Ctrl+M) or "Current Marker" . To get either of
these, go to "Markers" and either "Voltage/Level Marker" or "Current Marker".
III. Voltage Sources
A. VDC
This is your basic direct current voltage source that simulates a simple battery and
allowsyoutospecifythevoltagevalue.
B. VAC
A few things to note about the alternating current source, first PSpice takes it to be a
sine source, so if you want to simulate a cosine wave you need to add (or subtract) a
90° phase shift. There are three values which PSpice will allow you to alter, these
being:
o ACMAG which is the RMS value of the voltage.
o DC which is the DC offset voltage.
o ACPHASE which is the phase angle of the voltage.
Note that the phase angle if left unspecified will be set by default to 0°.
C. VSIN
The SIN type of source is actually a damped sine with time delay, phase shift and a
DC offset (see Figure 7). If you want to run a transient analysis you need to use the
VSIN see how AC will effect your circuit over time. Do not use this type of source for
a phasor or frequency sweep analysis, VAC would be appropriate for that.

Figure 7

o DC the DC component of the sine wave.


o AC the AC value of the sine wave.
o VOFF is the DC offset value. It should be set to zero if you need a pure
sinusoid.
o Vamplitude is the undamped amplitude of the sinusoid; i.e., the peak value
measured from zero if there were no DC offset value.
o FREQ is the frequency in Hz of the sinusoid.
o TD is the time delay in seconds. Set this to zero for the normal sinusoid.
o DF is the damping factor. Also set this to zero for the normal sinusoid.
o PHASE is the phase advance in degrees. Set this to 90 if you need a cosine
wave form.
Note that the normal usage of this source type is to set VOFF, TD and DF to zero as
this will give you a 'nice' sine wave.
D. VPULSE
The VPULSE is often used for a transient simulation of a circuit where we want to
make it act like a square wave source. It should never be used in a frequency response
study because PSpice assumes it is in the time domain, and therefore your probe plot
will give you inaccurate results. Details of VPULSE are (see Figure 8):
o DC the DC component of the wave.
o AC the AC component of the wave.
o V1 is the value when the pulse is not "on." So for a square wave, the value
when the wave is 'low'. This can be zero or negative as required. For a pulsed
current source, the units would be "amps" instead of "volts."
o V2 is the value when the pulse is fully turned 'on'. This can also be zero or
negative. (Obviously, V1 and V2 should not be equal.) Again, the units would
be "amps" if this were a current pulse.
o TD is the time delay. The default units are seconds. The time delay may be
zero, but not negative.
o TR is the rise time of the pulse. PSpice allows this value to be zero, but zero
rise time may cause convergence problems in some transient analysis
simulations.Thedefaultunitsareseconds.
o TF is the fall time in seconds of the pulse.
o TW is the pulse width. This is the time in seconds that the pulse is fully on.
o PER is the period and is the total time in seconds of the pulse.
This is a very important source for us because we do a lot of work on with the square
wave on the wave generator to see how various components and circuits respond to it.

Figure 8

IV. Analysis Menu

Figure 9
To open the analysis menu click on the button.

A. DC Sweep
The DC sweep allows you to do various different sweeps of your circuit to see how it
responds to various conditions.
For all the possible sweeps,
o voltage,
o current,
o temperature, and
o parameter and global
You need to specify a start value, an end value, and the number of points you wish to
calculate.
For example you can sweep your circuit over a voltage range from 0 to 12 volts. The
main two sweeps that will be most important to us at this stage are the voltage sweep
and the current sweep. For these two, you need to indicate to PSpice what component
you wish to sweep, for example V1 or V2.
Another excellent feature of the DC sweep in PSpice, is the ability to do a nested
sweep.
A nested sweep allows you to run two simultaneous sweeps to see how changes in
two different DC sources will affect your circuit.
Once you've filled in the main sweep menu, click on the nested sweep button and
choose the second type of source to sweep and name it, also specifying the start and
end values. (Note: In some versions of PSpice you need to click on enable nested
sweep). Again you can choose Linear, Octave or Decade, but also you can indicate
your own list of values, example: 1V 10V 20V. DO NOT separate the values with
commas.

B. Bias Point Detail


This is a simple, but incredibly useful sweep. It will not launch Probe and so give you
nothing to plot. But by clicking on enable bias current display or enable bias
voltage display, this will indicate the voltage and current at certain points within the
circuit.
C. Transient
The transient analysis is probably the most important analysis you can run in PSpice, and
it computes various values of your circuit over time
Choose Analysis…Setup from the menu bar, or click on the Setup Analysis button
in the toolbar. The Analysis Setup dialog box opens.
Click on the Transient button in the Analysis Setup dialog box. The Transient dialog
box opens.
Two very important parameters in the transient analysis are (see Figure 10):
o Print step.
o Final time.

Figure 10

The ratio of final time: print step (Keep print step at least 1/100th of the final time)
determines how many calculations PSpice must make to plot a wave form. PSpice
always defaults the start time to zero seconds and going until it reaches the user
defined final time. It is incredibly important that you think about what print step you
should use before running the simulation, if you make the print step too small the
probe screen will be cluttered with unnecessary points making it hard to read, and
taking extreme amounts of time for PSpice to calculate. However, at the opposite side
of that coin is the problem that if you set the print step too high you might miss
important phenomenon that are occurring over very short periods of time in the
circuit. Therefore play with step time to see what works best for your circuit.
You can set a step ceiling which will limit the size of each interval, thus increasing
calculation speed. Another handy feature is the Fourier analysis, which allows you to
specify your fundamental frequency and the number of harmonics you wish to see on
the plot. PSpice defaults to the 9th harmonic unless you specify otherwise, but this
still will allow you to decompose a square wave to see it's components with sufficient
detail.
V. Probe
A. Before you do the Probe
You have to have your circuit properly drawn and saved.
There must not be any floating parts on your page (i.e. unattached devices).
You should make sure that all parts have the values that you want.
There are no extra wires.
It is very important that you have a ground on your circuit.
Make sure that you have done the Analysis Setup and that only the things you want
are enabled.
B. To Start the Probe:
Click on the Simulate button on the tool bar (or Analysis, Simulate, or F11).
It will check to make sure you don't have any errors. If you do have errors, correct
them.
Then a new window will pop up. Here is where you can do your graphs.
C. Graphing:
If you don't have any errors, you should get a window with a black background to pop
up.
If you did have errors, in the bottom, left hand side, it will say what your errors were
(these may be difficult to understand, so go To "View - Output File").
D. Adding/Deleting Traces:
PSpice will automatically put some traces in. You will probably want to change them.
Go to Trace - Add Trace or on the toolbar. Then select all the traces you want.
To delete traces, select them on the bottom of the graph and push Delete.
E. Finding Points:
There are Cursor buttons that allow you to find the maximum or minimum or just a
point on the line. These are located on the toolbar (to the right).
Select which curve you want to look at and then select "Toggle Cursor" .
Then you can find the max, min, the slope, or the relative max or min ( is find
relative max).
VI. Measuring DC Analysis
If you want to measure DC levels you can use two parts to view these levels. These
parts are placed on the schematic drawing the same way any other part is placed.
VIEWPOINT is a voltage viewing point, which will show the value after the circuit is
simulated. You place VIEWPOINT on a node. IPROBE is a current probe, which will
show the value after the circuit is simulated. You need to put this part between two
parts, so that current flowing in that branch can be measured. If you have
measurements that are time-varying (i.e. a sinusoid) then you need to run Probe.
VII. Exercise
Read Pspice Tutorial before you start this Session:
Parts to be used in the PSpice

Diode Characteristic: (TUTORIAL):


1. Click on Start Program MicroSim Eval 6.3 Schematic
2. Open the Draw menu by clicking once on the Draw menu. Choose Get New Part, and
then Browse.
3. Get part DC battery VDC from the source.slb library
4. Get part resistance R from the analog.slb library
5. Get part diode D1N4002 from the eval.slb library.
6. Get part earth ground AGND from the port.slb library.
7. To rotate the part first select it, then press Ctrl-R.
8. Draw and complete the diode circuit shown in Figure 1 in which R = 200mΩ. You can
click the left mouse on the device or element and choose Attributes from the Edit menu.
Alternatively, you can change the attributes of any devices or elements by double clicking
the left mouse and giving new values.
9. Analyze the circuit of Figure 1 by choosing Analysis from Schematic menu.
Click once on the Analysis menu and then choose Setup menu.
Choose the analysis type – DC Sweep and give the sweep information: sweep name –
VDD, start value – 0V, Sweep end value – 0.8V, and Sweep increment – 0.01.

Run the simulation by choosing Simulate from the Analysis menu.


After successful simulation, PSPICE will automatically run Probe and move to Probe
menu. Choose Add from the Trace menu of Probe and select the plot variable, the
diode current. e.g. I(D1).
Repeat the same procedure for reverse bias by selecting diode D1N750, changing the
polarity of the dc source, and changing the sweep values. Attach a copy of the probe
output and schematic with this output.
Experiment 1: The MOSFET Small Signal Amplifier

Objective:
To study the properties of the common source MOSFET amplifier. The voltage gain, input
and output resistance will be calculated.

Components required:
1. N-channel MOSFET – 2N4351 (1)
2. Resistors - 5.6 KΩ, 10 KΩ, 100 KΩ, 1MΩ
3. Capacitor - 22 F (2)

MOSFET pin Configuration

Prelab work (Hand calculation):


1. For the MOSFET CS amplifier circuit shown in Figure 1, assume Vt = 1.5V, K=0.5mA/V2 and
calculate the drain current ID, and all DC voltages (VD, VG, VS). Check for saturation mode
operation.
2. Draw the small signal equivalent circuit and drive expressions for the amplifier voltage gain,
input and output resistances.

Summary of theory:
The MOSFET structure has become the most important device structure in the electronics
industry. It dominates the integrated circuit technology in Very Large Scale Integrated (VLSI)
digital circuits based on n-channel MOSFETs and Complementary n-channel and pchannel
MOSFETs (CMOS). The technical importance of the MOSFET results from its low power
consumption, simple geometry, and small size, resulting in very high packing densities and
compatibility with VLSI manufacturing technology.

Two of the most popular configurations of small-signal MOSFET amplifiers are the common
source and common drain configurations. The common source circuit is shown in Figure 1. The
common source, like all MOSFET amplifiers, has the characteristic of high input impedance. High
input impedance is desirable to keep the amplifier from loading the signal source. This high input
impedance is controlled by the bias resistor RG (or bias resistors RG1 and RG2). Normally the
value of the bias resistor(s) is chosen as high as possible. However too big a value can cause a
significant voltage drop due to the gate leakage current. A large voltage drop is undesirable
because it can upset the bias point. For amplifier operation the MOSFET should be biased in the
saturated region of the characteristics.

The CS and CD MOSFET amplifiers can be compared to the CE and CC BJT amplifiers respectively.
Like the CE amplifier, the CS amplifier has a negative voltage gain and an output impedance
approximately equal to the drain resistor (collector resistor for the CE amplifier). The CD
amplifier is comparable to the CC amplifier with the characteristics of high input impedance, low
output impedance, and less than unity voltage gain.

PSPICE:
1. Verify all Prelab calculations using SPICE. Assume Vt = 1.5V, Kp = 0.05mA/V2, W = 30μm and
L = 3μm.

Note: To change Vt and Kp select the MOSFET (MbreaKN). This is done by singleclicking on the
transistor with the right mouse button. If it has been selected, it will turn red. Then, select
"Model" from the Edit Menu. The Edit Model dialog box will appear. This box states the name
of the part to be edited, along with three different methods to edit. We will select "Edit Model
Instance (Model Editor)", since we want to use the Model Editor. Click that button, and you
should get this error. This is just to inform us that if we change any of the parameters of the
MOSFET, the model will behave differently. This is exactly what we want, so click "Okay". You
should see the following:

2. Use SPICE TRAN analysis to find the maximum input voltage that can be amplified without
distortion. Vary the value of RD and notice the effect on the output. Can you find the optimum
value for RD that results in maximum symmetric output swing (clipping occurs on both sides).

Observation & Report

1. DC analysis: Design the MOSFET CS amplifier circuit shown in Figure 1 using PSPICE.
Record the transistor voltages (VD, VG, VS) and drain current (ID). Make sure your
transistor is biased in the saturation mode for amplifier application. Compare all DC
results to your prelab calculations.

2. AC analysis: Apply a sine wave (20mV, 10 KHz). Observe both input and output signals
and the phase shift between input/output. Record the output voltage and compute the
voltage gain.
3. Increase the input amplitude until you observe clipping in the output. Plot and label the
clipped output. What is the maximum input that can be amplified without distortion
(clipping)?
4. Connect a 100 KΩ resistor between the voltage source and the coupling capacitor C1.
Measure the voltage gain and use the results from step 2 to deduce the amplifier input
resistance Rin.
5. Remove the load resistor RL, and measure the voltage gain, then deduce the amplifier
output resistance Ro.

Report writing:
a) Standard cover page with lab title and student information.
b) Objective of the lab and brief discussion of the procedure.
c) Compare all theoretical calculations and SPICE simulation.
d) Analyze point by point findings of the observation & report section (1 to 5)

You might also like