
















Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
This chapter introduces the use of electronic circuit simulation software (5Spice) and layout software (Eagle) for designing and analyzing analog circuits. a step-by-step guide on how to construct a circuit diagram using 5Spice, perform DC bias, AC, and transient analysis, and convert the circuit diagram into a circuit layout using Eagle. The goal is to help students understand the process of designing and optimizing analog circuits using industry-standard tools.
Typology: Study Guides, Projects, Research
1 / 24
This page cannot be seen from the preview
Don't miss anything!

















In this chapter, we introduce the use of analog circuit simulation software and circuit layout software.
So far we have designed all of our circuits by studying basic electronic subcircuit building blocks and then constructing larger circuits from these. We have designed our circuits by calculating their steady state behavior, as well as their response to small AC (sine wave) signal deviations from the quiescent state. While this method is useful for coming up with the overall design of a circuit, it is a slow and limited method for predicting the ideal theoretical behavior of a circuit under all experimental conditions.
A. Computer-based analog circuit simulators
Computer software circuit simulators are very good at calculating ideal theoretical behavior from Kirchhoff’s Laws. While circuit simulators will not help you come up with the insight or the creativity to design a good circuit, they are very useful for helping to elucidate quickly the benefits and disadvantages of one circuit design against another. Generally, you can simulate a circuit much more quickly than you can build and test it on a breadboard (after a little practice, of course). The circuit simulator also allows you to try out many variations on a circuit relatively quickly.
The industry standard analog circuit simulation software is SPICE (Simulation Program with Integrated Circuit Emphasis), which was originally developed at UC Berkeley during the 1970’s and early 1980’s. SPICE (v2G.6) is the basis for many commercial computer software programs. These programs provide the GUI (Graphical User Interface), but use the SPICE (or WinSPICE) simulation engine to perform all the circuit calculations.
SPICE does not simulate the electromagnetic fields in a circuit since these depend explicitly on the layout of the circuit. The results of SPICE can be trusted up to the low MHz range, but should be treated with suspicion for higher frequencies.
In this course, we will use the commercial software 5Spice (free for non-commercial use) available from www.5spice.com.
B. Computer-based circuit layout editor
In the electronics labs, you have designed the layout of your breadboard circuits on the fly. In a professional setting, the layout of a circuit determines its compactness, ease of use (and debugging), cost, longevity, and its performance (especially at high frequencies). A number of programs exist to help with circuit layout. In fact in industry, most electronics engineers will design an abstract circuit with a circuit simulator and then
use a software package to layout the actual circuit on a PCB (Printed Circuit Board). The PCB layout design is then turned into an industry standard Gerber file which is sent to a PCB production company. A prototype will be assembled and tested at the engineering company from a PCB board and electronics components, and once it is tested the entire production is usually contracted out to a third company.
In a physics research lab, the production is done in house, generally. The use of professionally made PCBs is relatively common, since it generally results in a reproducible circuit, which is likely to work better at high frequencies than one put together with wires or prototyping boards.
In this course, we will use the commercial software Eagle by CadSoft (free for non- commercial use) available from www.cadsoftusa.com.
Circuit simulation is a two step process. In the first step you must construct the actual circuit diagram using wires and electronics components (i.e. resistor, capacitors, inductor, diodes, integrated circuits, etc …). In the second step, you vary the inputs to your circuit and see how it affects the circuit operation and the outputs.
The program is relatively easy to use. When you start the program you will get a blank schematic drawing canvas. The important GUI elements (i.e. the ones you will use the most) of the main screen are shown in figure 12.1 below.
resistors, capacitor, etc …
diodes, transistors, etc …
ICs, Op-amps, transformers, etc …
voltage and current sources
Measurement test points
Wires
Analysis menu
resistors, capacitor, etc …
diodes, transistors, etc …
ICs, Op-amps, transformers, etc …
voltage and current sources
Measurement test points
Wires
Analysis menu
Figure 12.1 : 5Spice start screen with frequently used icons and menus
The schematic canvas now has a single op-amp in the middle of it. Figure 12.4, below, shows the schematic with a single unidentified op-amp.
Figure 12.4 : Schematic canvas with single unidentified op-amp sub-circuit.
We must now identify the op-amp so that 5Spice knows how to simulate it properly. We give the op-amp the identity of the LM741CN op-amp by finding it in the op-amp library. You can look up the LM741CN op-amp in the sub-circuits library by right- clicking on the op-amp component image and selecting the “Edit Parameter” menu listing as shown in figure 12.5 below.
The “Edit Parameter” selection calls up the sub-circuit library, where you can search and choose the desired op-amp, as shown in figure 12.6. In our case, the only op-amp sub-circuit available is the LM741, so we select this one. If you cannot find the SPICE model for the\component that you are looking for in the library, you can generally find it on the manufacturer’s website. If not then you must simulate with another component.
Figure 12.5 : Right-click the op-amp image and select “Edit Parameters” to look up the SPICE model for the LM741 op-amp.
Figure 12.6 : Find the SPICE model for the LM741 op-amp in the sub-circuit library.
Search for op-amp SPICE model here.
SPICE model code is here.
We now “rotate” and “mirror” flip the op-amp component image using the same technique so that it is in its traditional orientation. We can now copy and paste the resistor to make a second one, which we can then move around to start constructing our circuit diagram, which is shown in figure 12.8, below.
Figure 12.8 : LM741 op-amp and two 10 kΩ resistors.
We now convert the top most 10 kΩ resistor to a 100 kΩ resistor by left-double-clicking the resistor component image or right-clicking and choosing the “Edit Parameter” menu listing. We adjust the “10K” value to “100K” in the resistor parameter window, as shown in figure 12.9 below.
Change to “100K”Change to “100K”
Figure 12.9 : Adjusting the resistor value from 10 kΩ to 100 kΩ.
We only need to add the wires in to make our inverting amplifier. We do this by selecting the “wire” from the wire drawing icon menu, as shown in figure 12.10.
Wire toolWire tool
Figure 12.10 : We select the wire drawing tool.
connected connected
connected connected
Figure 12.12 : The power and ground connections for the inverting amplifier circuit.
The last additions to the circuit diagram are the input and output signals: we add a voltage signal source for input and insert a 1 kΩ load resistor at the output along with a “voltage test point”. The final circuit diagram is shown in figure 12.13 below.
voltage input voltage test point source
voltage input voltage test point source
Figure 12.13 : Final circuit diagram schematic
B. Circuit analysis
We are now ready to analyze the ideal theoretical performance of our LM inverting amplifier circuit. All circuit analysis starts with the “analysis dialog” which you can access through the “analysis menu” shown below in figure 12.14.
Figure 12.14 : The analysis menu
The “analysis dialog” allows you to perform three principal types of analysis on the a circuit: i) “DC bias”, ii) “AC”, and iii) “Transient”. The analysis type can be chosen in the “analysis” tab of the “analysis dialog” as shown in figure 12.15 below.
test point voltage
currents supplied to op-amp
test point voltage
currents supplied to op-amp
Figure 12.16 : Results of the “DC bias” analysis in the “DC Bias” tab of the main window
ii. AC analysis
We use the “analysis dialog” to setup an AC analysis as shown in figure 12.17 below. The AC analysis consists of sending an AC signal into the input, determined by the voltage signal source in the circuit diagram, and scanning the frequency to determine the frequency response of the circuit output or at any other test point. In our case, we scan the frequency of the input from 10 Hz to 10 MHz. The AC analysis is done in frequency space (i.e. Fourier space).
frequency scan parameters
frequency scan parameters
Figure 12.17 : AC analysis setup. AC analysis generally outputs a Bode plot of the frequency scan. The plot can be tailored to the circuit and the analysis in the “Graph/Table” tab of the “Analysis Dialog” as shown in figure 12.18 below. For our AC analysis we choose to plot both the magnitude and phase of the output AC signal.
Figure 12.18 : Output graphs setup for AC analysis.
Figure 12.20 : Transient analysis parameter selection for square wave input.
Transient analysis is the most difficult and frequently one must adjust the parameters governing the numerical computation in order for the simulation to work. Figure 12. (below) shows some of the basic changes to the numerical computation scheme one can select to help the transient analysis to compute.
Numerical computationNumerical computation adjustmentsadjustments
Numerical computationNumerical computation adjustmentsadjustments
Figure 12.21 : Coarse adjustments to the numerical computation used in transient analysis.
If the transient analysis cannot produce a solution after adjusting the above selections, then the parameters governing the tolerances and convergence criterion for the numerical computation must be modified. Figure 12.22 shows the “Project Defaults” tab and dialog in the “Analysis Dialog” window. The various parameters should be adjusted to obtain a transient numerical solution, though care must be taken since these adjustments will also affect the accuracy of the analysis results.
Figure 12.22 : The numerical computation convergence tolerances and additional parameters.
The results of the transient analysis are plotted versus time. The graphs must be setup in a similar manner as shown in figures 12.18-19 for the AC analysis. The output is plotted in the “Transient-1” tab of the main 5Spice window. As figure 24 below shows, our LM741 inverting amplifier amplifies the input with gain=-10 , though it does show some distortion due to some internal RC low-pass filtering. If we were to make the actual circuit in the lab, we should not expect better performance than what is shown in figure 12.23.
using the “QuantumOptics.lbr” library. Figure 12.24 below shows an Eagle schematic window with the important icons and menus highlighted.
Add component
Wire tool
Add component
Wire tool
Figure 12.24 : Eagle schematic window.
Once the schematic is complete, it can be converted to a board by selecting the board command, as shown in figure 12.25 below.
“Make Board” button“Make Board” button
Figure 12.25 : The “make board” button generates an initial board from the schematic.
B. Circuit layout
The printed circuit board produced with “make board” button still requires a lot of work. The first step is to place all the components appropriately into the board area as indicated in figure 12.26.
Move onto board and place appropriately
Move onto board and place appropriately
Figure 12.26 : After using the “make board” button the circuit components should be placed in appropriate locations on the board.
An important fact to remember is that the board has two sides which you can use for placing components and routing wires/traces. The next step is to route all the wires. This can be done to a certain extent with the “autorouter” feature, though one must still route some of the wires by hand, generally. The wire routing is shown in figure 12.27 below.
Route yellow wires
Auto-router tool
Wire & manual router tools
Active Layer Route yellow wires
Auto-router tool
Wire & manual router tools
Active Layer
Figure 12.27 : Available wire routing tools.