You are on page 1of 46

Ứng dụng của khuếch đại thuật toán

OPAM Applications
Learning Contents

1. Non-Linear Op-amp Applications


2. Comparators

Learning Goals

1. Design the non-linear op-amp circuits and their applications


2. Understand the use of comparators in practical applications
1. Non-Linear Op-amp Applications

1.1. Integrator
1.2. Differentiator
1.3. Logarithmic & Antilog Amplifier
1.4. Multiplying & Dividing Amplifier
1. Non-Linear Op-amp Applications
1.1. Integrator

• Let’s build an integrator…

vO = k  vI dt

• Let’s start with the following insight:

vI 1
vO = vC =
C  i dt

But we need to somehow convert voltage vI to current.


1. Non-Linear Op-amp Applications
1.1. Integrator

• First try… use resistor

dvo
i =C
dvO
dt
larger the RC,
vI = vR + vO = iR + vO = RC + vO
dt smaller the vO

When vR >>vO ,
for good integrator
ωRC >> 1
1. Non-Linear Op-amp Applications
1.1. Integrator

• There’s a better way…


1. Non-Linear Op-amp Applications
1.1. Integrator

• There’s a better way…


1. Non-Linear Op-amp Applications
1.1. Integrator
• Applications

Ramp generation

1 Vm Vm
v S = Vm sin  t vO = −  V sin  tdt = cos  t = sin( 90  +  t )
RC RC
m
RC

Phase shifter
1. Non-Linear Op-amp Applications
1.1. Integrator

C
• Op-amp integrating circuits must have
extremely low dc offset and bias currents, R
Vin –
because small errors are equivalent to a dc Vout

input. + Ideal
• The ideal integrator tends to accumulate Integrator

these errors, which moves the output


toward saturation.
Rf

• The practical integrator overcomes these C

errors– the simplest method is to add a R


Vin –
relatively large feedback resistor.
Vout
+ Practical
Integrator
1. Non-Linear Op-amp Applications
1.1. Integrator
• If a constant level is the input, the current is constant. The capacitor
charges from a constant current and produces a ramp.
• The slope of the output is given by the equation: V V out
=− in

t RiC

• Example: Sketch the output wave: Rf


+2.0 V

Vin 0V t (ms)
0.0 0.5 1.0 1.5 2.0
−2.0 V
C

• Solution:
Ri
Vout V 2V Vin –
= − in = = 2 V/ms
t Ri C (10 k )( 0.1 μF ) Vout
+1.0 V +
Vout 0V t (ms)
0.0 0.5 1.0 1.5 2.0
−1.0 V
1. Non-Linear Op-amp Applications
1.2. Differentiator

• Now, in the same manner, shall


we build a differentiator…

• Let’s start with the following insights:

But we need to somehow convert current to voltage.


1. Non-Linear Op-amp Applications
1.2. Differentiator

vo=-iR
1. Non-Linear Op-amp Applications
1.2. Differentiator

• The small reactance of C at high R

frequencies means an ideal differentiator C


Vin –
circuit has very high gain for high-frequency
Vout
noise. +
Ideal
Differentiator

• To compensate for this, a small series


resistor is often added to the input. This Rf

practical differentiator has reduced high


Rin C
frequency gain and is less prone to noise. Vin –
Vout
+
Rc
Practical
Differentiator
1. Non-Linear Op-amp Applications
1.2. Differentiator
• The output voltage is given by  VC 
Vout = −   Rf C
 t 
• Example: Sketch the output wave:
+1.0 V

Vin 0V t (ms)
0.0 0.5 1.0 1.5 2.0
−1.0 V

• Solution:
Rf

0.1mF 10 k
V  Rin C
Vout = −  C  Rf C Vin –
 t  220  Vout
 −1 V 
= −  (10 k )( 0.1 μF ) = 2 V
+

 0.5 ms  10 k Rc

+2.0 V

Vout 0V t (ms)
0.0 0.5 1.0 1.5 2.0
−2.0 V
1. Non-Linear Op-amp Applications
1.3. Logarithmic and Antilog Amplifier
1. Non-Linear Op-amp Applications
1.3. Logarithmic and Antilog Amplifier
Logarithmic Amplifier y=A.ln(Bx)
• When a diode is placed in the feedback path of an inverting op-amp, the
output voltage is proportional to the log of the input voltage.
• The gain decreases with increasing input voltage; therefore the amplifier
is said to compress signals.

