Vous êtes sur la page 1sur 34

Electrical Network Analysis

Lab Course

Prepared By : Husan Ali 1


Grading Criteria

• Attendance 10%
• Lab Tasks 30%
• Mini Project 20%
• Lab Exam 20%
• Viva 20%

2
Lab No.01

Getting Familiar with PSpice and


simulation of Basic Circuits

3
Introduction to PSpice
• What is SPICE?

• SPICE is an acronym for Simulation Package with Integrated Circuit


Emphasis.
• A powerful general purpose circuit simulator that is used to verify
circuit designs and to predict the circuit behavior
• Originally developed at the Electronics Research Laboratory of the
University of California, Berkeley (1975)
• PSpice
-- A PC version of SPICE (Micro Sim Corp.)
• HSpice
-- A version that runs on workstations and larger computers

4
How to Use?
• In its original form you tell Spice what elements are in the circuit
(resistors, capacitors, etc.), and then enter the circuit diagram as an
ASCII file showing what nodes each element is connected to.
• Every node is assigned a number, and there is always a ground
node, which has Number 0.
• You then tell Spice what information you want -- bias conditions,
frequency response, and/or transient response.
• Spice does the circuit analysis and puts out an ASCII file with the
information.
• Using Spice is not very intuitive because the input is an ASCII file
rather than a circuit diagram, and the output is another ASCII file
rather than a graph.
• Several companies have developed graphical user interfaces for
Spice, which make it much easier to use.
• One of the most popular is PSpice.
Analysis Type
• Before performing any simulations that require graphical output,
you must first tell PSPICE how you want to display the results.

• DC Analysis
– It is used for circuits with time invariant sources.

• Transient Analysis
– It is used for circuits with time variant sources

• AC Analysis
– It is used for analysis of circuits with sources of variable frequency.
Units
• Units of time, seconds, milliseconds, microseconds,
nanoseconds, picoseconds are written with the
abbreviations s, ms, us, ns, ps, e.g. 10us.

• Units of resistance, k-ohms, meg-ohms, are written with


abbreviations k and meg, 10k and 10meg.
Components Available
• Independent and dependent voltage and current sources
• Resistors
• Capacitors
• Inductors
• Mutual inductors
• Transmission lines
• Operational amplifiers
• Switches
• Diodes
• Bipolar transistors
• MOS transistors
• JFET
• MESFET
• Digital gates
8
• For parts such as resistors, capacitors, and inductors, PSpice uses
the names commonly used in industry. For example resistors are R;
capacitors are C; and inductors are L. You can find these parts in
the parts library by typing R, C, or L in the Part Name box of the Get
New Part menu.

• Parts like transistors or op-amps must be specified exactly as the


actual parts are named. For example, you need to type 2N2222 in
the Part Name box for the transistor of that name, not 2222.
Similarly for the op-amp, you need to specify LM324. If you type
transistor in the Description Search box of the Get New Part menu,
you may get hundreds of results.
Sources
• Most circuits in PSpice require a source of some kind.
The most common sources used are Vdc, Idc, Vsin and Vpulse

• Note that the current source Idc shows the flow of direction of the
electrons, which is the opposite of current.
More sources
• There are other sources such as Vac and Iac, but we seldom
use them
• Vsin is preferred to Vac because different frequencies can be
set in Vsin
Example
Compute the voltages and current between every node when V
= 12V DC
Getting Started
• Open up the “PSpice Schematics” application
• Start >> All Programs >> PSpice Student >> Schemetic

13
Part Placement
• Click on Draw on the Menu Bar and then, click on the
• Get New Part option.
Independent dc Voltage Source
• In the open window, click on the space under Part Name and type
VDC. This is the independent voltage source .
• When the part shows up click on the Place tab.
Placing the dc Voltage Source
• Click anywhere on the schematic background to place the part and
then right click.
Voltage Value Setting
• Double click the DC source
• Click on DC=0V
• Type Value
• Click Save Attr Button
• Then, OK
Resistor Placement
• Go back to the Part Draw Basic window and in the space under Part
Name, type R.
• Place one resistor and move the cursor on the background and click
again. In this way you can place as many resistors as you need.
• Right click when done.
• Rotation of elements:
Select the element
CTRL+R turns the element
Resistance Value Setting
• Double click on each resistor and type in the specified value into
the space shown below.
• Click on Save Attr.
GND placement
• Following the same procedure,
type GND_EARTH and place the
part on the background.
• This for the common ground.
• Close the Part window.
• GND_EARTH must be connected to
a circuit; otherwise, error would
occur.
Placement of all the Parts
• Place the parts in such a way that would ease the connection of the
wires.
Wiring the Parts
• Click on Draw on the Menu Bar and on the
drop down menu click on wire.( CTRL + W is
the shortcut)
Wiring
• First click on the
terminals/edges of the circuit
component.
• Then release the mouse button.
• Draw until you get to the edge
of the next component it
should be connected to.
• Then Click Mouse Button to
finish.
Circuit Completed

• Save your schematic


Result!
Graphical Display of the Result
• Menu Bar
--Analysis
--Setup
Analysis Setup Dialog Window
• Analysis Setup Window
• ‘Check’ DC Sweep Bar

• Click DC SWEEP Window


• Voltage Source
• Name : V1
• Sweep Type >> Linear
• Start Value -- 0
• End Value -- 120
• Increment -- 10
Measurement Probes
• Voltage Probe
• Current Probe
Circuit Simulation – Analysis
• Click on Analysis and then Simulate(F11 is the
shortcut), to simulate the circuit.
Common error
• If your circuit looks like this:

you made a common error. You mistakenly shorted out resistance


R1. That is why you see the big dots on either side of the resistance
and the wire running through it. (shown here in red).
• Rectify it by deleting the wire running through the resistance.
Practice Problem
• Independent dc Current Source
• 5 Resistors
• Build the following circuit and Simulate it.
Lab Task
• Explain step wise how to draw and simulate a
circuit in PSpice.
• Consider the following circuit. Analyze the
circuit using techniques learnt in class. Find
the current through and voltage across R6
Show all your work. Write neatly and legibly
contd…
• Build and simulate the circuit shown on the
previous slide.
• Does PSpice give you the same answers that
you calculated?

Vous aimerez peut-être aussi