# Chapter 4: p-n Junction¶

## Example 4.1, Page92¶

In [1]:
#initialisation of variable
from math import *
Na=10**18;#concentration
Nd=10**15;#concentration
N=9.65*10**9

#calculation
Vb=.0259*log(Na*Nd/N**2);#built in potential

#result
print"built in potential is",round(Vb,3),"V"

Populating the interactive namespace from numpy and matplotlib
built in potential is 0.777 V


## Example4.2 Page96¶

In [1]:
#initialisation of variable
from math import *
Na=10**19;#concentration
Nd=10**16#concentration
N=9.65*10**9
q=1.6*10**-19#charge
Es=10**-12;#constant

#calculation
Vb=.0259*log(Na*Nd/N**2);#voltage
W=(2*Es*Vb/q/Nd)**.5;#width
Em=q*W*Na/Es;#field

#result
print"built in potential is",round(Vb,3),"V"
print"depletion layer width is",round(W*10**4,3),"micro-m"
print"maximum field at zero bias is",round(Em/10299,0),"V/cm"

built in potential is 0.896 V
depletion layer width is 0.335 micro-m
maximum field at zero bias is 5200.0 V/cm


## Example4.3 Page 99¶

In [14]:
#initialisation of variable
from math import *
I=10**20;#impurity
W=.50;#width
q=1.6*10**-19;#charge
E=8.85*10**-14#constant
N=9.65*10**9;#concentration

#calculation
Em=q*I*W**2/(8*11.9*E);#maximum field
Vb=.0259*I*W/N/2;#built-in voltage

#result
print"maximum field is",round(Em/10**8,0),"V/cm"
print"built-in voltage is",round(Vb/10**8,2),"V"

maximum field is 4748.0 V/cm
built-in voltage is 0.67 V


## Example4.4 Page101¶

In [2]:
#initialisation of variable
from math import *
Na=2*10**19;#concentration
Nd=8*10**15;#concentration
V=4.0;#voltage
N=9.65*10**9
q=1.6*10**-19;#charge
E=10.53*10**-13#constant

#calculation
Vb=.0259*log(Na*Nd/N**2);#voltage at zero bias
W1=(2*E*Vb/q/Nd)**.5;#width
C1=E/W1;#capacitance at zero bias
W2=(2*E*(Vb+V)/q/Nd)**.5;#width
C2=E/W2;#capacitance at reverse bias

#result
print"capacitance at zero bias is",round(C1,11),"F/cm^2"
print"capacitance at reverse bias is",round(C2,11),"F/cm^2"

capacitance at zero bias is 2.723e-08 F/cm^2
capacitance at reverse bias is 1.172e-08 F/cm^2


## Example 4.5 Page109¶

In [3]:
#initialisation of variable
from math import *
Na=5*10**16;#concentration
Nd=10**16;#concentration
N=9.65*10**9
Dn=21
A=2*10**-4;#area
Dp=10
T=5*10**-7;#time
q=1.6*10**-19;#charge

#calculation
J=q*(N**2)*(((Dp/T)**.5)/Nd +((Dn/T)**.5)/Na);#current density
I=A*J;#ideal reverse current

#result
print"ideal reverse current is",round(I,17),"A"

ideal reverse current is 1.72e-15 A


## Example4.6 Page110¶

In [4]:
#initialisation of variable
from math import *
Na=5*10**16;#concentration
Nd=10**16;#concentration
N=9.65*10**9
V=4;#voltage
E=10.53*10**-13;#constant
T=5*10**-7;#time
q=1.6*10**-19;#charge

#calculation
W=(2*E*(Na+Nd)/(q*Na*Nd)*(.0259*log(Na*Nd/N**2)+V))**.5;#width
J=q*N*W/T;#current density

#result
print"generation current density is",round(J,9),"A/cm^2"

generation current density is 2.68e-07 A/cm^2


## Example 4.7 Page115¶

In [16]:
#initialisation of variable
from math import *
Nd=8*10**15;#concentration
V=1.00;#voltage
L=5*10**-4;#length of holes
q=1.6*10**-19;#charge
N=9.65*10**9

#calculation
Q=q*L*N**2/Nd*(e**(1/.0259)-1);#minority carriers

#result
print"stored minority carriers is",round(Q,2),"C/cm^2"
print"the answer in book is slightly wrong"

stored minority carriers is 0.05 C/cm^2
the answer in book is slightly wrong


## Example4.8, Page120¶

In [34]:
#initialisation of variable
from math import *
Nd=5*10**16;#concentration
E=10.53*10**-13;#constant
N=5.7*10**5
q=1.6*10**-19;#charge

#calculation
Vb=E*N**2/2/q/Nd;#breakdown voltage

#result
print"breakdown voltage is",round(Vb,1),"V"

breakdown voltage is 21.4 V


## Example4.9 Page122¶

In [10]:
#initialisation of variable
from math import *
Nb=8*10**14;#concentration
E=8.85*10**-14;#constant
q=1.6*10**-19;#charge
V=500;#voltage
W=20*10**-4;#width

#calculation
Wm=(24.8*E*V/q/Nb)**.5;#width
Vb=V*(W/Wm)*(2-(W/Wm));#breakdown voltage

#result
print"width is",round(Wm*10**4,1),"micro-m"
print"breakdown voltage is",round(Vb,3),"V"

width is 29.3 micro-m
breakdown voltage is 449.771 V


## Example4.10 Page126¶

In [11]:
#initialisation of variable
from math import *
V=1.60;#voltage
C1=10**16;#concentration
C2=3*10**19;#concentration
D1=12.00;#dielectric constant
D2=13.00;#dielectric constant
E=8.85*10**-14;#constant
q=1.6*10**-19;#charge

#calculation
V1=D2*C2*V/(D1*C1+D2*C2);#voltage
V2=D1*C1*V/(D1*C1+D2*C2);#voltage
W1=(2*D1*D2*E*C2*V/(C1*D1+C2*D2)/q/C1)**.5;#depletion width
W2=(2*D1*D2*E*C1*V/(C1*D1+C2*D2)/q/C2)**.5;#depletion width

#result
print"electrostatic potential 1 is",round(V1,2),"V"
print"electrostatic potential 2 is",round(V2,5),"V"
print"depletion width 1 is",round(W1,8),"cm"
print"depletion width 2 is",round(W2,11),"cm"

electrostatic potential 1 is 1.6 V
electrostatic potential 2 is 0.00049 V
depletion width 1 is 4.608e-05 cm
depletion width 2 is 1.536e-08 cm