Computer Modeling of Electronic Circuits with LT SPICE PHYS3360/AEP3630 Lecture 20/21 1.

Slides:



Advertisements
Similar presentations
Analog Basics Workshop Getting started with Tina-TI
Advertisements

1 1 Mechanical Design and Production Dept, Faculty of Engineering, Zagazig University, Egypt. Mechanical Design and Production Dept, Faculty of Engineering,
Sweeping a Variable Resistor Wheatstone Bridge. Place the Parts 1.VDC 2.R, which you place 3 times. The numbering of the resistor increases sequentially.
EEL102 Introduction to SPICE. Spice – Introduction Spice is a short form of : Simulated Program with Integrated Circuit Emphasis Used for circuit analysis.
Getting Started with Cadence Compiled by Ryan Johnson April 24, 2002  Open Orcad Capture under Engineering Software  Under FILE, choose NEW, PROJECT.
PSPICE Tutorial Spring 2015
PSpice Tutorial October 13, 2004 Franklin Chiang.
PSPICE Tutorial. Introduction SPICE (Simulation Program for Integrated Circuits Emphasis) is a general purpose analog circuit simulator that is used to.
Introduction to SPICE. History  SPICE stands for Simulation Program with Integrated Circuit Emphasis  In 1960 ECAP was developed by a team of IBM programmers.
INTRODUCTION Spice Excel. SPICE Simulation Program with Integrated Circuit Emphasis.
Introduction to PSpice Simulation Software. The Origins of SPICE In the 1960’s, simulation software begins –CANCER Computer Analysis of Nonlinear Circuits,
EMT 251 SPICE NETLIST. Introduction SPICE (Simulation with Integrated Circuits Emphasis) SPICE (Simulation with Integrated Circuits Emphasis) General.
Black Box Electronics An Introduction to Applied Electronics for Physicists 5. Pushing the Limits With Spice University of Toronto Quantum Optics Group.
VLSI Layout using Microwind
Experiment 11: An Inverting Amplifier
PCB design with Design Entry CIS and Layout Plus
Automating Tasks With Macros
Introduction to PSpice R. E. Abdel-Aal February 2005.
EE 2303 Week 2 EE 2303 Week 2. Overview Kirchoff’s Current Law (KCL) Kirchoff’s Voltage Law (KVL) Introduction to P-spice.
LSU 06/04/2007Electronics 81 CAD Tools for Circuit Design Electronics Unit – Lecture 8 Schematic Diagram Drawing Etched Circuit Board Layout Circuit Simulation.
DEMONSTRATION FOR SIGMA DATA ACQUISITION MODULES Tempatron Ltd Data Measurements Division Darwin Close Reading RG2 0TB UK T : +44 (0) F :
Good afternoon. My name is Jeferson Correa. I am a Ph. D
Experiment 17 A Differentiator Circuit
The George Washington University School of Engineering and Applied Science Department of Electrical and Computer Engineering Circuit Design Verification.
Abdülkadir ERYILDIRIM Turgut Ozal University. The Objectives:  Open and Save New Project File  Create a Circuit Schematic  Get Place, Place Parts i.e.
EAGLE Schematic Module PCB Layout Editor Autorouter Module.
Word Processing ADE100- Computer Literacy Lecture 12.
Basic Pspice Instructions Stuart Tewksbury
CIRCUIT ANALYSIS USING NGSPICE
Moodle (Course Management Systems). Assignments 1 Assignments are a refreshingly simple method for collecting student work. They are a simple and flexible.
Mentor Tools tutorial Bold Browser Design Manager Design Architect Library Components Quicksim Creating and Compiling the VHDL Model.
Basics of creating a Virtual Patient Centre for Medical & Healthcare Education eLearning Unit Steven Malikowski & Chara Balasubramaniam Press the F5 Key.
ECE122 – Digital Electronics & Design
EENG 2920: Circuit Design and Analysis Using PSpice Class 3: DC and Transient Analysis Oluwayomi Adamo Department of Electrical Engineering College of.
Lecture on PSpice. Introduction to SPICE  SPICE was originally developed at the University of California, Berkeley (1975).  Simulation Program for Integrated.
ELECTRIC CIRCUITS ECSE-2010 Spring 2003 Class 3. ASSIGNMENTS DUE Today (Thursday): Will introduce PSpice Activity 3-1 (In Class) using PSpice Will do.
The George Washington University School of Engineering and Applied Science Department of Electrical and Computer Engineering ECE122 – 30 Lab 3: Layout.
PSPICE – Windows Version
Week 1: Preparing for PSpice Simulations.  Week 1 is composed of two experiments from the lab manual ◦ Experiment 1: Breadboard Basics ◦ Experiment 3:
Introduction to Matlab Module #9 Page 1 Introduction to Matlab Module #9 – Simulink Topics 1.Simulink Textbook Reading Assignments Practice Problems.
Lab 4 Experiments 8 and 9. Same Circuit: Experiment 8 and 9.
1 Parametric analysis Overview This course describes how to set up parametric and temperature analyses. Parametric and temperature are both simple multi-run.
Introduction to PSpice
Modeling of Power Converters using Matlab and Simulink
Experiment 10: Inverting Amplifier With Modifications that Require the Use of the Velleman Oscilloscope.
Digital Logic Circuits (Part 1) Computer Architecture (Fall 2006)
Microwave Office 2005 Training Linear Simulation – Low Noise Amplifier
Microsoft Office 2008 for Mac – Illustrated Unit D: Getting Started with Safari.
IE 411/511: Visual Programming for Industrial Applications Lecture Notes #2 Introduction to the Visual Basic Express 2010 Integrated Development Environment.
ECE122 – Digital Electronics & Design Tanner Tools Tutorial Ritu Bajpai September 4, 2008.
Week 4: Experiment 24 Using Nodal or Mesh Analysis to Solve AC Circuits with an addition of Equivalent Impedance.
LT-Spice - IUCEE – Components Updated March 8, 2016 Copyright LTspiceman.
Chapter 10 Using Macros, Controls and Visual Basic for Applications (VBA) with Excel Microsoft Excel 2013.
Lab 1 LTspice Intro EC538 Selected Topics in Electronics 1 Eng. Nihal Tawfik.
Copyright © 2007 by Pearson Education 1 UNIT 6A COMBINATIONAL CIRCUIT DESIGN WITH VHDL by Gregory L. Moss Click hyperlink below to select: Tutorial for.
Introduction to LabVIEW. Overview Objectives Background Materials Procedure Report/Presentation Closing.
Created by Tim Green, Art Kay Presented by Peggy Liska
Introduction to LTspice IV
EMT 251 SPICE NETLIST.
Introduction to PSPICE
PSPICE Quickstart Revision 0
ORCAD PSPICE.
INTRODUCTION Spice Excel.
Introduction to PSpice
INTRODUCTION Spice.
Introduction to PSpice
Spice Seminar Simulation Program with Integrated Circuit Emphasis.
Introduction to PSpice
Presentation transcript:

