Chapter 05 : BJT biasing

Example 5.1, Page No 182

In [1]:
import math
#initialisation of variables
Rc=12.0*10**3
Vcc=20.0
print(" When Ic=0")
Ic=0

#Calculations
Vce=Vcc-Ic*Rc
print(" At point A Ic=0 nad Vce=20")
print("When Vce=0")
Vce=0
Ic=Vcc/Rc

#Results
print(" At point B Ic=1.7mA and Vce=0")
print("Ic is %.1f mA " %(Ic*10**3))
 When Ic=0
 At point A Ic=0 nad Vce=20
When Vce=0
 At point B Ic=1.7mA and Vce=0
Ic is 1.7 mA 

Example 5.2 Page No 186

In [2]:
import math

#initialisation of variables
Vcc=18.0
Rc=2.2*10**3
Ib=40.0*10**-6

#Calculations
print("when Ic=0")
Ic=0
Vce=Vcc-Ic*Rc
print("At point A Ic=0 and Vce=18")
print("when Vce=0")
Ic=Vcc/Rc

#Results
print(" at point B Ic=8.2mA and Vce=0")
print("Ic = %.1f mA " %(Ic*10**3))
when Ic=0
At point A Ic=0 and Vce=18
when Vce=0
 at point B Ic=8.2mA and Vce=0
Ic = 8.2 mA 

Example 5.3 Page No 189

In [3]:
import math

#initialisation of variables
Rb=470*10**3
Rc=2.2*10**3
Vcc=18.0
hfe=100
Vee=.7

#Calculations
Ib=(Vcc-Vee)/Rb
Ic=hfe*Ib
Vce=Vcc-Ic*Rc

#Results
print("Current voltage is %.1f V " %(Vce))
Current voltage is 9.9 V 

Example 5.4, Page No 189

In [4]:
import math
#initialisation of variables
hFEmin=50.0
hFEmax=200.0
Vcc=18.0
Vbe=0.7
Rb=470.0*10**3

#Calculations
Ib=(Vcc-Vbe)/Rb
Ic=hFEmin*Ib
Vce=Vcc-Ic*Rc
Ic=hFEmax*Ib
Vce=Vcc-Ic*Rc

#Results
print("Current voltage is %.1f V " %(Vce))
Current voltage is 1.8 V 

Example 5.5 Page No 193

In [5]:
import math
#initialisation of variables

Rb=270*10**3
Rc=2.2*10**3
Vcc=18.0
hFE=100
Vbe=.7

#Calculations
Ib=(Vcc-Vbe)/(Rb+Rc*(hFE+1))
Ic=hFE*Ib
Vce=Vcc-Rc*(Ic+Ib)

#Results
print("Current voltage is %.1f V " %(Vce))
Current voltage is 10.2 V 

Example 5.7 Page No 197

In [6]:
import math

#initialisation of variables
R1=33.0*10**3
R2=12.0*10**3
Rc=1.2*10**3
Re=1*10**3
Vcc=18.0
Vbe=.7

#Calculations
Vb=(Vcc*R2)/(R1+R2)
Ve=Vb-Vbe
Ie=(Vb-Vbe)/Re
Ic=Ie
Vc=Vcc-(Ic*Rc)
Vce=Vc-Ve

#Results
print("Current voltage is %.1f V " %(Vce))
Current voltage is 9.0 V 

Example 5.8, Page No 199

In [7]:
import math
#initialisation of variables
Vcc=18.0
Vbe=.7
hfe=100.0
R1=33*10**3
R2=12.0*10**3
Re=1.0*10**3

#Calculations
Vt=(Vcc*R2)/(R1+R2)
Rt=(R1*R2)/(R1+R2)
Ib=(Vt-Vbe)/(Rt+Re*(1+hfe))
Ic=hfe*Ib
Ie=Ib+Ic
Ve=Ie*Re
Vc=Vcc-(Ic*Rc)
Vce=Vc-Ve

#Results
print("Current voltage is %.1f V " %(Vce))
Current voltage is 9.7 V 

Example 5.9 Page No 200

In [8]:
import math 

#initialisation of variables
hfe=50.0
Vt=4.8
Rt=8.8*10**3#from example 5.7
Re=1.0*10**3
Vbe=.7

