Basic idea for finding parameter values
ECE 304 Spring ’05 Lab 1
Measuring transistor β , Early voltage V , and scale current I
DC AF S ObjectiveWhen we design a circuit using bipolar transistors, we use idealized equations and an idealized transistor. PS PICE describes this ideal NPN transistor using the dot-model statem
.model Qidealn NPN (Bf={B_F} Vaf={V_AF} Is={I_S})
1 PS dot-model statement for the ideal bipolar transistor: PICE
IGURE F
β = Bf, Early voltage Vaf, and scale current Is; as shown by curly braces {}, these values are set using variables B_F, V_AF and I_S from a P box
ARAMETER PICE
However, real circuits use real transistors. An example is the Q2N2222, approximated in PS using the dot-model statem
.model Q2N2222 NPN(Is=14.34f Xti=3 Eg=1.11 Vaf=74.03 Bf=255.9 Ne=1.307
- Ise=14.34f Ikf=.2847 Xtb=1.5 Br=6.092 Nc=2 Isc=0 Ikr=0 Rc=1 Cjc=7.306p Mjc=.3416 Vjc=.75 Fc=.5 Cje=22.01p Mje=.377 Vje=.75 + Tr=46.91n Tf=411.1p Itf=.6 Vtf=1.7 Xtf=3 Rb=10) +
2 Dot-model statement of the Q2N2222 found by highlighting the device, right clicking, and selecting E PS M
IGURE F
DIT PICE ODEL
If we design using the ideal transistor, and build using, for example, the Q2N2222, can we expect the built circuit to behave anything like the designed circuit? To have hope of success, our ideal transistor should have parameter values selected to match the Q2N2222 as closely as possible. In this lab we will determine the values of Bf, Vaf and Is that make an ideal transistor approximate the Q2N2222.
We compare the PS PICE results for a Q2N2222 with an ideal transistor using the setup of w.
DOT-MODEL I_S = 14.34fA
10.00mA 10.00mA V_AF = 74.03V
I1 I2 B_F = 174.11
22.73V {I_E}
22.94V {I_E} C
9.956mA 9.956mA PARAMETERS:
R1 R2 {R_B} Q1 {R_B} Q2
I_E = 10mA B
Qidealn Q2N2222 R_B = 500k 698.5mV 44.07uA 699.6mV 44.47uA
.model Qidealn NPN (Bf={B_F} Vaf={V_AF} Is={I_S})
3 Circuits for comparison of ideal transistor with shown dot-model statement with the
IGURE F
Q2N2222; parameters I and V are taken from the Q2N2222 dot-model statement, and
S AF
β (V =0V) is taken from β for the Q2N2222 in the PS PICE output file for this value of I
DC CB DC
E
The results of the comparison are shownr that the two curves agree closely as to value and slope. That is, the ideal transistor with the appropriate values of
parameters B and V closely approximates the V dependence of the DC β of the Q2N2222. F AF CB
1 However, in the ideal transistor, the DC beta and AC beta values are the same, and
β (V =0V) = Bf. Also β is independent of current. In the Q2N2222, these simplifications are
DC CB DC not so.
225 230
223 210
DC β
IC(Q1)/ IB(Q1) 190 174
IC(Q2)/ IB(Q2) 170
5
10
15
20
25 V (V) CB F
IGURE
4 Comparison of vs. V for the ideal and the Q2N2222 transistors with I = 10 mA
β DC CB E
Because β depends on current in the Q2N2222 (but does not depend on current in the ideal
DC
transistor) the value of β (V = 0V) used for Bf in the ideal transistor has to be set to agree with
DC CB
the PS PICE output file BetaDC for the Q2N2222 at V = 0V and the appropriate current. (For
CB
example, we force fitted the point at V
CB
because the dot-model statement of the Q2N2222 is much more complicated than that for the ideal transistor, as shown
To summarize, in this lab we:
1. Learn how to measure values for Bf, Vaf and Is,
2. Learn a bit about the current mirror as an approximation to an ideal current source,
3. Learn a bit about the variability of device parameters,
4. Learn that circuit design is necessarily approximate because our models aren’t perfect, and
XCEL PICE
5. Learn how to use some features of E and PS
Basic idea for finding parameter values
- + {I_E} -
{V_CB} Q2N2222 F
IGURE
5 Idealized circuit for measuring DC beta and Early voltage
ows the basic idea behind the measurement of β and V . A known emitter current
DC AF
I is driven into the transistor and a known collector-to-base voltage V is applied. The value of
E CB
β is then
DC EQ. 1
I
E 1 . = − βDC
I
BThe value of is plotted against V and fitted to th β
DC CB EQ. 2 V CB
V = )
1 . + = ( β β DC DC CB V AF The slope and intercept of the plot determine β at V = 0V and the value of the Early voltage
DC CB
V lue of the base current I . Therefore, we modify the AF.
B
circuit as showse current from the known value of resistor R
B and the measured collector and base voltages as give
{I_E} C
{R_B}
- B
Q2N2222 F
IGURE
6 ed to allow measurement of base current EQ. 3
V V − C B
I .
= B
R
B Implementation of current source I ETo apply a known current I as shown inwe build an approximate current source using
E
15.00V
- + PARAMETERS:
R_E = 100 12.86mA 12.86mA
V1 {V_CC} -
25.73mA R_R = 1k
R1 R2
V_A = 12.92V {R_E} {R_E}
V_CC = 15V
13.71V
13.71V Q2 Q1 B Q2N2907A Q2N2907A +
- -12.81mA -56.96uA -56.96uA -12.81mA
12.92V 12.92mA
12.92V
R3 - OUTPUT
- {R_R}
{V_A} F
IGURE
7 Circuit for a current mirror approximating an ideal current source
The applied bias V s been chosen to equal the base voltage of the two transistors,
A
making the bias conditions identical for both transistors. Because both transistors have the same dot-model statements (we say they are matched), they draw the same collector currents. We can plot the input current vs. V for this circuit to compare it with an ideal current source.
A
20mA
0A (12.92,12.81mA) (0.00,12.85mA)
(14.37,0.00A)
- 20mA
0V
5V
10V
15V I(OUTPUT)
V_A
F
IGURE
8 I-V behavior of the current mirr
Examining the I-V behaviont is nearly constant for V below about V =
A B
12.92V. As V goes above this value, the current drops rapidly, because the transistor Q1
A
saturates, leaving the active mode. Thus, the circs a pretty good approximation to an ideal current source delivering 12.81mA - 12.85 mA for voltages below about V = V =
A B
12.92V. The current level delivered by the mirror is adjusted using the resistor R , as is
R suggested because the current in R is I = V /R and is nearly the same as the output current. R R B R
Calibration of the mirror
We cannot assume that both transistors in the mirror will be matched in the lab circuit, so we do a calibration run to find what current we actually get for a given bias condition. For example, suppose the two transistors have different scale currents I as shown in the dot-model statements
S elow.
.model Q2N2907A_IS1 PNP(Is={I_S1} Xti=3 Eg=1.11 Vaf=115.7 Bf=231.7 Ne=1.829 Ise=54.81f Ikf=1.079 Xtb=1.5 Br=3.563 Nc=2 Isc=0 Ikr=0 Rc=.715 + Cjc=14.76p Mjc=.5383 Vjc=.75 Fc=.5 Cje=19.82p Mje=.3357 Vje=.75 + Tr=111.3n Tf=603.7p Itf=.65 Vtf=5 Xtf=1.7 Rb=10) +
.model Q2N2907A_IS2 PNP(Is={I_S2} Xti=3 Eg=1.11 Vaf=115.7 Bf=231.7 Ne=1.829 Ise=54.81f Ikf=1.079 Xtb=1.5 Br=3.563 Nc=2 Isc=0 Ikr=0 Rc=.715 + Cjc=14.76p Mjc=.5383 Vjc=.75 Fc=.5 Cje=19.82p Mje=.3357 Vje=.75 + Tr=111.3n Tf=603.7p Itf=.65 Vtf=5 Xtf=1.7 Rb=10) +
F
IGURE
9 Dot-model statements for the Q2N2907A with the scale currents made a parameter I or
S1
I S2
15.00V PARAMETERS: +
DOT-MODEL 12.90mA 12.50mA R_E = 100 I_S1 = 650.6E-18A
V1 {V_CC}
25.40mA R_R = 1k I_S2 = {I_S1*5} -
R1 R2 V_A = 13.01V
{R_E} {R_E}
V_CC = 15V 12.90mA 12.50mA
13.71V
13.75V Q2 Q1 B
Q2N2907A_IS2 Q2N2907A_IS1
- -12.85mA -56.54uA -55.35uA -12.44mA
13.01V
- + 12.44mA 12.96mA
12.96V R3 OUTPUT -
- {R_R}
{V_A}
10 Current mirror with mismatched transistors: I = 5I S2 S1
IGURE F
ws the current mirror with mismatched transistors: the currents in the two transistors are not the same, and the output current differs quite a bit from the current in R . We run an I-V
R curve lican determine exactly what current is provided to our test Q2N2222.
An example is shng this plot we can find exactly what current is delivered if we know the voltage V .
A 20mA (5.000,12.46mA)
0A (0.00,12.48mA) (13.01,12.44mA)
- 20mA
0V
5V
10V
15V I(OUTPUT) V_A
11 Calibration run for the mirror in Fitting procedure
IGURE F
We first build a mirromake an I-V calibration run. Then we hook up the Q2N2222 as showsing the mirror in place of the current source to provide I . Then
E
we measure V , V , R and determine the value of I for various V values, and put this data into
C B B E CB
an E
XCEL spreadsheet. We make a best fit to this plot using the T RENDLINE feature of E
XCEL , as explained next.
D ATA ENTRY
The data is entered on the spreadsheet as shown in ow. Measured data is outlined with boldface column headings. R is unnecessarily repeated.
B
12 Data entered on spreadsheet and calculation made of I , I , V and β B E CB DC F
IGURE F
ITTING THE DATA A plot is made of vs. V as shown in
β DC CB
y = 2.4023x + 180.69 200 195
DC 190
β 185 180
1
2
3
4
5
6
7 V (V) CB F
IGURE
13 Plot of calculated results from spreadsheet with T RENDLINE formula at top
A T RENDLINE is found by right clicking on the curve and selecting A DD T RENDLINE , as shown in
F
IGURE
14 Adding a T RENDLINE
INEAR PTIONS
We also select the L type, as showosing the O tab we elect to D ISPLAY E QUATION on the chart, as show
F
IGURE
15 Choosing the L
INEAR trend line F
IGURE
16 Choosing to D
ISPLAY E QUATION on chart
With the slope and intercept from the trend line equation in the form y = mx + b we find the value of (V = 0V) and V using the equations β DC CB AF
EQ. 4
β (V = 0V) = b and V = b/m.
DC CB AF ws the results.
Formula Box F
IGURE
17 Calculation of and V ; the formula box shows EQ. 4
β
DC AF
To obtain a formula in the formula box in below.
18 Naming variables to obtain formulas in the F B
IGURE F
ORMULA OX Another example of this procedure is shown in the .
PICE
The values inn be compared to the PS output file β (V =0V) = 175
DC CB and V = 74.03V. Accuracy is as shown AF
This procedure should be followed for three current levels near the values 100 µA, 1 mA and 10 mA, for two different Q2N2222 transistors. The results should be compared with each other and with the manufacturer’s data sheet and the differences summarized.
Precautions
The temperature will change as the transistor heats up – allow the transistor to cool between data points.
Finding the scale current
The base voltage of the Q2N2222 is given by
EQ. 5 ,
I ( V = V ) I ( V = V )
C CB E CB
V V l n V l n = =
BE TH TH
I 1 S
- I
1 S β ( V = V , I ) CB E
where V is the thermal voltage, 25.864mV at 27 °C. Your transistor may be at a different
TH
temperature: for one thing, it heats when drawi is the scale current. If there
S
is no Early effect, the current does not depend on collector-base bias V , but in our ideal
CB
transistor there is an Early effect and the current is givhe Q2N2222 uses a
more complex equation, approximated
2 In the Q2N2222 the current is given by PS PICE as found on pp. 208-209 of the online manual
TART TART ROGRAMS RCAD AMILY ELEASE
PSpceRef.pdf accessed from your S menu under S /P /O F R
9.2 L
ITE E DITION /O N L
INE M ANUALS /PS PICE R EFERENCE G UIDE /B
IPOLAR T RANSISTOR
EQ. 6
V CB . = + =
I I (
V V )
1 C C CB V AF
Because I depends on V , using a current corresponding to V
C CB CB
incorrect V e value of β varies with current level I ; that is,
BE E , I ).
β = β(V CB E Accordiof base voltage of the Q2N2222 vs. ) will have a slope of ln(I E
V , and by doing a best fit we can find the best value of I . If β >> 1, the error in neglecting
TH S
variation of β with I when plotting will not have much effect upon the value obtained for I . Doing
E S the fit with the largest and smallest β-value is a check on this particular error.
E NTERING THE DATA
An example worksheet for finding V and I is showmeasured
TH S data is for the case V = 0 V, or R =0 Ω. CB B B C D E F G H
I J K L M
6 Calculated Calculated Calculated Percent Percent
7 Fitted Values R_R I_E V_B V_TH_Q3 I_S_Q3 V_BE Error Trendline Error
8 V_TH 0.025868 100 0.0697 0.766 0.026100 9.7221E-15 0.7587046 0.89 0.762844
0.35
9 I_S 1.2678E-14 215 0.0441 0.750 0.025978 1.1193E-14 0.7468559 0.42 0.750023
0.00
10 B_DC 162.6 464 0.0245 0.732 0.025882 1.2458E-14 0.7316679 0.05 0.733589
0.21
11 B_DC(min) 148.9 1000 0.0124 0.713 0.025820 1.3320E-14 0.7140578 0.19 0.714534
0.25
12 B_DC(max) 176.3 2154 0.0059 0.692 0.025784 1.3806E-14 0.6947137 0.33 0.693602
0.17 13 4642 0.0026 0.671 0.025763 1.4061E-14 0.6738291 0.41 0.671004
0.01 14 10000 0.0011 0.648 0.025751 1.4186E-14 0.6508884 0.46 0.646181
0.27
15 Averages 0.025868 1.2678E-14 Total Error
2.74
1.26 F
IGURE
19 Worksheet for finding V and I ; the T RENDLINE predictions also are shown TH S F
ITTING THE DATA
Measured data is in columns R , I and V . V in Column J is calculated usi
R E B BE
values of V , I and β in cells C8-C10. Then V (Q3) is found by making the calculated V of
TH S DC TH BE
Column J agree with the measured value of V in Column G. To find this value of V (Q3),
BE TH
E tool G S is used. For example, we set the cursor in cell J8 and use the menu T OOLS /G OAL S EEK to obtain the G OAL S EEK menu in e S ET CELL is V and the V ALUE
BE HANGING CELL
is the measured V . The C is the thermal voltage V . Hitting OK, V is changed to
B TH TH
the value that makes V = V . We copy this value and paste it into the column V (Q3). This
BE B TH
procedure is followed for all the entries. At the bottom of the V (Q3) column, the average value
TH
of V (Q3) is found using E
XCEL function A VERAGE (). Then this value is copied into V , cell C8.
TH TH F
IGURE
20 G S menu for finding the value of V (cell C8) that makes V (cell J8) equal V
OAL EEK TH BE B (value .766 V for Row 8)
After the average V is found, the values of I (Q3) are found the same way, and the average
TH S
value of I is pasted into cell C9. Because V depends logarithmically on I , even a large change
S BE S in I hardly affects the fit. Therefore, the value of I found by fitting is not very accurate. S
S
A LTERNATIVE METHOD USING T RENDLINE
As a simpler alternative method, we might think to use the T RENDLINE feature of E
XCEL as
show
TH S
V_B
y = 0.027991Ln(x) + 0.837392 0.800 Calculated Log. (V_B)
0.750 (V)
0.700 BE
V 0.650 0.600
0.0010 0.0100 0.1000
I E (A) F
IGURE
21 Using the T feature of E to find V and I .
RENDLINE
XCEL TH S F
IGURE
22 Converting the slope and intercept to V and I .
TH S
The T RENDLINE approach gives a lower error of fitting re tedious
OAL EEK
approach using G S , but it does not give values as close to the true values. Therefore, the G OAL S EEK method, which fits V first and I second, is preferred.
TH S Prelab requirements
Decide what resistor values you will use in the lab. They should be standard values, but you will have to measure them to get accurate values.
Construct your spreadsheet using the standard resistor values you selected. Use one worksheet for I and V determination, and a second worksheet for and V determination.
β
S TH DC AF Both worksheets are in the same spreadsheet.
Make PS PICE simulations of the procedures you will follow to measure the transistor parameters and generate the plots you are going to use. Test the spreadsheet using “imitation” data generated by PS PICE to see how close your fitting procedure comes to the values of the transistor parameters actually used in generating your “imitation” data.
Tabulate your actual values alongside the extracted values found using the fitting procedure.
In the lab Here’s a brief summary of the things to be done in the lab that are discussed in this document.
1. Do parameter measurements for two Q2N2222 transistors at three current levels, levels near 100 µA, 1mA and 10mA. Put your data on worksheeke graphs liwing both your data and your fits.
PICE
2. Plot your β vs. I for both devices and from PS
DC E
3. Compare the results for all parameters with manufacturer’s data sheets
4. Summarize the differences and discuss whether they are within the range of values suggested by the manufacturer
The temperature will change as the transistor heats up – allow the transistor to cool between data points. A heat sink for discrete Q2N2222’s is available.
Appendix
PICEXCEL Pasting PS data into E
The PS PICE data from a P ROBE plot are copied to the spreadsheet from P ROBE by highlighting the
ROBE ROBE DIT OPY
curve label in the caption of the P plot. Then use the P toolbar E /C to copy the curve. Next the cursor is placed on the worksheet and the E
XCEL menu P ASTE is selected.
Remove the unnecessary spaces in the column headings.
Using Visual Basic for Applications
OAL EEK
Instead of repeating the sequence of operations to use G S for each row of the worksheet, you can use a M ACRO based on VBA. For example, to set V using the procedure outlined
TH e used.
Sub Set_VTH() ' Set_VTH Macro ' Macro recorded 1/5/2005 by John Brews ' ' Keyboard Shortcut: Ctrl+t ' Dim J As Integer For J = 1 To 7 Range("V_BE").Cells(J).GoalSeek Goal:=Range("V_B").Cells(J).Value, _ ChangingCell:=Range("V_TH") Range("V_TH").Select Selection.Copy Range("V_TH_Q3").Cells(J).Select Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _ False, Transpose:=False Range("V_BE").Cells(J + 1).Select Next J Range("H15").Select Selection.Copy Range("V_TH").Select Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _ False, Transpose:=False End Sub
23 Macro to scan down the rows of the table injust V so that V = V ; the TH BE B underscore _ at the end of lines is a line continuation symbol
IGURE F
AMED
For the macro to work, N ranges have to be set up. For example, with the rows and columns highlighted as sh NSERT /N AME /C REATE is selected to obtain the
REATE AMES C N ck OK.
24 With the columns and their names highlighted, I NSERT /N AME /C REATE names the columns: for example, column E8:E14 is named R_R
IGURE F
age Range(“V_BE”)
- Cells(J) then refers to the J-th cell of column variable V . The macro is easily invoked using the keyboard shortcut Ctrl+t. To set up
BE the shortcut, use the menu T OOLS /M ACRO /M ACROS /O PTIONS to obtain the menu
25 Setting up a keyboard shortcut Ctrl+t to run the macro
IGURE F
OOLS ACRO ECORD EW ACRO
The macro is first recorded using the feature T /M /R N M . The recording determines much of the language in the final macro. Then knowledge of VBA, which is
ASIC
OR EXT OOP
a lot like B , is used to introduce the names of ranges and the F -N L . It is not suggested that you learn how to use VBA. This example is intended to make you aware that this feature exists, and that it can be useful.