# Chapter 1: Semiconductor Diodes¶

## Example 1.1 Page Number-13¶

In :
k=1.38*(10**(-23))      #boltzmann's constant
t=273+27                #converting given temperature to Kelvin
q=1.6*(10**(-19))       #charge on an electron

# V=(k*t)/q

V=(k*t)/q
V=V*1000                #converting result in millivolts
print "Thermal Voltage=",V,"mV"

 Thermal Voltage= 25.875 mV


## Example 1.2 (a) Page Number-18¶

In :
Id= 1              #in mA, current across diodes
#from the standard graph for Ge,Si, and GaAs diodes
Vge=0.2
Vsi=0.6
Vgaas=1.1
print "Voltage across Germanium diode=",Vge,"V"
print "Voltage across Silicon diode  =",Vsi,"V"
print "Voltage across GaAs diode     =",Vgaas,"V"

Voltage across Germanium diode= 0.2 V
Voltage across Silicon diode  = 0.6 V
Voltage across GaAs diode     = 1.1 V


## Example 1.2 (b) Page Number-18¶

In :
Id= 4               #in mA, current across diodes
#from the standard graph for Ge,Si, and GaAs diodes
Vge=0.3
Vsi=0.7
Vgaas=1.2
print "Voltage across Germanium diode=",Vge,"V"
print "Voltage across Silicon diode  =",Vsi,"V"
print "Voltage across GaAs diode     =",Vgaas,"V"

Voltage across Germanium diode= 0.3 V
Voltage across Silicon diode  = 0.7 V
Voltage across GaAs diode     = 1.2 V


## Example 1.2 (c) Page Number-18¶

In :
Id=30               #in mA, current across diodes
#from the standard graph for Ge,Si, and GaAs diodes
Vge=0.42
Vsi=0.82
Vgaas=1.33
print "Voltage across Germanium diode=",Vge,"V"
print "Voltage across Silicon diode  =",Vsi,"V"
print "Voltage across GaAs diode     =",Vgaas,"V"

Voltage across Germanium diode= 0.42 V
Voltage across Silicon diode  = 0.82 V
Voltage across GaAs diode     = 1.33 V


## Example 1.2 (d) Page Number-18¶

In :
#Average value for Germanium
Vg=(0.2+0.3+0.42)/3
#Average value for Silicon
Vs=(0.6+0.7+0.82)/3
#Average value for GaAs
Vgs=(1.1+1.2+1.33)/3
print "Average Volatge value for Germanium Diode=",round(Vg,3),"V"
print "Average Volatge value for Silicon Diode=",round(Vs,3),"V"
print "Average Volatge value for GaAs Diode=",round(Vgs,3),"V"

Average Volatge value for Germanium Diode= 0.307 V
Average Volatge value for Silicon Diode= 0.707 V
Average Volatge value for GaAs Diode= 1.21 V


## Example 1.2 (e) Page Number-18¶

In :
#comparing average values in d with the standard knee voltages
#Average value for Germanium
Vg=(0.2+0.3+0.42)/3
#Average value for Silicon
Vs=(0.6+0.7+0.82)/3
#Average value for GaAs
Vgs=(1.1+1.2+1.33)/3
kge=0.3
ksi=0.7
kgaas=1.2
print "Very close correspondence between knee voltage and average voltage"
print "Germanium",kge,"V vs",round(Vg,3),"V"
print "Silicon",ksi,"V vs",round(Vs,3),"V"
print "GaAs",kgaas,"V vs",round(Vgs,3),"V"

Very close correspondence between knee voltage and average voltage
Germanium 0.3 V vs 0.307 V
Silicon 0.7 V vs 0.707 V
GaAs 1.2 V vs 1.21 V


## Example 1.2(a) Page Number-22¶

In :
Id=2*(10**(-3))        #in ampere
Vd=0.5                 #in volts
rd=Vd/Id
print "dc resistance=",rd,"ohms"

dc resistance= 250.0 ohms


## Example 1.2(b) Page Number-22¶

In :
Id=20*(10**(-3))          #in ampere
Vd=0.8                    #in volts
rd=Vd/Id
print "dc resistance=",rd,"ohms"

dc resistance 40.0 ohms


## Example 1.2(c) Page Number-22¶

In :
#Id=-Is
Id=1*(10**(-6))          #in ampere
Vd=-10                    #in volts
rd=abs(Vd)/Id
rd=rd/(10**(6))
print "dc resistance=",rd,"Mohms"

dc resistance= 10.0 Mohms


## Example 1.3(a) Page Number-24¶

In :
# drawing tangent at Id=2mA and choosing any random points n the tangent to gwt two set of values of Id and Vd
Id1=4*(10**(-3))        #IN ampere
Id2=0                   #IN ampere
Vd1=0.76                #IN VOLTS
Vd2=0.65                #IN VOLTS
X=Id1-Id2
Y=Vd1-Vd2
rd=Y/X
print "ac resistance=",rd,"ohms"

ac resistance= 27.5 ohms


## Example 1.3(b) Page Number-24¶

In :
# drawing tangent at Id=2mA and choosing any random points n the tangent to gwt two set of values of Id and Vd
Id1=30*(10**(-3))        #IN ampere
Id2=20*(10**(-3))       #IN ampere
Vd1=0.80                #IN VOLTS
Vd2=0.78               #IN VOLTS
X=Id1-Id2
Y=Vd1-Vd2
rd=Y/X
print "ac resistance=",rd,"ohms"

ac resistance= 2.0 ohms


## Example 1.3(c) Page Number-24¶

In :
#calculating Dc resistance
#Case-1
Id1=2*(10**(-3))      #in ampere
Vd1=0.7               #in volts
Rd=Vd1/Id1
rd=27.5               #ac resistance in ohms
if Rd>rd:
print "Dc resistance=",Rd,"ohms exceeds ac resistance=",rd,"ohms"
else:
print "Dc resistance=",Rd,"ohms didnot exceeds ac resistance=",rd,"ohms"

#Case-2
Id1=25*(10**(-3))      #in ampere
Vd1=0.79               #in volts
Rd=Vd1/Id1
rd=2                   #ac resistance in ohms
if Rd>rd:
print "Dc resistance=",Rd,"ohms exceeds ac resistance=",rd,"ohms"
else:
print "Dc resistance=",Rd,"ohms didnot exceeds ac resistance=",rd,"ohms"

Dc resistance= 350.0 ohms exceeds ac resistance= 27.5 ohms
Dc resistance= 31.6 ohms exceeds ac resistance= 2 ohms


## Example 1.4 Page Number-40¶

In :
#Equation- change in Cvz=(Tc*Vz*(t1-t0))/100%
Tc=0.072            #unit %/celsius
t1=100              #in celsius
t0=25               #in celsius
Vz=10               #in volts
Cvz=(Tc*Vz*(t1-t0))/100
nVz=Vz+Cvz          #new Vz
print "New potential across zener diode=",nVz,"V"

New potential across zener diode= 10.54 V


## Example 1.5 Page Number-43¶

In :
#Equation wavelength(x)=c/f,where c=speed of light and f=frequency of the light
c=3*(10**(8))*(10**(9))                #in nm/s
x1=(c/(400*(10**12)))                   #in nm
x2=c/(750*(10**12))                   #in nm
print "The range of Wavelength for the frequency of Visible lightis",x1,"nm to",x2,"nm"

The range of Wavelength for the frequency of Visible lightis 750 nm to 400 nm