ELEC 225L Circuit Theory I Laboratory Fall 2010 Lab #1: Application of PSpice to a Transistor Circuit Introduction Nodal analysis is a powerful circuit analysis technique. Its primary advantage is that it provides a systematic approach for finding the voltages and currents in a circuit. If the method is applied properly, then a solution will be obtained with a predictable amount of effort. Nodal analysis also lends itself well to implementation in software. Researchers at the University of California in the late 1960s and early 1970s were among the first to do this, and the result of their efforts is now known as SPICE – Simulation Program with Integrated Circuit Emphasis. SPICE has been modified and improved over the decades, and a version for Windows-based PCs, called PSpice, has been available for many years. In this lab exercise you will use PSpice to analyze a simple circuit built around a bipolar junction transistor (BJT) and compare the results to those you obtain via “pencil-and-paper” analysis and to measurements from the actual circuit. Furthermore, you will gain practice writing professional-style reports. Theoretical Background Before exploring the capabilities of PSpice, it will be helpful to have some information on BJTs. The bipolar junction transistor (BJT), sometimes simply called the transistor, is one of the most widely used electronic devices. BJTs are employed as amplifying devices, control devices, and sensors, to list just a few of their uses. They also serve as the basic building block of many kinds of integrated circuits, including the popular LM741 operational amplifier. BJTs come in two basic varieties, known as npn and pnp. The designation indicates the overall structure of the device. At the most basic level a BJT is fabricated using three layers of silicon, each of which has had added to it a tiny amount of some other chemical element (such as boron, phosphorus, or antimony) that either frees up electrons in the crystal lattice or creates gaps in the lattice into which electrons can become trapped. The former type of modified silicon is called n-type because of the availability of negatively charged free electrons; the latter is called p-type because of the positively charged “holes” in the lattice. Because of various performance differences between the two types, npn BJTs are more widely used, and we will focus on npn BJTs in this lab exercise. The circuit symbol for the npn BJT is shown in Figure 1a. The characteristic that makes the BJT such a useful device is that, under the proper operating conditions, the current that flows into terminal C (the collector terminal) is directly proportional to the current that flows into terminal B (the base terminal); that is, IC = FIB, where the parameter F is a constant called the DC current gain; it typically has a value in the range of 50-300. This property is what makes possible the use of the BJT as an amplifier; a small base current can control a large collector current. The terminal labeled E in Figure 1 is called the emitter terminal. The electrical behavior of BJTs can be modeled in many cases by the simple equivalent circuit shown in Figure 1b. The linear relationship between IC and IB is represented by a current-dependent current source. Between the base and emitter terminals there is an almost constant voltage drop of 0.7 V, and it is represented in the model by an ideal voltage source. 1 B C IB C IC B VBE ≈ 0.7 V IB FIB + − E E (a) (b) Figure 1. a) Circuit symbol for npn BJT, and b) a simple circuit model. Although manufacturing methods have improved steadily since the first BJT was invented in 1947, there is still a surprising amount of performance variation among individual samples of specific types of BJTs. Most importantly, the value of the parameter F can vary widely, even among units from the same production run. When designing circuits with BJTs it is often necessary to establish stable voltages at various points in the circuit that stay at their intended values regardless of changes in F (and other parameters). One simple way to do this is to place a resistor of an appropriate value in series with the emitter terminal of the BJT. The resistor introduces electronic feedback that counteracts the voltage or current changes that result from a drift in the value of F. A typical example is shown in Figure 2a, and the equivalent circuit model is shown in Figure 2b. This design technique, which you will study in detail in ELEC 350 and/or 351, ensures that the node voltages VB, VC and VE stay relatively constant. The process of designing a circuit to achieve specified DC voltage and current values is called biasing. It is one of the key steps in almost all kinds of electronic circuit design. We will use PSpice to analyze the biasing circuit and verify that the node voltages are relatively insensitive to the value of F. VCC IC RC RC VC R1 R1 IB VC IC IB VB + VBE − R2 VB FIB VBE ≈ 0.7 V VCC + − VE + − VE R2 RE (a) RE (b) Figure 2. a) A BJT biasing circuit, and b) its equivalent circuit model. The small triangles in diagram (a) represent connections to the reference (“ground”) node. 2 Assignment Complete the following tasks with your lab group: Follow along on your lab station computer as the instructor guides you through a brief introduction to PSpice. The tutorial available via the “Supplemental Readings” button at the Blackboard site should be of considerable help as you work on this part of the lab exercise. Use PSpice to find the node voltages VB, VC, and VE and the collector current IC for the circuit shown in Figure 2b with R1 = 91 k, R2 = 27 k, RC = 5.1 k, RE = 2 k, VCC = 12 V, and F = 150. Record the values of the node voltages and IC for this case; you will need to include them in a data table later. Print out the PSpice circuit diagram with the node voltages, branch currents, and power dissipated/delivered for each part labeled. Make sure that the diagram is readable (especially the component values) and that all quantities are clearly matched with their appropriate nodes, branches, and/or components. Give the printed diagram an appropriate title, and use the text toolbar button to add your group members’ names to the diagram. Also, be sure to indicate the value of F somewhere on the diagram. Re-run the circuit simulation with F changed from 150 to 250, and verify that the node voltages do not change significantly. Print out the PSpice circuit diagram with the new value of F clearly indicated. Apply nodal analysis by hand (the “pencil-and-paper” approach) to the BJT circuit model using the values given in the second bullet above. Produce a clear and concise version of your solution that you can read later, since it will serve as part of your written report for this lab. Find the values of node voltages VB, VC, and VE and the collector current IC, and verify that they closely match the values obtained using PSpice. Solve the system of equations using Matlab, and save a copy of the relevant parts of the Matlab command window to use later in your report. Construct the BJT biasing circuit using the component and voltage values given in the second bullet above. Use a 2N3904 for the BJT. Measure and record the node voltages VB, VC, and VE. Determine the value of IC indirectly from the measured node voltages (i.e., without an ammeter), and record its value as well. Replace the 2N3904 BJT with a 2N2222 BJT, and verify that the node voltages have not changed significantly. Record the new measured values of VB, VC, VE, and IC that you obtain. Once you have verified that the measured node voltages agree relatively closely with the values you predicted using nodal analysis, demonstrate the circuit to the instructor or TA. After the lab session, write a clear, concise, and professional-style report describing in detail the steps you followed to apply nodal analysis to the circuit. (Imagine that your supervisor has asked you to explain how you analyzed the circuit.) You should provide enough details and background information so that a technically competent but 3 uninvolved reader could understand the results you are presenting, but do not “pad” the report with extraneous information. There is no minimum or maximum page limit; make the report long enough to transmit the important information and no longer. Remember to include details that are helpful to readers, such as an introduction and conclusion, diagrams, units on values, well-defined variables, etc. The organization should be that of a progress report, so your calculations, results, procedures, and other details should be presented in a chronological, integrated format, not in separate sections. You are strongly urged to consult the “Lab Report Guidelines” available at the lab web site. Integrate the data table (described in the next bullet) and the PSpice diagrams into your report as well. Organize your calculated and measured voltage and current data into a table, and incorporate it into your report. You should include the values of VB, VC, VE, and IC obtained using PSpice for both F = 150 and F = 250; the values obtained using manual (“pencil-and-paper”) nodal analysis for F = 150; the measured values for the 2N3904; and the measured values for the 2N2222. You may produce the table by hand or using software. Remember to label the columns properly and include units. Add a row or column that shows the percentage difference between the PSpice results obtained using F = 150 and those obtained using F = 250 (use 150 as the “reference” value), using manual analysis, and by measurement. Make sure that the data table is labeled and organized so that an engineer only vaguely familiar with the lab exercise could figure out what all of the data means. You might want to add a descriptive caption to the table. Table captions should be placed above tables. Grading Each group’s written work (nodal analysis solution, circuit diagram, and data table) is due in class the following Wednesday. General guidelines for writing professional-style reports are available at the course web site. Cover sheets are not required for reports, but the names of all lab partners, the lab section (8 am or 1 pm), the course number (ELEC 225), and the lab date (not the report due date) should appear on the first page. Do not forget to cite other authors’ intellectual property, if necessary. Each group member will receive the same grade, which will be based on the following distribution: 15% 15% 25% 20% 25% Nodal analysis “hand” solution – Technical content Nodal analysis “hand” solution – Organization, neatness, spelling, and grammar PSpice circuit diagrams, with voltages, currents, and power levels clearly labeled Data table, with rows and columns properly labeled and organized Demonstration of working BJT biasing circuit with proper node voltages 4