Chapter 2 : Junction Diode Characteristics

Example 2.1 page no-45

In [1]:
# radius of the lowest state of Ground State

import math
#Variable declaration
n=1
h=6.626*10**-34 # planc's constantJ-sec
eps=10**-9/(36*math.pi)
m=9.1*10**-31      # electron mass in kg
e=1.6*10**-19      #Electron charge

#Calculations
r=n**2*h**2*eps/(math.pi*m*e**2)

#Result
print("\nradius of the lowest state of Ground State, r=%.2f A°"%(r*10**10))
radius of the lowest state of Ground State, r=0.53 A°

Example 2.2 page no-46

In [4]:
# no of photons emitted per second by lamp

import math
#Variable declaration
l =2537.0         # wavelength in A°
E_diff=12400.0/l
e=1.6*10**-19
energy=50.0/1000  # J/sec

#Calculations
e_j=energy/e      # eV/sec
n=e_j/E_diff

#Result
print("The lamp emits %.1f * 10^16 photons/sec of wavelength, lambda=%dA°"%(n/10**16,l))
The lamp emits 6.4 * 10^16 photons/sec of wavelength, lambda=2537A°

Example 2.3 page no-47

In [6]:
# Speed of ejected electron

import math
#Variable declaration
e_ar=11.6     # eV
e_Na=5.12     # eV
e=1.6*10**-19 # C
m=9.1*10**-31 # kg

#Calculations
V=e_ar-e_Na
v=math.sqrt(2*e*V/m)

#Result
print("Velocity, v = %.2f * 10^6 m/sec"%(v/10**6))
Velocity, v = 1.51 * 10^6 m/sec

Example 2.4 page no-48

In [7]:
# speed of electron in sodium vapour lamp

import math
#Variable declaration
l=5893.0      # A°
V=2.11        # Volts
e=1.6*10**-19 #C
m=9.1*10**-31 #kg

#Calcualations
v=math.sqrt(2*e*V/m)

#Result
print("Velocity, v = %.2f * 10^5 m/sec"%(v/10**5))
Velocity, v = 8.61 * 10^5 m/sec

Example 2.5 page no-48

In [9]:
# radio transmitter

import math
#Variable declaration
f=10*10**6         # Hz
h=6.626*10**-34    # Joules/sec
e=1.6*10**-19      # C
#(a)
E=h*f/e
print("\n(a)Energy of each radiated quantum,\n\tE = %.3f*10^-27 Joules/Quantum\n\tE = %.2f*10^-8 eV/Quantum"%(h*f*10**27,E*10**8))
 
# (b)
E=1000.0           # Joule/sec
N=E/(h*f)
print("\n\n(b)\nTotal number of quanta per sec, N=%.2f*10^29"%(N/10**29))

#(c)
o=10**-7
print("\n\n(c)\nNumber of quanta emitted per cycle = %.2f*10^22 per cycle"%(o*N/10**22))
(a)Energy of each radiated quantum,
	E = 6.626*10^-27 Joules/Quantum
	E = 4.14*10^-8 eV/Quantum


(b)
Total number of quanta per sec, N=1.51*10^29


(c)
Number of quanta emitted per cycle = 1.51*10^22 per cycle

Example 2.6 page no-48

In [16]:
# Neon Ionization

import math
#Variable declaration
V=21.5           # Volts
e=1.6*10**-19    # C
m=9.1*10**-31    # kg
l=12400.0/V      # A°
c=3*10**8        #m/sec

#calculations and Result
#(a)
v=math.sqrt(2*e*V/m)
print("(a)\nVelocity, v = %.2f*10^6 m/sec\nWavelength of Radiation, Lambda = %.1f"%(v/10**6,math.ceil(l)))
# (b)
f=c/(l*10**-10)
print("\n(b)\nFrequency of Radiation, f = %.1f * 10^15 Hz"%(f/10**15))
(a)
Velocity, v = 2.75*10^6 m/sec
Wavelength of Radiation, Lambda = 577.0

(b)
Frequency of Radiation, f = 5.2 * 10^15 Hz

Example 2.8 page no-49

In [19]:
# wavelength of photon

import math
#Variable declaration
L=1400.0
del_E=2.15

#Calculations
E_diff=12400.0/L    # eV
L2=12400.0/del_E

