Chapter 6: Power Switches

Example 6.1,Page 274

In [2]:
#finding Ic,Pload,Pq,Ibase,Rbase

#initialisation of variable
from math import pi,tan,sqrt,sin,cos,acos,atan
Vs=28.0;#V
Vi=5.0;#V
Rl=15.0;#ohm
Vc=.8;#V
b=20.0;

#calculation
Ic=(Vs-Vc)/Rl;
Pl=Ic**2*Rl;
Pq=Ic*Vc;
Ib=Ic/b*1000;
Rb=(Vi-.6)/Ib;

#result
print "collector current is",round(Ic,2), "A"
print "load power is",round(Pl,2), "W"
print "transistor power is",round(Pq,2), "W"
print "least value of base current is",round(Ib,2), "mA"
print "max value of base resistance is",round(Rb*100,2), "ohm"
print ('thus pick Rb=33ohm')
collector current is 1.81 A
load power is 49.32 W
transistor power is 1.45 W
least value of base current is 90.67 mA
max value of base resistance is 4.85 ohm
thus pick Rb=33ohm

Example 6.4,Page 282

In [3]:
#finding Pload,Pq,Iload,resistances

#initialisation of variable
from math import pi,tan,sqrt,sin,cos,acos,atan
Vd=28.0;#V
f=100.0;#frequency
I=50.0;#current
Rl1=560.0;
Vp=2.4;
Ib=500.0;#microAmp
D=.5;#duty cycle

#calculation
Rl=(Vd-.3)/I;
Rb=(Vp-.9)/Ib;
Vl=Vd-.3;
Ip=Vl/Rl1;
Pl=D*Vl*Ip;
Pq=D*Ip*.3;

#result
print "load resistance is",round(Rl*1000), "ohm"
print('thus pick Rl=560ohm')
print "max value of Rb is",round(Rb*1000,2),"kohm"
print('thus pick Rb=2.2kohm')
print "load current is",round(Ip*1000,2), "mA"
print "load power is",round(Pl*1000,2), "mW"
print "power delivered is",round(Pq*1000,2), "mW"
load resistance is 554.0 ohm
thus pick Rl=560ohm
max value of Rb is 3.0 kohm
thus pick Rb=2.2kohm
load current is 49.46 mA
load power is 685.08 mW
power delivered is 7.42 mW

Example 6.5,Page 286

In [4]:
#finding time of rise

#initialisation of variable
from math import pi,tan,sqrt,sin,cos,acos,atan
C=640.0;#capacitor
R1=560.0;#load resistance
R2=3.3;#kohm

#calculation
t1=2.2*R1*C;
t2=2.2*R2*C;

#result
print "time of rise is",round(t1/1000,2), "ns"
print "time of rise is",round(t2/1000,2), "microsec"
time of rise is 788.48 ns
time of rise is 4.65 microsec

Example 6.6,Page 287

In [2]:
#finding Rpick up,time of rise

#initialisation of variable
%matplotlib inline
import numpy as np
import matplotlib.pyplot as plt
Vol=0.7;
Iol=40.0/1000;#current
Rpullup1=680.0;
C=640.0;
Epullup=28.0;
#for plotting
x=[0, .1, 1.9, 4.1, 5, 5.1, 5.3, 5.6, 6.0, 9.3];
y=[27.8, .1, .1, .1, .1, 5, 13.5, 21.0, 27.0, 27.8];

#calculation
Rpullup=(Epullup-Vol)/Iol;
trise=2.2*Rpullup1*C;
plt.plot(x,y,'r');
plt.xlabel ('time(mus)')
plt.ylabel ('Vout')
plt.title ('Vout vs time')

#result
print "resistance is",round(Rpullup,2), "ohm"
print('pick up resistance=680 ohm');
print "rise time is",round(trise/1000,2), "ns"
resistance is 682.5 ohm
pick up resistance=680 ohm
rise time is 957.44 ns

Example 6.7,Page 289

In [5]:
#finding worst case resistance and power characteristics

#initialisation of variable
from math import pi,tan,sqrt,sin,cos,acos,atan
R1=.11;#resistance
Vd=28.0;#voltage
R2=6.0;#ohm
D=.4;#duty cycle
Q=62.0;

#calculation
Ro=2.6*R1;
Ip=Vd/(R2+Ro);
Vl=Ip*R2;
Pl=D*Vl*Ip;
Vq=Ip*Ro;
Pq=D*Vq*Ip;
T=40+round(Pq*10)/10*Q;

