# Chapter 01 : Basic semiconductor and pn junction theory¶

## Example 1.1, Page No 15¶

In [1]:
import math
#initialisation of variables
Nd=3*10**14
Na=0.5*10**14                       #all in atom/cm**3
ni=1.5*10**10

#Calculations
print("resultant densities of free electrons and hole")
ne=(-(Na-Nd)+(math.sqrt(((Na-Nd)**2)+4*ni**2)))/2
print("Electron densities = %.1f x 10^14 electron/cm**3" %(ne/(10**14)))     #electron densities in electron/cm**3
Nd>Na
n=Nd-Na
print(n)
p=(ni**2)/n

#Results

print("densities of hole is =%.1f X 10^6 dhole/cm3" %(p/(10**6)))

resultant densities of free electrons and hole
Electron densities = 2.5 x 10^14 electron/cm**3
2.5e+14
densities of hole is =0.9 X 10^6 dhole/cm3


## Example 1.2, Page No 18¶

In [2]:
import math

#initialisation of variables
l=1*10**-3
E=10

#Calculations
un=1500*10**-4
up=500*10-4
Vn=-(un*E)/l

#Results
print("drift current is =%.2dm/s\n" %Vn)
print("drift current of hole")
Vp=(up*E)/l
print("drift current is =%.f dm/s\n" %(Vp/10**5))

drift current is =-1500m/s

drift current of hole
drift current is =500 dm/s



## Example 1.3 Page No 19¶

In [3]:
import math

#initialisation of variables
l=1*10**-3
a=0.1*10**-4
ni=1.5*10**10
p=1.5*10**10
un=1500
up=500           #in cm3/V.s
q=1.6*10**-19

#Calculations
m=q*((ni*un)+(p*up))*10**6
print( "mobility is =%.1fmicro/ohmcm" %m)
R=l/(m*a)
print(" resistance is =%.1fMohm" %R)

#for doped material
n=8*10**13
p=(ni**2)/n
m=q*((n*un)+(p*up))

#Results
print("mobility is =%3.4f/ohmcm" %m)
R=l/(m*a)
print(" resistance is %.2f Kohm" %(R/1000))

mobility is =4.8micro/ohmcm
resistance is =20.8Mohm
mobility is =0.0192/ohmcm
resistance is 5.21 Kohm


## Example 1.4, Page No 25¶

In [4]:
import math
#initialisation of variables
T1=25.0
T2=35.0
T3=45.0
I0=30.0       # nA
print("I0(35)=I0*2**(T2-T1)/10")
#on solving
I035=I0*2**((T2-T1)/10)
print("Current at 35c is =%.2f nA\n" %I035)
print("I0(45)=I0*2**(T3-T1)/10")
#on solving
I045=30*2**2
print("current at 45c is =%.2f nA\n" %I045)
I_CS=100.0
V_CC=200.0
t_on=40*10**-6

I0(35)=I0*2**(T2-T1)/10
Current at 35c is =60.00 nA

I0(45)=I0*2**(T3-T1)/10
current at 45c is =120.00 nA



## Example 1.5, Page No 28¶

In [5]:
import math
#initialisation of variables
I0=30
Vd=0.7
n=2

#Calculations
Vt=26.0*10**-3
k=Vd/(n*Vt)
Id=I0*((2.7**k)-1)*10**-6     #Junction current
print(" a) Forward bais current is =%.2f mA\n" %Id)
Vd=-10                #reverse bais
k=Vd/(n*Vt)
Id=I0*((2.7**k)-1)

#Results
print(" b) Forward bais current is =%.2f nA" %Id)

 a) Forward bais current is =19.23 mA

b) Forward bais current is =-30.00 nA


## Example 1.6, Page No 29¶

In [6]:
import math
#initialisation of variables
Id=.1*10**-3
n=2
vt=26*10**-3
I0=30*10**-9

#Calculations
Vd=(n*Vt)*math.log(Id/I0)*10**3
print(" a) Forward bais current is =%.2f mV\n" %Vd)
Id=10*10**-3
Vd=(n*Vt)*math.log(Id/I0)*10**3

#Results
print("b) forward bais current is %dmV\n" %Vd)

 a) Forward bais current is =421.81 mV

b) forward bais current is 661mV