Chapter 4 - Diode Circuits

Example E1 - Pg 213

In [1]:
#Ex4_1 Pg-213
#calculate Peak source voltage,DC load voltage With an ideal diode and With second approximation
import math
Vrms=110. #rms volatage in V
Vm=Vrms/0.707 #peak source voltage
print '%s %.1f' %("Peak source voltage=V",Vm) #textbook answer wrong

print '%s' %("(a) With an ideal diode ")
Vpout=Vm #peak output voltage
print '%s %.1f' %("\n Peak output voltage=V",Vpout)
Vdc=Vm/math.pi #Dc load voltage
print '%s %.2f' %("\n DC load voltage=V \n",Vdc) #textbook answer wrong

print '%s' %("(b) With second approximation")
Vpin=Vm #peak input voltage
Vpout=Vpin-0.7
print '%s %.1f' %("\n Peak output voltage=V",Vpout)
Vdc=Vpout/math.pi #Dc load voltage
print '%s %.1f' %("\n DC load voltage=V \n",Vdc) #textbook answer wrong
Peak source voltage=V 155.6
(a) With an ideal diode 

 Peak output voltage=V 155.6

 DC load voltage=V 
 49.52
(b) With second approximation

 Peak output voltage=V 154.9

 DC load voltage=V 
 49.3

Example E2 - Pg 214

In [2]:
#Ex4_2 Pg-214
#calculate VR
print '%s' %("VR = (V_NoLoad - V_FullLoad)/V_FullLoad*100%")
print '%s' %("(a) VR = 0%")
V_FullLoad=20. #full load voltage
V_NoLoad=V_FullLoad#no load voltage
print '%s %.0f' %("\n V_FullLoad = V_NoLoad=V",V_NoLoad)
print '%s' %("(b) VR = 100%")
VR=100. #voltage regulation in %
V_NoLoad=(VR*V_FullLoad)/(100.)+V_FullLoad
print '%s %.0f' %("\n V_NoLoad=V",V_NoLoad)
VR = (V_NoLoad - V_FullLoad)/V_FullLoad*100%
(a) VR = 0%

 V_FullLoad = V_NoLoad=V 20
(b) VR = 100%

 V_NoLoad=V 40

Example E3 - Pg 214

In [3]:
#Ex4_3 Pg-214
#calculate Ratio of rectification or efficiency of halfwave rectifier,Ac input powerfrom transformer secondary
print '%s' %("Ratio of rectification or efficiency of halfwave rectifier")
print '%s' %("n = 0.406 = DC power deliverd to the load/AC input powerfrom transformer secondary ")
DC_power=500. #ddc power deliverd to the load
n=0.406 #efficiency
AC_in_power=DC_power/n #AC input powerfrom transformer secondary
print '%s %.0f' %("\n AC input powerfrom transformer secondary =Watt",AC_in_power)
Ratio of rectification or efficiency of halfwave rectifier
n = 0.406 = DC power deliverd to the load/AC input powerfrom transformer secondary 

 AC input powerfrom transformer secondary =Watt 1232

Example E4 - Pg 220

In [4]:
#Ex4_4 Pg-220
#calculate Peak value of current flowing,Average or DC current flowing,R.M.S value of current flowing, DC output power,AC input power,Efficiency of rectifier
import math
Rl=3.5*10.**(3.) #resistance in k-ohm
rF=800. #secondary resistance in k-ohm
Vm=240.# input voltage
print '%s' %("(1)(a) Peak value of current flowing")
Im=Vm/(rF+Rl) #peak current
print '%s %.2f' %("Im=mA",Im*10**3)
print '%s' %("(b) Average or DC current flowing")
Idc=Im/math.pi #DC current
print '%s %.2f' %("Idc=mA",Idc*10**3)
print '%s' %("(c) R.M.S value of current flowing")
Irms=Im/2. #rms current
print '%s %.2f' %("Irms=mA",Irms*10**3)
print '%s' %("(2) DC output power")
Pdc=(Idc)**2.*Rl #dc output power
print '%s %.1f' %("Pdc=Watt",Pdc)
print '%s' %("(3) AC input power")
Pac=(Irms)**2.*(rF+Rl)
print '%s %.2f' %("Pac=Watt",Pac)
print '%s' %("(4)Efficiency of rectifier")
n=(Pdc/Pac)*100. #efficiency
print '%s %.2f' %("n=",n)
(1)(a) Peak value of current flowing
Im=mA 55.81
(b) Average or DC current flowing
Idc=mA 17.77
(c) R.M.S value of current flowing
Irms=mA 27.91
(2) DC output power
Pdc=Watt 1.1
(3) AC input power
Pac=Watt 3.35
(4)Efficiency of rectifier
n= 32.99