Computer Modeling of Electronic Circuits with LT SPICE PHYS3360/AEP3630 Lecture 20/21 1

SPICE Simulation Program with Integrated Circuit Emphasis Originally developed at EE Berkeley Uses mathematical models to describe circuit elements SPICE3 is the latest variant. - It allows DC and time transient analysis of nonlinear circuits (transistors, diodes, capacitors, etc., also digital circuitry) - Command line driven interface - Available in public domain (written in C) - Has become de-facto the industry standard - Many spin-offs exist (use modified SPICE2 or SPICE3 as their engine), such as HSPICE, PSPICE, WinSPICE (commercial) 2

Netlist SPICE Netlist – text file containing circuit description INPUT OUTPUT 3

Netlist (closer look) * Demo of a simple AC circ. v1 1 0 ac 12 sin ; v1 is an AC source of 12V amp. r ; r1 is 30 Ohm between nodes 1 and 2 c u ; c1 is 100uF between nodes 2 and 0.ac lin ; directive to perform AC analysis.print ac v(2) ; print out the voltage from node 2.end ; anything after.end will be ignored Commands starting with dot (.ac,.end, etc.) are known as SPICE directives Circuit description SPICE directives 4

LTspice IV A freeware circuit simulator (Windows or *nix/Wine) Mac users: install Netlist syntax is powerful but hard to visualize LTspice has schematic capture and is much easier to use than traditional text-based SPICE. The user can enter a circuit to be simulated via a graphical user interface Has virtual scope, makes Bode plots, performs FFT, etc. Worth learning about – It is fast, expandable, powerful, and free – Most widely used noncommercial CAD electronics software 5

Download LTspice 6

To begin drawing the circuit, click New Schematic, or Ctrl+N Enable grid if not shown by clicking Ctrl+G 7

wire ground (required) “Component” To add a component, click on the corresponding icon Component button contains slew of predefined components: voltage and current sources; transistors; opamps; gates; user-defined stuff You can Delete (F5 or Ctrl-X) and Move (F7) components, as well as Drag (F8) them (keep the wires connected) 8

To rotate the component prior to placing press Ctrl-R To mirror the component prior to placing press Ctrl-E 9

Place Circuit Element Draw Wire Place Ground Label Node Place Resistor Place Capacitor Place Inductor Place Diode Move Drag Undo Redo Rotate Mirror Place Comment Place SPICE Directive Zoom In Pan Zoom Out Auto Scale Delete Copy Paste Find Simulate Toolbar Summary 10

Prefixes are case insensitive: T = t, G = g, and so on T = terra = G = giga = 10 9 MEG = meg = 10 6 K = kilo = 10 3 M = milli = U = micro = N = nano = P = pico = F = femto = No need to enter units, they are assumed (e.g. “1M” is 1mV if entered for voltage, 1ms if entered for time, etc.) 11

