Chapter 4 - Transistor Switching

Example E1 - Pg 111

In [1]:
#Caption:Determine (a)hfe (b)hfe for changed resistor
Ib=0.2#Base current(in mA)
Vcc=10.#Collector voltage(in volts)
Rc1=1.#Collector resistor(in kilo ohm)
Rc2=220.#Changed collector resistor(in ohm)
Ic1=Vcc/Rc1
h1=Ic1/Ib
print '%s %.f' %('(a)hfe=',h1)
Ic2=Vcc*1000./Rc2
h2=Ic2/Ib
print '%s %.f' %('(b)hfe for changed resistor=',h2)
(a)hfe= 50
(b)hfe for changed resistor= 227

Example E2 - Pg 112

In [2]:
#Caption:Calculate the transistor power dissipation at (a)Cutoff (b)Saturation (c)When Vce is 2V
Vcc=10.#Collector voltage(in volts)
Ic=50.#Collector current(in nA)
Rc=1.#Collector resistor(in kilo ohm)
Vs=0.2#Voltage of collector emitter junction at saturation(in volts)
Vce=2.#Collector emitter voltage(in volts)
P1=Ic*Vcc/1000.
print '%s %.1f' %('(a)Power dissipation at cutoff(in micro watt)=',P1)
P2=(Vcc/Rc)*Vs
print '%s %.f' %('(b)Power dissipation at saturation(in mW)=',P2)
I=(Vcc-Vce)/Rc
P3=I*Vce
print '%s %.f' %('(c)Power dissipation at given Vce(in mW)=',P3)
(a)Power dissipation at cutoff(in micro watt)= 0.5
(b)Power dissipation at saturation(in mW)= 2
(c)Power dissipation at given Vce(in mW)= 16

Example E3 - Pg 115

In [2]:
#Caption:Calculate Vce (a)Before input pulse is applied (b)at end of delay time (c)at end of turn on time (d)Total time 
Vcc=12.#Collector voltage(in volts)
Rc=3.3#Collector resistor(in Kilo ohm)
pw=5.#Pulse width of input voltage(in micro sec)
Ix=50.#Collector cutoff current(in nA)
t=250.#Switch off time(nA)
Vce=Vcc-(Ix*Rc*10.**(-6))
print '%s %.4f' %('(a)Collector emitter voltage before input pulse is applied(in volts)=',Vce)
Vce2=Vcc-(0.1*Vcc)
print '%s %.1f' %('(b)Collector emittter voltage at end of delay time(in volts)=',Vce2)
Vce3=Vcc-(0.9*Vcc)
print '%s %.1f' %('(c)Collector emitter voltage at end of turn on time(in volts)=',Vce3)
T=(t*10.**(-3))+pw
print '%s %.2f' %('(d)Total time from commencement of input to transistor switch off(in micro sec)=',T)
(a)Collector emitter voltage before input pulse is applied(in volts)= 11.9998
(b)Collector emittter voltage at end of delay time(in volts)= 10.8
(c)Collector emitter voltage at end of turn on time(in volts)= 1.2
(d)Total time from commencement of input to transistor switch off(in micro sec)= 5.25

Example E4 - Pg 120

In [3]:
#Caption:Determine (a)Capacitance that can give max turn on time (b)Max frequency
Rs=600.#Source resistor(in ohm)
Rb=5.6#Base resistor(in kilo ohm)
t=70.#Turn on time(in ns)
C=t*1000./(0.1*Rs)
print '%s %.f' %('(a)Required capacitance(in pF)=',C)
tre=2.3*Rb*C*10.**(-3)
f=1000./(2.*tre)
print '%s %.1f' %('(b)Max Frequency(in Khz)=',f)
(a)Required capacitance(in pF)= 1167
(b)Max Frequency(in Khz)= 33.3

Example E5 - Pg 125

In [5]:
#Caption:Calculate Rc and Rb
Vcc=12.#Collector voltage(in volts)
V=3.#Input voltage(in volts)
Ic=1.#collector current(in mA)
Vce=0.2#Saturated collector emitter voltage(in volts)
hfe=70.
Vbe=0.7#Base emitter voltage(in volts)
Rc=(Vcc-Vce)/Ic
Ib=Ic*1000./hfe
Rb=(V-Vbe)*1000./Ib
print '%s %.1f %s %.f' %('Rc(in kilo ohm)=',Rc,'\nRb(in kilo ohm)=',Rb)
Rc(in kilo ohm)= 11.8 
Rb(in kilo ohm)= 161