#Result
print("E2-E1 = %.2f eV\n1850 A° line is from 6.71 eV to 0 eV"%(E_diff))
print("Therefore, second photon must be from %.2f to 6.71 eV.\nLambda=%d A°."%(E_diff,L2))
E2-E1 = 8.86 eV
1850 A° line is from 6.71 eV to 0 eV
Therefore, second photon must be from 8.86 to 6.71 eV.
Lambda=5767 A°.

Example 2.9 page no-58

In [23]:
# High field emission

import math
#Variable declaration
A=60.2*10**4   # A/m^2/°K^2
B=52400.0      # °K
T1=2400.0      # °K
T2=2410.0      # °K

#calcualtions
js1=A*T1**2*(math.e**(-B/T1))
js2=A*T2**2*(math.e**(-B/T2))
js1=math.floor(js1)
js2=math.floor(js2)
p=(js2-js1)*100/js1


#Result
print("JS1 = %d A/m^2\nJS2 = %d A/m^2"%(js1,js2))
print("\nPercentage Increase = %.2f%%"%p)
JS1 = 1142 A/m^2
JS2 = 1261 A/m^2

Percentage Increase = 10.42%

Example 2.10 page no-58

In [3]:
# Work function and wavelength

import math
#Variable declaration
h=6.63*10**-34      # Plank's Constant,  J sec.
e=1.6*10**-19       # Charge of Electron, C
c=3*10**8           # Velocity of Light, m/sec
v=0.55              # volts
l=5500.0*10**-10    # m

#Calculations and Results
#(a)
fi=(h*c)/(l*e)
fi=fi-v
print("(a)\nWork Function(WF), fi = %.2f Volts"%fi)
#(b)
l0=12400.0/fi
print("\n\n(b)\nThreshold Wavelength = %d A°"%l0)
(a)
Work Function(WF), fi = 1.71 Volts


(b)
Threshold Wavelength = 7250 A°

Example 2.11 page no-59

In [5]:
# effect of temperature on emission

import math
#Variable declaration
dT=20.0
T=2310.0    # °K
Ew=4.52
k=8.62*10**-5

#Calculations
x=(Ew/(k*T))
x=(2+x)*dT/T

#Result
print("(a)\ndIth/Ith = %.1f%%\n\n(b)\nThis is solved by Trial and Error Method to get T = 2370°K"%(x*100))
(a)
dIth/Ith = 21.4%

(b)
This is solved by Trial and Error Method to get T = 2370°K

Example 2.12 page no-60

In [8]:
# RF voltage frequency in cyclotron

import math
#Variable declaration
B=1.0         # Tesla
T=35.5*10**-6 # sec
k=2*10**6
g=40000.0

#Calculations
f=1/T
v=49*g
R=(3.37*10**-6)*math.sqrt(v)

#Result
print("(a)\nThe frequency of the R.F voltage, f = %.2f*10^4 Hz"%(f/10**4))
print("\n\n(b)Number of passages required to gain 2*10^6 eV are ,N = %d"%(k/g))
print("\n\n(c)\nDiameter of last semicircle, D = 2R = %.2f *10^-4 m"%(2*R*10000))
(a)
The frequency of the R.F voltage, f = 2.82*10^4 Hz


(b)Number of passages required to gain 2*10^6 eV are ,N = 50


(c)
Diameter of last semicircle, D = 2R = 94.36 *10^-4 m

Example 2.13 page no-60

In [14]:
# Emission current and cathode efficiency

import math
#Variable declaration
Ew=1.0           # eV
A0=100.0         # A/m2 I °K2
S=1.8*10**-4     # cm2
K =8.62*10**-5   # eV/oK
T=1100.0
pd=5.8*10**4     # W/m^2

#Calculations
ipd=1.1*pd
tip=S*ipd
Ith=S*A0*T**2*math.e**(-Ew/(K*T))

#Result
print("Ith = %.3f A\nCathode Efficiency, eta = %.0f mA/°K"%(Ith,math.ceil(Ith*1000/11.5)))
Ith = 0.573 A
Cathode Efficiency, eta = 50 mA/°K

Example 2.14 page no-71

In [16]:
# resistivity of doped material

import math
#Variable declaration
n=4.4*10**22             # cm^3
mu=3600.0                # cm62/volt-sec
e=1.6*10**-19            # C

#Calculations
sigma=n*mu*e*10**-6

#Result
print("Resistivity, rho = %.3f Ohm-cm"%(1/sigma))
Resistivity, rho = 0.039 Ohm-cm

Example 2.15 page no-71

