# Chapter 5: Semiconductor Junction Diodes¶

## Example 1, Page 82¶

In [2]:
import math

#Variable declaration
#I=Is*(exp((e*V)/kB*T)-1)
I=50*10**(-3)#I=Forward current in ampere
Is=5*10**(-6)#Is=Reverse saturation current in ampere
e=1.6*10**(-19)#e=charge of electron in coulomb
#V=voltage
kB=1.38*10**(-23)#kB=Boltzmann's constant in Joule/kelvin
T=300#T=Temperature in kelvin

#Calculations
a=(I/Is)+1
#exp((e*V)/kB*T)=a
V=((kB*T)/e)*math.log(10**4)

#Result
print "V= %.3f V"%V

V= 0.238 V


## Example 2, Page 83¶

In [4]:
import math

#Variable declaration
e=1.6*10**-19#e=charge of an electron in C
V1=0.06#V1=applied forward bias in V
V2=(-0.06)#V2 =applied reverse bias in V
kB=1.38*10**(-23)#kB=Boltzmann's constant in J/K
T=300#T=Temperature in Kelvin

#Calculations
#Is=reverse saturation current in A
#I1=Is*(exp((e*V1)/(kB*T))-1)#I1=current for forward bias
#I2=Is*(exp((e*V2)/(kB*T))-1)#I2=current for reverse bias
a=((math.exp((e*V1)/(kB*T))-1))/((math.exp((e*V2)/(kB*T))-1))#a=(I1/I2)

#Result
print "a = %.2f"%abs(a)

a = 10.16


## Example 3, Page 83¶

In [6]:
#Variable declaration
V=0.9#V=forward bias voltage
I=60*10**(-3)#I=Current in ampere

#Calculations
rdc=(V/I)#rdc=static resistance in ohm
n=2#n=emission coefficient
rac=((26*n*10**(-3))/I)#rac=dynamic resistance

#Results
print "rdc=%.f ohm"%rdc
print "rac=%.2f ohm"%rac

rdc=15 ohm
rac=0.87 ohm


## Example 4, Page 83¶

In [8]:
import math

#Variable declaration
e=1.6*10**(-19)#e=charge of an electron in C
kB=1.38*10**(-23)#kB=Boltzmann's constant in J/K
#V,V1=forward bias voltagesin V
n=2#n=emission coefficient for silicon pn junction diode
T=300#T=Temperature in kelvin

#Calculations
#Is=Reverse saturation current in A
#I=Is*(exp((e*V)/(n*kB*T)))#I=current for forward bias voltage V
#2I=Is*(exp((e*V1)/(n*kB*T)))#2I=current for forward bias voltage V1
#exp((e*(V1-V)/(n*kB*T)))=2
a=(((n*kB*T)/e)*math.log(2))*10**3#a=(V1-V)=increase in the bias voltage in V

#Result
print "V1-V = %.1f mV"%a

V1-V = 35.9 mV


## Example 5, Page 84¶

In [10]:
import math

#Variable declaration
e=1.6*10**(-19)#e=charge of an electron in C
kB=1.38*10**(-23)#kB=Boltzmann's constant in J/K
n=2#n=emission coefficient for silicon pn junction diode
T=300#T=Temperature in kelvin

#Calculations
#Is=Reverse saturation current in A
#V=bias voltage in V
#I=Is*(exp((e*V)/(n*kB*T))-1)#I=reverse current in A
#I=(-(Is/2))
a=(((n*kB*T)/e)*math.log(1./2))*10**3#a=bias for reverse current in silicon pn junction diode

#Results
print "V = %.1f mV"%a
print "The negative sign suggests diode in reverse bias"

V = -35.9 mV
The negative sign suggests diode in reverse bias


## Example 6, Page 84¶

In [12]:
import math

#Variable declaration
#T1,T2=Temperature in kelvin
#Is1=Reverse saturation current at temperature T1 in ampere
#Is2=Reverse saturation current at temperature T2 in ampere
#Is2=Is1*2^((T2-T1)/10)
#((T2-T1)/10)*log(2)=log(Is2/Is1)
#b=(Is2/Is1)
b=50

#Calculations
a=((10*math.log(b))/math.log(2))#a=(T2-T1)=rise in temperature in degree celcius

#Result
print "T2-T1 = %.1f C"%a

T2-T1 = 56.4 C


## Example 7, Page 84¶

In [17]:
import math

#Variable declaration
V=0.6#V=cutin voltage in V
r=150.#r=forward resistance in ohm
P=200.0*(10**-3)#P=maximum power in Watt

#Calculations&Results
#P=(i^2)*r where i=maximum safe diode current
i=(math.sqrt(P/r))*10**3
print "i=%.1f mA"%i
#i=((Vb/3)-V)/3 by applying KCL
Vb=((3*i)+V)*3#Vb=maximum permissible battery voltage
print "Vb= %.1f V"%Vb

i=36.5 mA
Vb= 330.4 V


## Example 8, Page 85¶

