Op Amp Basics
Op Amp Basics
Op Amp Basics
1. NON-INVERTING AMPLIFIER
Vo R Z i nf Z of
AVF (ideal ) = = 1+ F Vi n
Vin RE Iin RB 0A
V Vi n
ZIF (ideal ) = in = ∞ Vo
Iin
V RE 0A RF
ZOF (ideal) = o =0
Io Viu = 0
- + - +
IF IF
NOTE: The ideal gain is positive therefore the output is in phase with the input which explains why this circuit
is called a non-inverting amplifier. This circuit is also ideal for buffering purposes, that is to isolate the load
from the source since ZIF = ∞ and ZOF = 0 - the source does not supply any current (Iin = 0) while the load
current is supplied by the output of the op amp which has 0Ω ideal output impedance.
Vo R Z of
AVF (ideal ) = =− F 0V
Vin RE RB 0A
V
ZIF (ideal ) = in = RE Vo
Iin Z i nf
Vo RE 0A RF
ZOF (ideal) = =0
Io Viu = 0 Vi n
Iin + - Iin + -
For minimum O/P DC offset voltage, make 0V
RB ≈ RE RF with BJT input op amps.
NOTE: The gain is negative therefore the output is inverted with respect to the input. The input impedance is
not infinite therefore current is drawn from the source - this is not a buffer as seen with the non-inverting
amplifier.
Vo RINT 0A
AVF (ideal ) = =1
Vin Vi n
Vo
BJT I/P
V
ZIF (ideal ) = in = ∞
Iin 0A
RL
Vo RF
ZOF (ideal) = =0
Io Viu = 0
RINT 0A
For minimum O/P DC offset voltage, make
RF ≈ RINT with BJT input op amps. Vi n
FET I/ P Vo
NOTE: This circuit is ideal for buffering purposes, that is to isolate the load from the source since ZIF = ∞ and
ZOF = 0 - the source does not supply any current (Iin = 0) while the load current is supplied by the output of the
op amp which has 0Ω output impedance.
Q1 SOURCE
0A Cc A ND
RL RINT 0A
SINK
Vi n
FET I/ P Vo
0A
CC = 20 pF to 0,1 µF needed to stabilise the Q2
RL
R R R 0V
Vo = − F × V1 + F × V2 + F × V3 R1
R1 R2 R3 V1
R I1 + R -
If R1 = R2 = R3 = RE ⇒ Vo = − F [V1 + V2 + V3 ] 2
RF
RE V2
V V V I2 + R - IF + -
ZIF1 = 1 = R1 Z IF 2 = 2 = R2 ZIF3 = 3 = R3 3
I1 I2 I3 V3
I3 + - Z of
V 0A
ZOF = o =0
Io Viu =0 RB 0A
Vo
For minimum O/P DC offset voltage, make
RB ≈ R1 R2 R3 RF with BJT input op amps. 0V
20 dB
b oost
2K 18K
V1
1 0K 1
LO G
R R
20 dB Vo
b oost
2K 18K R
4
R
V2
1 0K 2
LO G
20 dB
b oost
2K 18K
V3
1 0K 3
LO G
Vo =
RF
[V2 − V1 ]Z OF = Vo =0
-
V = V
+
RE Io Viu =0 RE RF
I1 I1
V1 RE
Z IF 1 (var iable ) = =
V1
+ - + -
I1 RF V2 0A
1 −
RE + RF V1 Vo
V2
Z IF 2 ( fixed ) = = RE + RF R E 0A RF
I2 V2
+ -
I2 I2 + -
Both op amp inputs see RE RF resistance wise therefore V
+
DC O/P offset is minimised.
RE RF
V1
Vo RF 0,5(1 + (∆RF RF )) RF
Ad = = 0,5 + ≈
V2 − V1 RE ∆RE + ∆RF RE Vo
1 +
RE + RF
V2
∆RF ∆RE RE+∆ R E
−
Vo RF R F RE RF +∆ R F
Acm = =
Vin RE + RF ∆RE + ∆RF
1+
RE + R F Both op amp inputs see RE RF resistance
−1 wise therefore DC O/P offset is minimised.
∆RF ∆RE
1 RF
−1
R − R 1 ACM is the voltage gain when common
= 1 + × F E
+ inputs are used, that is Vin = V1 = V2.
CMRRTOT RE 1 + ∆RE + ∆RF CMRROPA
RE + RF
−1
1 R 1
min = 1 + F × (2TOLR ) +
CMRRTOT RE CMRROPA
V +V
Vo = Ad (V2 − V1 ) + Acm 1 2
2
Component mismatch usually determines ACM of the subtractor when discrete resistors are used and one
should use a trim pot to null ACM - with both inputs tied together, apply a large AC input and measure the AC
output on a sensitive scale while trimming the pot until the output reaches zero mV AC or reaches a minimum
level. Even with optimal setting of the pot, ACM cannot be exactly zero because of the op amp's own ACM
which has nothing to do with the external resistor mismatch. So the story is that even with perfectly matched
components, there will always be a residual ACM .
One can purchase a subtractor with all the resistors integrated and matched right on the chip for a good
CMRR. If the CMRR is not satisfactory, there is usually provisions for external trimming of ACM.
CMRRideal is with an ideal op amp whose Acm = 0 V/V and CMRRactual is for an actual op amp with
Acm=Ad/100K.
Vo R
Ad = = F REE
V2 − V1 RE
V
Acm = o for Vin = V1 = V2 RE RF
Vin V1
V1 + V2
Vo = Ad (V2 − V1 ) + Acm
2 Vo
Vo R RB
Ad = = 1+ 1
V1 − V2 R2 V1
Vo
V
Acm = o for Vin = V1 = V2 R1
Vin
V + V2
Vo = Ad (V1 − V2 ) + Acm 1 RB
2 V2
R2
V1 RB
RE RF
A-1 Vo
GUA RD
Ix
TWISTED
RD=2 5 K 30K
+ PA IR
Rsense RG A-3
-
RD=2 5 K 30K CMRR
Ix RF( t r i m) A DJ UST
RB
A-2
RE RF
V2
Input guarding: a guard drive pin with a 15K resistance is provided. This pin will drive the guard at the
common mode input voltage (that is at (V1+V2)/2) to minimise leakage currents picked up by the normal inputs
- the leakage currents are then picked up by the guard. In some applications the guard should be driven with
0Ω impedance with a unity-gain buffer whose input is connected to the guard pin of the LH0036.
Twisted pair: if remote sensing is done the wires carrying the signal will pick up stray AC signals (magnetic
induction). If the wires are twisted they will pick up about the same amount of signal which will appear as a
common mode input and will be heavily attenuated by the instrumentation amplifier if it has a good CMMR.
Shielding: In very noisy (electrical noise) environments, the twisted pair should be shielded to prevent any
pick up from outside.
In the above circuit shown, the voltage across Rsense is sensed remotely and is amplified by the
instrumentation ampifier.
50K
Vo = Ad × (V2 − V1 ) = 1+ × I X Rsense assuming ACM = 0
RG
( )
t2 RESET
Vo (t2 ) = − 1
RE C F ∫ Vin (t ) dt + Vo (t1 ) CONTROL
t1
CF
V RE
ZIF (ideal ) = in = RE Vi n
Iin
Vo
ZOF (ideal) = =0
Io Viu = 0
RB Vo
Derivation of Vo(t)
dVC Iin I
Iin = Vin / RE Vo = −VC IC = Iin = CF ⇒ dVC = dt ⇒ VC = ∫ in dt + K
dt CF CF
Iin V
Vo = −VC = − ∫ dt − K = − ∫ in dt − K = − RE1C F ∫ Vin dt + K' where K' = −K
CF RE CF
t2
Vo (t2 ) = − ( )∫ V
1
RE C F
t1
in (t )
dt + K'
Now to find the integration constant, let t2 → t1 and let us solve the following limit:
t2
Lim (V ) = V
t2 → t1
o (t2 ) o (t1 ) = Lim −
t2 → t1
( )∫ V
1
RE C F
t1
in (t )
dt + K' = K'
therefore K' = Vo (t1)
t2
When using the above formula to determine the output, Vo(t1) will always be Vo at the start of the integration
period and Vo(t2) will be Vo at end of the integration period.
Reset control
At the end of the integration period the output can be reset to zero by discharging the capacitor and keeping it
discharged by leaving the switch ON (closed). If the switch is left OFF (open), even if there is no input signal,
the capacitor will be slowly charged by a very small DC leakage current caused by the small DC input offset
voltage of the op amp (Vio) and the small input bias currents of the op amp which would cause the capacitor to
charge until saturation of the output is reached. The switch should be open only during the integration period
when the capacitor is being charged by the input current which is normally much larger than the DC leakage
current.
Vi n
t2 t2
Vo (t2 ) = − ( 1
20 K × 0,1µ )∫ Vt1
in (t) dt + Vo (t1 ) = − 500 ∫ Vin (t ) dt + Vo (t1 )
t1
20K Vo
Integration of a constant voltage (a):
∫ a × dt = a t + K ⇒ linear function, slope = a
Integration of a ramp voltage (at+b):
∫ (a t + b) dt = 0,5 a t
2
+ b t + K ⇒ parabola
-3,25V
0 to 2 ms 0 -500 x area = 0 0
4 to 6 ms -2 -500 x area = 0 -2
( )
t2
IR
The unideal integrator is actually a low-pass filter which can be used to integrate (and attenuate) HF signals
and pass LF signals unattenuated with a gain of AVF (LF)= -RF/RE. Low-frequency signals will not be integrated,
therefore use the integration formula only for frequencies ω > 10/(RF CF) where 1/(RFCF) is the cutoff
frequency of the filter in r/s.
Derivation of Vo(t)
t2
I
dVC = − dVo = C dt ⇒ Vo (t2 ) = −
CF ( )∫ I dt + V
1
CF
t1
C o (t1 ) where IC = Iin − I R =
Vin
RE
− IR
To integrate the input voltage waveform properly, the input current should be fully integrated by CF but part of it
is shunted by RF . Therefore Iin will be integrated only if IC >> IR which will occur only if the frequency of the
input waveform is high enough such that the reactance of the capacitor is much smaller than RF. For a
periodic input signal, the following applies:
Vo (t2 ) = − ()1
CF ∫ IC dt + Vo (t1 ) = −
t1
() 1
CF ∫ Iin ( AC) dt + Vo (t1 ) = −
t1
( )∫ V 1
R E CF
t1
in ( AC ) dt + Vo (t1 )
t2
( )∫ V
The formula beside can be used to determine the peak-to-
∆ Vo (PP) = Vo (t2 ) − Vo (t1 ) = − 1
RE C F in (AC ) dt peak amplitude of Vo provided that the interval t1 - t2
t1 corresponds the entire I/P waveform area either above or
below its DC component.
Notice that the DC component of Vin will never be integrated (ω = 0 for DC) because the capacitor will block
the DC component of Iin after 5 RFCF and that DC component will flow through RF. The steady-state DC
analysis, after the initial transient of 5 RFCF , can be done simply by replacing CF with an open circuit and
analysing for Vo - the result can be predicted easily, Vin(DC) will be amplified by the inverting gain of the circuit
AVF (DC)= -RF/RE.
NOTE: the above circuit will not saturate if there is no input signal as it was the case with the ideal integrator
because any small DC leakage current will be shunted by RF and will not flow through CF which will keep the
output at 0V DC .
9,1K Vo
+6V
+1,2V DC
t
area-2
-2V
-12V DC 192 mV pp
V (t)
o
t +T
For a periodic function, the average of the function is 1
the same over any one cycle of the function which
translates into:
Vin ( DC ) = Vin ( ave) =
T ∫V ()
in t
dt
t
1 1 + PW 1
PW T T
Vin ( ave ) =
T0∫ V +
in
dt + ∫
PW
V −
in
dt
=
T
Vin ∫
0
dt + V −
in ∫ dt
PW
=
T
[(
Vin+ × (t )0PW + Vin− × (t )TPW ) ( )]
V+ V−
Vin ( ave) = in (PW − 0 ) + in (T − PW ) = Vin+
T T ( )+ V ( )
PW
T
−
in
SW
T
The circuit will integrate the AC component of the input waveform only if
10 10
F〉 = = 15,9 Hz ⇒ F = 1 kHz〉15,9 Hz which is OK.
2 π RF CF 2π 100k × 1µ
t2
∆Vo (PP) = − ( )∫ 1
10 K×1µ
0
(6−1,2 ) dt = − (4,8 × 0, 4m) = −0,192VPP
where the negative sign means that Vo goes down.
∆Vo ( PP ) = − ( )∫ (1
10 K×1 µ
PW
dt = − (−3,2 × 0,6m) = +0,192VPP
1,2 − ( − 2) )
C) Initial transient
5R C =0,5s tim e
0V F F
-1 2 V D C
192 m V pp
V (t)
o
Initially, the DC voltage across CF is 0V and will go down to -12V in five time constants.
100K
0V
+ - RF
0 , 1 2 mA
1 µF Vo
10K
+ 1,2V
DC
0 , 1 2 mA
CF
Vo 0 ,1 2 m A
DC
9,1K
The 0,12 mA current is equivalent to a perfect DC current source driving the RF CF parallel
combination, therefore CF is charged to the final DC voltage (0,12m x RF) in 5RF CF.
R1 R1 +Vsup
+VE
I
Vi n L R1
R
L
ZI F VOA Vi n
RB CURRENT SINK I I
R1 Vo R1 L Cst ab L
V in +
+
ZOF
R
L
- -
I Cstab
L
RB CURRENT SOURCE I
L
I I
IL = Vin R1 L L Vi n R
L
R1
R1 Vi n - VE
ZIF =
1 − (RL R1 )
Vi n - Vsup
+ -
Vi n R1 - Vi n R1
+v e R - - ve R +
R R
Vi n Vi n
I I
Cst ab L Cst ab L
+ -
Vs - Vi n - - Vs - Vi n +
I I
L L
R R R R
+Vsup R - Vsup R
L L
The first stage of the above two circuits is a unity-gain subtractor used to generate VSUP-Vin which is applied to
the bottom of R1 thus forcing VR1 to equal Vin and IL = Vin/R1. The MOSFET is used to boost the current
capacity of the op amp. The inputs of the second op amp should be able to accommodate the voltage Vsup-
Vin : if Vsup-Vin is close to Vsup, the input voltage range of the selected
op amp must go right up to the supply rail..
RF RF
C1
CE Vo
Vo Vo
PE Vi n
RB P1
Vi n Vi n CE
PE
XC XC XC
/ AVF = 2arctan / AVF = π + 2arctan / AVF = 2arctan
P1 P1 P1
Since the magnitude of the gain is one, the output amplitude will always be equal to the input amplitude. The
adjustment range of the phaseshift will depend on the size of P1 and C and also on the frequency because XC
varies with frequency.
0V
Stability problem
The above circuit is not a stable one because of the phaseshift introduced by the feedback network :
− jX C
V − = Vo × E
phaseshift of V- w.r.t. Vo varies from 0 to -90° over frequency
R
F − jX CE
the op amp itself will introduce -180° because of the inversion, and internal compensation of the op amp
introduces an additional -90°. Additional phaseshifts will be introduced by the internal circuit of the op amp at
high frequencies. What all this means is that total phaseshift of the feedback loop will reach -360° at a
particular frequency and if the loop gain is greater than 0 dB, the circuit will self-oscillate and will therefore be
useless for differentiation of the input signal.
( )
Vin = Iin RE + Iin − jXC E ≈ − jI in X C E and
RB 0A Vo
dVin dVin
Iin = CE Vo = − Iin RF = − RF CE
0V
dt dt
The above circuit will differentiate the input signal The above circuit will differentiate the input signal
only if VRE 〈〈 VC E which occurs at only if VRE 〈〈 VC E which occurs if
Given the following design parameters, determine the components using the procedure.
Input signal: maximum frequency Fmax and maximum rate of change (dVin/dt)max
Output signal: maximum amplitude Vo max
Op amp: minimum values of saturation voltage, gain-bandwidth product (GBW) and current limit.
A) Design a stable differentiator that is used to differentiate a triangular wave whose amplitude and
frequency range are 0 to 4 VPP and 0 to 500 Hz respectively. Assume that an LF347 op amp is used with
±15V supply voltages.
LF347: GBW > 1 MHZ, IVSATI > 12V and minimum current limit ±10 mA (source and sink).
The maximum slope of the input signal will occur when both the amplitude and the frequency are maximum,
that is at 4 VPP and 500 Hz.
4 V PP max
dVin 4
dt max = ± 1m = ± 4000 V / s
1 ms
max
Input waveform
3. For stability RF 〈 RE [(0,5π CE RE GBWmin ) − 1]= 3K × [(0,5 π 30µ × 1M) − 1]= 138,4K
dVin Vo (max) 8
4. maximum O/P Vo (max) = CE RF ⇒ RF = = = 200K
dt max dVin 10n × 4000
CE
dt max
Maximum O/P cannot be achieved with differentiator alone because circuit would be unstable,
therefore let RF = 100K for a stable circuit and then add an amplifier to obtain 8VP max.
dVin
Vo (max) = CE RF 10n × 100K(4000) = 4VP
Differentiator O/P
dt max =
Amplifier gain must be 8VP / 4VP = 2 V/V Let's use an non-inverting amp with RF = RE = 20K
Final circuit
Differentiator Amplifier
1 0 nF
3K 100K 20K 20K
Vi n
LF347 V 02
LF347
V 01
B) Determine the waveforms Vo1, Iin and VRE relative to Vin for a 500 Hz and 4 VPP triangular wave
input.
dVin
Vo = −CE RF 100K × (± 4000) = + 4VP
dt max = −10n ×
dVC dVin
Iin = CE ≈ 10n × (± 4000) = ±40 µA
dt =
CE if Vin ≈ VCE
dt
+2 VP
V
in
-2V P
1 ms
+4 VP
V
O1
-4 VP
V +0,12V P
RE
-0,12V P
+40 µA P
I
in
-40 µA P
The above waveforms are valid for Vin >> VRE which is true for most of the input waveform voltages except
when Vin is close to zero volt because VRE is ±0,12VP . The actual waveforms for VO, Iin and VRE will have very
short exponential edges (non-zero rise and fall times) instead of straight vertical edges (zero rise and fall
times) as shown above. One can show that the 10%-90% rise and fall times of V01 is given by the following:
which is negligible compared to the half period of 1 ms. Therefore the waveforms can be assumed to be good
squarewaves.