In [19]:
# conductivity and resistivity of pure silicon

import math
#Variable declaration
mup=500.0
mun=1500.0
n=1.6*10**10
e=1.6*10**-19 

#Calculations
sigma=(mun+mup)*e*n

#Result
print("Conductivity, sigma = %.2f *10^-6\nResistivity, rho = %d Ohm-cm"%(sigma*10**6,1/sigma))
Conductivity, sigma = 5.12 *10^-6
Resistivity, rho = 195312 Ohm-cm

Example 2.16 page no-71

In [20]:
# concentration of free electrons and holes

import math
#Variable declaration
A = 9.64*10**14
EG = 0.25              # eV
n1 = 6.25*10**26       # cm^3
na=3*10**14
nd=2*10**14
n=-(10**14)+(math.sqrt(10**28+4*6.25*10**26))
n=n/2.0


#Result
print("n = %.1f * 10^12 electrons/cm^3\np = %.2f * 10^14 holes/cm^3"%(n/10**12,(n+10**14)/10**14))
print("As p> n, this is p-type semiconductor.")
n = 5.9 * 10^12 electrons/cm^3
p = 1.06 * 10^14 holes/cm^3
As p> n, this is p-type semiconductor.

Example 2.17 page no-72

In [23]:
# concentration of free electrons and holes

import math
#Variable declaration
sigma=100.0      # Ohm-cm
e=1.6*10**-19    # c
mup=1800.0       # cm^2/V-sec
ni=2.5*10**13    # /cm^3

#Result
pp=sigma/(e*mup)
n=ni**2/pp

#Result
print("In p-type semiconductor, p>>n.")
print("\nPp = %.2f * 10^17 holes/cm^3\nn  = %.1f * 10^9 electrons/cm^3"%(pp/10**17,n/10**9))
In p-type semiconductor, p>>n.

Pp = 3.47 * 10^17 holes/cm^3
n  = 1.8 * 10^9 electrons/cm^3

Example 2.18 page no-72

In [25]:
# concentration of free electrons and holes in p type Ge and n type Si

import math
#Variable declaration
# (a)
sigma=100.0      # Ohm-cm
e=1.6*10**-19    # c
mup=1800.0       # cm^2/V-sec
ni=2.5*10**13    # /cm^3
#(b)
mun=1300.0
sig=0.1
n1=1.5*10**10

#Calculations
pp=sigma/(e*mup)
n=ni**2/pp
n2=sig/(mun*e)
p1=(n1**2)/n2

#Result
print("(a)\nAs it is p-type semiconductor, p>>n.")
print("\nPp = %.2f*10^17 holes/cm^3\nn = %.1f*10^9 electrons/cm^3"%(pp/10**17,n/10**9))
print("\n\n(b)\nn = %.2f*10^14 elecrons/cm^3\np = %.2f*10^5 holes/cm^3"%(n2/10**14,p1/10**5))
(a)
As it is p-type semiconductor, p>>n.

Pp = 3.47*10^17 holes/cm^3
n = 1.8*10^9 electrons/cm^3


(b)
n = 4.81*10^14 elecrons/cm^3
p = 4.68*10^5 holes/cm^3

Example 2.19 page no-73

In [28]:
# conduction current density

import math
#Variable declaration
sig=1.0/60        # v/cm
mup=1800.0        # cm^2/V-sec
mun=3800.0        # cm^2/V-sec
e=1.6*10**-19     # C
na=7*10**13       # cm^3
nd=10**14         # /cm^3
p=0.88*10**13
n=3.88*10**13
eps=2.0

#Calculations
ni=sig/(e*(mun+mup))
k=na-nd           # p-n
J=(n*mun+p*mup)*(e*eps)

#Result
print("J = %.1f mA/cm^3"%(J*1000))
J = 52.2 mA/cm^3

Example 2.20 page no-74

In [30]:
# concentration of free electrons and holes in Ge

import math
#Variable declaration
na=3*10**14   # /cm^3
nd= 2*10**14  # /cm^3
ni= 2.5*10**13# /cm^3

#Calculations
k=na-nd
n=(-k+math.sqrt(k**2+4*ni**2))/2

#Result
print("n = %.1f * 10^18 electrons/m^3\np = %.2f * 10^19 holes/m^3"%(n/10**12,ni**2/n*10**-13))
print("as p > n, it is p-type semiconductor.")
n = 5.9 * 10^18 electrons/m^3
p = 10.59 * 10^19 holes/m^3
as p > n, it is p-type semiconductor.