Iin IF
Vin
+V –
R1 F
0V

Op-amp Vout
+
1. Non-Linear Op-amp Applications
1.3. Logarithmic and Antilog Amplifier
Logarithmic Amplifier y=A.ln(Bx)
𝑉𝑖
Iin IF −𝐼 =0
Vin
𝑅1 𝑓
+V –
R1 F
0V

𝑉𝑖 𝑉𝑓
𝐼𝑓 = 𝐼𝑓 = 𝐼𝑠 𝑒 𝑛𝑉𝑇
Op-amp Vout 𝑅1
+
0 − 𝑉𝑓 − 𝑉0 = 0

𝑉𝑓 = −𝑉0

𝑉𝑖 𝑉 𝑉𝑖 𝑉
−𝑛𝑉0 −𝑛𝑉0
= 𝐼𝑠 𝑒 𝑇 =𝑒 𝑇
𝑅1 𝑅1 𝐼𝑠

𝑉𝑖 𝑉0 𝑉𝑖
ln =− 𝑉0 = −𝑛𝑉𝑇 ln
𝑅1 𝐼𝑠 𝑛𝑉𝑇 𝑅1 𝐼𝑠
1. Non-Linear Op-amp Applications
1.3. Logarithmic and Antilog Amplifier
Logarithmic Amplifier [2]
• It can be done by either diode or transistor.

• Many sensors, particularly photo-sensors, have a very large dynamic


range outputs; current from photodiodes can range over 5 decades.
• A log amp will amplify the small current more than the larger current
to effectively compress the data for further processing.
1. Non-Linear Op-amp Applications
1.3. Logarithmic and Antilog Amplifier
Logarithmic Amplifier
• When a BJT is used in the feedback path, the output is referred to the
ground of the base connection rather than the virtual ground. This
eliminates offset and bias current errors.
𝑉𝑖𝑛
𝑉𝑜𝑢𝑡 = − 0.025 V ln
𝐼𝑆 𝑅1
Iin IC
• Log amplifiers are available in IC Vin –
form with even better performance R1 VBE
+
than the basic log amps shown here. 0V

• For example, the MAX4206 Op-amp Vout
operates over 5 decades and can +
measure current from 10 nA to 1 mA.
1. Non-Linear Op-amp Applications
1.3. Logarithmic and Antilog Amplifier
Logarithmic Amplifier

• For the circuit shown, the equation for Vout is


𝑉𝑖𝑛
𝑉𝑜𝑢𝑡 ≅ − 0.025 V ln
𝐼S 𝑅1
• Example:
What is Vout? Assume Vin = 11V R1 = 1kΩ
IS1 = 50 nA, IS2 = 1000 nA)
Iin IC
• Solution: Vin –
11 V R1 VBE
𝑉𝑜𝑢𝑡1 ≅ − 0.025 V ln +
50 nA 1.0 kΩ
0V

= −307 mV
Op-amp Vout
11 V +
𝑉𝑜𝑢𝑡2 ≅ − 0.025 V ln
1000 nA 1.0 kΩ
= −233 mV
1. Non-Linear Op-amp Applications
1.3. Logarithmic and Antilog Amplifier
Antilog Amplifier
• An antilog amplifier produces an output proportional to the input
raised to a power. In effect, it is the reverse of the log amp.
• The diode (or transistor) is place in the input path.
• For example, the Datel LA-8048 is a log amp and the Datel LA-8049
is its counterpart antilog amp. These ICs are specified for a six
decade range.

IC
• Vin + –
+
VBE Rf

0V

Op-amp Vout
+
1. Non-Linear Op-amp Applications
1.3. Logarithmic and Antilog Amplifier
Antilog Amplifier
𝑉0
− = 𝐼𝑓
𝑅1
𝑉𝑓
𝐼𝑓 = 𝐼𝑠 𝑒 𝑛𝑉𝑇

𝑉𝑓
𝑉0 = −𝑅1 𝐼𝑠 𝑒 𝑛𝑉𝑇

𝑉𝑓
𝑉0 = −𝑅1 𝐼𝑠 𝑒 𝑛𝑉𝑇

𝑉𝑖
𝑉𝑖 = 𝑉𝑓 𝑉0 = −𝑅𝑓 𝐼𝑠 𝑒 𝑛𝑉𝑇
1. Non-Linear Op-amp Applications
1.4. Multiplying and Dividing Amplifier
Multiplying Amplifier