Example E6 - Pg 125

In [6]:
#Caption:Determine maximum value of capacitor
f=45.#Frequency(in khz)
Rb=150.#Base Resistor(in ohms)
t=1000./(2.*f)
C=t*1000./(2.3*Rb)
print '%s %.6f' %('Maxixmumvalue of capacitor(in pF)=',C)
Maxixmumvalue of capacitor(in pF)= 32.206119

Example E7 - Pg 126

In [4]:
#Caption:Design a transistor by determining Rc,Rb and amplitude of output waveform
E=10.#Input voltage(in volts)
Vcc=15.#Collector voltage(in volts)
R=100.#Load resistance(in kilo ohm)
Vce=0.2#Saturted collector emitter voltage(in volts)
Vd=0.7#Diode forward voltage(in volts)
hfe=35.
Vbe=0.7#Base emitter voltage(in volts)
Rc=R/10.
Ic=(Vcc-Vce-Vd)/Rc
Ib=Ic/hfe
Rb=(E-Vbe-Vd)/Ib
Vmin=Vd+Vce
Vmax=(Vcc*R)/(R+Rc)
Vo=Vmax-Vmin
print '%s %.f %s %.f %s %.1f' %('Rc(in kilo ohm)=',Rc,'\nRb(in kilo ohm)=',Rb,'\namplitude of output waveform(in volts)=',Vo)
Rc(in kilo ohm)= 10 
Rb(in kilo ohm)= 213 
amplitude of output waveform(in volts)= 12.7

Example E8 - Pg 129

In [5]:
#Caption:Calculate Rc,Rb,and Cc
Vcc=10.#Collector voltage(in volts)
Vce=0.2#Saturated collector emitter voltage(in volts)
Ic=10.#Collector current(in mA)
Vbe=0.7#Base emitter voltage(in volts)
hfe=100.
Pw=1.#Pulse width(in ms)
Vi=4.#Input voltage(in volts)
Rc=(Vcc-Vce)*1000./Ic
Ib=Ic*1000./hfe
Rb=(Vcc-Vbe)*1000./Ib
Vb=Vi-Vbe-0.5
I=(Vcc+Vi)/Rb
Cc=I*Pw/Vb
print '%s %.f %s %.f %s %.2f' %('Rc(in ohm)=',Rc,'\nRb(in kilo ohm)=',Rb,'\nCc(in micro farad)=',Cc)
Rc(in ohm)= 980 
Rb(in kilo ohm)= 93 
Cc(in micro farad)= 0.05

Example E9 - Pg 132

In [6]:
#Caption:Determine required capacitance
import math
E=4.#Input voltage(in volts)
Pw=1.#Pulse width(in ms)
Rs=1.#Source resistance(in kilo ohm)
Vce=0.2#Saturated Collector emitter voltage(in volts)
Rc=1.#Collector resistance(in kilo ohm)
Vcc=10.#Collector voltage(in volts)
hfe=100.
Vbe=0.7#Base emitter voltage(in volts)
Rb=10.#Base resistance(in kilo ohm)
Ic=(Vcc-Vce)/Rc
Ib=Ic*1000./hfe
Irb=Vbe*1000./Rb
ic=Ib+Irb
I=(E-Vbe)/Rs
C=Pw/(Rs*(math.log(I*1000./ic)))
print '%s %.2f' %('Required capacitance(in micro farad)=',C)
Required capacitance(in micro farad)= 0.34

Example E10 - Pg 136

In [7]:
#Caption:Determine output voltage when (a)Device is cutoff (b)Device is switched on
Idf=0.25#Drain current at cutoff(in ns)
rd=40.#Drain resistance at switched on(in ohm)
Vdd=15.#Drain voltage(in volts)
Rd=6.8#Drain resistance(in kilo ohm)
Vo=Vdd-(Idf*Rd*10.**(-6))
print '%s %.f' %('Output voltage when device is cutoff(in volts)=',Vo)
Id=Vdd/Rd
Vo2=Id*rd
print '%s %.f' %('Output voltage when device is switched on(in milli volts)=',Vo2)
Output voltage when device is cutoff(in volts)= 15
Output voltage when device is switched on(in milli volts)= 88