Example 2.21 page no-75

In [31]:
# intrinic concentration and conductivity of Germanium

import math
#Variable declaration
A=9.64*10**21
T=320.0
e=1.6*10**-19
Eg=0.75
k=1.37*10**-23
mup=0.36
mun=0.17

#Calculations
ni=A*T**(3.0/2)*math.e**(-(e*Eg)/(2*k*T))
sig=e*ni*(mup+mun)


#Result
print("ni = %.2f *10^19 electrons(holes)/m^3"%(ni/10**19))
print("\nConductivity, Sigma = %.3f Mho/m"%sig)
ni = 6.28 *10^19 electrons(holes)/m^3

Conductivity, Sigma = 5.326 Mho/m

Example 2.22 page no-75

In [33]:
# resistivity of intrinsic Germanium at room temperature

import math
#Variable declaration
e=1.6*10**-19     # C
ni=2.5*10**19
mun=0.36          # m^2/V-sec
mup=0.17          # m^2/V-sec


#Calculations
sig=e*ni*(mup+mun)
rho=1/sig

#Result
print("Resistivity, rho = %.2f Ohm-m"%rho)
Resistivity, rho = 0.47 Ohm-m

Example 2.23 page no-80

In [36]:
# Fermi level of p type Ge

import math
#Variable declaration
mup=0.4
T=300.0
Nv=4.82*10**15

#Calculations
Na=Nv*mup**(3.0/2)*T**(3.0/2)

#Result
print("Doping concentration, NA = %.2f*10^18 atoms/cm^3"%(Na/10**18))
Doping concentration, NA = 6.34*10^18 atoms/cm^3

Example 2.24 page no-80

In [38]:
# Distance of Fermi level from centre of forbidden bond

import math
#Variable declaration
Vt=0.026

#Calculations
Nv=(3.0/4)*Vt*math.log(2)

#Result
print("For Intrinsic Semiconductor,EF will be at the centre of the forbidden band.")
print("But if mp and mn are unequal,EF will be away")
print("from the centre of the forbidden band by\n\nNv = %.1f * 10^-3 eV"%(Nv*10**3))
For Intrinsic Semiconductor,EF will be at the centre of the forbidden band.
But if mp and mn are unequal,EF will be away
from the centre of the forbidden band by

Nv = 13.5 * 10^-3 eV

Example 2.25 page no-83

In [39]:
# Temperature for which conduction band and fermi level coincides

import math
#Variable declaration
si=5*10**22    # atom/cm^3
d=2*10**8 
Nd=si/d
m=9.1*10**-31  # kg
k=1.38*10**-23
h=6.626*10**-34

#Calculations
Nc=2*(2*math.pi*m*k/h**2)**(3.0/2)
T=(Nd/Nc)**(2.0/3)

#Result
print("T = %.2f°K"%(T*10**4))
T = 0.14°K

Example 2.26 page no-83

In [42]:
# distance between valence band and Fermi level

import math
#Variable declaration
m=9.1*10**-31
k=1.38*10**-23
h=6.626*10**-34
T=300.0
mp=0.6
si=5*10**22
at=10**8
Kt=0.026

#Calculations
Nc=si/at
Nv=2*(2*math.pi*m*k*T*mp/h**2)**(3.0/2)
Ediff=Kt*math.log(1.17*10**19/(5*10**14))

#Result
print("Nv = %.2f * 10^19 /cm^3"%(Nv/10**25))
print("Ef-Ev = %.2f eV\nTherefore, EF is above Ev"%Ediff)
Nv = 1.16 * 10^19 /cm^3
Ef-Ev = 0.26 eV
Therefore, EF is above Ev

Example 2.27 page no-86

In [43]:
# doping concentration for given fermi level

import math
#Variable declaration
mp=0.4
T=300.0
k=4.82*10**15

#Calculations
Nv=k*(mp*T)**(3.0/2)

#Result
print("Doping concentration, NA = ND = %.2f*10^18 atoms/cm^3"%(Nv/10**18))
Doping concentration, NA = ND = 6.34*10^18 atoms/cm^3

Example 2.28 page no-86

In [48]:
# Distance of Fermi level from centre of forbidden bond

import math
#Variable declaration
Vt=0.026

#Calculations
Nv=(3.0/4)*Vt*math.log(3)

