Chapter03:Diodes

Ex3.1:pg-143

In [2]:
#v_s is sinusoidal input voltage with peak 24V
#battery charges to 12V
I_d=(24-12)/100.0
max_v_rev=24+12.0;
print round(I_d,2),"peak value of diode current (A)\n",round(max_v_rev,2),"maximum reverse voltage acrossthe diode (V)"
0.12 peak value of diode current (A)
36.0 maximum reverse voltage acrossthe diode (V)

Ex3.2:pg-145

In [5]:
print "Consider fig 3.6(a). Assume both diodes are conducting"
I_D2=(10-0)/10.0;
I=(0-(-10))/5.0-I_D2; # node eqution at B for fig 3.6(a)
V_B=0;
V=0;
print I,"= I (mA)\n", V,"= V (V)\n" ,"D_1 is conducting as assumed originally"
print "Consider fig 3.6(a). Assume both diodes are conducting"
I_D2=(10-0)/5.0;
I=(0-(-10.0))/10-2; # node eqution at B for fig 3.6(b)
print I,"= I (mA)\n ", V,"=V (V)"
print "Implies assumption is wrong. lets assume D_1 is off and D_2 is on"
I_D2=(10-(-10))/15.0;
V_B=-10+10.0*I_D2;
I=0;
print I,"= I (mA)\n", round(V_B,1),"= V (V)\n D_1 is reverse biased"
Consider fig 3.6(a). Assume both diodes are conducting
1.0 = I (mA)
0 = V (V)
D_1 is conducting as assumed originally
Consider fig 3.6(a). Assume both diodes are conducting
-1.0 = I (mA)
  0 =V (V)
Implies assumption is wrong. lets assume D_1 is off and D_2 is on
0 = I (mA)
3.3 = V (V)
 D_1 is reverse biased

Ex3.3:pg-150

In [11]:
#i-I_S*exp(v/(n*V_T)) implies I_S=i*exp(-v/(n*V_T))
n=1;
i=10**-3; # (A)
v=700; # (V)
V_T=25; # (V)
I_S=i*exp(-v/(n*V_T))
print round(I_S,17),"= I_S (A) for n=1"
n=2;
I_S=i*exp(-v/(n*V_T))
print round(I_S,11),"= I_S (A) for n=2"
print "These values implies I_S is 1000 times greater "
6.9e-16 = I_S (A) for n=1
8.3e-10 = I_S (A) for n=2
These values implies I_S is 1000 times greater 

Ex3.4:pg-154

In [14]:
V_DD=5; # (V)
R=1000; # (ohm)
I_1=1*10**-3; # (A)
V_D=0.7; # (V)
V_1=V_D;
I_D=(V_DD-V_D)/R;
I_2=I_D;
V_2=V_1+0.1*log10(I_2/I_1);
I_D=(V_DD-V_2)/R;
print round(I_D*1000.0,3),"= The diode current (mA)"
V_D=V_2+0.1*log10(I_D/I_2)
print round(V_D,3),"= The diode volage (V)"
4.237 = The diode current (mA)
0.763 = The diode volage (V)

Ex3.5:pg-157

In [18]:
V_D0=0.65; # (V)
r_D=20; # (ohm)
R=1000; # (ohm)
V_DD=5; # (V)
I_D=(V_DD-V_D0)/(R+r_D);
print round(I_D*1000,2),"= I_D (mA)"
V_D=V_D0+I_D*r_D;
print round(V_D,3),"= The diod voltage (V)"
4.26 = I_D (mA)
0.735 = The diod voltage (V)

Ex3.6:pg-162

In [21]:
V_S=10; # V_S=V_+
V_D=0.7; # (V)
R=10*10**3; # (ohm)
n=2;
V_T=25*10**-3; # (V)
V_s=1; # (V)
I_D=(V_S - V_D)/R;
r_D=n*V_T/I_D;
v_d=V_s*r_D/(R+r_D);
print round(v_d*1000,2),"= v_d(peak (mV))"
5.35 = v_d(peak (mV))

