# Chapter 7: The pn Junction¶

## Example 7.1, Page 242¶

In [1]:
import math

#Variable declaration
T=300#K
Na=1*10**18# Na=L*10**18 cm**-3
Nd=1*10**15# cm**-3
ni=1.5*10**10# cm**-3
e=1.6*10**-19# eV
k=1.3806*10**-23# JK**-1

#Calculations&Results
Vbi=(((k*T)/e)*math.log(Na*Nd/ni**2))
print "the value of Vbi is %.3f V"%Vbi

#changing the Na value
Na=10**16# Na=l*10**16 cm**1
Vbi=(((k*T)/e)*math.log(Na*Nd/ni**2))
print "the value of Vbi is %.3f V "%Vbi

the value of Vbi is 0.754 V
the value of Vbi is 0.635 V


## Example 7.2, Page 247¶

In [2]:
#Variable declaration
T=300.#K
Na=10**16# cm**-3
Nd=10**15# cm**-3
e=1.6*10**-19# eV
epsilon0=8.85*10**-14# F/m
epsilons=11.7
Vbi=0.635# V

#Calculations&Results
W=(((2*(epsilons*epsilon0)*Vbi)/e)*(Na+Nd)/(Na*Nd))**0.5
print "W spacing charge width is %.2e c- meter"%W
xn=0.864*10**-4# xp=0.086 micro m
Emax=-e*Nd*xn/(epsilons*epsilon0)
print "the value of Emax is %.2e V/cm"%Emax  #Answer in textbook is incorrect

W spacing charge width is 9.51e-05 c- meter
the value of Emax is -1.34e+04 V/cm


## Example 7.3, Page 249¶

In [3]:
#Variable declaration
T=300#K
Na=10**16#  cm**-3
Nd=10**15# cm**-3
e=1.6*10**-19# eV
epsilon0=8.85*10**-14# F/m
epsilons=11.7
Vbi=0.635# V
Vr=5# V

#Calculations
W=(((2*(epsilons*epsilon0)*(Vbi+Vr))/e)*(Na+Nd)/(Na*Nd))**0.5

#Result
print "the value of W is %.2e m"%W

the value of W is 2.83e-04 m


## Example 7.4, Page 250¶

In [4]:
import math

#Variable declaration
T=300#K
k=8.617*10**-5#eV/K
e=1.6*10**-19 #C
Vr=25 #V
Emax=3*10**5#V/cm
Na=10**18#cm**-3
esp=11.7
esp0=8.85*10**-14

#Calculations
#Emax=sqrt((2*e*Vr*(Na+Nd))/(esp*(Na+Nd))
x=((Emax**2)*esp*esp0)/(2*e*Vr)            #solving the above equation we get
Nd=(Na*x)/(Na-x)

#Result
print "doping concentration is %.2e cm**-3"%Nd

doping concentration is 1.18e+16 cm**-3


## Example 7.5, Page 252¶

In [5]:
#Variable declaration
T=300#K
Na=10**16#  cm**-3
Nd=10**15# cm**-3
e=1.6*10**-19# eV
epsilon0=8.85*10**-14# F/m
epsilons=11.7
Vbi=0.635# V
Vr=5# V

#Calculations
C=((e*(epsilons*epsilon0)*Na*Nd)/(2*(Vbi+Vr)*(Na+Nd)))**0.5
A=10**-4# cm**2
C=C*A

#Result
print "the value of c with cross section area is %.3e F "%C

the value of c with cross section area is 3.656e-13 F


## Example 7.6, Page 254¶

In [6]:
import math

#Variable declaration
T=300#K
ni=1.5*10**10# cm**-3
Nd=10**15# cm**-3
Vbi=0.855# V
e=1.6*10**-19# eV
k=1.3806*10**-23# JK**-1
S=1.32*10**15# Slope=1.32*10**-15 (F/cm**2)**-2*(V)-1
epsilon0=8.85*10**-14# F/m
epsilons=11.7

#Calculations
Nd=2/((e*(epsilons*epsilon0))*S)
Na=((ni*ni)/Nd)*math.exp((e*Vbi)/(k*T))

#Result
print "the value of Na is %.2e cm**-3"%Na

the value of Na is 5.44e+18 cm**-3