import math
#initialisation of variables
B=100.0 #Beta
Ico=20.0 #in nA
Rc=3.0
Rb=200.0
Vbb=5.0 #in V
Vcc=10 #in V
Vbe=0.7 #in Active region
#Applying KVL to base circuit
#Vbb+Rb*Ib+Vbe=0
#Calculations
Ib=(Vbb-Vbe)/Rb #in mA
#Ico<<Ib
Ic=B*Ib #in mA
#To verify the Active region Assumption
#Vcc+Rc*Ic+Vcb+Vbe=0
Vcb=(-Rc*Ic)+Vcc-Vbe #in V
#Results
print("Vcb = %.2f V " %Vcb)
if Vcb>0 :
print('Positive value of Vcb represents reversed biased collector junction and Transistor in active region')
print("Current in transistor(Ic) is %.2f mA " %Ic)
print("Current in transistor(Ib) is %.2f mA " %Ib)
import math
#initialisation of variables
B=100.0 #Beta
Ico=20.0 #in nA
Rc=3.0
Ico=20 #in nA
Rb=200.0
Re=2.0
Vbb=5.0 #in V
Vcc=10.0 #in V
Vbe=0.7 #in Active region
#Ico<<Ib Assuming
#Itot=Ib+Ic=Ib+B*Ib=(B+1)*Ib
#Applying KVL to base circuit
#Vbb+Rb*Ib+Vbe+Re*Itot=0
#Calculations
Ib=(Vbb-Vbe)/(Rb+(Re*(B+1))) #in mA
Ic=B*Ib #in mA
#Hence Ico<<Ib
#To verify the Active region Assumption
#Vcc+Rc*Ic+Vcb+Vbe=0
Vcb=(-Rc*Ic)+Vcc-Vbe-(Re*(B+1)*Ib) #in V
print("Vcb = %.2f V " %Vcb)
if Vcb>0 :
print('Positive value of Vcb represents reversed biased collector junction and Transistor in active region')
#Results
print("Current in transistor(Ic) is %.2f mA " %Ic)
print("Current in transistor(Ib) is %.2f mA " %Ib)
import math
#initialisation of variables
Rc=3.0
Rb=50.0
Vbb=5.0 #in V
Vcc=10.0 #in V
Vce=0.2 #in V
Vbe=0.8 #in Active region
hFE=100.0
#Assuming transistor in saturated region
#Applying KVL to base circuit
#Vbb+Rb*Ib+Vbe=0
#Calculations
Ib=(Vbb-Vbe)/Rb #in mA
#Applying KVL to Collector circuit
#Vcc+Rc*Ic+Vce=0
Ic=(Vcc-Vce)/Rc #in mA
Ib_min=Ic/hFE
print("Minimum Ib = %.2f mA " %Ib_min)
if Ib>Ib_min :
print('Transistor in saturated Region')
#Results
print("Current in transistor(Ic) is %.2f mA " %Ic)
print("Current in transistor(Ib) is %.2f mA " %Ib)
import math
#initialisation of variables
Ib=0.01 #mA
Ic=100.0*Ib
#Calculations
Vcb=5-Ic-0.7-(101*Ib)
#Results
print("The value of Vcb is= %.2f V " %(Vcb))
print("Since Vcb is positive, the transistor is in the active region ")
import math
#initialisation of variables
Ve= 4.0 #V
Ie=2 #mA
Vc=12-(2*2)
beta=19.0
#Calculations
Rb=2*(1.0+beta)
#Results
print("The value of Vcb is= %.2f V " %(Rb))
import math
#initialisation of variables
Ve= 4.0 #V
Ie=2 #mA
Vc=12-(2*2)
beta=100.0
#Calculations
Ib=(2.7-0.7)/beta
Ic=beta*Ib
Vc=(10.0-Ic)/2
#Results
print("The value of Vcb is= %.2f V " %(Vc))
import math
#initialisation of variables
Ie1=1.0 #mA
Vc1=10.7*Ie1-10
Vbe2=0.7
#Calculations
Ie2=(10+Vc1-Vbe2)/10.0
Vc2=10-Ie1
Vcb2=Vc2-Vbe2
#Results
print("The value of Vcb is= %.2f V " %(Vcb2))
import math
#initialisation of variables
hfe=100
Ib=4.2/50 #mA
Ic=9.8/3
Ib=Ic/hfe
#Results
print("The value of Ib is= %.3f V " %(Ib))
import math
#initialisation of variables
Ie1=1.0 #mA
Ic1=0.99 #mA
Vcb1=12-(5*Ic1)-5
Ve=5-0.7
Vbe2=2.5-Ve
#Results
print("The value of Vbe2 is= %.2f V " %(Vbe2))
import math
#initialisation of variables
Ie2=1.0 #mA
Ic2=0.99 #mA
Vcb2=12-(5*Ic2)-2.5
#Calculations
Ve2=2.5-0.7
Vbe1=0-Ve
V0=12-(5*Ic2)
#Results
print("The value of V0 is= %.2f V " %(V0))