Chapter1-Semiconductor materials and diodes

Ex1-pg6

In [1]:
import math
#calculate the 
##Example 1.1
T=300.;##((K)temperature)
##for silicon
B=5.23*10**(15);##Constant (per centimeter cube degree kelvin)
Eg=1.1;##bandgap energy in electrovolt(eV)
k=86.*10**(-6);##Boltzmann's constant(eV per degree kelvin)
n_i=B*T**(3/2.)*math.exp(-Eg/(2.*k*T));##intrinsic carrier concentration
print"%s %.2f %s"%('intrinsic carrier concentration= ',n_i,' cm^-3');
intrinsic carrier concentration=  14995738948.72  cm^-3

Ex2-pg8

In [2]:
import math

#calculate the

##Example 1.2 
T=300.;##(K)Given Temperature
Nd=10**16;##(cm^-3)Donor concentration
n_i=1.5*10**10;##(cm^-3)intrinsic carrier concentration
##since Nd>>n_i
n_o=10**16;##(cm^-3)electron concentration
##by using formula ::n_i^2=n_o*p_o
p_o=(n_i)**2/Nd;##hole concentration
print"%s %.2e %s"%('\nelectron concentration= ',n_o,' cm^-3');
print"%s %.2e %s"%('\nhole concentration = ',p_o,' cm^-3');
electron concentration=  1.00e+16  cm^-3

hole concentration =  2.25e+04  cm^-3

Ex3-pg13

In [3]:
import math
#calculate the 
##Example1.3
T=300;##(K)Given Temperature
Na=10**16;##(cm^-3)Acceptor concentration in p region
Nd=10**17;##(cm^-3)Donor concentration in n region
n_i=1.5*10**10;##(cm^-3)intrinsic carrier concentration
V_T=0.026;##(Volt)terminal voltage
##built-in potential
V_bi=V_T*math.log(Na*Nd/(n_i)**2);
print"%s %.2f %s"%('\nthe built-in potential= ',V_bi,'V')
the built-in potential=  0.76 V

Ex4-pg15

In [4]:
import math
#calculate the 
##Example 1.4
T=300.;##(K)Given Temperature
Na=10**16;##(cm**-3)Acceptor concentration in p region
Nd=10**15;##(cm**-3)Donor concentration in n region
n_i=1.5*10**10;##(cm**-3)intrinsic carrier concentration
C_jo=0.5;##(pF)junction capacitance at zero applied voltage
V_T=0.026;##(Volt)terminal voltage
##built-in potential
V_bi=V_T*math.log(Na*Nd/(n_i)**2);
print"%s %.2f %s"%("the built-in potential(V)",V_bi,"")
##the junction capacitance for
V_R=1.;##(V)reverse bias voltage
Cj=C_jo*(1.+V_R/V_bi)**(-1/2.);
print"%s %.2f %s"%('\nthe junction capacitance for V_R=1V= ',Cj,' pF\n')
V_R=5.;##(V)reverse bias voltage
Cj=C_jo*(1.+V_R/V_bi)**(-1/2.);
print"%s %.2f %s"%('\nthe junction capacitance for V_R=5V = ',Cj,' pF')
the built-in potential(V) 0.64 

the junction capacitance for V_R=1V=  0.31  pF


the junction capacitance for V_R=5V =  0.17  pF

Ex5-pg17

In [5]:
import math
#calculate the 
##Example 1.5
T=300.;##(K)Given Temperature
V_T=0.026;##(Volt)terminal voltage
Is=10**-11;##(mA)reverse bias saturation current
n=1.;##emission coefficient
v_D=+0.7;##(V)applied voltage
##pn junction is forward biased
i_D=Is*(math.exp(v_D/V_T)-1.);##diode current
print"%s %.2f %s"%('\ndiode current= ',i_D,' mA\n')
v_D=-0.7;##(V)pn junction is reverse biased
Is=10**-14##A;
i_D=Is*(math.exp(v_D/V_T)-1);##diode current
print"%s %.2e %s"%('\ndiode current= ',i_D,' A')
diode current=  4.93  mA


diode current=  -1.00e-14  A

Ex6-pg25