Ex3.7:pg-163

In [24]:
V_DD=10; # (V)
V_D=0.7*3; # string of 3 diodes provide this constant voltage
R=1*10**3;
I_D=(V_DD-V_D)/R;
n=2;
V_T= 25*10**-3; # (V)
r_d=n*V_T/I_D; # incremental resistance 
r=3*r_d; # total incremental resistance
deltav_O=2*r/(r+R); # deltav is peak to peak change in output voltage
print round(deltav_O*1000,1),"is Percentage change (mV) in regulated voltage caused by 10% change in power supply"
I=2.1*10**-3; # The current drawn from the diode string
deltav_O=-I*r; # Decrease in voltage across diode string
print round(deltav_O*1000,1),"is Decrease in voltage across diode string (mV)"
# The answer in the textbook is slightly different due to approximation
37.3 is Percentage change (mV) in regulated voltage caused by 10% change in power supply
-39.9 is Decrease in voltage across diode string (mV)

Ex3.8:pg-169

In [29]:
V_Z=6.8; # (V)
I_Z=0.005; # (A)
r_Z=20; # (ohm)
V=10; # V=V_+
R=0.5*10**3; # (ohm)

# 3.8a
V_ZO=V_Z-r_Z*I_Z;
I_Z=(V-V_ZO)/(R+r_Z)
V_O=V_ZO+I_Z*r_Z;
print round(V_O,2),"= V_O (V)"

# 3.8b
deltaV=1; # change in V is +1 and -1
deltaV_O=deltaV*r_Z/(R+r_Z); # corresponding change in output voltage
print round(deltaV_O*1000,1),"= Line regulation (mV/V)"

# 3.8c
I_L=1*10**-3; # load current
deltaI_L=1*10**-3;
deltaI_Z=-1*10**-3; # change in zener current
deltaV_O=r_Z*deltaI_Z;
print round(deltaV_O*1000),"= Load regulation (mV/mA)"

# 3.8d
I_L=6.8/2000; # load current with load resistance of 2000
deltaI_Z=-I_L;
deltaV_O=r_Z*deltaI_Z;
print round(deltaV_O*1000,2),"= Corresponding change in zener voltage (mV) for zener current change of -3.4mA"

# 3.8e
R_L=0.5*10**3; # (ohm)
V_O=V*R_L/(R+R_L);
print V_O,"V_O (V) for R_L=0.5K ohm"

# 3.8f
I_Z=0.2*10**-3; # Zener t be at the edge of breakdown I_Z=I_ZK
V_Z=6.7; # V_Z=V_ZK
I_Lmin=(9-6.7)/0.5; # Lowest current supplied to R
I_L=I_Lmin-I_Z; # load current
R_L=V_Z/I_L;
print round(R_L,1),"= R_L (Kohm)"
6.83 = V_O (V)
38.5 = Line regulation (mV/V)
-20.0 = Load regulation (mV/mA)
-68.0 = Corresponding change in zener voltage (V) for zener current change of -3.4mA
5.0 V_O (V) for R_L=0.5K ohm
1.5 = R_L (Kohm)

Ex3.9:pg-181

In [35]:
# Example 3.9 : Value of capacitance C that will result in peak-peak ripple of 2V
V_P=100.0; # (V)
V_r=2.0; # (V)
f=60.0; # (Hz)
R=10.0*10**3; # (ohm)
I_L=V_P/R;
C=V_P/(V_r*f*R);
print round(C*1000000,1),"= C (microF)"
wdeltat=math.sqrt(2*V_r/V_P);
print wdeltat,"= Conduction angle (rad)"
i_Dav=I_L*(1+math.pi*math.sqrt(2*V_P/V_r));
print round(i_Dav*1000),"= i_Dav (A)"
i_Dmax=I_L*(1+2*math.pi*math.sqrt(2*V_P/V_r));
print round(i_Dmax*1000),"= i_Dmax (mA)"
83.3 = C (microF)
0.2 = Conduction angle (rad)
324.0 = i_Dav (A)
638.0 = i_Dmax (mA)