#Result
print("For Intrinsic Semiconductor,EF will be at the centre of the forbidden band.")
print("But if mp and mn are unequal, EF will be away")
print("from the centre of the forbidden band by\n\nNv = %.1f*10^-3 eV"%(Nv*10**3))
For Intrinsic Semiconductor,EF will be at the centre of the forbidden band.
But if mp and mn are unequal, EF will be away
from the centre of the forbidden band by

Nv = 21.4*10^-3 eV

Example 2.29 page no-90

In [51]:
# Einstein relationship

import math
#Variable declaration
mung=3800.0
mupg=1800.0
muns=1300.0
mups=500.0
Vt=0.026

#Result
print("For Germanium at room temperature,\nDp = %d cm^2/sec"%(math.ceil(mupg*Vt)))
print("Dn = %d cm^2/sec"%(math.ceil(mung*Vt)))
print("\nFor Silicon,\nDp = %d cm^2/sec\nDn = %d cm^2/sec"%(math.ceil(mups*Vt),math.ceil(muns*Vt)))
For Germanium at room temperature,
Dp = 47 cm^2/sec
Dn = 99 cm^2/sec

For Silicon,
Dp = 13 cm^2/sec
Dn = 34 cm^2/sec

Example 2.30 page no-95

In [54]:
# Hall Effect

import math
#Variable declaration
B=0.1       # Wb/m^2
Vh=50.0     # mV
I=10.0      # mA
rho=2*10**5 # Ohm-cm
w=3*10**-3  # m

#Calculations
x=B*I*10**-3/(Vh*10**-2*w)
y=1/(rho*10**-2)

#Result
print("1/RH = %.3f"%x)
print("\nConductivity = %.4f mhos/meter\nmu = %.0f cm^2/V-sec"%(y,(y/x)*10**6))
1/RH = 0.667

Conductivity = 0.0005 mhos/meter
mu = 750 cm^2/V-sec

Example 2.31 page no-116

In [57]:
# Reverse saturation current in diode

import math
#Variable declaration
#(a)
Vt=300.0/11600
#(b)
v1=0.2
v2=0.3

#Calculations
v=Vt*math.log(1.9)
i1=10*(math.e**(v1/Vt)-1)
i2=10*(math.e**(v2/Vt)-1)

#Result
print("(a)\nV = %.3f V"%v)
print("\n(b)\nFor V = 0.2, I = %.2f mA"%(i1/1000))
print("For V = 0.3, I = %.2f A"%(i2/1000000))
(a)
V = 0.017 V

(b)
For V = 0.2, I = 22.82 mA
For V = 0.3, I = 1.09 A

Example 2.32 page no-116

In [62]:
# AC and DC resistance of Ge diode

import math
#Variable declaration
Vt=301.6/11600
i0=20*10**-6
v=0.1

#Calculations
I=i0*(math.e**(v/Vt)-1)
r_DC=v/I
r_AC=i0*(math.e**(v/Vt))/Vt

#Result
print("I = %.3f mA"%(I*1000))
print("r_DC = %.1f Ohm"%r_DC)
print("r_AC = %.1f Ohm"%(1/r_AC))
I = 0.916 mA
r_DC = 109.1 Ohm
r_AC = 27.8 Ohm

Example 2.33 page no-117

In [64]:
# width of the depletion layer

import math
#Variable declaration
A = 0.001       # cm2
sig1n= 1.0      # mhos/cm,
sig1p=100.0     # mhos/cm
mun=3800.0      # cm2/sec
mup = 1800.0    # cm2/sec.
e=1.6*10**-19   # C
eps=16*8.85*10**-14
ni=6.25*10**26
T=300.0

#Calculations
Vt=T/11600.0
Nd=sig1n/(e*mun)
Na=sig1p/(e*mup)
V0=Vt*math.log(Na*Nd/ni)
w=math.sqrt(2*eps*(V0+1)/(e*Na))

#Result
print("ND = %.2f * 10^15 /cm^3\nNA = %.1f * 10^17 /cm^3"%(Nd*10**-15,Na*10**-17))
print("V0 = %.3f V\nw = %.3f * 10^-4 cm"%(V0,w*10**4))
ND = 1.64 * 10^15 /cm^3
NA = 3.5 * 10^17 /cm^3
V0 = 0.355 V
w = 0.083 * 10^-4 cm

Example 2.34 page no-118

In [65]:
# dynamic forward and reverse resistance of a p-n junction diode