Example E5 - Pg 221

In [5]:
#Ex4_5 Pg-221
#calculate Peak output volatge,Average output current,Diode dissipation
import math
Vr=0.7 #diodes voltage drop
Rl=820. #load resistor in ohm
Vin=40. #input voltage in V
print '%s' %("(1)  Peak output volatge: Current flows through load only when two diodes conduct. While conducting, there is voltage drop across the diode.")
V_drop_2=2.*Vr #voltage drop across 2 diodes
Vm=Vin-V_drop_2 #peak voltage
print '%s %.2f' %("\nVm=V",Vm)
print '%s' %("\n(2) Average output current")
Idc=(2*Vm/math.pi)/Rl #average output current
print '%s %.0f' %("Idc=mA",Idc*10**3)
print '%s' %("\n(3) Diode dissipation")
DD=Idc*Vr #Diode dissipation
print '%s %.0f' %("=mW",DD*10**3)
(1)  Peak output volatge: Current flows through load only when two diodes conduct. While conducting, there is voltage drop across the diode.

Vm=V 38.60

(2) Average output current
Idc=mA 30

(3) Diode dissipation
=mW 21

Example E6 - Pg 222

In [6]:
#Ex4_6 Pg-222
#calculate RMS value of secondary voltage,,Peak secondary voltage,Peak inverse voltage of diode,Peak load voltage,DC load voltage
import math
Vr=0.7 #voltage drop
Vi=120. #input voltage
print '%s' %("RMS value of secondary voltage")
V_sec=Vi/5. #RMS value of secondary voltage
print '%s %.0f' %("=V",V_sec)
print '%s' %("Peak secondary voltage")
Vm=V_sec*math.sqrt(2.) #Peak secondary voltage
print '%s %.0f' %("=V",Vm)
print '%s' %("Peak inverse voltage of diode")
Vinv=-(Vm) #Peak inverse voltage of diode
print '%s %.0f' %("=V",Vinv)
print '%s %.0f' %("\nPeak load voltage=V",Vm)
print '%s' %("DC load voltage")
Vdc=Vm/math.pi #DC load voltage
print '%s %.1f' %("=V",Vdc)
print '%s' %("Assuming second approximation")
print '%s' %("Vm'' = Vm - Vr ")
print '%s' %("Peak load voltage")
Vm_dash=Vm-Vr #Peak load voltage
print '%s %.1f' %("=V",Vm_dash)
print '%s' %("DC load voltage")
Vdc=Vm_dash/math.pi #DC load voltage
print '%s %.1f' %("=V",Vdc)
RMS value of secondary voltage
=V 24
Peak secondary voltage
=V 34
Peak inverse voltage of diode
=V -34

Peak load voltage=V 34
DC load voltage
=V 10.8
Assuming second approximation
Vm'' = Vm - Vr 
Peak load voltage
=V 33.2
DC load voltage
=V 10.6

Example E7 - Pg 222

In [7]:
#Ex4_7 Pg-222
#calculate Secondary RMS voltage,Secondary pek voltage,Half of the secondary voltage is input to the half section,Peak voltage across load,DC load current
import math
Vi=120. #supply voltage n V
Rl=5.*10.**3. #load resistance
print '%s' %("Secondary RMS voltage")
Vrms=Vi/5. #Secondary RMS voltage
print '%s %.0f' %("=V",Vrms)
print '%s' %("Secondary pek voltage")
Vm=Vrms*math.sqrt(2.) #Secondary pek voltage
print '%s %.0f' %("=V",Vm)
print '%s' %("  Half of the secondary voltage is input to the half section.")
print '%s' %("So input to the half section")
i=Vm/2. #input to the half section
print '%s %.0f' %("=V",i)
print '%s' %("Peak voltage across load")
print '%s %.0f' %("=V",i)
print '%s' %("DC voltage across load = 17V. Since the capacitor gets changed up to peak value,")
print '%s' %("DC load current")
Vdc=i
Idc=Vdc/Rl #DC load current
print '%s %.1f' %("=mA",Idc*10**3)
Secondary RMS voltage
=V 24
Secondary pek voltage
=V 34
  Half of the secondary voltage is input to the half section.
So input to the half section
=V 17
Peak voltage across load
=V 17
DC voltage across load = 17V. Since the capacitor gets changed up to peak value,
DC load current
=mA 3.4

Example E8 - Pg 227