Right-click to enter component value 12

“Draw” your circuit, then specify all of the components, then select Simulate  Edit Simulation Cmd Your choices: Transient analysis AC small signal anlysis DC sweep Noise analysis DC transfer function DC operating point (Q-pt) Highlighted is what you will be using in this course SPICE analysis 13

After setting up the simulation command, you are set to go. Simply click Run button Run command is a SPICE directive itself You can add other SPICE commands directly by clicking on Spice Directive button Refer to HELP for details on the syntax Adding SPICE directives 14

Your home assignment for this week includes working your way through Supplement Part 1 (a tutorial) then working home problems using LTspice. Install LTspice on your own computer. LTspice is installed on all lab computers and in A&EP computer room Supplement Part 2 contains LTspice experiments. They will start after the break and are to be done in the same way as the usual lab experiments, but using LTspice. Print out results using the lab printers, attach them to your lab report, etc. You can do LTspice experiments anywhere you have access to LTspice, not just in the lab SPICE use in this course 15

We will look at how to setup two examples –Example1: crossover corrected push-pull amp (ex6.10) –Example2: active filter Any additional files not included with LTspice but required for this course are found under Spice models on the Blackboard. Two examples 16

First, create the circuit (you may want to use Ctrl-E, Ctrl-R to mirror and rotate the symbols for best orientation) 17 Next, specify component values for resistors, DC voltages by right-clicking on the elements (be careful, sometimes you may click on the name thinking you are changing the value). First example demonstrates transient analysis

Assigning Vin Right-click on Vin, then click Advanced. You will see a window like this. Choose SINE Function. Enter: DC offset[V] : 0 Amplitudep[V]: 0.05 Freq[Hz]: 100 Tdelay[s]: 20m 18

Assigning Diodes and Transistors If you do not assign diode and transistors, LTspice will use some default models. It may be OK for a simple circuit like the one we are looking at. Real-life situations require more accurate model specific to the actual component being used. E.g. to assign a specific diode model, right-click on it, then click “Pick New Diode” and choose IN

Assigning Transistors and opamp Similarly, assign the transistors to be 2N3904 and 2N3906 Note: you will find some familiar components missing (e.g. LM741 op-amp); you have to add them to LTspice All major manufacturers will have SPICE model files online 20

How to add LM741 Google for LM741, you will get to the manufacturer’s web-site with link to Model file LM741.MOD Download it, it is an ASCII file in SPICE format: it comes from National Semiconductor component model describes frequency response, input and output impedance, etc. can be a subcircuit that includes other elements 21

How to add LM741 Place this file where LTspice will look for it, preferably in the local directory (where you circuit file is saved) Add generic opamp ( opamp2 ) to your circuit Right-click on the symbol to invoke Component Attribute Editor Enter Value = LM741/NS (must match the first line in LM741.MOD file, which is not a comment, i.e. not preceded by *, something like.SUBCKT LM741/NS …) Add SPICE directive 22

Time Transient Analysis Choose Simulate  Edit Simulation Cmd Indicate Stop Time of 0.1 s Click OK and place SPICE directive somewhere on your circuit Ready to go! 23

Looking at the result LTspice has nice tools to look at the waveforms, voltages or currents, FFT (Fourier Analysis), gain amplitude and phase (in AC analysis) You can open multiple panes, plot signals versus time or signal versus another signal You can zoom in, zoom out, also activate scope-like cursor(s) for more accurate measurements on waveforms By default the mouse cursor transforms into voltage probe, however, when hovering over a component (or pressing Alt over wire), it transforms into current probe Pressing Alt over an element will report instantaneous power drawn by the element (thermometer icon) 24

Second example will demonstrate AC analysis Use ideal opamp from the list of components Must include with this opamp! 25

Assigning Vin Right-click on Vin, then click Advanced. Use Small signal AC analysis section. AC amplitude 1 volt 26

AC Analysis Choose Simulate  Edit Simulation Cmd On AC analysis tab specify type of sweep (decade), number of points per decade, initial and final frequencies Click OK, plant SPICE directive somewhere Ready to go! 27

Click on Vout to display Bode plot 28

Few gotchas “M” and “m” are interpreted the same by SPICE. Thus, a resistor value of 10 M is the same as 10 m (ten milliohms) –Use 10 MEG (or 10E6) to specify ten megohms Do not enter “1F” or “1f” as the capacitance for a one- farad capacitor (enter “1”). “F” and “f” designate the prefix femto ( ) When simulating astable circuits (multivibrator), specify some small nonzero initial voltage in the positive feedback to seed the oscillations Initial conditions SPICE directive 29

Additional resources LTspice Supplement (read Part 1 Tutorial this week) Documentation and examples installed with LTspice Our PHYS3360 mailing group Yahoo! LTspice group (great resource, kept active by many thousands of users) 30