In [23]:
#Variable declaration
V=15#V=supply voltage
Vz=12#Vz=Zener voltage
P=0.36#P=power of Zener diode

#Calculations&Results
#P=Vz*I
I=(P/Vz)#I=maximum allowable Zener current
print "I= %.2f A"%I
Vr=V-Vz#Vr=voltage drop across series resistance R
print "Vr=%.f V"%Vr
R=Vr/I#R=series resistance
print "R=%.f ohm"%R
#I=Iz+Il
Iz=2*(10**-3)#Iz=minimum diode current
print "Il=%.f mA"%(Il*10**3)
Rlm=Vz/Il#Rlm=minimum value of Rl
print "Rlm=%.1f ohm"%Rlm
print "The allowable range of variation of Rl is 428.6ohm<=Rl<infinite"

I= 0.03 A
Vr=3 V
R=100 ohm
Il=28 mA
Rlm=428.6 ohm
The allowable range of variation of Rl is 428.6ohm<=Rl<infinite


## Example 9, Page 85¶

In [25]:
#Variable declaration
V=15#V=supply voltage
Vz=12.#Vz=Zener voltage
P=0.36#P=power of Zener diode

#Calculations&Results
#P=Vz*I
I=(P/Vz)#I=maximum allowable Zener current
print "I=%.2f A"%I
Iz=2*10**(-3)#Iz=minimum value attained by the zener current
print "i=%.3f A"%i
Imin=Iz+i#Imin=minimum allowable value of current
R=100#R=series resistance
Vr=Imin*R#Vr=voltage drop across R
print "Vr=%.1f V"%Vr
Vmin=Vz+Vr#Vmin=minimum value of V
print "Vmin=%.1f V"%Vmin
I1=I+i
print "I1=%.f mA"%(I1*10**3)
VR=I1*R
print "VR=%.1f V"%VR
Vmax=Vz+VR#Vmax=maximum value of V
print "Vmax=%.1f V"%Vmax
print "V can vary between Vmin & Vmax"

I=0.03 A
i=0.012 A
Vr=1.4 V
Vmin=13.4 V
I1=42 mA
VR=4.2 V
Vmax=16.2 V
V can vary between Vmin & Vmax


## Example 10, Page 85¶

In [29]:
import numpy as np
from numpy.linalg import inv

#Variable declaration
Vz=3#Vz=breakdown voltage of zener diode
Vi=12#Vi=input voltage
V=np.matrix('12;-3')#V=[Vi:-Vz]
R1=1000
R2=1000
R3=500#R1,R2,R3=resistances

#Calculations&Results
R=np.matrix([[R1+R2, -R2],[-R2, R2+R3]])
#solving this matrix on the basis of application of KCL & KVL,we get the values of branch currents I & Iz as I1=[I;Iz]
I1=inv(R)*V
print "I=%.2f mA"%(I1[0]*10**3)
print "Iz=%.f mA"%(I1[1]*10**3)
Pz=Vz*I1[1]#Pz=power dissipated in zener diode
print "Pz=%.f mW"%(Pz*10**3)
print "Power dissipated does not exceed the maximum power limit of 20mW"

I=7.50 mA
Iz=3 mA
Pz=9 mW
Power dissipated does not exceed the maximum power limit of 20mW


## Example 11, Page 86¶

In [31]:
#Variable declaration
Vs1=15
Vs2=30.#Vs=supply voltage varying from 15(Vs1) to 30(Vs2) Volt
Vzo=9#Vzo=knee voltage
rZ=5.#rZ=dynamic resistance in ohms
R=800#R=series resistance in ohms

#Calculations&Results
Izmin=(Vs1-Vzo)/(R+rZ)#Izmin=current through zener diode when Vs is 15 V
print "Izmin=%.2f mA"%(Izmin*10**3)
Vomin=(rZ*Izmin)+Vzo#Vomin=corresponding minimum output voltage
print "Vomin=%.3f V"%Vomin
Izmax=(Vs2-Vzo)/(R+rZ)#Izmax=current through zener diode when Vs is 30 V
print "Izmax=%.f mA"%(Izmax*10**3)
Vomax=(rZ*Izmax)+Vzo#Vomax=corresponding maximum output voltage
print "Vomax=%.2f V"%Vomax
print "Output voltage Vo varies in the range Vomin to Vomax"

Izmin=7.45 mA
Vomin=9.037 V
Izmax=26 mA
Vomax=9.13 V
Output voltage Vo varies in the range Vomin to Vomax


## Example 12, Page 86¶

In [33]:
#Variable declaration
V=35#V=supply voltage
Iz=25*10**(-3)#Iz=diode current
Vzo=7#Vzo=knee voltage of zener diode
rZ=6#rZ=dynamic resistance in ohms

#Calculations&Results
Vz=Vzo+(rZ*Iz)#Vz=zener voltage
print "Vz=%.2f V"%Vz
I=Iz+Il#I=current through resistance R
print "I=%.f mA"%(I*10**3)
R=(V-Vz)/I
print "R=%.1f ohm"%R

Vz=7.15 V
I=30 mA
R=928.3 ohm