In [8]:
#Ex4_8 Pg-227
#calculate Ripple factor for a full wave rectifier,DC output voltage,Percentage voltage regulation
import math
f=50. #frequency in Hz
C=100.*10.**(-6.) #capacitance in F
Rl=2.*10.**3. #load resistance
Vrms=40. #rms secondary voltage
print '%s' %("(a) Ripple factor for a full wave rectifier")
r=1./(4.*math.sqrt(3.)*f*C*Rl) #Ripple factor for a full wave rectifier
print '%s %.3f' %("=",r)
print '%s' %("(b) DC output voltage")
Vm=Vrms*math.sqrt(2.)
Vdc=Vm/(1.+(1./(4.*f*C*Rl))) #DC output voltage
print '%s %.1f' %("=V",Vdc)
print '%s' %("(c) Percentage voltage regulation")
per=100./(4.*f*C*Rl) #Percentage voltage regulation
print '%s %.1f' %("=",per)
(a) Ripple factor for a full wave rectifier
= 0.014
(b) DC output voltage
=V 55.2
(c) Percentage voltage regulation
= 2.5

Example E9 - Pg 237

In [9]:
#Ex4_9 Pg-237
#calculate Connected load,Ripple factor in case of shunt capacitor filter
import math
Vrms=300. #rms voltage in V
f=60. #frequency
Idc=0.2 #load current
C=10. #shunt capacitor in microFarad
Vm=Vrms*math.sqrt(2.) #peak voltage
Vdc=(2*Vm)/math.pi #Dc voltage
print '%s' %("Connected load")
Rl=Vdc/Idc #Connected load
print '%s %.0f' %("Rl=ohm = (955.6)*sqrt(2) ohm\n",Rl)
print '%s' %("Ripple factor in case of shunt capacitor filter ")
print '%s' %("=2410/C*Rl")
r=2410./(C*Rl) #ripple factor
print '%s %.2f' %("=",r)
Connected load
Rl=ohm = (955.6)*sqrt(2) ohm
 1350
Ripple factor in case of shunt capacitor filter 
=2410/C*Rl
= 0.18

Example E10 - Pg 238

In [10]:
#Ex4_10 Pg-238
#calculate Peak voltage,DC output voltage,Ripple factor in case of capacitor filter
import math
f=60. #frequency in Hz
C=100.*10.**(-6.) #capacitance in F
Rl=1.*10.**3. #load resistance

print '%s' %("Since the transformer is center tapped ,the rms value of voltage across half the secondary coil")
Vct=12.6 #voltage of center tapped transformer
Vrms=Vct/2. #rms voltage

print '%s' %("Peak voltage")
Vm=Vrms*math.sqrt(2.) #peak voltage
print '%s %.2f' %("= V\n ",Vm)

print '%s' %("(b) DC output voltage")
Vdc=Vm/(1.+(1./(4.*f*C*Rl))) #DC output voltage
print '%s %.2f' %("=V\n ",Vdc)

print '%s' %("Ripple factor in case of capacitor filter ")
print '%s' %("=2410/C*Rl")
r=2410./(100.*Rl)*100. #ripple factor
print '%s %.1f' %("\n=\n ",r)
Since the transformer is center tapped ,the rms value of voltage across half the secondary coil
Peak voltage
= V
  8.91
(b) DC output voltage
=V
  8.55
Ripple factor in case of capacitor filter 
=2410/C*Rl

=
  2.4

Example E11 - Pg 238

In [11]:
#Ex4_11 Pg-238
#calculate the LOad connected to the filter,Critical value of inductor,Capacitance
import math
Vdc=9. #dc voltage
Idc=100.*10.**(-3.) #dc load current
print '%s' %("Ripple factor with an L-C filter,r=(0.83/LC)")
print '%s' %("where L-> Henry,C->microFarad")
gamm=0.02 #maximum ripple
LC=0.83/gamm
print '%s %.1f' %("LC =",LC) #let LC=42

print '%s' %("LOad connected to the filter,")
RL=Vdc/Idc #load resistance in ohm
print '%s %.0f' %("RL=ohm",RL)

print '%s' %("Critical value of inductor,")
Lk=RL/900. #Critical value of inductor
print '%s %.1f' %("Lk=",Lk)

print '%s' %("Capacitance")
LC=42. #rounding of 41.5 to 42
C=LC/Lk #capacitance in microFarad
print '%s %.0f' %("C  =uF",C)
Ripple factor with an L-C filter,r=(0.83/LC)
where L-> Henry,C->microFarad
LC = 41.5
LOad connected to the filter,
RL=ohm 90
Critical value of inductor,
Lk= 0.1
Capacitance
C  =uF 420

Example E12 - Pg 245

