ELECTRIC CIRCUITS ECSE-2010 Spring 2003 Class 3
ASSIGNMENTS DUE Today (Thursday): Will introduce PSpice Activity 3-1 (In Class) using PSpice Will do Experiment 1; Report Due Jan 27 Next Monday: No Classes – Martin Luther King Day Next Tuesday/Wednesday: HW #1 Due Activities 4-1, 4-2, 4-3 (In Class) 4-2 in NOT in your Supplement
REVIEW Kirchhoff’s Laws: KCL, KVL Current Into Node = Current Out of Node Sum of Voltages Around any Closed Path = 0 Resistors in Series: Resistors inParallel:
KIRCHHOFF’S LAWS
RESISTORS IN SERIES
VOLTAGE DIVIDER RULE v 1 = i R 1 = V/R eq x R 1 v 1 = [R 1 /(R 1 + R 2 )] V v 2 = i R 2 v 2 = [R 2 /(R 1 + R 2 )] V Elements in Series v 1 ~ R 1 v 2 ~ R 2
RESISTORS IN PARALLEL
CURRENT DIVIDER RULE i 1 = [R 2 /(R 1 + R 2 )] i i 2 = [R 1 /(R 1 + R 2 )] i Elements in Parallel i 1 ~ R 2 i 2 ~ R 1
PSPICE Widely Used Simulation Package Industry Standard for Circuits and Electronics Student Version is FREE default/asp We will use PSpice A/D and Schematics Could use Capture in place of Schematics Get a Copy and Use it Often
PSPICE PSpice has Many “Rules”: Will build up slowly Use PSpice for Circuits that are Computationally Challenging: Will Often Analyze a Circuit to Learn Principles - Then “test” with PSpice:
METHODS FOR PSPICE Circuit File Method: Draw Simulation Diagram Create Circuit File (lines of code you type in) Run Circuit File Using PSpice A/D Observe Output (Probe or Output File) Schematics (or Capture) Method: Create Circuit Diagram (Drag and Drop) Set up Analysis Run Simulation (PSpice A/D) Observe Output (Probe or Output File)
ACTIVITY 3-1
CIRCUIT FILE METHOD Create Simulation Diagram: Original Circuit Label Nodes, Name Elements, Identify Sources Create Circuit File: Lines of code describing circuit and analysis Must save as.cir Tells PSpice what to do Run Circuit File using PSpice A/D: Observe Output Output File or Plot using Probe
SIMULATION DIAGRAM Circuit Diagram but with all Nodes and all Elements Labeled for PSpice Each Node must have a unique Number Each Element must have both a Name and a Value Both Active and Passive Elements
SIMULATION DIAGRAM
CIRCUIT FILES Circuit File Describes Circuit to PSpice and Tells PSpice What to Do: First Line Not Used by PSpice: => Name To Describe a Current Source: i 01DC1 Name of Source = i; “i” means current (i or I) Current flows from Node 0 to Node 1 DC Source 1 Amp
CIRCUIT FILES To Describe a Voltage Source v410DC 2 Name of Source = v4; “v” means voltage Positive terminal is Node 1 Negative terminal is Node 0 DC Source 2 Volts
CIRCUIT FILES Resistors: R Name of Resistor = R45; “R” => Resistor Connected between Nodes 2 and 3 Positive Terminal is Node 2 Negative Terminal is Node 3 Resistance is 12 ohms
COMMANDS.dclini-1, 1, 0.1 Perform a DC Analysis Do a Linear Sweep Sweep the variable named i Sweep i from -1 Amp to +1 Amp in steps of 0.1 Amps
COMMANDS.probe Tells PSpice to run Probe after performing the specified circuit analysis.end Tells PSpice that the file is at the end Will Add More Commands Later
PROCEDURE Create Circuit File from Simulation Diagram Save as.cir Open PSpice A/D: Open Circuit File: Run Simulation Observe Output
ACTIVITY 3-1
Open PSpice A/D Under File: Select New - Text File Type in Circuit File Save as.cir
ACTIVITY 3-1 Circuit File Activity 3-1 * PSpice does not use first line i01dc1 R R13132 R R20203 R dclini-1,1,0.1.probe.end
ACTIVITY 3-1 Under Simulation: Select Run If Errors: => Error Message => Correct If it Runs, Probe comes up automatically Horizontal axis = i (from -1 to + 1) Under Trace: Select v(1) v(1) = Voltage at Node 1 Note that R eq = 5 ohms
SCHEMATICS METHOD Create Schematics Diagram: Same Circuit using Schematics Parts Drag and Drop; Similar to LogicWorks Rotate Elements using Control R or Control F Set up Analysis: Choose what you wish to do Save as.sch Simulate using PSpice A/D: Observe Output Output File or Plot using Probe
ACTIVITY 3-1
SCHEMATICS METHOD Open Schematics: Select New Locate “Parts”; Drag and Drop Sources are Passive Elements in PSpice! Must put in i = -1 A to get +1 A Add Wires using Wire Icon Must always include Earth Ground! Change Names and Values of Elements by Doubleclicking on them Save as.sch
SCHEMATICS METHOD Under “Set up Analysis” Icon: Select DC Sweep of Current Source, -1 to +1 A Will use other options later Click “Simulate” Icon: Error Messages if Errors Observe Output Same as before except for Sign Change Horizontal Axis to –i to get positive slope Much Quicker once you get used to it
MULTIMETER MEASUREMENTS Model for Real Voltmeter: Ideal Voltmeter in Parallel with R M Ideal Voltmeter Draws No Current R M = “large”; Typically a few Mohms Model for Real Ammeter: Ideal Ammeter in Series with R m Ideal Ammeter has no voltage drop R m = “small”; Typically a few ohms
VOLTMETER
AMMETER
EXAMPLE
EXPERIMENT 1 Use E3631A Voltage Source: + 25 V output; +, Com Adjust output to be + 12 Volts Think About Model for Ammeter: With Switch Open; Current flows thru Meter Measures current as if Switch were Closed With Switch Closed; Current flows thru Switch Ammeter measures 0; as if Switch were Open
EXPERIMENT 1a
EXPERIMENT 1b