#result
print "worst case resistance is",round(Ro,3), "ohm"
print "load current is",round(Ip,2),"A"
print "load voltage is",round(Vl,2), "V"
print "load power is",round(Pl,2), "W"
print "drop voltage is",round(Vq,2), "V"
print "power is",round(Pq*10,2)/10, "W"
print "temperature is",round(T,2), "deg.C"
worst case resistance is 0.286 ohm
load current is 4.45 A
load voltage is 26.73 V
load power is 47.62 W
drop voltage is 1.27 V
power is 2.27 W
temperature is 182.6 deg.C

Example 6.8,Page 292

In [6]:
#finding voltage

#initialisation of variable
from math import pi,tan,sqrt,sin,cos,acos,atan
L=10.0;#inductor
I=4.5;#current
t=300.0#time

#calculation
V=L*I/t;

#result
print "voltage is",round(V*1000,2), "V"
voltage is 150.0 V

Example 6.9,Page 298

In [1]:
#finding resistance and power characteristics

#initialisation of variable
from math import pi,tan,sqrt,sin,cos,acos,atan
Rl=12.0;#load resistance
V1=.8;#voltage
V2=2.4;#voltage
D=.8;#duty cycle
Tj=150.0;#degreeC
Ta=40.0;#degreeC
Vd=28.0;
Vo=.7;
I=40.0;#mA;
R1=330;
R2=360;
Vn1=28;
Vn2=.7;

#calculation
k=(Vd-Vo)/I;
Vg=R2*Vd/(R1+R2)+Vn2;
Vgs=Vg-Vd;
Vl=Vd*Rl/(Rl+.57);
Il=Vl/Rl;
Pl=D*Vl*Il;
Vq=Il*.57;
Pq=D*Vq*Il;
Q=(Tj-Ta)/Pq-3.7;

#result
print "R1+R2 is",round(k*1000,2), "ohm"
print('pick R1=330ohm & R2=360ohm as they divide Vd setting 8V<Vg<18V')
print "node voltage for V1 is",round(Vn1,2),"V"
print "node voltage for V2 is",round(Vn2,2), "V"
print "gate voltage is",round(Vg,2), "V"
print "gate & source diff is",round(Vgs,2), "V"
print "load voltage is",round(Vl,3), "V"
print "load current is",round(Il,2), "A"
print "load power is",round(Pl,2), "W"
print "Pq is",round(Pq,2), "W"
print "thermal resistance is",round(Q,2), "degreeC/W"
R1+R2 is 682.5 ohm
pick R1=330ohm & R2=360ohm as they divide Vd setting 8V<Vg<18V
node voltage for V1 is 28.0 V
node voltage for V2 is 0.7 V
gate voltage is 15.31 V
gate & source diff is -12.69 V
load voltage is 26.73 V
load current is 2.23 A
load power is 47.63 W
Pq is 2.26 W
thermal resistance is 44.92 degreeC/W

Example 6.10,Page 305

In [8]:
#finding time

#initialisation of variable
from math import pi,tan,sqrt,sin,cos,acos,atan
I=40.0;#current
Q=44.0;#nC

#calculation
t=Q/I;

#result
print "time is",round(t,2), "micro s"
time is 1.1 micro s

Example 6.11,Page 313

In [9]:
#finding different voltages and power

#initialisation of variable
from math import pi,tan,sqrt,sin,cos,acos,atan
Rl=15.0;#load resistance
D=.85;#duty cycle
Ts=60.0;#degreeC
Vd=28.0;#voltage
R1=.375;
R2=.2;

#calculation
I=Vd/(R1+R2+Rl);
Vl1=I*Rl;
P=D*Vl*I;
Vh=I*R1;
Ph=D*Vh*I;
Vl=I*R2;
Pl=D*Vl*I;
Pic=Ph+Pl;
Pic=1.56;
Tj=150;
Ta=60;
Q=(Tj-Ta)/Pic-2.2;

#result
print "current is",round(I,2), "A"
print "load voltage is",round(Vl1,2), "V"
print "power is",round(P,2), "W"
print "high side voltage is",round(Vh,2), "V"
print "high side power is",round(Ph,2), "W"
print "low side voltage is",round(Vl,2), "V"
print "low side power is",round(Pl,2), "W"
print "IC power is",round(Pic,2), "W"
print "thermal resistance is",round(Q,2), "degreeC/W"
current is 1.8 A
load voltage is 26.97 V
power is 40.85 W
high side voltage is 0.67 V
high side power is 1.03 W
low side voltage is 0.36 V
low side power is 0.55 W
IC power is 1.56 W
thermal resistance is 55.49 degreeC/W