introduction to spice - ugrtejada/componentes/ftp/tema03spice.pdf · introduction to spice...

Post on 28-Jun-2020

26 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

Introduction to SPICE

Simulator of Electronic devices

Main steps:

DownloadInstalationOpen OrCAD capture CIS LiteCreate a circuit. Place parts.Design a Simulation ProfileRun PSpice F11View simulation results F12

DownloadOrcad 16.5 Demo software

Capture & PSpice only

http://www.cadence.com/products/orcad/pages/downloads.aspx

You will receive an email with a link where you download a compressed file:

16.5_OrCAD_Lite_Capture&PSpice_Products.zip

Decompress and install.

Running PSpice the first time:

Cadence-> Orcad 16.5 Lite -> OrCADCapture CIS Lite

Project -> New

Analog or mixed A/D. Name………….

Create a blank project

Installation

Open PSpice

File options

Project (practica01.dsn):

-Pages (PAGE1, PAGE2,...)

-Simulation profiles (name01, name02,...)

A new page can be created. The pages inside the same schematics have the same simulation profile. If you edit this profile in one page it is automatically modified in the rest of pages.When you run spice, the results of all pages are represented together in the same figure if markers are placed in them.You can eliminate markers you do not want to see.You can create different simulation profiles and select them when you like

NEW PAGES

If you need to use and keep different simulation profiles in different circuits you would rather create a new schematics

Create schematic +mouse right button -e -> make root. If you do not make root you will see this message:

Edition options(Edit, Draw, View).Place->Part (or p) Adds a new element to the circuit Rotate Rotates a selected elementMirror Reflects the component as in a mirrorPlace->Wire (or w) Connects elements with wiresPlace->Text (or t) Adds text to the circuitZoom in/out (I/O) Zooms in/out

Creating a circuit.Place component: (Place -> Part) or (P)

Add library: (Alt+A) or click on this icon

Select all The libraries below do not work.Only those in “pspice” directory do.

Placing componentsMost common components: Place->Part (p)R, C, L Resistor, capacitor, inductorGround Use 0/CAPSYM symbol to place a dc ground.VDC/SOURCE DC source.VSRC General purpose voltage source (DC-AC-Pulse)Vsin Sine voltage source: amplitude (VAMPL), frequency

(FREQ) and offset (VOFF)Vpulse Square voltage source: minimum (V1), maximum

(V2), pulse width (PW), period (PER), fall time (TF), rise time (TR) y delay time (TD)

d1n4002 DiodeQ2n2222 Bipolar Transistor (npn)MbreakN, MbreakP Enhancement MOSFET n- (p-) channelua741 Operational amplifier 741

Markers:Mark Voltage/Level Mark Voltage Differential Mark Current into Pin Mark Power dissipation“V” icon: Enable bias voltage display

-Write name of part or select it from the list + enter

-Capacitor: C/ANALOG

Resistor: R/ANALOG

Inductor: L/ANALOG

Diode: Dbreak/BREAKOUT, PDIODE/EVALP

Bipolar Junction Transistor: Q2N…../EVAL, PBJN/EVALP

MOSFET: MBREAKN/BREAKOUT, MBREAKN/BREAKOUT

VDC/SOURCE VAC/SOURCE VEXP/SOURCE

VSRC/SOURCE VSIN/SOURCE VPULSE/SOURCE

• Voltage controlled voltage source : E• Current controlled voltage source: H• Voltage controlled current source : G• Current controlled current source: F

Dependent sources

Output of source depends on some other variable. There are four types depending on the controlling variable and output of the source.

SCALE FACTORS IN PSPICESYMBOL EXPONENT VALUEF (f) 1e-15 10-15

P (p) 1e-12 10-12

N (n) 1e-9 10-9

U (u) 1e-6 10-6

M (m) 1e-3 10-3

K (k) 1e3 103

MEG (meg) 1e6 106

G (g) 1e9 109

T (t) 1e12 1012

Important: Pspice DOES NOT DISTINGHISH between uppercase or lowercase letters.1M is always mili- (1E-3 = 1e-3), never mega- (1E6 = 1e6).

Design.

Simulation.

Results.

Simple circuits. Basic analysis.Bias point

It generates output file.

DC sweep

AC sweep

0 constant; 0; 0 open circuit

; short circuit

dVi Cdt

dVV idt

dV idt

ω

ω

=

→ ⇒ ≈ → →

→∞ ⇒ →∞ →∞

Time domain (transient)

Parametric analysis

Results

Schematics Trace → Add Trace (INSERT): Adds a new curve on the current figure: Vo,Vin, 20*log(Vo/Vin), dBPlot → Axis settings: Data range (auto/user defined), axis scale (linear/log)Plot → Add Plot to window: representation of more than one figure in the same window.Plot → Delete Plot.Plot → Label → Text, Line, Poly-Line, Arrow, Box, Circle, Ellipse.View → Zoom, Output File, Toolbars, Alternate Display,…

Use of worksheet to represent results and to compare Spice, theory and lab results.Select curve in Schematics and Ctrl+C

Place Hierarchical Blocks

1.- Place -> Hierarchical Block. 2.- Fill: Reference…….Write a name you want.3.- Click, Primitive -> No (in order to modify it).4.- Implementation type -> Schematic view5.- Implementation name: write a name you want6.- Ok7.- Mark a rectangle with the mouse on the screen.8.- Place Hierarchical pin. Name (“in” or “out”), Type (”input” or “output”)9.- To copy Hierarchical Blocks you must copy the block and the contents separatedly. Is is preferable to create a part in a new library

Creating a part in a library.1.- In project window, click on project name.2.- Clik: Tools -> Generate Part.Netlist/source file: name of the project we are working onNetlist/source file type: Capture Schematic/DesignPart name: give a name for the part. Ex.: DiodePrimitive: NoDestination part library: /COMPONENTES.olbSource Schematic name: Schematic name that includes the hierarchical blockCreate New Part: It must be active3. Ok.- Accept Pin confirmation window: Ok->save-The library and part are generated and loaded in the “output” file. -Opcional: the icon of the design can be changed by drawing new lines or inserting text. Click right button in your mouse -> Edit part.-The part of this library can be placed in a circuit as usual: Place->part or write simply “p”.

top related