import math
#Variable declaration
I0=10**-6   # A
T = 301.6   # K
Vf =0.25    # V
Vr= 0.25    # V
#Dynamic Forward Resistance
Vt=T/11600.0
x=(I0*math.e**(Vf/Vt))/Vt
rf=1/x
print("Dynamic Forward Resistance, rf = %.3f Ohm"%rf)
#Dynamic Reverse Resistance
x1=(I0*math.e**(-Vf/Vt))/Vt
rr=1/x1
print("Dynamic Reverse Resistance, rr = %.1f * 10^6 Ohm"%(rr/10**6))
Dynamic Forward Resistance, rf = 1.734 Ohm
Dynamic Reverse Resistance, rr = 389.8 * 10^6 Ohm

Example 2.35 page no-125

In [66]:
# zener breakdown voltage

import math
#Variable declaration
eps=16/(36*math.pi*10**9) # F/m
mup=1800.0
E=4.0*10**14

#Calculations
V=(eps*mup*E*10**-6)/2
sige=1.0/45
Vz=math.ceil(V)/sige

#Result
print("V = %d V"%Vz)
V = 2295 V

Example 2.36 page no-125

In [67]:
# Effect of bias on capacitance of a diode

import math
#Variable declaration
Ct=20.0    # pF
v1=5.0     # v
v2=6.0     # v

#Calculations
Ct2=Ct*math.sqrt(v1/v2)
print("Therefore, decrease in the value of capacitance is\nCt1-Ct2 = %.2f pF"%(Ct-Ct2))
Therefore, decrease in the value of capacitance is
Ct1-Ct2 = 1.74 pF

Example 2.37 page no-126

In [71]:
# Zener As voltage regulator

import math
#Variable declaration
V1=200.0    # V
Vd=50.0     # V
I=40*10**-3 # A

#Calculations
#If Il=0,
R=(V1-Vd)/I
I0=5        # mA
#for Vmin
Il=25.0
Vmin=Vd+(Il+I0)*0.001*R
#for Vmax
Vmax=Vd+(Il+I*1000)*0.001*R

#Result
print("(a)\nR = %d Ohm\nImax occurs when I0 = %d mA\nTherefore, Imax = %d mA"%(R,I0,I*1----I0))
print("\n(b)\nFor Vmin\nVmin = %.1fV\n\nFor Vmax\nVmax = %.1fV"%(Vmin,Vmax))
(a)
R = 3750 Ohm
Imax occurs when I0 = 5 mA
Therefore, Imax = 5 mA

(b)
For Vmin
Vmin = 162.5V

For Vmax
Vmax = 293.8V

Example 2.39 page no-127

In [70]:
# Zener As voltage regulator

import math
#Variable declaration
x=99.5 *10**3  # Ohm (R1+R2)
rm=0.56 *10**3 # Ohm
v1=20.0        # V

#Calculations
i=v1/x
i=0.0002       # aproxximated to
k=16.0/i
R1=k-rm
R2=x-R1

#Result
print("R1 = %.1f K-ohm\nR2 = %.1f K-ohm"%(R1/1000,R2/1000))
R1 = 79.4 K-ohm
R2 = 20.1 K-ohm

Example 2.40 page no-127

In [72]:
# forward snd reverse current ratios

import math
#Variable declaration
T=301.6
vt=T*1000.0/11600
vf=50.0           # mV
vr=-50.0          # mV

#Calculations
k=(math.e**(vf/vt)-1)/(math.e**(vr/vt)-1)

#Result
print("ratio = %.2f"%k)
print("Negative sign is because, the direction of current is opposite when the diode is reverse biased")
ratio = -6.84
Negative sign is because, the direction of current is opposite when the diode is reverse biased

Example 2.41 page no-128

In [75]:
# PN junction diode as Resistance

import math
#Variable declaration
V=10.0         # v
I0=0.07/0.11   #(0.07/0.11)*I
i1=5.0         # mA

#Calculations
Ir=1-I0
i=Ir/I0
Ir=i*i1
R=V/Ir

#Result
print("R = %.1f K-Ohm"%R)
R = 3.5 K-Ohm

Example 2.42 page no-128

In [76]:
# Zener As voltage regulator

import math
#Variable declaration
V=30.0      # V
R=2000.0    # Ohm
Iz=0.025    # A
Rs=200.0

#Calculations
I=V/R
It=Iz+I
Vmax=V+Rs*It

#Result
print("Vrmax = %d V"%Vmax)
Vrmax = 38 V