from __future__ import division
# Given data
V_EE = 8 # in V
V_BE = 0.7 # in V
R_E = 1.5 # in k ohm
I_E = (V_EE - V_BE)/R_E # in mA
I_C = I_E # in mA
print "The value of I_C = %0.2f mA " %I_C
V_CC = 18 # in V
R_C = 1.2 # in kΩ
V_CB = V_CC - (I_C * R_C) # in V
print "The value of V_CB = %0.2f V " %V_CB
# Given data
alpha = 0.9
I_E = 1 # mA
I_C = alpha * I_E # in mA
I_B = I_E - I_C # in mA
print "The value of base current = %0.1f mA " %I_B
# Given data
bita = 50
I_B= 20 # in µA
I_B=I_B*10**-6 # in A
I_C= bita*I_B # in A
I_E= I_C+I_B # in A
I_E = I_E * 10**3 # in mA
print "The Emitter current = %0.2f mA " %I_E
# Given data
beta_dc = 90
I_C = 15 # in mA
I_C = I_C * 10**-3 # in A
I_B = I_C/beta_dc # in A
print "The base current = %0.2f µA " %(I_B*10**6)
I_E = I_C + I_B # in A
I_E = I_E * 10**3 # in mA
print "The Emitter current = %0.3f mA " %I_E
alpha_dc = beta_dc/(1+beta_dc)
print "The value of alpha_dc = %0.3f" %alpha_dc
# Given data
del_ic = 1.8 # in mA
del_ie = 1.89 # in mA
alpha = del_ic / del_ie
bita = alpha/(1 - alpha)
del_ib = del_ic/bita # in mA
del_ib = del_ib * 10**3 # in µA
print "The change in I_B = %0.f µA " %del_ib
# Given data
V_CC = 10 # in V
R_C = 3 # in k Ω
R_C= R_C*10**3 # in Ω
bita = 100
I_CO = 20 # in nA
I_CO = I_CO * 10**-9 # in A
V_BB = 5 # in V
R_B = 200 # in kΩ
R_B= R_B*10**3 # in Ω
V_BE = 0.7 # in V
# Applying KVL to the base circuit, V_BB= I_B*R_B+V_BE
I_B = (V_BB - V_BE)/R_B # in A
print "The base current = %0.1f µA " %(I_B*10**6)
I_C = (bita * I_B) + I_CO # in A
print "The collector current = %0.5f mA " %(I_C*10**3)
I_E = I_C + I_B # in A
print "Emitter current = %0.5f mA " %(I_E*10**3)
V_CE = V_CC - (I_C * R_C) # in V
print "Collector emitter voltage = %0.4f V " %(V_CE)
# Given data
bita = 100
I_CBO = 4 # in µA
I_B = 40 # in µA
I_C = (bita * I_B) + ((1+bita) * I_CBO) # in µA
I_C = I_C * 10**-3 # in msA
print "The collector current = %0.3f mA " %I_C
%matplotlib inline
import matplotlib.pyplot as plt
import numpy as np
from __future__ import division
# Given data
del_IC = 1 * 10**-3 # in A
del_IB = 10 * 10**-6 # in A
CurrentGain= del_IC/del_IB
print "The current gain = %0.f" %CurrentGain
del_IC= del_IC*10**3 # in mA
del_IB= del_IB*10**6 # in µA
I_B=np.arange(0,50,0.1) # in µA
I_C= I_B/del_IB+del_IC # in mA
plt.plot(I_B,I_C)
plt.xlabel('Base current in micro A')
plt.ylabel('Collector current in mA')
plt.title('Transfer Characteristics')
plt.axis([0, 60, 0, 7])
plt.show()
print "Transfer Characteristics is shown in figure"
# Given data
I_CBO = 3 #in µA
I_CBO= I_CBO*10**-3 # in mA
I_C= 15 # in mA
# But it is given that I_C= 99.5% of I_E, SO
I_E= I_C/99.5*100 # in mA
alpha_dc= I_C/I_E
print "The value of alpha_dc = %0.3f" %alpha_dc
print "The value of I_E = %0.2f mA " %I_E
#Given data
alpha_dc = 0.99
I_CBO = 10 # in µA
I_CBO= I_CBO*10**-6 # in A
I_E = 10 # in mA
I_E= I_E*10**-3 # in A
I_C = (alpha_dc * I_E) + I_CBO # in A
print "The value of I_C = %0.2f mA " %(I_C*10**3)
I_B = I_E - I_C # in A
I_B = I_B * 10**6 # in µA
print "The value of I_B = %0.f µA " %I_B
# Given data
alpha_dc = 0.99
I_C = 6 # in mA
I_C= I_C*10**-3 # in A
I_CBO = 15 # in µA
I_CBO= I_CBO*10**-6 # in A
I_E = (I_C - I_CBO)/alpha_dc # in A
I_B = I_E - I_C # in A
print "The value of I_B = %0.f µA " %(I_B*10**6)
# Given data
alpha_dc = 0.98
I_CBO = 12 # in µA
I_CBO = I_CBO * 10**-6 # in A
I_B = 120 # in µA
I_B = I_B * 10**-6 # in A
beta_dc = alpha_dc/(1-alpha_dc)
I_E = ((1 + beta_dc) * I_B) + ((1 + beta_dc) * I_CBO) #in A
I_E = I_E * 10**3 # in mA
print "The value of I_E = %0.1f mA " %I_E
# Given data
bita= 100
V_BEsat= 0.8 # in V
V_CEsat= 0.2 # in V
V_BEact= 0.7 # in V
V_CC = 10 # in V
V_BB=5 # in V
R_E = 2 # in kΩ
R_C = 3 # in kΩ
R_B= 50 # in kΩ
# Applying KVL to collector loop
# V_CC= I_Csat*R_C +V_CEsat +I_E*R_E and I_E= I_Csat+I_B, So
#I_B= ((V_CC-V_CEsat)-(R_C+R_E)*I_Csat)/R_E (i)
# Applying KVL to base loop
# V_BB-I_B*R_B -V_BEsat-I_E*R_E =0 and I_E= I_Csat+I_B, So
#V_BB-V_BEsat= R_E*I_Csat + (R_B+R_E)*I_B (ii)
# From eq (i) and (ii)
I_B = ((V_BB-V_BEsat)*5- (V_CC-V_CEsat)*2) / ((R_B+R_E)*5 - R_E*2) # in mA
I_Csat= ((V_CC-V_CEsat)-R_E*I_B)/(R_C+R_E) # in mA
I_Bmin= I_Csat/bita # in mA
if I_B<I_Bmin :
print "Since the value of I_B (",round(I_B*10**3,2),"µA) is less than the value of I_Bmin (",round(I_Bmin*10**3,1),"µA)"
print "So the transistor is not in the saturation region. But it is conducting hence it can not be in cutoff."
print "Therefore the transistor is in the active region"
# Given data
bita= 100
V_BEsat= 0.8 # in V
V_CEsat= 0.2 # in V
V_BEact= 0.7 # in V
V_CC = 10 # in V
V_BB=5 # in V
R_E = 2 # in kΩ
R_C = 3 # in kΩ
R_B= 50 # in kΩ
# Applying KVL to input loop
# V_BB= I_B*R_B+(1+bita)*I_B*R_E+V_BEact or
I_B= (V_BB-V_BEact)/(R_B+(1+bita)*R_E) # in mA
I_C= bita*I_B # in mA
# Applying KVL to collector circuit
# V_CC= I_Csat*R_C +V_CEsat +(I_C+I_B)*R_E
V_CEact= V_CC-I_B*R_E-I_C*(R_C+R_E) # in V
print "The value of I_B = %0.f µA " %(I_B*10**3)
print "The value of I_C = %0.1f mA " %I_C
print "The value of V_CE = %0.3f volts " %V_CEact
# Given data
bita = 100
V_CEsat = 0.2 # in V
R_B = 150 # in kohm
R_C = 2 # in kohm
V_CC = 10 # in V
V_BEsat = 0.8 # in V
I_B = (V_CC - V_BEsat)/R_B # in mA
I_C = (V_CC - V_CEsat)/R_C # in mA
I_Bmin = I_C/bita # in mA
if I_B>I_Bmin :
print "Since the value of I_B (",round(I_B*10**3,2),"µA) is greater than the value of I_Bmin (",int(I_Bmin*10**3),"µA)"
print "So the transistor is in the saturation region."
# Given data
bita = 100
V_CE = 0.2 #in V
V_BE = 0.8 # in V
R_C= 500 # in Ω
R_B= 44*10**3 # in Ω
R_E= 1*10**3 # in Ω
V_CC= 15 # in V
V_GE= -15 # in V
# Applying KVL to collector circuit
# V_CC-V_GE - I_Csat*R_C-V_CE-I_E*R_E=0, but I_Csat= bita*I_Bmin and I_E= 1+bita
I_Bmin= (V_CC-V_GE-V_CE)/(R_C*bita+(1+bita)*R_E) # in A
# Applying KVL to the base emitter circuit
# V_BB-I_Bmin*R_B-V_BE-I_E*R_E + V_CC=0
V_BB= I_Bmin*R_B + V_BE + (1+bita)*I_Bmin*R_E-V_CC # in V
print "The value of I_B(min) = %0.3f mA " %(I_Bmin*10**3)
print "The value of V_BB = %0.1f volts " %V_BB
# Given data
V_ECsat= 0.2 # in V
V_CC= 10 # in V
V_EBsat= 0.8 # in V
# Part (i)
bita= 100
R_B= 220 # in kΩ
# Applying KVL to collector circuit, V_CC= V_EC+ICRC
ICRC= V_CC-V_ECsat # in V
# Applying KVL to input loop, V_CC= V_EBsat+I_B*R_B (i)
I_B= (V_CC-V_EBsat)/R_B # in mA
I_C= bita*I_B # in mA
R_Cmin= ICRC/I_C # in kΩ
print "The minimum value of R_C = %0.3f kΩ " %R_Cmin
# Part (ii)
R_C= 1.2 # in kΩ
I_Csat= ICRC/R_C # in mA
I_B= I_Csat/bita # in mA
# From eq (i)
R_B= (V_CC-V_EBsat)/I_B # in kΩ
print "The maximum value of R_B = %0.2f kΩ " %R_B
# Given data
bita= 100
V_BEsat= 0.8 # in V
V_CEsat= 0.2 # in V
V_BEact= 0.7 # in V
V_CC = 10 # in V
R_E = 1 # in kΩ
R_C = 2 # in kΩ
R_B= 100 # in kΩ
bita=100
alpha= bita/(1+bita)
# Applying KVL to collector circuit
# V_CC= I_Csat*R_C +V_CE +R_E*I_E
# but I_E= alpha*I_Csat
I_Csat= (V_CC-V_CEsat)/(R_C+R_E*alpha) # in mA
I_Bmin= I_Csat/bita # in mA
# Applying KVL to base loop
# V_CC= I_B*R_B +V_BEsat +I_E*R_E
# but I_E= I_Csat+I_B
I_B= (V_CC-V_BEsat-I_Csat*R_E)/(R_B+R_E) # in mA
print "The value of I_B = %0.2f µA " %(I_B*10**3)
print "The minimum value of I_B = %0.1f µA " %(I_Bmin*10**3)
if I_B>I_Bmin :
print "Since the value of I_B is greater than the value of I_Bmin"
print "Hence the transistor is in saturation ."
I_E= (1+bita)*I_Bmin # in mA
R_E= (V_CC-V_BEact-I_Bmin*R_B)/I_E # in kΩ
print "The value of R_E = %0.3f kΩ " %R_E
print "So R_E should be greater than this value in order to bring the transistor just out of saturation "
# Given data
V_CC = 9 # in V
V_BE = 0.8 # in V
V_CE = 0.2 # in V
R_B = 50 # in kΩ
R_C=2 # in kΩ
R_E = 1 # in kΩ
bita=70
# Applying KVL to input loop, V_CC= I_B*R_B +V_BE +I_E*R_E
# V_CC- V_BE= (R_B+R_E)*I_B + R_E*I_C (i)
# Applying KVL to output loop, V_CC= R_C*I_C +V_CE +I_C*R_E +I_B*R_E
#I_B = ((V_CC- V_CE)-(R_C+R_E)*I_C)/R_E (ii)
# From eq (i) and (ii)
I_C= ( (V_CC- V_BE)-(R_B+R_E)* (V_CC- V_CE)/R_E)/(1-(R_B+R_E)*(R_C+R_E)) # in mA
I_B = ((V_CC- V_CE)-(R_C+R_E)*I_C)/R_E# in mA
I_Bmin= I_C/bita # in mA
if I_B>I_Bmin :
print "Since the value of I_B (",round(I_B,3)," mA) is greater than the value of I_Bmin (",round(I_Bmin,4)," mA)"
print "So the transistor is in saturation "
V_C= V_CC-I_C*R_C # in V
print "The value of collector voltage = %0.3f volts " %V_C
bita= I_C/I_B
print "The minimum value of bita that will change the state of the trasistor = %0.3f" %bita