#Calculations
Ib=(Vt-Vbe)/(Rt+Re*(1+hfe))
Ic=hfe*Ib
Ie=Ib+Ic
Ve=Ie*Re
Vc=Vcc-(Ic*Rc)
Vce=Vc-Ve

#Results
print("Current voltage is %.1f V " %(Vce))
Current voltage is 10.4 V 

Example 5.10 Page No 201

In [9]:
import math
#initialisation of variables
Vt=4.8
Rt=8.8*10**3#from example 5.8
Re=1*10**3
Vbe=.7
hfe=200.0

#Calculations
Ib=(Vt-Vbe)/(Rt+Re*(1+hfe))
Ic=hfe*Ib
Ie=Ib+Ic
Ve=Ie*Re
Vc=Vcc-(Ic*Rc)
Vce=Vc-Ve

#Results
print("Current voltage is %.1f V " %(Vce))
Current voltage is 9.4 V 

Example 5.11 Page No 208

In [10]:
import math

#initialisation of variables
Vce=5.0
Ic=5*10**-3
Vcc=15.0
hfe=100.0

#Calculations
Rc=(Vcc-Vce)/Ic
Ib=Ic/hfe
Rb=(Vcc-Vbe)/Ib

#Results
print("The value of Rv is %.1f kohm " %(Rb/1000))
The value of Rv is 286.0 kohm 

Example 5.12, Page No 209

In [11]:
import math

#initialisation of variables
Vce=5.0
Ic=5*10**-3
Vcc=15.0
hfe=100.0

#Calculations
Ib=Ic/hfe
Rc=(Vcc-Vce)/(Ic+Ib)
Rb=(Vce-Vbe)/Ib

#Results
print("The value of Rb is %.1f kohm " %(Rb/1000))
The value of Rb is 86.0 kohm 

Example 5.13, Page No 211

In [12]:
import math
#initialisation of variables
Vce=5.0
Ve=Vce
Ic=5.0*10**-3
hFE=100.0
Vcc=15.0
Vbe=0.7

#Calculations
Ie=Ic
Re=Ve/Ie
Rc=(Vcc-Vce-Ve)/Ic
I2=Ic/10
Vb=Ve+Vbe
R2=Vb/I2
R1=(Vcc-Vb)/I2

#Results
print("The value of Rb is %.1f kOhm " %(R1/1000))
The value of Rb is 18.6 kOhm 

Example 5.14, Page No 212

In [13]:
import math
#initialisation of variables
Vce=3.0
Ve=5.0
Ic=1*10**-3
Vcc=12.0

#Calculations
Ie=Ic
R4=Ve/Ie
print(" with Ic=1mA and R4=4.7Kohm")
R4=4.7*10**3
Ve=Ic*R4
Vc=Ve+Vce
Vr3=Vcc-Vc
R3=Vr3/Ic
Vb=Ve+Vbe
I2=Ic/10
R2=Vb/I2
print(" with R2=56Kohm and Vb=5.4V")
R2=56*10**3
I2=Vb/R2
R1=(Vcc-Vb)/I2

#Results
print("The value of R1 is %.1f V " %(R1/1000))
 with Ic=1mA and R4=4.7Kohm
 with R2=56Kohm and Vb=5.4V
The value of R1 is 68.4 V 

Example 5.15, Page No 214

In [14]:
import math
#initialisation of variables
Vce=9.0
Ve=4.0
Ic=4*10**-3
Vcc=18.0

#Calculations
Ie=Ic
R4=Ve/Ie
Vb=Ve+Vbe
I2=Ic/10
R2=Vb/I2
print(" with R2=12Kohm standard")
R2=12*10**3
I2=Vb/R2
R1=(Vce+Ve-Vb)/I2
print(" with R1=22kohm standard")
R1=22*10**3
Vr3=Vcc-Vce-Ve
R3=Vr3/(Ic+I2)

#Results
print("The value of R3 %.2f V " %(R3/1000))
 with R2=12Kohm standard
 with R1=22kohm standard
The value of R3 1.14 V 

Example 5.16, Page No 216

In [15]:
import math
#initialisation of variables
Vc=5.0
Ic=1.0*10**-3
hFE=70.0
Vbe=.7
Vee=9.0
Vcc=Vee
Re=8.2*10**3