In [6]:
import math
#calculate the 
##Example 1.6
Is=10**-13;##(A)reverse saturation current
V_PS=5.;##(V)applied voltage
R=2;##(KOhm)Resistance in circuit
V_T=0.026;##(Volt)terminal voltage
##V_PS=Is*R*(exp(V_D/V_T)-1)+V_D
##5=(10^-13)*(2000)*(exp(V_D/V_T)-1)+V_D
##let right side of equation be x=(10^-13)*(2000)*(exp(V_D/V_T)-1)+V_D
V_D=0.6;##(V)
x=(10**-13)*(2000.)*(math.exp(V_D/V_T)-1.)+V_D
##so the equation is not balanced
V_D=0.65;##(V)
x=(10**-13)*(2000.)*(math.exp(V_D/V_T)-1.)+V_D
##again equation is not balanced .solution for V_D is between 0.6V and 0.65V
V_D=0.619;##(V)
x=(10**-13)*(2000.)*(math.exp(V_D/V_T)-1.)+V_D
##essentially equal to the value of the left side of the equation i.e 5V
print"%s %.2f %s"%('\ndiode voltage= ',V_D,' V')
I_D=(V_PS-V_D)/R;##(A)diode current
print"%s %.2f %s"%('\nthe diode current= ',I_D,' mA')
diode voltage=  0.62  V

the diode current=  2.19  mA

Ex7-pg28

In [7]:
import math
#calculate the 
##Example 1.7
##piecewise linear diode parameters
V_Y=0.6;##(V)
r_f=0.010;##(KOhm)
V_PS=5.;##(V)applied voltage
R=2.;##(KOhm)Resistance in circuit
I_D=(V_PS-V_Y)/(R+r_f);##(A)diode current
print"%s %.2f %s"%('\nthe diode current= ',I_D,' mA\n')
V_D=V_Y+I_D*r_f;##(V)diode voltage
print"%s %.2f %s"%('\ndiode voltage= ',V_D,' V')
the diode current=  2.19  mA


diode voltage=  0.62  V

Ex9-pg33

In [8]:
import math
#calculate the 
##Example 1.9 
##circuit and diode parameters 
V_PS=5.;##(V)
R=5;##(KOhm)
V_Y=0.6;##(V)
V_T=0.026;##(Volt)terminal voltage
v_i=0.1##*sin(wt)Volt
##dc analysis
I_DQ=(V_PS-V_Y)/R;
print"%s %.2f %s"%('\ndc quiescent current= ',I_DQ,' mA\n')
V_O=I_DQ*R;
print"%s %.2f %s"%('\ndc output voltage= ',V_O,' V\n')
##ac analysis
V_PS=0.;
##Kirchhoff voltage law equation becomes
##v_i=i_d*r_d+i_d*R
r_d=V_T/I_DQ##(Ohm)small signal diode diffusion resistance
i_d=v_i/(r_d+R);##ac diode current
print"%s %.2f %s"%('\nac diode current= ',i_d,'sin(wt) A\n')

v_o=i_d*R;##ac output voltage
print"%s %.2f %s"%('\nac output voltage= ',v_o,'sin(wt) V')
dc quiescent current=  0.88  mA


dc output voltage=  4.40  V


ac diode current=  0.02 sin(wt) A


ac output voltage=  0.10 sin(wt) V

Ex10-pg38

In [9]:
import math
#calculate the 
##Example 1.10
V_Y=0.7;##(V)cut in voltage for pn junction
r_f=0.;
V_PS=4;##(V)
R1=4.
R2=4.##(KOhm) from given circuit
I1=(V_PS-V_Y)/R1;
print"%s %.2f %s"%('\ncurrent through pn junction diode= ',I1,' mA\n')
V_Y=0.3;##(V)cut in voltage for Schottky diode
I2=(V_PS-V_Y)/R2;
print"%s %.2f %s"%('\ncurrent through Schottky diode= ',I2,' mA\n')
current through pn junction diode=  0.82  mA


current through Schottky diode=  0.93  mA

Ex11-pg40

In [10]:
import math
#calculate the 
##Example 1.11 
V_Z=5.6;##(V)Zener diode breakdown voltage
r_z=0.;##(Ohm)Zener resistance
I=3.;##(mA)current in the diode
V_PS=10.;##(V)
##I=(V_PS-V_Z)/R
R=(V_PS-V_Z)/I;
print"%s %.2f %s"%('\nresistance= ',R,' KOhm\n')
resistance=  1.47  KOhm