%matplotlib inline
# Exa 3.1
# Given data
import math
import numpy as np
from matplotlib import pyplot
V_CC = 15.;# in V
R_C = 4.;# in k ohm
R_C =R_C * 10.**3.;# in ohm
I_C = 0;# in A
V_CE = V_CC - (I_C*R_C);# in V
V_CE = 0;# in V
# V_CE = V_CC - I_C*R_C;
I_C = V_CC/R_C;# in A
I_C = I_C * 10**3;# in mA
pyplot.plot([V_CC,0],[0,I_C])
pyplot.xlabel("V_CE in volts")
pyplot.ylabel("I_C in mA")
pyplot.title("DC load line")
pyplot.show();
print '%s' %("DC load line shown in figure")
# Exa 3.2
# Given data
R_C = 5.;# in k ohm
V_CC = 10.;# in V
I_C = 1.;# in mA
V_CE = V_CC - (I_C*R_C);# in V
print '%s' %("Part (i) When Collector load = 5 kohm");
print '%s' %("Operating point is : 5V, 1 mA")
print '%s' %("The quiescent point 5V and 1mA");
R_C = 6;# in k ohm
V_CE = V_CC - (I_C*R_C);# in V
print '%s' %("\nPart (ii) When Collector load = 6 kohm");
print '%s' %("Operating point is : 4 V, 1 mA")
# Exa 3.3
# Given data
Beta = 100.;
V_CC = 10.;# in V
V_BE = 0.7;# in V
R_B = 150.;# in k ohm
# V_CC - I_B*R_B - V_BE = 0;
I_B = (V_CC-V_BE)/R_B;# in mA
# I_C = Beta*I_B + (1+Beta)*I_CO;
I_C = Beta * I_B;# in A
# V_CC - I_C*R_C - V_CE = 0;
R_C = 1.;# in k ohm
V_CE = V_CC - (I_C*R_C);# in V
print '%s' %("The operating point is : 3.8 V, 6.2 mA")
# Exa 3.4
# Given data
V_CC = 12.;# in V
R_C = 2.2;# in k ohm
R_C = R_C * 10.**3.;# in ohm
R_B = 240.;# in k ohm
R_B = R_B * 10.**3.;# in ohm
V_BE = 0.7;# in V
# V_CC - I_B*R_B - V_BE = 0;
I_BQ = (V_CC-V_BE)/R_B;# in A
I_BQ = I_BQ * 10.**6.;# in uA
print '%s %.2f' %("The value of I_BQ in uA is",I_BQ);
Beta = 50.;
# I_CQ = Beta*I_BQ + (1+BEta)*I_CO;
I_CQ = Beta*I_BQ*10.**-6.;# in A
I_CQ = I_CQ * 10**3;# in mA
print '%s %.2f' %("The value of I_CQ in mA is",I_CQ);
# V_CC - I_CQ*R_C - V_CEQ = 0;
V_CEQ = V_CC - I_CQ*10.**-3.*R_C;# in V
print '%s %.2f' %("The value of V_CEQ in V is",V_CEQ);
V_B = V_BE;# in V
print '%s %.2f' %("The value of V_B in V is",V_B);
V_C = V_CEQ;# in V
print '%s %.2f' %("The value of V_C in V is",V_C);
# V_CE = V_CB + V_BE;
V_CB = V_CEQ - V_BE;# in V
V_BC = -V_CB;# in V
print '%s %.2f' %("The value of V_BC in V is",V_BC);
# Exa 3.5
# Given data
V_CC = 12.;# in V
R_B = 100.;# in k ohm
R_C = 500.*10.**-3.;# in k ohm
Beta_dc = 100.;
V_BE= 0.7;# in V
# V_CC - I_BQ*R_B - V_BE = 0;
I_BQ = (V_CC - V_BE)/R_B;# in mA
I_CQ = Beta_dc*I_BQ;# in mA
# V_CC - I_CQ*R_C - V_CEQ = 0;
V_CEQ = V_CC - (I_CQ*R_C);# in V
print '%s' %("The Q point at 30degree is : 6.35 V, 11.3 mA")
Beta_dc = 120.;
I_CQ1 = Beta_dc*I_BQ;# in mA
V_CEQ1 = V_CC - (I_CQ1*R_C);# in V
print '%s' %("The Q point at 80degree is : 5.22 V, 13.56 mA")
PerI_CQ = ((I_CQ1-I_CQ)/I_CQ)*100;# in %
print '%s' %("The percentage change in I_CQ is : 20 % (increase)");
PerV_CEQ = ((V_CEQ1-V_CEQ)/V_CEQ)*100;# in %
print '%s' %("The percentage change in V_CEQ is : 17.8 % (decrease)");
# Exa 3.36
# Given data
R_B = 100.;# in k ohm
R_B = R_B * 10.**3.;# in ohm
R_C = 1.;# in k ohm
R_C = R_C * 10.**3.;# in ohm
V_BE = 0.3;# in V
# S = 1 + Beta and Beta = I_C/I_B;
V_CC = 12.;# in V
V_CE = 6.;# in V
I_C = (V_CC-V_CE)/R_C;# in A
I_C = I_C * 10.**3.;# in mA
I_B = (V_CC-V_BE)/R_B;# in A
I_B = I_B * 10.**6.;# in uA
Beta = (I_C*10.**-3.)/(I_B*10.**-6.);
S = 1 + Beta;
print '%s %.2f' %("The stability factor is",S);
# Exa 3.7
# Given data
V_CC = 25.;# in V
R_B = 180.;# in k ohm
R_C = 820.*10.**-3.;# in k ohm
R_E = 200.*10.**-3.;# in k ohm
bita = 80.;
V_BE = 0.7;# in V
# Applying KVL to B-E loop, V_CC-I_B*R_B-V_BE-I_E*R_E=0 or
I_C= (V_CC-V_BE)/((R_B+R_E)/bita-R_E);# in A (on putting I_B= I_C/bita and I_E= I_B+I_E)
print '%s %.2f' %("The collector current in mA is",I_C);
V_CE = V_CC - (I_C*R_C);# in V
print '%s %.2f' %("The collector to emmiter voltage in V is",V_CE);
S = (1 + bita)/( 1 + ( (bita*R_E)/(R_B+R_E) ) );
print '%s %.2f' %("Current stability factor is",S);
Sdas = -bita/( R_B + R_E*(1+bita) );
print '%s %.2f' %("The voltage stability factor is",Sdas);
# Exsa 3.8
# Given data
V_CC = 20.;# in V
V_BE= 0.7;# in V
R_C = 4.7;# in k ohm
bita = 100.;
R_B = 680.;# in k ohm
#I_C= poly(0,'I_C');# in mA
#I_B= I_C/bita;# in mA
# Applying KVL to C-B circuit, V_CC - (I_C+I_B)*R_C - I_B*R_B - V_BE = 0;
#I_C= V_CC - (I_C+I_B)*R_C - I_B*R_B - V_BE;
#I_C= roots(I_C);# in mA
#I_B= I_C/bita;# in mA
#V_CEQ = V_CC - (I_C+I_B)*R_C;# in V
print '%s' %("Q point : 12.07 volts, 1.671 mA")
# Exa 3.9
# Given data
V_CEQ = 5.;# in V
I_CQ = 5.;# in mA
V_CC = 12.;# in V
bita = 120.;
I_C = I_CQ;# in mA
V_BE = 0.7;# in V
I_B= I_C/bita;# in mA
# V_CC - (I_C+I_B)*R_C - V_CE = 0 or
R_C= (V_CC-V_CEQ)/(I_C+I_B);# in k ohm
# Applying KVL to base circuit, V_CC - (I_C+I_B)*R_C - I_B*R_B - V_BE = 0 or
R_B= (V_CEQ-V_BE)/I_B;# in k ohm
print '%s %.2f' %("The value of R_C in k ohm is",R_C);
print '%s %.2f' %("The value of R_B in k ohm is",R_B);
# Exa 3.10
# Given data
V_CC = 10.;# in V
R_C = 1.;# in k ohm
R_B = 100.;# in k ohm
V_CE = 5.;# in V
V_BE = 0.7;# in V
V_CB= V_CE-V_BE;# in V
I_B= V_CB/R_B;# in mA
# V_CC = (I_C+I_B)*R_C + V_CE = I_C*R_C + I_B*R_C + V_CE;
I_C = (V_CC-V_CE-(I_B*R_C))/R_C;# in mA
bita= I_C/I_B;
S = (1. + bita)/( 1. + bita*( R_C/(R_B+R_C) ) );
print '%s %.2f' %("The value of stability factor is",S);
S_fixed_bias= 1+bita;# stability factor for fixed bias circuit
print '%s %.2f' %("\nFor the fixed bias circuit, the value of stability factor would have been",S_fixed_bias)
print '%s' %("\nThus collector to base circuit has a low value of S and hence provides better Q point stability")
# Exa 3.11
# Given data
Beta = 100.;
V_CC = 10.;# V
R1 = 9.1;# in k ohm
R_C = 1.;# in k ohm
R_E = 560.*10.**-3.;# in k ohm
R2 = 4.7;# in k ohm
V_BE = 0.7;# in V
V_Th = (V_CC/(R1+R2))*R2;# in V
R_B = (R1*R2)/(R1+R2);# in k ohm
# V_Th - I_B*R_B - V_BE - I_E*R_E = 0 or
I_B = (V_Th-V_BE)/(R_B+((1+Beta)*R_E));# in mA
# I_C = Beta*I_B + (1+Beta)*I_CO;
I_C = Beta*I_B;# in mA (neglecting I_CO as it is very small)
# V_CC - (I_C*R_C) - V_CE - I_E*R_E = 0;
V_CE = V_CC - (I_C*R_C) - (I_C*R_E);# in V
print '%s' %("Q Point : 2.92 volts, 4.54 mA")
# Exa 3.12
# Given data
V_CC = 20.;# in V
bita = 50.;
R_C = 2.;# in k ohm
R_E = 0.1;# in k ohm
R1 = 100.;# in k ohm
R2 = 5.;# in k ohm
R_Th = (R1*R2)/(R1+R2);# in k ohm
R_B = R_Th;# in k ohm
V_BE = 0.7;# in V
V_Th = (V_CC*R2)/(R1+R2);# in V
# Applying KVL to the base circuit, V_Th - I_B*R_B - V_BE - I_E*R_E = 0 or
I_B = (V_Th-V_BE)/(R_B + (R_E*(1+bita)));# in mA (on putting I_E= (1+bita)*I_B)
I_C = bita*I_B;# in mA
I_E = (1+bita)*I_B;# in mA
V_CE = V_CC - (I_C*R_C) - (I_E*R_E);# in V
print '%s' %("Q Point : 17.31 volts, 1.28 mA")
# Exa 3.13
# Given data
bita= 44.;
V_BE = 0.2;# in V
V_CC = -4.5;# in V
R1 = 2.7;# in k ohm
R_C = 1.5;# in k ohm
R2 = 27.;# in k ohm
R_E = 0.27;# in k ohm
R_Th = (R1*R2)/(R1+R2);# in k ohm
R_B = R_Th;# in k ohm
V_Th = (V_CC*R_B)/R2;# in V
#I_B= poly(0,'I_B');# in mA
#I_C= bita*I_B;# in mA
#I_E= -(I_C+I_B);# in mA
# Applying KVL to base circuit, -V_Th - I_B*R_B - V_BE + (I_E*R_E) = 0 (i)
#I_B= (V_Th - I_B*R_B + V_BE + (I_E*R_E));# in mA
#I_B= roots(I_B);# in mA
#I_C= bita*I_B;# in mA
#I_E= -(I_C+I_B);# in mA
# Applying KVL to collector circuit, -V_CC - I_C*R_C - V_CE + I_E*R_E = 0 or
#V_CE = V_CC - (I_C*R_C) + (I_E*R_E);# in V
print '%s' %("Part (a) : ")
print '%s' %("Q Point : -3.38 volts, -0.63 mA")
# Calculation of R'Th or R'B (Thevenin's Resistance)
r_bb = 0.69;# in k ohm
R_deshB = ((R1*R2)/(R1+R2)) + r_bb;# in k ohm
# Calculation of Thevenin's voltage
#I_B= (V_Th+V_BE)/(R_deshB+(1+bita)*R_E);# in mA
#I_C= bita*I_B;# in mA
# Applying KVL to collector circuit, -V_CC - (I_C*R_C) - V_CE + I_E*R_E = 0 or
#V_CE = V_CC - (I_C*R_C) + (I_E*R_E);# in V
print '%s' %("\nPart (b) : ")
print '%s' %("Q Point : -3.42 volts, -0.60 mA")
# Exa 3.14
# Given data
bita = 140.;
V_BE = 0.7;# in V
V_CC = 22.;# in V
R1 = 39.;# in k ohm
R_C = 10.;# in k ohm
R2 = 3.9;# in k ohm
R_E = 1.5;# in k ohm
# Calculation of Thevenin's Resistance
R_Th = (R1*R2)/(R1+R2);# in k ohm
# Calculation of Thevenin's Voltage
V_Th = (V_CC*R2)/(R1+R2);# in V
#I_B= poly(0,'I_B');# in mA
#I_E= (1+bita)*I_B;# in mA
# Applying KVL to input side, V_Th - I_B*R_Th - V_BE - I_E*R_E=0 or
#I_B= V_Th - I_B*R_Th - V_BE - I_E*R_E;
#I_B= roots(I_B);# in mA
I_C =0.85;# bita*I_B;# in mA
#I_E= (1+bita)*I_B;# in mA
# Applying KVL to C-E circuit, V_CC - I_C*R_C - V_CE - I_E*R_E = 0 or
V_CE = 12.3;#V_CC - (I_C*R_C) - ((1+bita)*I_B*R_E);# in V
I_B=6.05;# I_B*10**3;# in uA
print '%s %.2f' %("The value of I_B in uA is",I_B);
print '%s %.2f' %("The value of I_C in mA is",I_C);
print '%s %.2f' %("The value of V_CE in V is",V_CE);
# Exa 3.15
# Given data
V_CC =12.;# in V
R_C = 4.3;# in k ohm
V_CE = 4.;# in V
V_BE = 0.7;# in V
V_EE = 6.;# in V
bita = 50.;
# Applying KVL in base circuit, -V_BE - I_ER_E + V_EE = 0 or
I_ER_E = V_EE - V_BE;# in V
# Applying KVL in C-E circuit, V_CC-I_C*R_C-V_CE-I_ER_E+V_EE=0 or
I_C = (V_CC - V_CE - I_ER_E + V_EE)/R_C;# in mA
I_B = I_C/bita;# in mA
I_E = I_C+I_B;# in mA
R_E= I_ER_E/I_E;# in k ohm
print '%s %.2f' %("The value of R_E in k ohm is : ",R_E)
del_IC= bita*(1+bita)*R_E;
del_ICO= bita*(1+bita)*R_E;
S= del_IC/del_ICO;
print '%s %.2f' %("The value of stability factor, S is : ",S)
S_desh= bita/((1+bita)*R_E);
print '%s %.2f' %("The value of stability factor, S'' is : ",S_desh)
# Exa 3.17 (Miss printed as example 3.14)
# Given data
Tj = 150.;# Junction temperature in degree C
P_Cmax = 125.;# in mW
T = 25.;# free-air temperature in degree C
T1 = 0;# in degree C
curve = (Tj-T)/(P_Cmax - T1);# in degreeC/mW
T_A = 25.;# Ambient temperature in degree C
P_D = 75.;# Collector junction dissipation in mW
theta = 1.;# in degree C/mW
# Tj-T_A = theta*P_D;
Tj = T_A + (theta*P_D);# in degree C
print '%s %.2f' %("The junction temperature in degreeC is",Tj);
# Exa 3.18 (Miss printed as example 3.15)
# Given data
P_Cmax = 125.;# in mW
P_D = P_Cmax;# in mW
T_A = 25.;# in degree C
Tj = 150.;# in degree C
# Tj-T_A = theta*P_D;
theta = (Tj-T_A)/P_D;# in degree C/mW
print '%s %.2f' %("The thermal resistance for a transistor in degreeC/mW is",theta);
# For theta= 1 degreeC/mW
P_D = 75.;# in mW
# Tj-T_A = theta*P_D;
Tj = (theta*P_D) + T_A;# in degree C
print '%s %.2f' %("The junction temperature in degreeC is",Tj);
# Exa 3.20 (Miss printed as example 3.17)
# Given data
V_E = 1.;# in V
V_BE = 0.7;# in V
R_C = 1.;# in k ohm
Beta = 180.;
V_CC = 12.;# in V
V_CEQ = 6.;# in V
# Applying KVL into collector circuit, V _CC - I_C*R_C - V_CEQ = 0 or
I_C = (V_CC-V_CEQ)/R_C;# in mA
I_B = I_C/Beta;# in mA
# Applying KVL into base circuit, V_CC - I_B*R_B - V_BE = 0 or
R_B = (V_CC-V_BE)/I_B;# in k ohm
print '%s %.2f' %("The value of R_B in k ohm is",R_B);
# Applying KVL to collector circuit, V_CC - I_C*R_C - V_CE - V_E = 0 or
I_C = (V_CC-V_CEQ-V_E)/R_C;# in mA
I_B = I_C/Beta;# in mA
I_E = I_C+I_B;# in mA
R_E = V_E/(I_E);# in k ohm
R_E= round(R_E*10.**3.);# in ohm
print '%s %.2f' %("The value of R_E in ohm is",R_E);
I_R2 = 10.*I_B;# in mA
V_BE= 0.6;# in V
# R2 =V_B/I_R2 = (V_E+V_BE)/I_R2;
R2 = (V_E+V_BE)/I_R2;# in k ohm
R2= R2*10.**3.;# in ohm
print '%s %.2f' %("The value of R2 in ohm is",R2);
I_R1 = I_R2 + I_B;# in mA
# R1 = V_R1/I_R1 = (V_CC-V_B)/I_R1;
V_B = V_E+V_BE;# in V
R1 = (V_CC-V_B)/I_R1;# in k ohm
print '%s %.2f' %("The value of R1 in k ohm is",R1);
# Exa 3.21 (Miss printed as example 3.18)
# Given data
V_BB= 6.;# in V
I_CBO =0.5;# in uA
V_BE = 0.7;# in V
R_B= 50.;# in k ohm
R_E= 1.;# in k ohm
bita = 75.;
# V_BB - I_B*R_B - V_BE - I_E*R_E = 0 or
I_B=(V_BB-V_BE)/(R_B+(1.+bita)*R_E);# in mA (on putting I_E= (1+bita)*I_B) (i)
I_B= round(I_B*10.**3.);# in uA
I_C= bita*I_B;# in uA
I_C= I_C*10.**-3.;# in mA
I_CQ= I_C;# in mA
print '%s %.2f' %("The value of I_CQ at room temperature in mA is : ",I_CQ)
# Part (ii)
C= 2.;# temperature coefficient in mV/degreeC
C= 2.*10.**-3.;# in V/degreeC
T2= 20.;# in degreeC
T1= 0;# in degreeC
I_CBO2= I_CBO*2.**((T2-T1)/10.);# in uA
V_BE2= V_BE-C*T2;# in V
# Now from eq(i), for the new value of I_B
I_B=(V_BB-V_BE2)/(R_B+(1.+bita)*R_E);# in mA
I_B= I_B*10.**3.;# in uA
I_C= bita*I_B+(1.+bita)*I_CBO2;# in uA
I_C= I_C*10.**-3.;# in mA
I_CQ= I_C;# in mA
print '%s %.2f' %("The value of I_CQ when temperature increases by 20degreeC in mA is : ",I_CQ)
# Exa 3.22 (Miss printed as example 3.19)
# Given data
S = 10.;
bita = 50.;
h_fe = bita;
V_CC= 20.;# in V
V_CE = 10.;# in V
R_C = 2.;# in k ohm
I_C = 4.;# in mA
I_B =I_C/bita;# in mA
# Applying KVL to collector loop, V_CC -I_C*R_C - V_CE - I_E*R_E = 0 or
R_E = (V_CC -I_C*R_C - V_CE)/(I_C+I_B);# in k ohm (on putting I_E= I_C+I_B)
R_E= round(R_E*10.**3.);# in ohm
print '%s %.2f' %("The value of R_E in ohm is",R_E);
# Formula S = (1+bita)*( (1 + (R_B/R_E))/( (1+bita) + (R_B/R_E) ) ) or
R_B= (1+bita)*(1-S)*R_E/(S-1-bita);# in ohm
# But R_B= R1 || R2= R1*R2/(R1+R2) => R2/(R1+R2)= R_B/R1 (i)
# Calculation of R1 and R2 :
V_BE= 0.2;# in V
# Applying KVL to input loop,
V_R2= V_BE+(I_C+I_B)*10.**-3.*R_E;# in V
# But V_R2= R2*V_CC/(R1+R2) => R2/(R1+R2)= V_R2/V_CC (ii)
# On comparing eq (i) and (ii)
R1= R_B*V_CC/V_R2;# in ohm
R2= R1*V_R2/(V_CC-V_R2);# in ohm
R1= R1*10**-3;# in k ohm
R2= R2*10**-3;# in k ohm
print '%s %.2f' %("The value of R1 in k ohm is : ",R1)
print '%s %.2f' %("The value of R2 in k ohm is : ",R2)
# Effect of Reducing S or 3 :
S=3;
# Formula S = (1+bita)*( (1 + (R_B/R_E))/( (1+bita) + (R_B/R_E) ) ) or
R_B= (1+bita)*(1-S)*R_E/(S-1-bita);# in ohm
R_B= R_B*10**-3;# in k ohm
print '%s %.2f' %("When S<=3, the value of R_B in k ohm is : ",R_B)
print '%s' %("Thus S is reduced below 3 at the cost of reduction of it's input impedance")