• By combining a summing circuit with logarithmic and


antilogarithmic circuits, we can multiply two voltages together.
• lnA + lnB = ln(A.B)
R R
ln ln A
A
amp

R antilog
ln AB
B amp
amp ln B +
ln A + ln B

Think about the square amplifier ??


1. Non-Linear Op-amp Applications
1.4. Multiplying and Dividing Amplifier
Square Amplifier

R R
ln ln A
A
amp

R antilog
ln A*A
A amp
amp ln A +
ln A + ln A
1. Non-Linear Op-amp Applications
1.4. Multiplying and Dividing Amplifier
Dividing Amplifier

• Combining a difference amplifier with log/antilog circuits


allows us to divide to voltages.
• lnB- lnA = ln(B/A) R

A ln R
amp – antilog
B/A
amp
B ln +
amp R
R
2. Comparators

2.1. Comparator without Positive Feedback


2.2. Comparator with Positive Feedback
2. Comparators
2.1. Comparator without Positive Feedback
• The op-amp is often used as a comparator.
• The output voltage exhibits two stable states.
• The output state depends on the relative value of one
input voltage compared to the other input voltage.

Threshold voltages
vi  VR ,
vi  VR ,
VO = VO H
VO = VO L
vi (= VR ) = VTH
2. Comparators
2.1. Comparator without Positive Feedback

𝑉ℎ = 𝑉𝑃 −𝑉𝑁

VOH VOH
Vh > 0 Vh > 0

Vh < 0 Vh < 0
VOL VOL
2. Comparators
2.1. Comparator without Positive Feedback

VOH

VOL
2. Comparators
2.1. Comparator without Positive Feedback
What is the threshold voltage ?

R1
E1
R2
Vi _
Vo vi (= VR ) = VTH

E2 +

𝑅1 𝑉𝑖 + 𝑅2 𝐸1
𝑉𝑃 = 𝐸2 𝑉𝑁 =
𝑅1 +𝑅2

𝐸2 (𝑅1 +𝑅2 ) − 𝑅2 𝐸1
𝑉𝑅 = 𝑉𝑖 (𝑉ℎ=0) = 𝑉𝑖 (𝑉𝑃 =𝑉𝑁 ) =
𝑅1
2. Comparators
2.2. Comparator with Positive Feedback

What’s the difference?

Positive feedback drives op amp


into saturation: Vout→Vsaturation
2. Comparators
2.2. Comparator with Positive Feedback
• Positive feedback is often used with comparator circuits. The
feedback is applied from the output to the non-inverting input
of the op amp.
2. Comparators
2.2. Comparator with Positive Feedback
The Comparator

Without positive feedback (without hysteresis)


2. Comparators
2.2. Comparator with Positive Feedback
When vi(<< 0)< VP, vh > 0 → vO=VOH>0,

Rf 𝑉𝑇𝐻1 = 𝑉𝑖 (𝑉𝑃=𝑉𝑁 ,𝑉𝑜=𝑉𝑂𝐻)


R
E1 + 𝑅𝑓 𝐸1 + 𝑅𝑉𝑜𝐻
Vo
⇒ 𝑉𝑇𝐻1 =
𝑅𝑓 + 𝑅
Vi -

𝑅𝑓 𝐸1 + 𝑅𝑉𝑜
𝑉𝑁 = 𝑉𝑖 𝑉𝑃 =
𝑅𝑓 + 𝑅
2. Comparators
2.2. Comparator with Positive Feedback
When vi(>> 0)> VP, vh < 0 → vO=VOL<0,

RF 𝑉𝑇𝐻2 = 𝑉𝑖 (𝑉𝑃 =𝑉𝑁 ,𝑉𝑜=𝑉𝑂𝐿 )


R
E1 + 𝑅𝑓 𝐸1 + 𝑅𝑉𝑜𝐿
Vo
⇒ 𝑉𝑇𝐻2 =
𝑅𝑓 + 𝑅
Vi -

𝑅𝑓 𝐸1 + 𝑅𝑉𝑜
𝑉𝑁 = 𝑉𝑖 𝑉𝑃 =
𝑅𝑓 + 𝑅
2. Comparators
2.2. Comparator with Positive Feedback

RF

