# Chapter-11 Op-Amp Applications¶

## Example-11.1 Page Number-642¶

In [7]:
Rf=200.0                #in kohm(feedback resistor)
R1=2.0                  #in kohm
Vi=2.5*(10**-3)         #converting microV to mV(Input voltage)

A=-Rf/R1                #gain of op-amp
Vo=A*Vi                 #output voltage in volts
print "Output voltage=",Vo,"mV"

Output voltage= -0.25 mV


## Example-11.2 Page Number-642¶

In [9]:
Rf=240.0                #in kohm(feedback resistor)
R1=2.4                  #in kohm
Vi=120*(10**-3)         #converting microV to mV(Input voltage)

A=1+(Rf/R1)             #gain of op-amp
Vo=A*Vi                 #output voltage in volts
print "Output voltage=",Vo,"mV"

Output voltage= 12.12 mV


## Example-11.3 Page Number-643¶

In [11]:
Rf=470                 #in kohm(feedback resistor)
R1=4.3                 #in kohm
R2=33.0                  #in kohm
R3=33.0                  #in kohm
Vi=80*(10**-6)         #converting microV to V(Input voltage)

#Total gain(A)=A1*A2*A3
A=(1+(Rf/R1))*(-Rf/R2)*(Rf/R3)
Vo=A*Vi                 #output voltage in volts

print "Output voltage=",round(Vo,2),"V"

Output voltage= -1.79 V


## Example-11.4 Page Number-644¶

In [16]:
Rf=270.0                 #in kohm(feedback resistor)
Vi=150*(10**-6)         #converting microV to V(Input voltage)
#Case-1:Positive gain
A1=10
R1=Rf/(A1-1)
#Case-2:Negative gain
A2=18
R2=Rf/A2
#Case-3:Negative gain
A3=27
R3=Rf/A3

#total gain of the circuit A=A1*A2*A3:
A=A1*A2*A3
#Output voltage Vo:
Vo=A*Vi
print"Required resistors are R1=",R1,"Kohm, R2=",R2,"Kohm, R3=",R3,"Kohm"
print"Output voltage Vo=",Vo,"V"

Required resistors are R1= 30.0 Kohm, R2= 15.0 Kohm, R3= 10.0 Kohm
Output voltage Vo= 0.729 V


## Example-11.5 Page Number-645¶

In [20]:
Rf=500.0                 #in kohm(feedback resistor)
A1=10                    #gain of 1st op-amp
A2=20                    #gain of 2nd op-amp
A3=50                    #gain of 3rd op-amp
#since all the gain are negative in LM348 IC Op-amp,hence
R1=Rf/A1
R2=Rf/A2
R3=Rf/A3

print"Required resistors are R1=",R1,"Kohm, R2=",R2,"Kohm, R3=",R3,"Kohm"

Required resistors are R1= 50.0 Kohm, R2= 25.0 Kohm, R3= 10.0 Kohm


## Example-11.6 Page Number-646¶

In [21]:
#V1=50mVsin(1000t)
#V2=10mVsin(3000t)
V1=50*(10**-3)           #in volts
V2=10*(10**-3)           #in volts
Rf=330.0                 #in kohm(feedback resistor)
R1=33                    #in kohm
R2=10                    #in kohm

#for the voltage summing circuit,Output voltage Vo:
Vo=-(Rf/R1)*V1+(Rf/R2)*V2

print "Output voltage Vo=-[",(Rf/R1)*V1,"sin(1000t)+",(Rf/R2)*V2,"sin(3000t)]"

Output voltage Vo=-[ 0.5 sin(1000t)+ 0.33 sin(3000t)]


## Example-11.7 Page Number-647¶

In [30]:
Rf=1000.0                   #in Kohm(feedback resistor)
R1=100.0                    #in Kohm
R2=50.0                     #in Kohm
R3=500.0                    #in Kohm

#for the voltage subtractor circuit:
#Output voltage Vo=-(((Rf/R2)*V2)-((Rf/R3)*(Rf/R1)*V1))

print "Output voltage Vo=-[",int(Rf/R2),"V2 -",int(Rf/R3)*(Rf/R1),"V1]"

Output voltage Vo=-[ 20 V2 - 20.0 V1]


## Example-11.8 Page Number-647¶

In [29]:
Rf=100.0                   #in Kohm(feedback resistor)
R2=100.0                    #in Kohm
R1=20.0                     #in Kohm
R3=20.0                    #in Kohm

#for the voltage subtractor circuit,Output voltage Vo:
#Vo=-(((R3/(R1+R3))*((R2+R4)/R2)*V1)-((R4/R2)*V2))

print "Output voltage Vo=-[",int((R3/(R1+R3))*((R2+Rf)/R2)),"V1 -",int(Rf/R2),"V2]"

Output voltage Vo=-[ 1 V1 - 1 V2]


## Example-11.10(a) Page Number-651¶

In [31]:
Rf=4.0                     #in Kohm(feedback resistor)
R1=2.0                     #in Kohm
R2=2.0                     #in Kohm
V1=8                       #in volts

#for the given circuit:
Il=V1/R1

print "Il=",Il,"mA"

Il= 4.0 mA


## Example-11.10(b) Page Number-651¶

In [32]:
Rf=2.0                     #in Kohm(feedback resistor)
I1=10                      #mA(input current)

#for the given circuit,Output voltage Vo:
Vo=-I1*R1

print "Vo=",Vo,"V"

Vo= -20.0 V


## Example-11.11 Page Number-654¶

In [33]:
R=5000                    #in ohm
Rp=500                    #in ohm
#for the given circuit:
#Output voltage Vo=(1+(2*R)/Rp)*(V1-V2)
print "Vo=",(1+(2*R)/Rp),"(V1-V2)"

Vo= 21 (V1-V2)


## Example-11.12 Page Number-656¶

In [37]:
R1=1.2*(10**3)              #in ohm
C1=0.02*(10**-6)           #in farad

#for first order low pass filter,Cutoff-frequency Foh:
Foh=1/(6.28*R1*C1)

print "Cutoff-frequency Foh:",round((Foh/1000),2),"kHz"

Cutoff-frequency Foh: 6.63 kHz


## Example-11.13 Page Number-657¶

In [40]:
R1=2.1*(10**3)              #in ohm
R2=R1
C1=0.05*(10**-6)            #in farad
C2=C1
#for second order high pass filter,Cutoff-frequency Fol:
Fol=1/(6.28*R1*C1)

print "Cutoff-frequency Fol:",round((Fol/1000),2),"kHz"

Cutoff-frequency Fol: 1.52 kHz


## Example-11.14 Page Number-658¶

In [43]:
R1=10.0*(10**3)              #in ohm
R2=R1
C1=0.1*(10**-6)              #in farad
C2=0.002*(10**-6)            #in farad

#for band pass filter,Cutoff-frequencies are:
Fol=1/(6.28*R1*C1)
Foh=1/(6.28*R2*C2)

print "Cutt-off frequencies are=",round(Fol,1),"Hz and",round((Foh/1000),2),"kHz"

Cutt-off frequencies are= 159.2 Hz and 7.96 kHz