#Calculations
Ve=Vee-Vbe
Ie=Ic
R3=Ve/Ie
print(" with R3=8.2kohm standard value")
R3=8.2*10**3
Ie=Ve/R3
Vr2=Vcc-Vc
R2=Vr2/Ic
Ib=Ic/hFE
Vr1=Vbe/10
R1=Vr1/Ib
print(" use 4.7Kohm as standard")
#the transistor emitter terminal is .7 below ground and voltage across Re is
Ve=Vee-Vbe
Ie=Ve/Re
Vc=Vcc-(Ie*3.9*10**3)

#Results
print("Current voltage is %.1f V " %(Vc))
 with R3=8.2kohm standard value
 use 4.7Kohm as standard
Current voltage is 5.1 V 

Example 5.17, Page No 220

In [16]:
import math
#initialisation of variables
hFE=100.0
Rc=2.2*10**3
Rb=270.0*10**3
Re=1.0*10**3
R1=33.0*10**3
R2=12*10**3

#Calculations
S=1+hFE
print("for collector to base bias")
S=(1+hFE)/(1+(hFE*Rc)/(Rc+Rb))
print(" for voltage divider bias")
print("S=(1+hFE)/(1+hFE*Re(Re+R1||R2))")
S=(1+hFE)/(1+(hFE*Re)/(Re+(R1*R2)/(R1+R2)))

#Results
print("Voltage-divider bias is %.2f  " %(S))
for collector to base bias
 for voltage divider bias
S=(1+hFE)/(1+hFE*Re(Re+R1||R2))
Voltage-divider bias is 9.01  

Example 5.18, Page No 221

In [17]:
import math
#initialisation of variables
Icbo1=15.0*10**-9# at 25C
S=101.0
print("chnage in temp")
T=105-25
print(" n=T in 10 step")
n=T/10.0

#Calculations
Icbo2=Icbo1*2**n
Icbo=Icbo2-Icbo1
print(" for base bais")
Ic=S*Icbo
print("  for collector to base bais")
S=56
Ic=S*Icbo
print(" for voltage divider bais")
S=8.2
Ic=S*Icbo

#Results
print("The value of Ic is %.1f mA " %(Ic*10**6))
chnage in temp
 n=T in 10 step
 for base bais
  for collector to base bais
 for voltage divider bais
The value of Ic is 31.4 mA 

Example 5.19, Page No 223

In [18]:
import math
#initialisation of variables
Re=4.7*10**3
T=125-25

#Calculations
Vbe=T*(1.8*10**-3)
Ie=Vbe/Re

#Results
print("The value of Ie is %.1f V " %(Ie*10**6))
The value of Ie is 38.3 V 

Example 5.20, Page No 223

In [19]:
import math
#initialisation of variables
Vcc=10.0
Rc=1.0*10**3
Rb=6.8*10**3
Vs=5.0

#Calculations
print(" hFE calculation")
Ic=Vcc/Rc
Ib=(Vs-Vbe)/Rb
hFE=Ic/Ib
print("when hFE=10")
hFE=10
Ic=hFE*Ib
Vce=Vcc-(Ic*Rc)

#Results
print("Current voltage is %.1f V " %(Vce))
 hFE calculation
when hFE=10
Current voltage is 2.9 V 

Example 5.21, Page No 227

In [20]:
#initialisation of variables
Vcc=15.0
Rc=3.3*10**3
Vbe=.7
Rb=56.0*10**3

#Calculations
Ic=Vcc/Rc
Ib=(Vcc-Vbe)/Rb
hFE=Ic/Ib

#Results
print(" minimum hFE is %3.2f " %hFE)
 minimum hFE is 17.80 

Example 5.22, Page No 229

In [21]:
#initialisation of variables
Vcc=12.0
Ic=1.5*10**-3
Vs=5.0
hFE=10.0
Vbe=.7

#Calculations
Rc=Vcc/Ic
Ib=Ic/hFE
Rb=(Vs-Vbe)/Ib

#Results
print("The value of Rb is %.1f kohm " %(Rb/1000))
The value of Rb is 28.7 kohm 

Example 5.23, Page No 229

In [22]:
#Calculations
Vcc=9.0
Ic=2*10**-3
hFE=10.0
Vbe=.7

#Calculations
Rc=Vcc/Ic
Ib=Ic/hFE
Rb=(Vcc-Vbe)/Ib

#Results
print("The value of Rb is %.2f kohm " %(Rb/1000))
The value of Rb is 41.50 kohm