Chapter 21 : Optoelectronic Devices

Example 21.1, Page No 947

In [13]:
import math

#initialisation of variables
r=3.0
Os=25.0
area=0.25

#Calculations
Ea=Os/(4.0*3.14*(r)**2)
Tf=Ea*area

#Results
print(" total flux is %3.3fW " %Tf)
 total flux is 0.055W 

Example 21.3, Page No 951

In [14]:
import math

#initialisation of variables
Vcc=9.0
Vf=1.6
Vb=7.0
hFE=100.0
Vce=0.2
Ic=10.0*10**-3
Vbe=0.7

#Calculations
R2=(Vcc-Vf-Vce)/Ic
R2=680#use standard value
Ic=(Vcc-Vf-Vce)/R2
Ib=Ic/hFE
Rb=(Vb-Vbe)/Ib

#Results
print("The value of Rb is %d kohm" %(Rb/1000))
The value of Rb is 59 kohm

Example 21.4 Page No 952

In [15]:
import math

#initialisation of variables
Vcc=5.0
N=(3*7.0)+(1.0*2)

#Calculations
It=N*10.0*10**-3
P=It*Vcc

#Results
print("The value of power is %.2f W" %P)
The value of power is 1.15 W

Example 21.5, Page No 957

In [16]:
import math
#initialisation of variables
Rc=1.0*10**3
I=10.0*10**-3
E=30.0

#Calculations
R1=E/I -Rc
R1=1.8*10**3#use standard value
print(" when dark Rc=100Kohm")
Rc=100*10**3
I=E/(R1+Rc)

#Results
print("The value of I is %.2f mA" %(I*10**3))
 when dark Rc=100Kohm
The value of I is 0.29 mA

Example 21.6 Page No 958

In [17]:
import math
#initialisation of variables

Vee=6.0
Vbe=0.7
Ib=200.0*10**-6
Vb=0.7
Vcc=6.0

#Calculations
print("when cell is dark Rc=100Kohm")
Rc=100.0*10**3
Vrc=Vee+Vbe
Irc=Vrc/Rc
Ir1=Irc+Ib
Vr1=Vcc-Vb
R1=Vr1/Ir1
R1=18.0*10**3#use standard value
print(" when Q1 is off")
Vr1=6.0
Vrc=6.0
Ir1=Vr1/R1
Rc=Vrc/Ir1

#Results
print("The value of Rc is %d kohm" %(Rc/1000))
when cell is dark Rc=100Kohm
 when Q1 is off
The value of Rc is 18 kohm