Chapter 3 - Diode Switching

Example E1 - Pg 81

In [3]:
#Caption:Calculate (a)Resistance (b)Forward Current (c)Power dissipation (d)Peak Reverse Voltage
e=50.#Input voltage(in volts)
i=20.#Output Current(in mA)
v=0.5#Output voltage(in volts)
ir=5.#Reverse Leakage Current(in micro ampere)
vf=0.7#Forward voltage of diode(in volts)
R=v*1000./ir
print '%s %.f' %('(a)Resistance(in Kilo ohm)=',R)
I=(e-vf)/R
P=(e**2.)/R
ep=-e
print '%s %.f' %('(b)Diode Peak Reverse Voltage(in volts)=',ep)
i=i+I
print '%s %.1f' %('(c)Diode Forward Current(in mA)=',i)
p=vf*i
print '%s %.2f' %('(d)Diode Power Dissipation(in mW)=',p)
(a)Resistance(in Kilo ohm)= 100
(b)Diode Peak Reverse Voltage(in volts)= -50
(c)Diode Forward Current(in mA)= 20.5
(d)Diode Power Dissipation(in mW)= 14.35

Example E3 - Pg 83

In [6]:
#Caption:Calculate resistance and amplitude of output signal
E=2.#Input voltage(in volts)
v=0.5#Input noise voltage(in volts)
Vf=0.7#Forward diode voltage(in volts)
i=1.#Forward current of diode(in mA)
V=E-Vf
R=V/i
print '%s %.1f %s %.1f' %('Output signal amplitude(in volts)=',V,'\nResistance(in kilo ohm)=',R)
Output signal amplitude(in volts)= 1.3 
Resistance(in kilo ohm)= 1.3

Example E4 - Pg 86

In [7]:
#Caption:Calculate Resistance and diode forward current
E=10.#Input voltage(in volts)
v=9.#Output voltage(in volts)
i=1.#Output current(in mA)
vf=0.7#Diode forward voltage(in volts)
R=E-v/i
i=E-vf/R
print '%s %.f %s %.1f' %('Resistance(in kilo ohm)=',R,'\nDiode forward current(in mA)=',i)
Resistance(in kilo ohm)= 1 
Diode forward current(in mA)= 9.3

Example E5 - Pg 87

In [4]:
#Caption:Calculate Resistance
V=2.7#Output voltage(in volts)
E=8.#Input voltage(in volts)
i=1.#Output current(in mA)
vf=0.7#Diode forward voltage(in volts)
i=1.#Diode forward current(in mA)
vb=V-vf
R=(E-vb-vf)/(i+i)
print '%s %.2f' %('Resistance(in kilo ohm)=',R)
Resistance(in kilo ohm)= 2.65

Example E6 - Pg 88

In [8]:
#Caption:Find Zener voltage and Resistance
E=25.#Input voltage(in volts)
V=11.#Output voltage(in volts)
Vf=0.7#Forward diode voltage(in volts)
i=1.#Output current(in mA)
v=9.1#Voltage for 1N757 diode
I=20.#Current across 1N757 diode(in mA)
Vz=V-Vf
Vr=E-(Vf+v)
Iz=0.25*I
Ir=Iz+i
R=Vr/Ir
print '%s %.1f %s %.1f' %('Zener voltage(in volts)=',Vz,'\nResistance(in Kilo ohm)=',R)
Zener voltage(in volts)= 10.3 
Resistance(in Kilo ohm)= 2.5

Example E7 - Pg 92

In [9]:
#Caption:Calculate Capacitance and Resistance
E=10.#Input voltage(in volts)
f=1.#Frequency(in Khz)
Rs=500.#Source resistance(in ohms)
t=0.01#Tilt
T=1./(f)
pw=T*1000./2.
C=pw/Rs
R=pw/(t*C*1000.)
print '%s %.f %s %.f' %('Capacitance(in micro farad)=',C,'\nResistance(in kohm)=',R)
Capacitance(in micro farad)= 1 
Resistance(in kohm)= 50

Example E8 - Pg 96

In [11]:
#Caption:Find Capacitance and Resistance required to design the circuit
E=20.#Input waveform amplitude(in volts)
f=2.#Frequency(in Khz)
t=0.02#Tilt
R=600.#Resistance(in ohm)
T=1./f
pw=T*1000./2.
C=pw/R
R=pw/(t*C)
print '%s %.2f %s %.f' %('Capacitance(in micro farad)=',C,'\nResistance(in kohm)=',25)
Capacitance(in micro farad)= 0.42 
Resistance(in kohm)= 25

Example E9 - Pg 96

In [12]:
#Caption:Calculate Capacitance,Resistance and Zener Voltage
E=15.#Amplitude of input waveform(in volts)
Rs=1.#Source Resistance(in Kilo ohm)
V=9.#Output Voltage(in volts)
Vf=0.7#Diode forward voltage(in volts)
f=500.#Frequency(in hertz)
t=0.01#Tilt
T=1000./f
pw=T/2.
C=pw/Rs
R=pw/(t*C)
Vz=V-Vf
print '%s %.f %s %.f %s %.1f' %('Capacitance(in micro farad)=',C,'\nResistance(in Kilo ohm)=',R,'\nZener Voltage(in volts)=',Vz)
Capacitance(in micro farad)= 1 
Resistance(in Kilo ohm)= 100 
Zener Voltage(in volts)= 8.3

Example E10 - Pg 98

In [17]:
#Caption:Calculate Capacitance C1and C2,Diode reverse recovery time and input voltage
V=12.#Output voltage(in volts)
Vd=0.7#Diode forward voltage(in volts)
R=1.2#Load resistance(in Kilo ohm)
f=1.#Frequency(in KHz)
r=10.#Ripple in output voltage(in %)
Il=V/R
t=1000./(2.*f)
C2=(Il*t)*10.**(-3)/((r/(2.*100.))*V)
C1=(2.*Il*t)*10.**(-4)/((r/(2.*100.))*V)
trr=t/10.
Vpp=V+((r/100.)*V)+(2.*Vd)
Vp=Vpp/2.
print '%s %.2f %s %.2f %s %.f %s %.1f' %('\n C2(in micro farad)=',C2,'\n C1(in micro farad)=',C1,'\n Diode reverse recovery time(in micro sec)=',trr,'\n Input voltage(in volts)=',Vp,)
 C2(in micro farad)= 8.33 
 C1(in micro farad)= 1.67 
 Diode reverse recovery time(in micro sec)= 50 
 Input voltage(in volts)= 7.3