Survey
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Immunity-aware programming wikipedia , lookup
Voltage optimisation wikipedia , lookup
Alternating current wikipedia , lookup
Resistive opto-isolator wikipedia , lookup
Current source wikipedia , lookup
Mains electricity wikipedia , lookup
Schmitt trigger wikipedia , lookup
Buck converter wikipedia , lookup
Switched-mode power supply wikipedia , lookup
Power MOSFET wikipedia , lookup
PSpice tutorial Discusses Text-Based PSPICE ENTRY Note: I ran this tutorial using the PSPICE 9.1 STUDENT VERSION downloaded from http://www.cadencepcb.com/products/downloads/PSpicestudent/ It would be a good idea to also download the documentation .PDF file. This tutorial was adapted from EDL Acoustic Signal Processing Group Help 4: Pspice tutorial (http://olympus.ece.jhu.edu/~david/edl/help4.php) From the Start Menu, run PSpice AD Student. This will bring up PSpice. We are going to simulate the simple op amp circuit below. There are many ways to enter a design into a Spice simulator. For this tutorial we will describe the circuit in a text file. Go to File->New->Text File. This will open up a text file where you can type your "Spice deck". The following is an example Spice deck with comments: .lib "nom.lib" * Include nominal library V10 10 0 DC 5 * This makes a 5 Volt DC voltage source between node 10 and ground (0) V4 4 0 SIN 2.5 1m 100 0 0 0 * This makes a sinusoidal voltage source between nodes 4 and 0. The source has a DC offset of 2.5, an AC amplitude of 1 mV, and frequency of 100 Hz V1 1 0 DC 2.5 * A DC voltage source R0 2 4 2.2K * A resistor between 2 and 4 with a resistance of 2.2 kOhm R1 2 3 220K * A resistor of 220 kOhm X1 1 2 10 0 3 LMC6462B/NS * This calls an instance of the subcircuit LMC6462B/NS, a CMOS opamp from National Semiconductor. Nodes 1, 2, 10, 0, 3 correspond to ports on the subcircuit. The subcircuit must be defined somewhere in the file. .INC "lmc6462b.cir" * Include the opamp subcircuit definition .TRAN 1u 10m 0 * Run a transient analysis for 10 msec in 1 usec time steps .PROBE * Saves simulation variables for plotting? .END * Required to end the deck Copy and paste this text to your PSPICE window. (To do this highlight the text by mouse selection then CNTRL-C to copy, put cursor in PSPICE window then CNTRL-V to paste it.) Save this file (use File -> Save As – call it Demo1.cir). Be sure to give it a .cir file extension. Do the same thing with the op amp subcircuit definition file that follows at the end of all this below. Put it in the same directory as your Demo1.cir, and call it lmc6462b.cir. The reason it must be called this is because it is referenced by this name in the “include statement” of the main program, which is .INC "lmc6462b.cir". For some reason, the simulator will only work if you exit Pspice (close all PSPICE windows), start it again, and then load your .cir file using File -> Open (will not work from “recent file list”). Do this now. You are now ready to run a simulation. Go to Simulation->Run. When the simulation is complete, you can plot the results. To explore the amplifying behavior of the op amp, we will plot the input and output waveforms on the same plot. Go to Trace->Add Trace.... then Type V(4) V(3) into the Trace Expression box at the bottom of the Add Traces Window -- then click OK. Spice has many other capabilities. In addition to transient analysis, Spice can perform a small-signal, AC analysis of a circuit in order to determine the frequency response. (What is the maximum frequency at which this circuit will operate properly?) The “include file” for the op-amp is sometimes referred to as a “macromodel”. You can get macromodels for other op-amps and components from manufacturer’s websites (e.g. Motorola, National Semiconductor). *////////////////////////////////////////////////////////// *LMC6462B CMOS Dual OP-AMP MACRO-MODEL *////////////////////////////////////////////////////////// * * connections: non-inverting input * | inverting input * | | positive power supply * | | | negative power supply * | | | | output * | | | | | * | | | | | .SUBCKT LMC6462B/NS 1 2 99 50 28 * CAUTION: SET .OPTIONS GMIN=1E-16 TO CORRECTLY MODEL INPUT BIAS CURRENT. * *Features: *Operates from single or dual supplies *Rail-to-rail input and output swing *Ultra low input current = 150fA *Slew rate = 0.02V/uS * *NOTE: Model is for single device only and simulated * supply current is 1/2 of total device current. * Noise is not modeled. * Asymmetrical gain is not modeled. * *****************INPUT STAGE************** * I1 99 4 6.9U M1 5 2 4 99 MOSFET R3 5 50 3.79K M2 6 7 4 99 MOSFET R4 6 50 3.79K *Fp2=5.9 MHz C4 5 6 2.3868P G0 98 9 6 5 4.4165E-2 R0 98 9 1K DP1 1 99 DA DP2 50 1 DC DP3 2 99 DB DP4 50 2 DC *For accurate Ib , set GMIN<=1E-16 on .OPTIONS line. * ***********COMMON MODE EFFECT*********** * I2 50 99 6.8U *^Quiescent current EOS 7 1 POLY(1) 16 49 3.0E-3 1 *Offset voltage.......... R8 99 49 250K R9 49 50 250K * ***************POLE STAGE*************** * *Fp=13.3 MHz G3 98 15 9 49 1E-3 R12 98 15 1K C5 98 15 11.967P * ************POLE/ZERO STAGE************* * *Fp=600 KHz, Fz= 1.4MHz G5 98 18 15 49 1E-3 R14 98 18 1K R15 98 19 750 C6 19 18 151.58P **********COMMON-MODE ZERO STAGE********* * *Fpcm=20 KHz G4 98 16 POLY(2) 1 49 2 49 0 2.812E-8 2.812E-8 L2 98 17 7.958M R13 17 16 1K * **************SECOND STAGE************** * EH 97 98 99 49 1 G1 98 29 18 49 5.6667E-6 R5 98 29 100.37MEG V2 99 8 1.56 D1 29 8 DX D2 10 29 DX V3 10 50 1.56 * **************OUTPUT STAGE************** * F6 99 50 VA7 1 *^Dynamic supply current F5 99 35 VA8 1 D3 36 35 DX VA7 99 36 0 D4 35 99 DX E1 99 37 99 49 1 VA8 37 38 0 GN3 98 115 40 49 1U RN21 98 115 1MEG EN1 97 123 99 115 1 RN17 123 125 180 RN16 123 124 130 DN6 125 127 DX DN5 126 124 DX VN7 28 127 0.63 VN6 126 28 0.63 DN3 115 120 DX RN18 120 129 350K VN4 129 28 .27 DN4 121 115 DX RN19 130 121 350K VN5 28 130 .27 ENP 97 0 99 0 1 ENN 0 96 0 50 1 DN7 28 99 DX DN8 50 28 DX * * G6 38 40 49 29 16.667E-3 R16 38 40 2.3886K V4 30 40 .77 D5 30 97 DX V5 40 31 .77 D6 96 31 DX *Fp1=7.96 Hz C3 29 39 280P R6 39 40 1K * ***************MODELS USED************** * .MODEL DA D(IS=1.075E-12) .MODEL DB D(IS=1.15E-12) .MODEL DC D(IS=1E-12) .MODEL DX D(IS=1E-14) .MODEL MOSFET PMOS(VTO=0 KP=1.842E-3) .ENDS * *$