In [12]:
#Ex4_12 Pg-245
#calculate Voltage across resistor,Current through series resistor
V=20. #source voltage
Vz=12. #zener voltage
Vr=V-Vz #voltage across resistor 
Rs=330. #series resistance
print '%s' %("Voltage across resistor ")
print '%s %.0f' %("=V",Vr)
print '%s' %("Current through series resistor")
Iser=Vr/Rs #Current through series resistor
print '%s %.1f' %("=mA",Iser*10**3)
print '%s' %("Since Zener diode is in series with resistor, current through it is equal to current flowing through resistor,i.e 24.2mA ")
Voltage across resistor 
=V 8
Current through series resistor
=mA 24.2
Since Zener diode is in series with resistor, current through it is equal to current flowing through resistor,i.e 24.2mA 

Example E13 - Pg 245

In [13]:
#Ex4_13 Pg-245
#calclate Voltage across resistor,Current through series resistor,Current through series load Il,Current through zener diode,Respective wattage of elements used
V=20. #source voltage in V
Vz=12. #zener voltage in V
Vs=V-Vz #voltage across resistor in V 
Rs=330. #series resistance in ohm
RL=1.5*10**3 #load resistance in ohm
print '%s' %("Voltage across resistor ")
print '%s %.0f' %("=V",Vs)

print '%s' %("(1) Current through series resistor Is")
Is=Vs/Rs #Current through series resistor
print '%s %.1f' %("Is=mA",Is*10**3)

print '%s' %("(2) Current through series load Il")
VL=Vz #voltage across load
IL=VL/RL #Current through series load
print '%s %.0f' %("IL=mA",IL*10**3)

print '%s' %("(3)Current through zener diode")
Iz=Is-IL #Current through zener diode
print '%s %.1f' %("IL=mA",Iz*10**3)

print '%s' %("(4)Respective wattage of elements used")
print '%s' %("(a) Series resistor -> W=Is*Vs")
W=Vs*Is #wattage of series resistor
print '%s %.1f' %("=mW",W*10**3)

print '%s' %("(b) Zener diode -> W=Iz*Vz")
W=Vz*Iz #wattage of zener diode
print '%s %.1f' %("=mW",W*10**3)


print '%s' %("(b) Load resistor -> W=IL*VL")
W=VL*IL #wattage of zener diode
print '%s %.0f' %("=mW",W*10**3)
Voltage across resistor 
=V 8
(1) Current through series resistor Is
Is=mA 24.2
(2) Current through series load Il
IL=mA 8
(3)Current through zener diode
IL=mA 16.2
(4)Respective wattage of elements used
(a) Series resistor -> W=Is*Vs
=mW 193.9
(b) Zener diode -> W=Iz*Vz
=mW 194.9
(b) Load resistor -> W=IL*VL
=mW 96

Example E14 - Pg 246

In [14]:
#Ex4_14 Pg-246
#calculate, Applying Thevenin's theorem, Thevenin voltage across the zener diode
RL=1.*10.**3. #load resistance in ohm
Rs=270. #series resistor in ohm
Vs=18. #supply voltage in V
vz=10. #xener voltage
print '%s' %("Applying Thevenin''s theorem, Thevenin voltage across the zener diode")
Vth=(RL/(RL+Rs))*Vs #Thevenin voltage
print '%s %.1f' %("Vth=V",Vth)
print '%sf' %("Thus Vth is greater than Vz(zener voltage),i.e 14.2 >10. So Zener diode is operating in the breakdown voltage.")
Applying Thevenin''s theorem, Thevenin voltage across the zener diode
Vth=V 14.2
Thus Vth is greater than Vz(zener voltage),i.e 14.2 >10. So Zener diode is operating in the breakdown voltage.f

Example E15 - Pg 246

In [15]:
#Ex4_15 Pg-246
#calculate Average load current,Total current entering the circuit,Series resistor,Power rating of resistor
IL1=10.*10.**(-3.) 
IL2=20.*10.**(-3.) #IL1,IL2 range of load current in A
Vin=20. #supply voltage in V
Izt=6.*10.**(-3.) #zener current in A
Vz=15. #zener voltage in V

print '%s' %("Average load current")
IL=(IL1+IL2)/2. # Average load current
print '%s %.0f' %("\nIL=mA",IL*10**3)

print '%s' %("Total current entering the circuit")
Is=IL+Izt #current entering the circuit
print '%s %.0f' %("\nIs=mA",Is*10**3)

print '%s' %("Series resistor")
Rs=(Vin-Vz)/Is #Series resistor in ohm
print '%s %.0f' %("Rs=ohm",Rs)

print '%s' %("Power rating of resistor")
Vs=Vin-Vz 
P=(Vs**2.)/Rs #Power rating of resistor
print '%s %.1f' %("\nP=W",P)
Average load current

IL=mA 15
Total current entering the circuit

Is=mA 21
Series resistor
Rs=ohm 238
Power rating of resistor

P=W 0.1