# 10: Semiconductor Devices¶

## Example number 10.1, Page number 335¶

In :
#importing modules
import math
from __future__ import division

#Variable declaration
rho=1.7*10**-6;    #specific resistance of Cu(ohm cm)
w=63.54;    #atomic weight of Cu
d=8.96;    #density of Cu(g/cm**3)
q=1.6*10**-19;   #charge on electron(C)

#Calculation
x=A*d/w;     #number of free electrons in unit volume(per cm**3)
sigma=1/rho;    #conductivity
mewn=sigma/(x*q);    #mobility of electron(cm**2/Vs)

#Result
print "mobility of electron is",round(mewn,2),"cm**2/Vs"

mobility of electron is 43.27 cm**2/Vs


## Example number 10.2, Page number 336¶

In :
#importing modules
import math
from __future__ import division

#Variable declaration
q=1.6*10**-19;   #charge on electron(C)
ni=1.6*10**10;   #number of charge carriers
mewn=1500;    #mobility of negative charge carriers(cm**2/Vs)
mewp=500;    #mobility of positive charge carriers(cm**2/Vs)

#Calculation
sigma=q*ni*(mewn+mewp);    #conductivity of silicon(per ohm cm)

#Result
print "conductivity of silicon is",sigma,"per ohm cm"

conductivity of silicon is 5.12e-06 per ohm cm


## Example number 10.3, Page number 348¶

In :
#importing modules
import math
from __future__ import division

#Variable declaration
w=350*10**-9;    #width(m)
E=5*10**5;    #electric field intensity(V/m)

#Calculation
V=E*w;    #potential difference(V)

#Result
print "potential difference is",V,"V"
print "minimum energy required is",V,"eV"

potential difference is 0.175 V
minimum energy required is 0.175 eV


## Example number 10.4, Page number 348¶

In :
#importing modules
import math
from __future__ import division

#Variable declaration
I0=1.8*10**-6;    #current(A)
V=0.25;    #potential difference(V)
e=1.6*10**-19;   #charge on electron(C)
eta=1;
k=1.38*10**-23;    #boltzmann constant
T=293;     #temperature(K)

#Calculation
a=round(e*V/(eta*k*T));
I=I0*(math.exp(a)-1);    #current through the diode(A)

#Result
print "current through the diode is",round(I*10**3),"mA"

current through the diode is 40.0 mA


## Example number 10.5, Page number 357¶

In :
#importing modules
import math
from __future__ import division

#Variable declaration
Vac=230;    #voltage(V)

#Calculation
Vm=math.sqrt(2)*Vac;
Vdc=Vm/math.pi;   #DC voltage(V)
Idc=Vdc/RL;    #DC current(A)
Irms=round(Vm/(2*RL),4);   #rms value of current(A)
gama=math.sqrt(((Irms/Idc)**2)-1);    #ripple factor
Pdc=(Idc**2)*RL;   #DC power(W)
Pac=(Irms**2)*RL;   #DC power(W)
eta=Pdc*100/Pac;      #efficiency(%)

#Result
print "DC voltage is",round(Vdc,1),"V"
print "DC current is",round(Idc*10**3,1),"mA"
print "ripple factor is",round(gama,2)
print "answer for ripple factor varies due to rounding off errors"
print "efficiency is",round(eta),"%"

DC voltage is 103.5 V
DC current is 51.8 mA
ripple factor is 1.21
answer for ripple factor varies due to rounding off errors
efficiency is 41.0 %


## Example number 10.6, Page number 361¶

In :
#importing modules
import math
from __future__ import division

#Variable declaration
Vm=30;    #AC voltage(V)
Rf=10;   #resistance(ohm)

#Calculation
Im=Vm/(Rf+RL);    #maximum current(A)
Im=Im*10**3;    #maximum current(mA)
Idc=2*Im/math.pi;   #DC current(mA)
Irms=Im/math.sqrt(2);   #rms current(mA)
Pdc=(Idc**2)*RL/10**-3;   #DC power(mW)
Pac=(Irms**2)*(Rf+RL)/10**-3;   #AC power(mW)
eta=Pdc*100/Pac;   #efficiency(%)

#Result
print "DC current is",round(Idc,2),"mA"
print "answer for DC current varies due to rounding off errors"
print "rms current is",round(Irms,2),"mA"
print "efficiency is",round(eta,1),"%"

DC current is 12.65 mA
answer for DC current varies due to rounding off errors
rms current is 14.05 mA
efficiency is 80.5 %


## Example number 10.7, Page number 377¶

In :
#importing modules
import math
from __future__ import division

#Variable declaration
alpha=0.99;   #amplification factor

#Calculation
beta=alpha/(1-alpha);   #value of beta

#Result
print "value of beta is",beta

value of beta is 99.0


## Example number 10.8, Page number 377¶

In :
#importing modules
import math
from __future__ import division

#Variable declaration
alpha=0.9;   #amplification factor
IE=4*10**-3;   #emitter current(A)
ICO=12*10**-6;   #current(A)

#Calculation
IC=(alpha*IE)+ICO;    #collector current(A)
IC=round(IC*10**3,2);   #collector current(mA)
IB=IE-(IC*10**-3);    #base current(A)

#Result
print "collector current is",IC,"mA"
print "base current is",IB*10**6,"micro A"

collector current is 3.61 mA
base current is 390.0 micro A


## Example number 10.9, Page number 394¶

In :
#importing modules
import math
from __future__ import division

#Variable declaration
A=-120;    #gain
beta=-0.1;   #feedback factor
V=5*10**-3;   #input voltage(V)

#Calculation
a=A*beta;
Af=round(A/(1+a),1);
ff=20*math.log10(A/Af);     #feedback factor(dB)
phis=(1+a)*V;    #input voltage(V)
phio=Af*phis;    #output voltage(V)

#Result
print "feedback factor is",round(ff,1),"dB"
print "answer for feedback factor varies due to rounding off errors"
print "input voltage is",phis*10**3,"mV"
print "output voltage is",phio*10**3,"mV"

feedback factor is 22.3 dB
answer for feedback factor varies due to rounding off errors
input voltage is 65.0 mV
output voltage is -598.0 mV


## Example number 10.10, Page number 395¶

In :
#importing modules
import math
from __future__ import division

#Variable declaration
A1=4000;    #gain
A2=8000;    #increased gain
beta=0.04;   #feedback factor

#Calculation
Af1=A1/(1+(A1*beta));
Af2=A2/(1+(A2*beta));
Af=1/beta;    #value of Af

#Result
print "values of Af are",round(Af1,2),"and",round(Af2,2)
print "hence the changes are very small. value of Af is",Af

values of Af are 24.84 and 24.92
hence the changes are very small. value of Af is 25.0


## Example number 10.11, Page number 395¶

In :
#importing modules
import math
from __future__ import division

#Variable declaration
A=40;    #gain
Af=10;   #decreased gain

#Calculation
beta=((A/Af)-1)*100/A;     #percentage of feedback(%)

#Result
print "percentage of feedback is",beta,"%"

percentage of feedback is 7.5 %