Chapter 21: Bipolar Transistors

Example 21.1, Page 445

In [5]:
import math
#Initialization
vcc=10                     #voltage
vbe=0.7                     #voltage, base-to-emitter junction
rb=910*10**3                #resistance in ohm
hfe=200
rc=2.7*10**3                 #resistance in ohm

#Calculation
ib=(vcc-vbe)/rb               #base current in ampere
ic=hfe*ib                     #collector in current in ampere
vo=vcc-(ic*rc)                #output voltage

#Result
print'Output Current, I = %.2f mA'%(ic*10**3)
print'Output Voltage, V = %.1f V'%vo
Output Current, I = 2.04 mA
Output Voltage, V = 4.5 V

Example 21.2, Page 445

In [25]:
import math
#Initialization
vcc=10                     #voltage
r2=10*10**3                #resistance in ohm
r1=27*10**3                  #resistance in ohm
vbe=0.7                     #voltage, base-to-emitter junction
re=10**3                #resistance in ohm
rc=2.2*10**3                 #resistance in ohm

#Calculation
vb=vcc*(r2*(r1+r2)**-1)                     # base voltage
ve=vb-vbe                           #emitter voltage
ie=ve/re                          #emitter current
ic=ie                           #collector current
vo=vcc-(ic*rc)                  #output voltage

#Result
print'Quiescent Output Voltage, V = %.1f V'%vo
Quiescent Output Voltage, V = 5.6 V

Example 21.3, Page 448

In [16]:
import math
#Initialization
re=10**3                #resistance in ohm
rc=2.2*10**3                 #resistance in ohm

#Calculation
gain=-rc/re                #voltage gain

#Result
print'Voltage Gain = %.1f mA'%gain
Voltage Gain = -2.2 mA

Example 21.4, Page 451

In [20]:
import math
#Initialization
r1=15*10**3                #resistance in ohm
r2=47*10**3                 #resistance in ohm
C=220*10**-9                #capacitance in farad

#Calculation
ri=(r1*r2)/(r1+r2)           #resistance in paraller
fco=1/(2*math.pi*C*ri)        #frequency in Hz


#Result
print'Voltage Gain = %d Hz'%round(fco)
Voltage Gain = 64 Hz

Example 21.5, Page 453

In [26]:
import math
#Initialization
vcc=10                     #voltage
r2=10*10**3                #resistance in ohm
r1=27*10**3                  #resistance in ohm
vbe=0.7                     #voltage, base-to-emitter junction
re=10**3                #resistance in ohm
rc=2.2*10**3                 #resistance in ohm

#Calculation
vb=vcc*(r2*(r1+r2)**-1)                     # base voltage
ve=vb-vbe                           #emitter voltage


#Result
print'Quiescent Output Voltage, V = %.1f V'%ve
Quiescent Output Voltage, V = 2.0 V
In [ ]: