chapter14:Operational Amplifiers

Example E1 - Pg 474

In [1]:
#Calculate voltage gain and input and output resistance
#given
R1=20.*10.**3.;#ohm
Rf=2000.*10.**3.;#ohm
Acl=-Rf/R1;
Ricl=R1;
Ro=0;
print '%s %.f %s' %("The voltage gain =",Acl,"\n");
print '%s %.f %s' %("The input resistance =",R1/1000,"kohm\n");
print '%s %.f %s' %("The output resistance =",Ro,"ohm\n");
The voltage gain = -100 

The input resistance = 20 kohm

The output resistance = 0 ohm

Example E2 - Pg 474

In [2]:
#Find the output voltage
#given
R1=20.*10.**3.;#ohm
Rf=2000.*10.**3.;#ohm
v1=4.;#V
v2=3.8;#V
vo=v2*(1.+Rf/R1)-(Rf/R1)*v1;
print '%s %.1f %s' %("The output voltage =",vo,"V");
The output voltage = -16.2 V

Example E4 - Pg 475

In [3]:
#Design an adder circuit using an op amp
#given
#Vo=-(V1+10*V2+100*V3)
Rf=100.*10.**3.;#ohm
C1=1.;#coefficient of V1
C2=10.;#coefficient of V2
C3=100.;#coefficient of V3
R1=Rf/C1;
R2=Rf/C2;
R3=Rf/C3;
print '%s %.f %s' %("R1 =",R1/1000,"kohm\n");
print '%s %.f %s' %("R2 =",R2/1000,"kohm\n");
print '%s %.f %s' %("R3 =",R3/1000,"kohm\n");
R1 = 100 kohm

R2 = 10 kohm

R3 = 1 kohm

Example E5 - Pg 484

In [4]:
#Calculate CMRR in dB
#given
import math
Ad=100.;#differential mode gain
Ac=0.01;#common mode gain
CMRR=20.*math.log10(Ad/Ac);
print '%s %.f %s' %("The CMRR in dB =",CMRR,"dB");
The CMRR in dB = 80 dB

Example E6 - Pg 484

In [5]:
#Calculate the output voltage
#given
Ad=2000.;#differential mode gain
CMRR=10000.;
V1=10.**-3.;#V
V2=0.9*10.**-3.;#V
Vd=V1-V2;
Vc=(V1+V2)/2.;
Vo=Ad*Vd*(1.+Vc/(CMRR*Vd));
print '%s %.2f %s' %("The output voltage is =",Vo*1000,"mV");
The output voltage is = 200.19 mV