Calculations. 1 Diodes Let’s consider the circuit on Fig. 1. We will use a simple model of the diode: we assume, that below the forward voltage (approx. 0.7 V) the diode is off, no current flows through it, hence it can be substitued by an open circuit. If the diode is open due to a certain forward current, the voltage of the diode will be equal to the forward voltage independently of the magnitude of the current. In this case it may be substituted by a voltage source of 0.7 V. R Vd Vin Figure 1. Simple diode circuit Problem 1. Let’s calculate the DC case and assume that the voltage of the source is 3 V and R = 2.3 kΩ. Solution 1. circuit is: 3 V is enough to open the diode, so we can substitute it by a voltage source of 0.7 V. The KVL for the −Vin + VR + Vd = 0. With the values that we already know: −3 + VR + 0.7 = 0, hence VR = 2.3 V. Ohm’s law helps us to find the current of the resistor: IR = VR 2.3 = = 1 mA. R 2300 As there is only one current path, the current of the diode will be equal to that of the resistor: Id = IR = 1 mA. Vout 0.7 Vin Figure 2. Transfer function of the diode circuit in Fig. 1 Nagy Gergely (September 15, 2009) 1 If the input voltage is increased, the current flowing in the circuit will be increased also, but the voltage of the diode stays at the forward voltage. Below 0.7 V, the diode is turned off. In this circuit this means that no curretn will flow at all, hence the voltage of the source will appear on the diode. This is because of the Ohm’s law: if no current flows through a resistor, than no voltage is dropped on it, thus the potential of it’s terminals need to be equal. Hence if we draw the diode voltage as a function of the input voltage, we get Fig. 2. If the output of the circuit is the diode voltage than this function is called the transfer function of the circuit. 2 2.1 Transistors Simple operating point Problem 2. Let’s assume that VCC = 10 V, RC = 2 kΩ, β = 100, VCESAT = 0.2 V and VBESAT = 0.8 V for the circuit in Fig. 3. In which region of operation is the transistor working for RB = 300 kΩ and RB = 150 kΩ? V CC RC RB V CE V BE Figure 3. Simple operating point for a BJT Solution 2. The first thing that is needed to be considered is that the transistor will be on or off. The transistor is on if it’s base-emitter junction is on. 10 V is enough to open the junction, so we know that the transistor will be in either the normal active or the saturation region. Figure 4. Common emitter characteristics of the BJT If we take a look at the common emitter characteristics of the BJT (Fig. 4), we can see, that if the voltage between the collector and emitter of the transistor (VCE ) is below VCESAT (or VCES0 ) than the transistor is sure to be in the saturation mode. Hence we need to find VCE in order to be able to tell which operating mode the transistor is in. The problem is that the transistor behaves in a different way in the two modes, and throughout the calculations we need to make an assumption. We will assume that the transistor is in a normal active mode and if the voltages that we Nagy Gergely (September 15, 2009) 2 get are not possible to appear in such a circuit (e.g. they are negative), than we will know, that we were wrong and will be able to carry out the correct calculations. Let’s perform the calculations for RB = 300 kΩ. First we need to find the base current of the transistor. This is the same problem as in the first case with the diode earlier. Here we also have a pn junction and it is driven by a voltage source and a series resistor. The KVL is: −VCC + VRB + VEB = 0. We know that the transistor is open, thus VEB = 0.7 V and VCC = 10 V, thus VRB = 9.3 V. The current of the resistor is: VR B 9.3 IRB = = = 31 µA. RB 300 · 103 The base current of the transistor will be equal to the current of the resistor as there is no other path where the current could flow. We were supplied with the current gain (β) of the transistor, hence we are able to calculate it’s collector current: IC = β · IB = 100 · 31 · 10−6 = 3.1 mA. The collector current of the transistor flows through RC and drops a certain voltage (VRC ) on it. Thus the potential of the collector (ϕC ) will be the difference between the source voltage and the voltage of RC . ϕC = VCC − VRC = VCC − IRC · RC = VCC − IC · RC = 10 − 3.1 · 10−3 · 2 · 103 = 3.8 V. The potential of the emitter is 0 as it is connected to the gorund so VCE = ϕC . The VCE in this case is bigger than VCESAT , thus the transistor is in the normal active mode, our assumption was right. Let’s consider now the case of RB = 150 kΩ. The equations are the same, only the values will differ. If we have a smaller resistor at the base, than the base current will be bigger which results in a bigger collector current. A bigger current drops a bigger voltage on a resistor, thus the collector potential will be lower: IRB = VR B 9.3 = = 62 µA RB 150 · 103 IC = β · IB = 100 · 62 · 10−6 = 6.2 mA VCE = ϕC = VCC − IC · RC = 10 − 6.2 · 10−3 · 2 · 103 = −2.4 V. VCE was calculated to be negative in a circuit where the most negative potential is the ground potential. This is not a valid value, thus the assumption that the transistor was in a normal active mode was wrong. Hence we need to use the model for the saturation mode. The voltages of the transistor in saturation (VBESAT and VCESAT ) were given, so they can be used to obtain the currents in the circuit: IB = VCC − VBESAT 10 − 0.8 = = 0.0613 mA RB 150 · 103 IC = 2.2 VCC − VCESAT 10 − 0.2 = = 4.9 mA RC 2 · 103 Analysis of a BJT amplifier The operating point (with base current) Problem 3. Let’s calculate the parameters of the operating point of the circuit in Fig. 5. We assume that VCC = 15 V, RG = 2 kΩ, CIN = 360 nF, R1 = 1.4 MΩ, R2 = 330 kΩ, RE = 10 kΩ, CE = 100 µF, RC = 40 kΩ, COU T = 100 nF, RL = 100 kΩ, B = 255, VBE = 0.6 V. Solution 3. The capacitors in this circuit function as a seprator of direct and alternating voltages. We may use the approximation, that the capacitors may be substituted with an open circuit for DC and a short circuit for AC. Thus the operating point of the transistor will be determined by merely R1 , R2 and RE . Let’s find the KCL for the base node of the transistor. The capacitor is an open circuit for direct currents, hence only three currents need to be summed: −IR1 + IB + IR2 = 0 Let VB be the potential of the base and VE be the potential of the emitter. The current of R1 , R2 and RE can be expressed with these potentials: VCC − VB IR1 = R1 Nagy Gergely (September 15, 2009) 3 Figure 5. A BJT amplifier circuit IR2 = VB R2 IE = VE RE As the bipolar transistor is open, the voltage between it’s base and emitter terminals will be equal to the forward voltage of the EB PN junction (0.6 V): VB = VE + 0.6 We also know that there is a connection between IB and IE . The following definitions exist: IC = A · IE IC = B · IB IE = IB + IC Hence IE can be exressed: IE = IB + IC = IB + B · IB = (B + 1) · IB which allows us to give VB as a function of IB : VB = VE + 0.6 = IE · RE + 0.6 = (1 + B) · IB · RE + 0.6 Using the relationships found above and substituting the equations in the KCL, we get: −IR1 + IB + IR2 = − VB VCC − (1 + B) · IB · RE + 0.6 (1 + B) · IB · RE + 0.6 VCC − VB + IB + =− + IB + =0 R1 R2 R1 R2 Now IB can be expressed with the constants that are given: IB = R2 · VCC − R2 · 0.6 − R1 · 0.6 1 + R2 · RE · (B + 1) + R1 · RE · (B + 1) Substituing the numbers into this equation IB = 330 · 103 · 15 − 330 · 103 · 0.6 − 1.4 · 106 · 0.6 = 0.833 µA 1 + 330 · 103 · 10 · 103 · (255 + 1) + 1.4 · 106 · 10 · 103 · (255 + 1) Now IE , IC and the potentials can also be found: IE = (B + 1) · IB = 256 · 0.883 · 10−6 = 0.226 mA Nagy Gergely (September 15, 2009) 4 IC = B · IB = 255 · 0.883 · 10−6 = 0.225 mA VE = (1 + B) · IB · RE = 2.26 V VB = VE + 0.6 = 2.86 V The collector potential equals to the difference of the supply voltage and the voltage that is dropped on RC : VC = VCC − VRC = VCC − IC · RC = 15 − 0.225 · 10−3 · 40 · 103 = 6 V Let’s calculate the VCE voltage in order to find out if the transistor saturates: VCE = VC − VE = 6 − 2.26 = 3.73 V Although the collector-emitter saturation voltage was not given in this problem, but it’s value is around 0.2-0.3 V, so this transistor is in the normal active region. Simplified operating point calculations Problem 4. Let’s calculate the parameters of the operating point of the circuit in Fig. 5. In this case we assume, that IB = 0, which simplifies the calculation by a large scale but doesn’t degrade the preciseness of the results significantly. Solution 4. and R2 : If IB = 0 then the base potential (VB ) can be found by simply dividing the supply voltage between R1 VB = VCC · R2 330 · 103 = 15 · = 2.86 V R1 + R2 1.44 · 106 + 330 · 103 We have received basicly the same value for VB as in the previous section but in a much easier way! Next, we determine VE : VE = VB − 0.6 = 2.26 V The emitter current can be calculated using Ohm’s law: IE = 2.26 VE = = 0.226 mA RE 10 · 103 If we calculate with zero base current then the colector current equals to the emitter current: IC ' IE = 0.226 mA Hence the collector potential is VC = VCC − IC · RC = 15 − 0.226 · 10−3 · 40 · 103 = 5.96 V The error we made by the approximation is only 0.04 V. Problem 5. Let’s calculate the parameters of the small signal model of the circuit in Fig. 5. Solution 5. We are going to use the operating point values to obtain the parameters of the small signal equivalent circuit of the BJT. The common emitter small signal equivalent circuit of the BJT can be seen in Fig. 6. Figure 6. The common emitter small signal equivalent circuit of the BJT Nagy Gergely (September 15, 2009) 5 The parameters of the equivalent circuit are: (β + 1) · re = (β + 1) · and gm = dVBE VT 26 · 10−3 = (β + 1) · = 256 · = 29.451 kΩ dIE IE 0.226 · 10−3 IC 0.225 · 10−3 ∂IC = = = 8.654 mS ∂VEB VT 26 · 10−3 where we assumed that β ' B. In order to construct the small signal model of the amplifier core (the elements between CIN and COU T ), a few rules need to be revised: • The capacitors in such circuits are sized so that at the operating frequency (and thus in the small signal equivalent circuit) they can be substituted with a short circuit. • DC voltage sources can also be substitued with short circuits as they merely realize a constant displacement in the potential – the alternating current flows through them. Subsequently the voltage source will be an AC ground, as it is a DC voltage source with a terminal at ground potential. The small signal equivalent of the amplifier can be seen in Fig. 7. Figure 7. The small signal equivalent of the amplifier In AC calculations we are interested in the input and output resistance of the amplifier and the gain. All three values are considered good if they are big. If the input resistance is big, than the amplifier can be driven by small currents, thus a small power signal can be amplified. The output resistance should also be a high value, because the load resistance is parallel to it, so if the load is much smaller than the output resistance, than most of the current flows on the load which yields a high power efficiency. The input resistance of the amplifier core is the parallel sum of the three resistors (R1 , R2 and (β + 1) · re ): RIN = R1 × R2 × (β + 1) · re = 28.6 kΩ The output resistance equals to the collector resistance: ROU T = RC = 40 kΩ The gain is by definition the ration of the output and intput signals: AV 0 = uOU T −gm · uin · RC = = −346.53 uIN uin The negative sign is due to the opposite direction of the collector current and the output voltage. AV 0 is the voltage gain of the amplifier core. The circuit in Fig. 5. there is a non-ideal alternating voltage source with a series resistance of RG on the input and load resistor (RL ) on the output. The RG resistance is in series with input resistance of the amplifier core thus the voltage of the generator (VG ) is divided: RIN Vin = VG · RIN + RG This is the input voltage of the amplifier. At it’s output, the output current (IC ) is divided by RC and RL hence the total gain of the amplifier is: AV = AV 0 · Nagy Gergely (September 15, 2009) RIN RL · RIN + RG RC + RL 6 Figure 8. A subtracting amplifier 3 Operational amplifiers Problem 6. In the circuit in Fig. 8 R1 = 1 kΩ, R2 = 10 kΩ, R3 = 10 kΩ and R4 = 20 kΩ. The operational amplifier is ideal. Find the output voltage. Solution 6. As the operational amplifier is ideal, no current flows into its inputs and their potentials are equal. Therefore according to the KCL for the V+ input is V+ = R3 · V2 R2 + R3 as R2 and R3 act as a voltage divider. The KCL for the V− input: V− − Vout V− − V1 + = 0. R1 R4 Let’s rearrange this equation to get V− : V− = R4 V1 + R1 Vout . R1 + R4 As V+ = V− : R3 R4 · V1 + R1 · Vout · V2 = . R2 + R3 R1 + R4 By rearranging the formula, we get Vout = − R4 R1 + R4 R3 · V1 + · · V2 . R1 R2 + R3 R1 (1) Thus: Vout = −20 · V1 + 10.5 · V2 . Problem 7. Supposing that the operational amplifier in the circuit in Fig. 9 is ideal and the resistance of all the resistors is identical (R), find the voltage gain. Figure 9. Problem 7. Nagy Gergely (September 15, 2009) 7 Solution 7. The potential of the V− input is equal to that of the V+ input and no current flows into the inputs. Thus the voltage drop on R1 is VIN . Hence its current is: IR1 = VIN . R The same current flows through R2 , which means that the same voltage is dropped on it (because their resistances are equal). As the Vx potential is equal to the sum of the V− potential and the voltage drop on R2 : Vx = 2 · VIN . Vx is the voltage dropped on R3 , thus its current is IR3 = 2 · VIN . R Applying the KCL to the Vx node: IR4 = IR2 + IR3 = VIN 2 · VIN 3 · VIN + = . R R R As R4 = R, the voltage drop on R4 is VR4 = 3 · VIN . The potential of the output equals to the sum of the Vx potential and the voltage drop on R4 : VOU T = Vx + VR4 = 2 · VIN + 3 · VIN = 5 · VIN . Thus the voltage gain of this amplifier is 5. Problem 8. In the circuit in Fig. 10 the operational amplifier is ideal and R1 = 500 Ω, R2 = 3 kΩ, R3 = 6 kΩ and the breakdown voltage of the Zener diode is 6 V. Determine the output voltage and current of the amplifier. You may neglect the differential resistance of the diode, and may suppose that it is open in steady state. Figure 10. Problem 8. Solution 8. The V+ input of the amplifier is driven by the breakdown voltage of the Zener diode, hence its potential is 6 V. This needs to be the potential of the V− input. The R2 and R3 resistors divide the output voltage to 6 V: V− = VOU T · R3 R2 + R3 hence 3 · 103 + 6 · 103 = 9V 6 · 103 The output current of the amplifier is equals to the sum of IR1 and IR2 according to the KCL. According to Ohm’s law: VR 1 VOU T − VZ 9−6 IR1 = = = = 6 mA, R1 R1 500 VOU T = 6 · and IR2 = VR 2 9−6 = = 1 mA R2 3 · 103 Thus the output current of the amplifier is 7 mA. Nagy Gergely (September 15, 2009) 8 Figure 11. Problem 9. Problem 9. In the circuit in Fig. 11 the operational amplifier is ideal and VCC = 15 V, V1 = 1 V, RC = 10 kΩ, RE = 2 kΩ, VBE = 0.7 V, UCES = 0.2 V and B = 100. Determine (a) the current of RC , (b) the output current and voltage of the amplifier. Solution 9. The potential of the V− input and thus the voltage drop on RE is V1 , hence IE = V1 = 0.5 mA. RE The base current of the transistor (and the output current of the operational amplifier) is IB = IE = 4.95 µA B+1 The output potential of the amplifier is VB = VE + 0.7 = 1.7 V. The current of RC is IRC = IC = B · IB = 0.495 mA if the transistor is in normal active mode. It should be checked whether the transistor is in normal active mode: VCE = VC − VE = VCC − IC · RC − VE = 15 − 0.495 · 10−3 · 10 · 103 − 1 ' 9 V > 0.2 V hence the transistor is in normal active mode. Problem 10. Find the gain of the circuit in Fig. 12. Solution 10. The amplifier can be divided into two stages (shown in the figure with a red line) As the potentials of the inputs of an ideal operational amplifier are equal, the voltage drop on R4 is equal to the input voltage (VS ) and its current is VS I= . R4 The same current flows through the two R3 resistors thus the output voltage of the first stage is: µ ¶ 2 · R3 V1 = I · R3 + I · R4 + I · R3 = I · (2 · R3 + R4 ) = VS · 1 + R4 The gain of the first stage can now be calculated: A1 = 1 + 2 · R3 R4 The gain of the second stage can be calculated using Eq. 1: A2 = Nagy Gergely (September 15, 2009) R2 . R1 9 Figure 12. Instrumentation amplifier The gain of the amplifier is the product of the gains of its stages: µ ¶ 2 · R3 R2 A = A1 · A2 = 1 + · R4 R1 The circuit in Fig. 12 is an instrumentation amplifier. It is used extensively in applications where a small differential signal needs to be amplified (e.g. in measurement and test equipments). Its advantage is that it has a differential input and both of the input ports are the inputs of an operational amplifier hence it has a large input resistance. 4 Calculation of a CMOS operational amplifier Let’s analyse the operational amplifier in Fig. 13. The sizes of the transistors are shown in the figure – the W/L ratio is given in µms. VDD = 5 V, R = 100 kΩ, Kn = 110 µA/V2 , Kp = 50 µA/V2 , λn = λp = 0.01, VT n = |VT p | = 0.7 V. Figure 13. A CMOS operational amplifier 4.1 Hand calculation of MOS transistors The VGS and VT voltages of the PMOS transistors are negative, but in most of the formulas the absolute value can be used, which makes calculations easier. The channel-length modulation is neglected during the DC calculations, it is considered only when the output resistance is computed. It is worthwhile to use the following definition: VON = VGS − VT , Nagy Gergely (September 15, 2009) 10 as it is easy to get using the current of the transistor and the VON voltage is the threshold voltage of saturation. The following equations are needed for the calculations. • The current of the MOS transistor in saturation: ID = K W K W 2 · · (VGS − VT ) = · · VON 2 2 L 2 L • The VON voltage (using the equation above): r VON = 2 · ID · L K ·W • The condition of saturation: VDS > VGS − VT = VON • The parameters of the small signal modell: 1. Transconductance: gm = 2 · ID 2 · ID = VGS − VT VON 2. The output resistance of the transistor: rDS = 1 λ · ID The following unit system should be used to ease calculations: [V, µA, MΩ]. 4.2 DC calcualtions, the operating point The DC currents are set by the M8 transistor and the R resistor – these elements build up the current generator of the operational amplifier. The same current flows through M8 and R, thus: I8 = Kp W 8 VDD − VGS8 2 · · (VGS8 − VT ) = 2 L8 R The following quadratic equation needs to be solved: 2 75 · (VGS8 − 0.7) = 5 − VGS8 0.1 One of the two solutions yields a result smaller than the threshold voltage, thus the correct result is: VGS8 = 1.4 V and I8 = 36 µA. The M5 , M6 and M8 transistors form a current mirror. The size of M5 is exactly the same as that of M8 so I5 = I8 = 36 µA. The width of M6 is 35 · W8 , so I6 = 53 · I8 = 60 µA. The M3 and M4 transistors also form a current mirror. The currents of M1 and M2 are equal due to the circuit’s symmetry, thus I1 = I2 = 18 µA. The currents in the circuit are shown in Fig. 14. Figure 14. The DC currents in the CMOS operational amplifier Nagy Gergely (September 15, 2009) 11 Let’s determine the gate-source and on voltage of the transistors using the formulas below: r 2 · ID · L VON = K ·W and VGS = VON + VT . Please note, that Kn 6= Kp ! The calculated voltages are shown in Table. 1. Table 1. VGS and VON of the transistors Tran. M1 M2 M3 M4 M5 M6 M7 M8 Type p p n n n n n p W [µm] 2 2 4 4 3 5 10 3 L [µm] 1 1 1 1 1 1 1 1 I [µA] 18 18 18 18 36 60 60 36 VON [V] 0.6 0.6 0.3 0.3 0.7 0.7 0.3 0.7 VGS [V] 1.3 1.3 1.0 1.0 1.4 1.4 1.0 1.4 Let’s determine the voltage of the nodes (shown in blue in Fig. 14): 1. V1 = VDD − VGS8 = 3.6 V. 2. This potential is determined by the common mode voltage applied to the inputs (as long as the transistors (M1 and M5 are in saturation). This will be determined later, the equation is: V2 = VC + VGS1 = VC + 1.3 V. 3. The currents and output resistances of M6 and M7 are equal, hence V3 = VDD 2 = 2.5 V. 4. V4 = VGS3 = 1 V. 5. V5 = VGS7 = 1 V. 4.3 The common mode input range The range of the common mode input voltage is determined by the simple rule that the M1 and M5 transistors must be kept in saturation. The maximum common mode input potential is limited by M5 : it is in the edge of saturation, hence VDS5 = VON 5 = 0.7 V. In this case, the potential of node 2 is: V2 = VDD − VON 5 = 4.3 V. The VC voltage is VGS1 less than V2 , so the maximum common mode voltage is: VCmax = VDD − VON 5 − VGS1 = 3 V. The minimum common mode voltage is limited by M1 , which is in the edge of saturation, so: V2 = VGS3 + VON 1 = 1.6 V and thus VCmin = 1.6 − 1.3 = 0.3 V. 4.4 Small signal, AC analysis Let’s determine the small signal parameters of the transistors using the following formulas. Transconductance: 2 · ID 2 · ID gm = = VGS − VT VON The output resistance of the transistor: rDS = Nagy Gergely (September 15, 2009) 1 λ · ID 12 Table 2. The small signal parameters of the transistors Tran. M1 M2 M3 M4 M5 M6 M7 M8 gm [µS] 60 60 120 120 104 173 400 104 rds [MΩ] 5.6 5.6 5.6 5.6 2.8 1.7 1.7 2.8 The symmetrical voltage gain is to be found. The amplifier can be divide into two stages, an OTA (Operational Transconductance Amplifier – M1 − M5 ) and a common source amplifier (M6 − M7 ). Let’s analyse the OTA first (Fig. 15). Let’s short the output AC-wise to the ground. This can be done by placing a DC voltage source to the output that’s voltage is exactly the same as the DC operating point of the output node (node 5). A DC voltage source is an AC short circuit, because forces a DC voltage between it’s ports, so if one of it’s port’s potential is changed, the port’s potential changes with the same amount. And as the voltage source is connected to the ground, it shorts node 5 to the ground potential AC-wise. Let’s apply a symmetrical voltage (vs ) with a common mode component (Vc ) to the input. This means that: V+ = VC + vs 2 and vs , 2 hence the gate-source voltage of M1 is elevated by v2s , while that of M2 is decreased by the same amount. This causes an increase/decrease in the current ( i2s ). V− = VC − Figure 15. Small signal analysis of the first stage of the operational amplifier The M3 − M4 current mirror copies the IC + i2s current to the output, so the current of the voltage source equals to is according to the KCL for node 5 (the sum of incoming and outgoing currents is zero). The amplitude of us is very small (the input voltage of an operational amplifier is almost zero), thus the following (linear) approximation can be used: is ' gm · us , hence the short current of the amplifier is ish = gm1 · us At node 5 the output resistance is the parallel connection of the output resistance of M2 and M4 : rout = rds2 × rds4 By performing a Norton-Thévenin transformation, we get: v0 = ish · rout = gm1 · vs · (rds2 × rds4 ) Nagy Gergely (September 15, 2009) 13 This formula gives the connection between the input (vs ) and output (v0 ) voltages, hence the gain of the first stage is: A1 = gm1 · (rds2 × rds4 ) = 168 The gain of the second stage can be calculated with the formula seen in the slides of the class concerning the common source amplifier: A2 = gm7 · (rds6 × rds7 ) = 308 The symmetrical voltage gain of the amplifier is: A = A1 · A2 ' 50000 ' 94 dB. 5 Logic gates Problem 11. Determine the logic function of the gate in Fig. 16. Figure 16. Logic gate built up with transfer gates Solution 11. Consider the operation of the upper transfer gate. It is open, when the gate of the NMOS transistor (M2 ) is at logic 1 and the gate of the PMOS (M1 ) is at logic 0. Thus, when A = 0 then Y = B. The lower transfer gate is driven in the opposit phase: it is open, when the upper is closed, hence the output is always driven by one and only one of the two transfer gates. The lower is open, when A = 1 and then the output is: Y = B. At this point the truth table can be filled: Table 3. The truth table of the logic gate in Fig. 16. A 0 0 1 1 B 0 1 0 1 Y 0 1 1 0 It is now evident the circuit in Fig. 16. realizes an XOR gate. Problem 12. Find the threshold voltage of the inverter in Fig. 17. Figure 17. A CMOS inverter Solution 12. If the input voltage of a logic gate is lower than the threshold voltage then it is considered a logic 0, if it is higher, then it is considered a logic 1. A logic gate’s output, when the thershold voltage is applied to its input is VDD /2. Nagy Gergely (September 15, 2009) 14 In a CMOS inverter, we get an output voltage of VDD /2, if the channel resistances of the two transistors are equal, i.e. when the transistors force the same drain currents. So the equation that yields the threshold voltage is the following: Id1 = Id2 By substituting the currents with the characteristics of the MOS transistor we get: Kp Wp Kn W n 2 2 · · (VGSn − VT ) = · · (VGSp − VT ) 2 Ln 2 Lp Let the input potential be: Vth . The gate-source voltage of hte NMOS transistor is: VGSn = Vth − 0 = Vth and that of the PMOS is: VGSp = VDD − Vth hence the equation can be written as: Kp W p Kn W n 2 2 · · (Vth − VT ) = ID = · · (VDD − Vth − VT ) 2 Ln 2 Lp The threshold voltage (Vth ) can be calculated using the formula above. Nagy Gergely (September 15, 2009) 15