R
E1 +
Vo VTH2 VTH1

Vi -
2. Comparators
2.2. Comparator with Positive Feedback
Comparator with Hysteresis
• Sometimes the input signal to a comparator may vary due to noise
superimposed on the input. The result can be an unstable output.
• To avoid this, hysteresis can be used.

• Hysteresis is incorporated by
adding regenerative (positive)
feedback, which creates two VUTP

switching points: the upper trigger Vin 0 t


point (UTP) and the lower trigger VLTP
point (LTP).
+Vout (max)
• After one trigger point is crossed,
it becomes inactive and the other –Vout(max)
one becomes active.
2. Comparators
2.2. Comparator with Positive Feedback
The Comparator

Why is hysteresis useful?

e.g., analog to digital


2. Comparators
2.2. Comparator with Positive Feedback
Comparator with Hysteresis

• A comparator with hysteresis is also called a Schmitt trigger.


The trigger points are found by applying the voltage-divider rule:
𝑅2 𝑅2 𝑅2
𝑉UTP = 𝑉 𝑉LTP = 𝑉 = −𝑉𝑂𝐻
𝑅1 + 𝑅2 𝑂𝐻 and 𝑅1 + 𝑅2 𝑂𝐿 𝑅1 + 𝑅2

• Example: What are the trigger


points for the circuit if the maximum Vin –
output is ±13 V? Vout
+ R1
• Solution: 47 k

10 k
VUTP =
R2
R1 + R2
( +Vout ( max ) ) =
47 k + 10 k
( +13 V ) R2
10 k
= 2.28 V
By symmetry, the lower trigger point = −2.28 V.
2. Comparators
2.2. Comparator with Positive Feedback
xs(t)
xq(t)

Q
ΔVr

t
Ts
Simultaneous or flash analog-to-digital converters (Flash ADC)
• Use 2n-1 comparators to convert an analog input to a digital value
for processing
• Flash ADCs are a series of comparators, each with a slightly
different reference voltage.
2. Comparators VREF

Op-amp
R comparators
Vin
2.2. Comparator with Positive
(analog) Feedback

+

Flash ADC R
+

Priority
R encoder
+
VIN (7)
+ VOUT –
(6)
VREF - R (5) D2
+ (4) D1 Binary
– (3) D0 output
(2)
R (1)
+
(0)

If Output
R
+
VIN > VREF High Enable
– input

VIN < VREF Low R


+

R
2. Comparators
2.2. Comparator with Positive Feedback
Flash ADC
Advantages Disadvantages
• Very fast • Needs many parts
(255 comparators for
8-bit ADC)
• Lower resolution
• Expensive
• Large power
consumption
Quiz 1.

OX Example Select
Quiz Number 1 Quiz Type

Question Hysteresis is incorporated in a comparator by adding

A. a capacitor in series with the input


B. capacitors from the power supply to ground
Example C. a small resistor in series with the input
D. positive feedback

Answer D

Feedback
Quiz 2.
OX Example Select
Quiz Number 2 Quiz Type

A differentiator circuit produces an output that is proportional to


Question
the negative of the
A. sum of the inputs
B. rate of change of the input
Example C. area under the curve of the input
D. none of the above

Answer B

Feedback
Summary
1. Integrator: An inverting amplifier that has a capacitor in the feedback path.

2. Differentiator: An inverting amplifier that has a capacitor in the input path.

3. Logarithmic: An inverting amplifier that has a diode (or transistor) in the feedback path.

4. Antilog: An inverting amplifier that has a diode (or transistor) in the input path.

5. Comparator: nonlinear op-amp circuit that compares two input voltages and produces an output
state that indicates which one is greater

6. Positive Feedback: Drives the op-amp into the saturation

7. Hysteresis: Characteristics of a circuit in which two different trigger levels produce an offset or
lag in the switching action.

8. Schmitt trigger: A comparator with built-in hysteresis.


Next lesson guide…

Lesson 11: Op-Amp Applications (II)

Reference
[1] Electronics devices and Circuits theory – Robert Boylestad, Louis Nashelsky, Prentice Hall, 11th edition
[2] Fundamental of Microelectronics – Behzad Razavi, Wiley, Preview Edition 2006
[3] Electronics Fundamentals : Circuits, Devices, and Applications - Thomas L. Floyd, David. L. Buchla,
Pearson, 8th Edition

You might also like