Pr=5 #Power rating(W)
Vd=1.2 #diode voltage(V)
Id=1.75 #diode current(A)
PD=Vd*Id #Power dissipaion(W)
print 'Power Dissipation =',PD,'W'
print 'PD(',PD,'W) < ''Pr(',Pr,'W), So diode will not be destroyed.'
Vs=10 #Source voltage(V)
RL=1 #Load resistance(KOhm)
VL=Vs #LOad voltage(V)
IL=VL/RL #Load current(mA)
print 'Vs will be appearing across RL'
print 'Load voltage VL =',Vs,'V'
print 'Load current IL =',IL,'mA'
print 'As per figure 3-6b, Thevenize the circuit to the left of the diode'
R1=6 #Resistance(KOhm)
R2=3 #Resistance(KOhm)
RL=1 #Load Resistance(KOhm)
Vs=36 #Supply voltage(V)
Vth=R2*Vs/(R1+R2) #ThCevenin voltage(V)
Rth=(R1*R2)/(R1+R2) #Thevenin resistance(KOhm)
Rt=Rth+RL #total resistance(KOhm)
IL=Vth/Rt #Load current(mA)
VL=IL*RL #Load voltage(V)
print 'Vth =',Vth,'V & Rth =',Rth,'KOhm'
print 'Visualize diode as closed switch,'
print 'IL =',IL,'mA'
print 'VL =',VL,'V'
print 'As per Second approximation in Fig.3-8,'
Vd=0.7 #diode voltgage(V)
Vs=10 #supply voltage(V)
RL=1 #Load resistance(KOhm)
VL=Vs-Vd #Load voltage(v)
IL=VL/RL #Load current(mA)
PD=Vd*IL #diode power(mW)
print 'IL =',IL,'mA & VL =',VL,'V'
print 'Diode power PD =',PD,'mW'
print 'As per Second approximation in Fig.3-9a,'
Vd=0.7 #diode voltgage(V)
Vs=36 #supply voltage(V)
R1=6 #Resistance(KOhm)
R2=3 #Resistance(KOhm)
RL=1 #Load resistance(KOhm)
Vth=R2*Vs/(R1+R2)#Thevenin Voltage(V)
Rth=(R1*R2)/(R1+R2)#Thevenin resistance(KOhm)
IL=(Vth-Vd)/R2#Load current(mA)
VL=IL*RL#Load voltage(V)
PD=Vd*IL#diode power(mW)
print 'Thevenize the circuit to the left of the diode'
print 'Vth =',Vth,'V & Rth =',Rth,'KOhm'
print 'VL =',round(VL,2),'V & IL =',round(IL,2),'mA'
print 'Diode power PD =',round(PD,2),'mW'
print 'In Fig.3-11a,'
Vd=0.7 #diode voltgage(V)
Vs=10 #supply voltage(V)
RL=1000L #Load resistance(Ohm)
Rb=0.23 #bulk resistance
print 'As per third approximation, we get fig.3-11b'
if Rb<(RL/100):
print'If Rb < 0.01RL than ignore Rb & use second approximation.'
VL=Vs-Vd #Load voltage(V)
IL=(VL/RL)*1000 #Load current(mA)
PD=Vd*IL #diode power(mW)
print 'IL =',IL,'mA & VL =',VL,'V'
print 'Diode power PD =',PD,'mW'
print 'In Fig.3-11a, take RL = 10 Ohm'
Vd=0.7 #diode voltgage(V)
Vs=10 #supply voltage(V)
RL=10 #Load resistance(Ohm)
Rb=0.23 #bulk resistance
RT=Rb+RL #Total reistance(Ohm)
VT=Vs-Vd #total voltage(V)
print 'RT =',RT,'Ohm & VT =',VT,'V'
IL=VT/RT #Load current(mA)
VL=IL*RL #Load voltage(V)
VD=Vd+(IL*Rb)
PD=VD*IL #diode power(W)
print 'IL =',round(IL,2),'mA & VL =',round(VL,2),'V'
print 'VD =',round(VD,2),'V'
print 'Diode power PD =',round(PD,2),'W'