Chapter - 5 : PN JUNCTION DIODE

Ex 5.1 Pg 102

In [2]:
from math import exp    
I0=2*10**-7
Vf=0.1
I=I0*(exp (40*Vf)-1)
print "I = %0.2f"%(I*10**6),'uA'
I = 10.72 uA

Ex 5.2 Pg 102

In [7]:
from __future__ import division
from math import exp
I0=1*10**-3
Vf=0.22
T=298
n=1
VT=T/11600
print "VT=%0.2f"%(VT*10**3),'mV'
I=I0*(exp (Vf/(n*VT))-1)
print "I=%0.2f"%I,"A"
VT=25.69 mV
I=5.24 A

Ex 5.3 Pg 103

In [4]:
from math import log
from __future__ import division
I1=0.5*10**-3
V1=340*10**-3
I2=15*10**-3
V2=440*10**-3
kTbyq=25*10**-3
a=V1/kTbyq
b=V2/kTbyq
#log(I1/I2)==log(exp((b-a)/n))
n=(a-b)/(log(I1/I2))
print "value of n =",n
value of n = 1.17605641518

Ex 5.4 Pg 103

In [5]:
from __future__ import division
I300=10*10**-6
T1=300
T2=400
I400=I300*(2**((T2-T1)/10))
print "I400=%0.2f"%(I400*10**3),'mA'
I400=10.24 mA

Ex 5.5 Pg 103

In [6]:
from __future__ import division
rB=2.0
IF=12*10**-3
VF=0.7+IF*rB
print "VF=%0.2f"%VF,'V'
VF=0.72 V

Ex 5.8 Pg 104

In [7]:
from __future__ import division
PD=0.5
VF=1
VBR=150
IF=(PD/VF)
print "IF=%0.2f"%IF,"A"
IR=(PD/VBR)
print "IR=%0.2f"%(IR*10**3),'mA'
IF=0.50 A
IR=3.33 mA

Ex 5.9 Pg 104

In [8]:
from __future__ import division
R=330
VS=5
VD=VS
print "VD=VS=%0.2f"% VD,'V'
VR=0
print "VR=",VR
I=0
print "I=",I
VD=VS=5.00 V
VR= 0
I= 0

Ex 5.10 Pg 105

In [10]:
from __future__ import division
VS=12
R=470
VD=0
print "VD=",VD
VR=VS
print "VR=",VR,"V"
I=(VS/R)
print "I=%0.2f"%(I*10**3),"mA"
VD= 0
VR= 12 V
I=25.53 mA

Ex 5.11 Pg 105

In [11]:
from __future__ import division
VS=6
R1=330
R2=470
VD=0.7
RT=R1+R2
I=(VS-0.7)/RT
print "I=%0.2f"%(I*10**3),'mA'
I=6.62 mA

Ex 5.12 Pg 105

In [12]:
from __future__ import division
VS=5
R=510
VF=0.7
VR=VS-0.7
print "VR=%0.2f"%VR,"V"
I=VR/R
print "I=%0.2f"%(I*10**3),"mA"
VR=4.30 V
I=8.43 mA

Ex 5.13 Pg 105

In [14]:
from __future__ import division
VS=6
VD1=0.7
VD2=0.7
VR=1.5*10**3
I=(VS-VD1-VD2)/VR
print "I=%0.2f"%(I*10**3),'mA'
I=3.07 mA

Ex 5.14 Pg 106

In [15]:
from __future__ import division
VS=12
R1=1.5*10**3
R2=1.8*10**3
VD1=0.7
VD2=0.7
I=(VS-VD1-VD2)/(R1+R2)
print "I=%0.2f"%(I*10**3),'mA'
I=3.21 mA

Ex 5.15 Pg 106

In [16]:
from __future__ import division
V1=0
V2=0
VO=0
print "VO=",VO,"V"
V1=0
V2=5
VO=V2-0.7
print "VO=",VO,"V"
V1=5
V2=0
VO=V1-0.7
print "VO=",VO,"V"
V1=5
V2=5
VO=V2-0.7
print "VO=",VO,"V"
VO= 0 V
VO= 4.3 V
VO= 4.3 V
VO= 4.3 V

Ex 5.16 Pg 106

In [1]:
from __future__ import division
from numpy import arange,pi,sin
%matplotlib inline
from matplotlib.pyplot import plot,show,xlabel,ylabel,title
R=20*10**3
I=(R-0.7)/R
print "I=",I,"mA"
rj=50
rB=1
re=rB+rj
R1=(R*re)/(re+R)
print "R1=",R1
V=10*(re/(re+1000))
print "V=",V,'mV'
i=arange(0,6*pi,0.01)
y=[]
for x in i:
    y.append(sin(x))
plot(i,y)
xlabel("X")
ylabel("Y")
title("sin wave")
show()
I= 0.999965 mA
R1= 50
V= 0 mV