CHAPTER 5 SPECIAL-PURPOSE DIODES

Example 5-1, Page 146

In [1]:
Vsmin=20             #Source voltage minimum(V)
Vsmax=40             #Source voltage maximum(V)
Vbd=10               #Breakdown voltage(V)
R=0.82               #Resistance(KOhm)

Vr1=Vsmin-Vbd        #voltage across resistor(V)
Is1=Vr1/R            #Minimum current(mA)
Vr2=Vsmax-Vbd        #voltage across resistor(V)
Is2=Vr2/R            #Maximum current(mA)

print 'Ideally, zener diode acts as a battery(of breakdown voltage = 10V) shown in figure 5-4b'
print 'Minimum current Is1=',round(Is1,2),'mA'
print 'Maximum current Is1=',round(Is2,2),'mA'
Ideally, zener diode acts as a battery(of breakdown voltage = 10V) shown in figure 5-4b
Minimum current Is1= 12.2 mA
Maximum current Is1= 36.59 mA

Example 5-2, Page 149

In [2]:
Vs=18                 #supply voltage(V)
Rs=0.27               #source resistance(KOhm)
RL=1                  #Load resistance(KOhm)
Vz=10                 #Zener voltage(V)

VTH=(RL/(Rs+RL))*Vs    #Thevenin voltage(V)

print 'Thevenin voltage VTH = ',round(VTH,2),'V'
print 'Thevenin voltage is greater than zener voltage, zener diode is operating in breakdown region.'
Thevenin voltage VTH =  14.17 V
Thevenin voltage is greater than zener voltage, zener diode is operating in breakdown region.

Example 5-3, Page 149

In [3]:
Vs=18                 #supply voltage(V)
Rs=0.27               #source resistance(KOhm)
RL=1                  #Load resistance(KOhm)
Vbd=10                #Zener voltage(V)

Vr=Vs-Vbd            #voltage across resistor(V)
Is=Vr/Rs              #Current(mA)
IL=Vbd/RL            #Current(mA)
Iz=Is-IL             #Zener current(mA)

print 'Load current IL = ',IL,'mA'
print 'Zener current Iz = ',round(Iz,2),'mA'
Load current IL =  10 mA
Zener current Iz =  19.63 mA

Example 5-7, Page 153

In [15]:
Iz=20                    #zener current(mA)
Rz=8.5                   #zener resistance(Ohm)
Vbd=10                   #Zener voltage(V)

DVL=Iz*Rz/1000           #change in load voltage(V)
VL=Vbd+DVL               #Load voltage(V)

print 'Change in load voltage DVL =',DVL,'V'
print 'Load voltage with second approx., VL =',VL,'V'
Change in load voltage DVL = 0.17 V
Load voltage with second approx., VL = 10.17 V

Example 5-8, Page 154

In [4]:
Rs=270                   #Source resistance (Ohm)
Rz=8.5                   #zener resistance(Ohm)
VRin=2                   #Zener voltage(V)

VRout=(Rz/Rs)*VRin*1000  #Load ripple voltage(V)

print 'Load ripple voltage VRout=',round(VRout,2),'mV'
Load ripple voltage VRout= 62.96 mV

Example 5-10, Page 157

In [5]:
Vil=22                 #input voltage range low(V)
Vih=30                 #input voltage range high(V)
Vz=12                  #regulated output voltage(V)
Rl=140                 #Load resistance low(KOhm)
Rh=10                  #Load resistance high(KOhm)

RSmax=Rl*(float(Vil)/float(Vz)-1)  #Maximum series resistance

print 'Maximum series resistance RSmax =',round(RSmax,2),'V'
Maximum series resistance RSmax = 116.67 V

Example 5-11, Page 157

In [69]:
Vil=15                     #input voltage range low(V)
Vih=20                     #input voltage range high(V)
Vz=6.8                     #regulated output voltage(V)
Il=5                       #Load current low(mA)
Ih=20                      #Load current high(mA)

RSmax=(Vil-float(Vz))/Ih*1000  #Maximum series resistance

print 'Maximum series resistance RSmax =',RSmax,'V'
Maximum series resistance RSmax = 410.0 V

Example 5-12, Page 168

In [6]:
Vi=50                    #voatage supply(V)
Rs=2.2                   #series resistance(KOhm)
Vf=2                     #forward approx. voltage
                    
Is=(Vi-Vf)/Rs

print 'LED current Is =',round(Is,2),'mA'
LED current Is = 21.82 mA

Example 5-13, Page 168

In [12]:
Vs=9                     #voatage supply(V)
Rs=470.0                 #series resistance(Ohm)
Vf=2                     #forward approx. voltage
                    
Is=(Vs-Vf)/Rs

print 'LED current Is =',round((Is*1000),2),'mA'
LED current Is = 14.89 mA

Example 5-14, Page 169

In [17]:
import math

Vac=20                   #AC voatage supply(V)
Rs=680.0                 #series resistance(KOhm)
                    
Vacp=1.414*Vac            #peak source voltage(V)
Is1=(Vacp/Rs)*1000        #approx. peak current(mA)
Is2=Is1/math.pi              #average of half-wave current through LED(mA)
P=(Vac)**2/Rs             #Power dissipation(W)

print 'approx. peak LED current Is1 =',round(Is1,2),'mA'
print 'average of half-wave current through LED Is2 =',round(Is2,2),'mA'
print 'Power dissipation P =',round(P,2),'W'
approx. peak LED current Is1 = 41.59 mA
average of half-wave current through LED Is2 = 13.24 mA
Power dissipation P = 0.59 W

Example 5-15, Page 170

In [18]:
import math

Vs=120                   #AC voatage supply(V)
f=60                     #frequency(Hz)
C=0.68                   #series resistance(KOhm)
                    
Xc=1/(2*math.pi*f*C)*1000    #capacitive reactance(KOhm)
Vacp=Vs*1.414
Is1=(Vacp/Xc)             #approx. peak current(mA)
Is2=Is1/math.pi              #average current through LED(mA)

print 'Capacitance reactance Xc = ',round(Xc,2),'KOhm'
print 'approx. peak LED current Is1 =',round(Is1,2),'mA'
print 'average current through LED Is2 =',round(Is2,2),'mA'
Capacitance reactance Xc =  3.9 KOhm
approx. peak LED current Is1 = 43.5 mA
average current through LED Is2 = 13.85 mA
In [ ]: