Chapter 3: Inverting and Non Inverting Amplifiers

Example 3.1 Page No 47

In [1]:
#Given
Rf=100*(10**3)      #Feedback Resistance in ohms
Ri=10*(10**3)       #Input Resistance in ohms
Ei=1.0                #Input volts

#Calculation 
I=Ei/Ri              #Equation for current through Rf
Vout=-(Rf/Ri)*Ei      #Equation for Output Voltage
Acl=-(Rf/Ri)          #Closed loop gain of the amplifier 

#Result
print"(a) Current through Rf  is",I*1000,"mA"
print"(b) Value of output voltage is ",Vout,"V"
print"(c) Value of closed loop gain is",Acl
(a) Current through Rf  is 0.1 mA
(b) Value of output voltage is  -10.0 V
(c) Value of closed loop gain is -10

Example 3.2 Page No 47

In [2]:
#Given
Vout=10.0         #output voltage
I=0.1*(10**-3)   #current through Rf in amperes
Rl=25*(10**3)    #Load resistance in ohms

#Calculation
Il=Vout/Rl
Iout=I+Il

#Result
print"(a) Value of load current is",Il*1000,"m"
print"(b) Total current into the output pin of the opamp is ",Iout*1000,"mA"
(a) Value of load current is 0.4 m
(b) Total current into the output pin of the opamp is  0.5 mA

Example 3.3 Page No 49

In [5]:
#Given
Rf=250*(10**3)#Feedback Resistance in Ohms
Ri=10*(10**3)#Input Resistance in Ohms
Ei=0.5#Input voltage

#Calculation
I=Ei/(Ri)
VRf=I*Rf
Ei1=-0.5
Vout=-(Rf/Ri)*Ei1

#Result
print"(a) Value of current through Rf is",I,"A"
print"(b) Voltage through Rf is ",VRf,"V"
print"(c) Output Voltage is",Vout,"V"
(a) Value of current through Rf is 5e-05 A
(b) Voltage through Rf is  12.5 V
(c) Output Voltage is 12.5 V

Example 3.4 Page No 49

In [3]:
#Given
Vout=12.5      #in volts
Il=2*10**-3    #in amperes

#Calculation
Rl=Vout/Il     #Load resistance in ohm
I=0.05*10**-3
Iout=I+Il

#Result
print"(a) Value of Load Resistance is",Rl/1000,"kohm"
print"(b) Value of output current is ",Iout*1000,"mA"
print"(c)The circuit input resistance is Rl=10Kohm"
(a) Value of Load Resistance is 6.25 kohm
(b) Value of output current is  2.05 mA
(c)The circuit input resistance is Rl=10Kohm

Example 3.5 Page No 50

In [12]:
#Given
Rf=20*10**3
Ri=10*10**3

#calculation
Acl=-(Rf/Ri)  #Voltage Gain

#Result
print" Value of Voltage Gain is",Acl
 Value of Voltage Gain is -2

Example 3.6 Page No 51

In [14]:
#Given
Ei=-5         #input voltage
Acl=-2        #Voltage Gain

#Calculation
Vout=Ei*Acl   #output voltage

#Result
print" Value of Output Voltage is",Vout,"V"
 Value of Output Voltage is 10 V

Example 3.7 Page No :51

In [5]:
#Given
Ri=10*10**3       #input resistance in ohm
Gain= 25

#Calculation
Rf=Gain*Ri        #feedback resistance in ohm

#result
print" Value of Rf is",Rf/1000,"kohm"
 Value of Rf is 250 kohm

Example 3.8 Page No 52

In [17]:
#Given
E1=2
E2=3
E3=1        #input voltage
R=10*10**3  #in ohm

#calculation
Vout=-(E1+E2+E3)

#result
print" Value of o/p voltage is  ",Vout,"V"
 Value of o/p voltage is   -6 V

Example 3.9 Page No 53

In [19]:
#Given
E1=2.0
E2=3.0
E3=-1.0      #input voltage
R=10*10**3   #in ohm

#Calculation
Vout=-(E1+E2+E3)

#result
print" Value of o/p voltage is",Vout
 Value of o/p voltage is -4.0

Example 3.11 Page No 56

In [8]:
#Given
#Channel 1
Ri= 10*10**3      #Choosing Input resistance
Acl = -10.0 

#Calculation
Rf1 = - (Acl * Ri)
#Channel 2
Acl1 = -5
Rf2 = - (Acl1 * Ri)
#channel 3
Acl2 = -2
Rf3 = - (Acl2 * Ri)

#result
print" Value of Rf1 =  ",Rf1/1000,"kohm"
print" Value of Rf2 =  ",Rf2/1000,"kohm"
print" Value of Rf3 =  ",Rf3/1000,"kohm"
 Value of Rf1 =   100.0 kohm
 Value of Rf2 =   50 kohm
 Value of Rf3 =   20 kohm

Example 3.12 Page No 57

In [21]:
#Given
R1=100000.0
R2=100000.0
R3=100000.0
R=100000.0     #in ohm
Rf=33*10**3    #in ohm
E1=5
E2=5
E3=-1  #in volts
n=3.0          #number of inputs

#Calculation
Vout=-(E1+E2+E3)/n   #output voltage

#Result
print" Value of output voltage is",Vout,"V"
 Value of output voltage is -3.0 V

Example 3.13 Page No 59

In [15]:
#Given
Rf = 40*10**3
R1 = 10*10**3

#calculation
Acl = (Rf + R1)/R1
print"(a) Value of Voltage Gain =   ",Acl
(a) Value of Voltage Gain =    5

Example 3.14 Page No 59

In [ ]:
#Given 
Acl = 10.0    # Gain is positive, so choose noninvering amplifier
R1 = 10*10**3

#Calculation
Rf = (Acl*R1)-R1

#Result
print" Value of Rf is",Rf/1000,"kohm"

Example 3.15 Page No 62

In [11]:
#Given
Ei=4.0       #in volts
Rl=10*10**3  #in ohm
I=0          #in ampere

#Calculation
Vout=Ei      #output voltage
Il=Vout/Rl   #load current
I0=I+Il      #output current 

#Result
print" Value of o/p voltage is",Vout,"V"
print" Value of load current is ",Il*1000,"mA"
print" Value of output current is ",I0*1000,"mA"
 Value of o/p voltage is 4.0 V
 Value of load current is  0.4 mA
 Value of output current is  0.4 mA