Chapter5: Non-Linear Applications of IC OP-AMPs

Ex5.1:pg-283

In [6]:
#Ex 5.1


R1=100.0;#kohm
R2=86.0;#kohm
Vsat=15.0;#V
VUT=R2/(R1+R2)*Vsat;#V
VLT=R2/(R1+R2)*-Vsat;#V
print round(VUT,2),"=VUT(V) "
print round(VLT,2),"=VLT(V) "
6.94 =VUT(V) 
-6.94 =VLT(V) 

Ex5.2:pg-283

In [8]:
#Ex 5.2

Rf=100;#kohm
C=0.1;#micro F
T=2*Rf*1000*C*10**-6;#s
print T*10**3,"Time period(ms)"
f=1/T;#Hz
print f,"Frequency(Hz) "
20.0 Time period(ms)
50.0 Frequency(Hz) 

Ex5.3:pg-287

In [10]:
#Ex 5.3

R=100.0;#kohm
C=0.01;#micro F
f=1/(2*R*10**3*C*10**-6);#Hz
print f,"Frequency(Hz) "
500.0 Frequency(Hz) 

Ex5.4:pg-287

In [13]:
#Ex 5.4

f=1*1000.0;#HZ
Vs=15.0;#V
C=0.1;#micro F(Assumed)
R=1.0/(2*f*C*10**-6);#Hz
print "For the required design value of R(kohm)  ",R/1000.0
print "R1 & R2 can be choosen as 10 kohm"
#/Answer in the book is wrong
For the required design value of R(kohm)   5.0
R1 & R2 can be choosen as 10 kohm

Ex5.5:pg-293

In [15]:
#Ex 5.5

Vo=0.7;#V
Vsat=12.0;#V
R1=10.0;#kohm
R2=60.0;#kohm
Vth=R1/(R1+R2)*Vo;#V
iDmax=(Vsat-Vo)/R1-Vo/(R1+R2);#mA
print iDmax,": Maximum current(mA) "
1.12 : Maximum current(mA) 

Ex5.7:pg-294

In [17]:
#Ex 5.7


R1=10.0;#kohm
R2=16.0;#kohm
C=10.0;#nF
R=62.0;#kohm
Beta=R1/(R1+R2);#unitless
T=2*R*1000.0*C*10**-9*math.log((1+Beta)/(1-Beta));#seconds
f=1.0/T;#Hz
print round(f,1),": Frequency of oscillations(Hz) "
994.5 : Frequency of oscillations(Hz) 

Ex:5.8:pg-295

In [24]:
#Ex 5.8


#vo/v1=1+R2/R1;#
#For v2/v1 i.e. gain=2, R1 & R2 should be equal
Vpp=10.0;#V
R1=10.0;#kohm
R2=10.0;#kohm
#Avg=1/T*integrate('Vpp*math.sin(2*%pi*t/T)','t',0,T/2);
Avg=-Vpp/(2*math.pi)*(math.cos(math.pi)-math.cos(0));
print round(Avg,2),": Average output voltage(V) "
3.18 : Average output voltage(V) 

Ex5.9:pg-296

In [27]:
#Ex 5.9


#vo/v1=-2;#Gain for -ve inputs
voBYvi=-2;#Gain for -ve inputs
#vo/v1=0;#Gain for non -ve inputs
Rin=100;#kohm
R1=100;#kohm(R1=Rin)
R2=-R1*voBYvi;#kohm
print R1,"and",R2,"are Values of R1 & R2(kohm) "
100 and 200 are Values of R1 & R2(kohm) 

Ex5.11:pg-298

In [29]:
#Ex 5.11


f0=1.5;#kHz
Vopp=6;#V
Vsat=13.5;#V
#Let R2=10kohm
R2=10;#kohm
R3=R2*2*Vsat/Vopp;#kohm
#Let C1=0.05 micro F
C1=0.05;#micro F
R1=R3/(4*f0*1000*R2*1000*C1*10**-6);#kohm
print R1,",",R2,",",R3,"are Values of R1, R2 & R3(kohm) "
print C1,": Value of C1(micro F)"
15.0 , 10 , 45.0 are Values of R1, R2 & R3(kohm) 
0.05 : Value of C1(micro F)

Ex5.12:pg-299

In [34]:
#Ex 5.12


tau=1;#ms
#R1/R2=1.8:9;given range
#Let R1/R2=1.8
R1BYR2=1.8;#ratio
Beta1=1.0/(R1BYR2+1);
R1BYR2=9.0;#ratio
Beta2=1.0/(R1BYR2+1);#unitless
#For fmin
Tmax=2.0*math.log((1+Beta1)/(1-Beta1));#ms
fmin=1000.0/Tmax;#Hz
#For fmax
Tmin=2*math.log((1+Beta2)/(1-Beta2));#ms
fmax=1/Tmin;#kHz
print "Frequency range is ",round(fmin)," Hz to ",round(fmax,1)," kHz"
Frequency range is  669.0  Hz to  2.5  kHz