* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Download lab instructions - University of Iowa
Survey
Document related concepts
Operational amplifier wikipedia , lookup
Wien bridge oscillator wikipedia , lookup
Radio transmitter design wikipedia , lookup
Rectiverter wikipedia , lookup
Resistive opto-isolator wikipedia , lookup
Topology (electrical circuits) wikipedia , lookup
Electronic engineering wikipedia , lookup
Power MOSFET wikipedia , lookup
Valve RF amplifier wikipedia , lookup
Current mirror wikipedia , lookup
Regenerative circuit wikipedia , lookup
Opto-isolator wikipedia , lookup
Index of electronics articles wikipedia , lookup
Flexible electronics wikipedia , lookup
Integrated circuit wikipedia , lookup
Two-port network wikipedia , lookup
Transcript
55:041 Electronic Circuits The University of Iowa Fall 2014 Very Brief Introduction to Micro-Cap SPICE Starting Micro-Cap SPICE Micro-Cap SPICE is available on CoE machines under the Spectrum Software menu: Programs Spectrum Software Micro-Cap 10 Evaluation (see the figure below). Figure 1. Starting Micro-Cap SPICE on CoE computers. First Circuit—Thevenin Equivalent Circuit Follow the instructor’s instructions and build the following circuit in Micro-Cap SPICE. Replicate the circuit as closely as possible, including the rounded box, labels, etc. Save the circuit as Thevenin.cir. Figure 2. A simple circuit captured in Micro-Cap SPICE. Version 1.4 1 Author: A. Kruger 55:041 Electronic Circuits The University of Iowa Fall 2014 Dynamic DC Analysis Next, perform a dc analysis to determine the current through the load using this menu sequence: Analysis Dynamic DC. Select OK on the popup menu. Micro-Cap SPICE calculates the dc values and displays node voltages in small ellipse boxes as shown in the figure below. Figure 3. Results after performing a Dynamic DC Analysis. To determine the current through the resistors, click on the Currents icon in the toolbar, which is the diode with an arrow above it. Figure 4. Menu items for displaying current, power, node voltages, etc. After selecting Currents from the toolbar, SPICE updates the display with the dc currents through the circuit elements. Note that SPICE may place text over circuit elements. If this happens, simply move the text boxes using the mouse. Figure 5. Results after performing a Dynamic DC Analysis and displaying currents and node voltages Version 1.4 2 Author: A. Kruger 55:041 Electronic Circuits The University of Iowa Fall 2014 Why “Dynamic” DC? Why is the analysis is called “Dynamic” dc analysis? It turns out that Micro-Cap SPICE dynamically recalculates and updates values (analogous to a spreadsheet) as they are changed. For example, while in the Dynamic dc mode, click on the 100K resistor (see (a) below) and change the value to 10K (see (b) below). Notice how the current through the resistor is updated. (a) (b) Figure 6. One can click on component values (highlighted in green) and change the values. Micro-Cap SPICE will then recalculate the circuit’s dc values. Post-Lab Report for First Circuit Your Post-lab report should include the following elements 1. Section title “First Circuit Results” 2. Capture of the schematic for the circuit showing simulated currents and voltages 3. Hand calculations of a Thevenin equivalent circuit for the part shown inside the brokenline box 4. Micro-Cap SPICE simulation of the Thevenin equivalent circuit showing the load current 5. A paragraph discussing the results Note: add text that shows your name and the date to all SPICE schematics. Version 1.4 3 Author: A. Kruger 55:041 Electronic Circuits The University of Iowa Fall 2014 Second Circuit—Transient Analysis to Measure Rise Time and Bandwidth Build the following circuit in SPICE. Be sure to label the output node Vo as shown. Save the circuit as LPF.cir. Figure 7. A Simple lowpass filter (LPF) We will first measure the circuit’s step response and determine the rise time. From the rise time we will estimate the bandwidth using 𝐵𝑊 ≅ 0.35⁄𝑡𝑟 . Just as one would do with a real circuit, we use a square wave generator to simulate a step function. As long as the period of the square wave is much longer than the rise time of the circuit, one can zoom in on the transient and obtain the step response. Figure 8. Configuring the voltage source as a square wave. All the values are the default except for the pulse widths (PW) and period (PER). Version 1.4 4 Author: A. Kruger 55:041 Electronic Circuits The University of Iowa Fall 2014 Click on the signal generator symbol in the schematic. On the popup menu, select Square. There are many options for changing parameters of the square wave: period, maximum- and minimum voltages, rise- and fall times of the signal generator, etc. Change the period (PER) to 20m (for 20 ms) and the pulse width (PW) to 10 ms and leave the other values alone. You can click “plot” to see what the resulting square wave looks like. Next we will perform transient analysis using the menu sequence AnalysisTransient. As a first try, perform the analysis for 100 ms by making sure 100m is in the Time Range Field. Be sure to select AutoAlways for X Range and Y Range. This will allow you to see the complete waveform. Also, make sure there is only one plot, namely V(VO) versus T. The notation V(VO) means the voltage at node VO. Figure 9. Transient Analysis popup menu. Once all the fields are filled in, click on “Run”. SPICE will then perform the transient analysis and plot the results, which should resemble something similar to Figure 10. Note that while the default graph settings are adequate for on-screen viewing, they are insufficient for copying to a Word document—lines are too thin and the text too small. Figure 10. Output from Transient Analysis—poor for using in reports. One can easily fix this by clicking on the plot and then making appropriate adjustments on the popup menu and its various tabs. Below is the same plot, but dressed up a bit by making the Version 1.4 5 Author: A. Kruger 55:041 Electronic Circuits The University of Iowa Fall 2014 fonts bigger and lines thicker. Also, note that one can annotate the plot with text boxes, arrows, and so on. Figure 11. Improved version of Transient Analysis output. As indicated in the figure, the lines are jagged. This is because SPICE uses its default time step during the simulation. For a smoother plot, we should adjust the time step. The figure below shows the settings for our next transient analysis. The Time Range is now 10m which will effectively zoom in to the first 10 ms, and we set the maximum time step to be 100 ns to get a smooth plot. Figure 12. Modifying Transient Analysis Limits to zoom into the first 10 ms and also to produce a smoother plot. Version 1.4 6 Author: A. Kruger 55:041 Electronic Circuits The University of Iowa Fall 2014 Figure 13. Zoomed-in and smoothed output from Transient Analysis. The rise time is defined as the time for the waveform to go from 10% to 90%. The amplitude of the signal generator is 5 V, so for this waveform the rise time is the time to go from 0.5 V to 4.5 V. Making such measurements is easy using Micro-Cap SPICE using the Horizontal Tag Mode tool. Figure 14. Zoomed-in and smoothed output from Transient Analysis with the 10–90% rise time indicated. The Horizontal Tag Mode tool was used for the annotation. Version 1.4 7 Author: A. Kruger 55:041 Electronic Circuits The University of Iowa Fall 2014 Second Circuit—AC Analysis Bandwidth One can also use SPICE’s ac analysis capabilities to sweep the frequency over a range of frequencies and plot the output. We will use the same RC circuit from before and determine the bandwidth using an analysis this was and then compare the results. Run the ac analysis: Analysis AC. Edit the popup menu so that it matches the figure below. Remember to set ranges to AutoAlways. Note how one specifies frequency ranges in SPICE: the higher boundary first. For example, to plot the frequency response of a range 10 Hz to 10 kHz, we use 10K,10 in SPICE. Figure 15. AC analysis options. The resulting plot is shown below. The font sizes were enlarged, the plot- and grid lines were thickened, and we used the cursor to move along the data points until we reached the -3dB point. This is shown in the yellow box as 157.549,-2.966. The interpretation is that the output voltage is -3 dB down from the low frequency value of 0 dB at a frequency of 157.549 Hz. Thus, we will take the 3-dB bandwidth to be 158 Hz. Figure 16. Output from the AC Analysis. The cursor tool was used to find the 3-dB frequency. Version 1.4 8 Author: A. Kruger 55:041 Electronic Circuits The University of Iowa Fall 2014 Referring to the graph and the rise time graph above, complete the following table. 𝑡𝑟 1 Hand calculation BW (Hz) Transient analysis AC analysis 1 — Complete and include in Post-Lab Report. Table 1. Bandwidth results. Post-Lab Report for Second Circuit Your Post-lab report should include the following elements 1. Section title “Second Circuit Results” 2. Capture of the schematic for the LPF. Enlarge fonts, make lines thicker etc. so you have a professional-looking schematic 3. Capture of the transient analysis (step response) output 4. Hand calculations of the theoretical bandwidth for the circuit 5. A completed version of Table 1 above 6. A paragraph discussing the results Note: add text that shows your name and the date to all SPICE schematics. Third Circuit—Stabilizing MOSFET Q-Point Build the circuit shown in Micro-Cap SPICE. For the MOSFET, use the 2N6660 NMOS part. Be sure to connect the substrate terminal to the source. Save the circuit as MOSFET.cir. Figure 17. MOSFET circuit for exploring how variations in the FET’s 𝑉𝑇𝑁 affects the Q-point. Version 1.4 9 Author: A. Kruger 55:041 Electronic Circuits The University of Iowa Fall 2014 First, set 𝑅2 = 180K and 𝑅𝑆 = 0, and perform a Dynamic DC Analysis, and measure 𝑉𝐷𝑄 and 𝐼𝐷𝑄 and fill in the values in the table. Next explore how 𝑉𝐷𝑄 and 𝐼𝐷𝑄 change if we were to replace this MOSFET with another 2N6660, but the second transistor has 𝑉𝑇𝑁 = 1.5 V rather than the nominal 𝑉𝑇𝑁 = 1.69 V that is built into Micro-Cap SPICE. Double-click on the MOSFET and on the popup menu, and change the VTO parameter (in the lower right corner) to 1.5 V. Micro-Cap SPICE recalculates the dc values. Record the values in the table. Clearly, changing 𝑉𝑇𝑁 affects the Q-point. Next we will explore how 𝑉𝐷𝑄 and 𝐼𝐷𝑄 and change for the same change in 𝑉𝑇𝑁 if the circuit has a source stabilization resistor. Set VTO parameter back to its original value (1.69 V), then set 𝑅2 = 270K and 𝑅𝑆 = 220 Ω, and perform a Dynamic DC Analysis and record the 𝑉𝐷𝑄 and 𝐼𝐷𝑄 . Next, change VTO to 1.5 V, thus simulating replacing the transistor. Note the resulting 𝑉𝐷𝑄 and 𝐼𝐷𝑄 values. 𝑉𝑇𝑁 (V) Hand Calculation, 𝑅𝑆 = 0, 𝑅2 = 180K SPICE Default = 1.69 1 SPICE, 𝑅𝑆 = 0, 𝑅2 = 180K SPICE Default = 1.69 SPICE, 𝑅𝑆 = 0, 𝑅2 = 180K 1.5 V Hand Calculation, 𝑅𝑆 = 220 Ω, 𝑅2 = 270K SPICE Default = 1.69 SPICE, 𝑅𝑆 = 220, 𝑅2 = 270K 1.5 V 1 SPICE, 𝑅𝑆 = 220, 𝑅2 = 270K 1 𝑉𝐷𝑄 (V) 𝐼𝐷𝑄 (mA) SPICE Default = 1.69 Complete and include in Post-Lab Report. Use 𝑉𝑇𝑁 = 1.69 V and 𝐾𝑛 = 41.88 mA⁄V 2. Table 2. Source resistor stabilization results. Version 1.4 10 Author: A. Kruger 55:041 Electronic Circuits The University of Iowa Fall 2014 Post-Lab Report for Third Circuit Your Post-lab report should include the following elements 1. Section title “Third Circuit Results” 2. Capture of the schematic for the circuit showing simulated currents and voltages for 𝑅𝑆 = 220 Ω, 𝑉𝑇𝑂 = 1.69 V, 𝑅2 = 270K. 3. Complete the following two sentences (show your calculations) o A ____% change in 𝑉𝑇𝑁 resulted in a ____% change in 𝐼𝐷𝑄 and a ____% change in 𝑉𝐷𝑄 when there is no source stabilization resistor (i.e., 𝑅𝑆 = 0). o A ____% change in 𝑉𝑇𝑁 resulted in a ____% change in 𝐼𝐷𝑄 and a ____% change in 𝑉𝐷𝑄 when there is a source stabilization resistor (i.e., 𝑅𝑆 = 220 Ω). 4. Completed Table 2 5. Hand calculations for the indicated values in Table 2 6. A paragraph discussing the results Note: add text that shows your name and the date to all SPICE schematics. Next Steps The preceding barely scratches the surface of Micro-Cap SPICE. There are whole books on SPICE and one could teach a complete course on using SPICE. Micro-Cap SPICE has extensive built-in help and really nice demonstrations available through Help Demos. There are also many sample circuits available through Help Sample Circuits. Students are encouraged to take a look some of the demos as they are very well-crafted and quite extensive. Version 1.4 11 Author: A. Kruger