You are on page 1of 16

AN1353

Op Amp Rectifiers, Peak Detectors and Clamps

Author: Dragos Ducu,


Microchip Technology Inc. VOUT

INTRODUCTION AC
D1 V

This application note covers a wide range of RL


t
applications, such as half-wave rectifiers, full-wave
rectifiers, peak detectors and clamps. Many of the
VIN
circuits are simple in terms of component count, but VOUT
they play important roles in overall systems design,
such as:
AC to DC Power Conversion FIGURE 2: Positive Half-Wave Rectifier.
Automatic Gain Control Loops
Power Monitoring Applications
AM Demodulator V
VOUT

BASIC RECTIFIERS t
The basic rectifiers have been designed with diodes. RL VIN
Figure 1 shows such a simple series circuit, driven by VOUT
an AC source. When the diode is reverse-biased, it
acts as a very high impedance device. Figure 1shows
a negative half wave rectifier. It outputs nearly the full
input voltage across the diode when reverse biased. A
similar circuit in Figure 2 shows a positive half-wave
rectifier. If a full-wave rectifier is desired, more diodes FIGURE 3: Full-Wave Rectifier.
must be used to configure a bridge, as shown in
Figure 3. The input signal must be larger than the Choosing the Components
voltage across the diode to ensure that the diode is
forward biased. SELECTING THE DIODE
When choosing the diode, the most important
parameters are the maximum forward current (IF), and
D1 VOUT the peak inverse voltage rating (PIV) of the diode. The
peak inverse voltage is the maximum voltage the diode
V
can withstand when it is reverse-biased. If this voltage
AC is exceeded, the diode may be destroyed. The diode
RL must have a peak inverse voltage rating that is higher
t than the maximum voltage applied to it in an
application. In many diode data sheets, PIV is referred
VIN to as peak reverse voltage (PRV).
VOUT

FIGURE 1: Negative Half-Wave


Rectifier.

2011 Microchip Technology Inc. DS01353A-page 1


AN1353
The peak inverse voltage of the diode will be equal to: TABLE 1: ADVANTAGES AND
DISADVANTAGES OF THE
EQUATION 1: CIRCUIT
Advantages Disadvantages
V PIV ( rating ) VPK ( max ) + VD ( on )
- Uses few compo- - Poor accuracy
Where: nents
VPIV = Peak inverse voltage - Simple design - The rectified voltage depends
on the diode voltage threshold
VPK(max) = Maximum peak amplitude
VD(on) = Diode voltage on when in
1.5

Magnitude (V)
0.5
Every diode has a parasitic capacitance and, by
default, has a time charge storage. This charge storage 0
mechanism is nonlinear, leading to a nonlinear
-0.5
capacitance. This effect is very important because the
nonlinearity of the diode can generate harmonics. For -1 VOUT
example, the output voltage becomes negative for a VIN
-1.5
short time. This period is called reverse recovery time.
Time (1 ms/div)
During the transition, the diodes parasitic capacitance
will interact with the circuit resistors to modify the FIGURE 4: Negative Half-Wave
circuits behavior.
Rectifier Sample.
For most general purpose applications, low power
signal diodes such as 1N4148, are adequate. For high
accuracy applications, where offset errors and reverse 1.5
diode leakage current are critical, a low leakage FET
1
transistor can be used as a diode (short Drain and
Magnitude (V)

Source together), such as 2N4117A. In applications 0.5


where speed is important, silicon Schottky barrier
0
diodes are worth considering, since they have a low
forward ON voltage of only 0.4V and are fast. -0.5

SELECTING THE RESISTOR -1 VOUT


VIN
The resistor is selected based on the load current. -1.5

One limitation is the value of load resistor. The value of Time (1 ms/div)

the load resistor must be less than the diode resistance


when in reverse bias. The parasitic capacitance of the FIGURE 5: Positive Half-Wave Rectifier
diode interacts with the load resistor causing a time Sample.
constant. If this constant is large, the output voltage will
have a delayed recovery.
1.5

Advantages and Disadvantages 1


Magnitude(V)

The major disadvantage of these circuits is the 0.5

nonlinearity of the diodes. If the input signal is smaller 0


than the threshold voltage of the diode, the signal
-0.5
cannot be recovered. To reduce the threshold voltage
of the diode and improve linearity, we need to include -1 VOUT
VIN
the diode into the feedback loop of the operational
-1.5
amplifier. Time (1 ms/div)

Practical Examples
Figures 4 6 show practical samples when using the FIGURE 6: Full-Wave Rectifier Sample.
1N4001 diode and RL = 1 k. The frequency is
f = 1 kHz.

DS01353A-page 2 2011 Microchip Technology Inc.


AN1353
ACTIVE HALF-WAVE RECTIFIER Choosing the Components
The simplest op amp half-wave rectifier is shown in
SELECTING THE OP AMP
Figure 7. When the VIN is positive, the diode is forward
biased; the signal can be found on the RL load. When When selecting the op amp, two important
the VIN is negative, the diode is non-conductive, and characteristics must be considered:
the output signal is ground (0V). Gain Bandwidth Product
Slew Rate (SR)
- VOUT The minimum gain bandwidth product requirement can
VIN + be estimated in Equation 2.
AO1 D1 RL
EQUATION 2:

f = 10 G f
GBWP INPUT
FIGURE 7: Op Amp Half-Wave Rectifier. Where:
The big advantage of this circuit is represented by the fGBWP = Gain bandwidth product
small threshold voltage and linearity. This is more
G = DC gain
convenient than the basic rectifiers, since this circuit is
able to rectify signals smaller than the diode threshold fINPUT = Maximum input frequency
voltage.

The next parameter that needs to be considered is the


1.50 slew rate (SR). This is the maximum time rate change
1.00
at the output of the op amp; it shows how fast the output
can follow the input signal. The SR parameter can be
Magnitude (V)

0.50 found in the selected op amps data sheet.


0.00 The full bandwidth product (FPBW) defines the highest
frequency sine wave that will not be distorted by the
-0.50
slew rate limit.
-1.00 VOUT

-1.50
VIN
EQUATION 3:
Time (1 ms/div)
V OUT
SR = -----------------
FIGURE 8: Circuit Behavior on T max
Low Frequency. SR
FPBW = -------------------------------------
This circuit has limitations. The rectifiers speed is V OUT ( p p )
limited by the op amp bandwidth. This effect is
illustrated in Figure 9, where the rectified output signal
overlaps the input signal. The maximum frequency SELECTING THE DIODE AND THE RESISTOR
that can be rectified is determined by the slew rate of Refer to the sections Selecting the Diode and Selecting
the op amp. The Resistor, in the Basic Rectifiers section, for details
on choosing the appropriate components.
1.5 VOUT

1 VIN Advantages and Disadvantages


Table 2 shows the main advantages and
Magnitude (V)

0.5
disadvantages of a half-wave rectifier.
0
TABLE 2: ADVANTAGES AND
-0.5
DISADVANTAGES OF THE
-1 CIRCUIT
-1.5 Advantages Disadvantages
Time (50 s/div) - Uses few components - Load dependant
FIGURE 9: Output Limitation on - Good linearity - Limited op amp bandwidth
High-Frequency Input Signals.

2011 Microchip Technology Inc. DS01353A-page 3


AN1353
Practical Example Improved Op Amp Half-Wave Rectifier
This example of a half-wave rectifier uses an Figure 12 shows a half-wave rectifier circuit with
MBRM110LT3 Schottky diode and the MCP661 op improved performance. The additional diode prevents
amp with different load resistors. For this example, the the op amp's output from swinging to the negative
value of the load resistor is less than 1 k, to avoid supply rail. The low level linearity is also improved.
glitches in the negative cycle. The Schottky diode is Although the op amp still operates in open-loop at the
chosen for higher speed than a small signal silicon point where the input swings from positive to negative
diode. Figures 10 and 11 below are examples of a or vice versa, the range is limited by the diode and the
1 kHz input signal and different load resistors. Note that load resistor.
for the small values of the resistor (i.e. 100), the glitch When the input signal is positive, D1 is open and D2
is smaller. conducts. The output signal is zero because one side
of R2 is connected to the virtual ground, with no current
through it. When the input is negative, D1 conducts and
RL = 100 Ohm
D2 is open. The output follows the positive input cycle
0.2
with a gain of G = -R2/R1.
0.15
0.1
Magnitude (V)

0.05 R2
0
-0.05
-0.1 VIN R1 D2
VOUT - VOUT
-0.15 VIN +
-0.2 AO1 D1
Time (500 s/div)
R3 RL

FIGURE 10: Half-Wave Rectifier with


RL = 100.

FIGURE 12: Have-Wave Rectifier Circuit


RL = 1 k:
0.2 Improvement.
0.15 This type of circuit also has limitations. The input
0.1 impedance is determined by the input resistor. It must
Magnitude (V)

0.05 be driven from a low-impedance source. Likewise, the


0 input resistor R3 shown in Figure 12 is also optional,
-0.05 and is needed only if there is no DC path to ground.
-0.1
-0.15
VOUT
VIN
Choosing the Components
-0.2 Refer to the section Selecting the Op Amp in the Active
Time (500 s/div) Half-Wave Rectifier section, and to the section
Selecting the Diode in the section Basic Rectifiers, for
FIGURE 11: Half-Wave Rectifier with details on choosing the appropriate components.
RL = 1 k.
SELECTING THE RESISTORS
The DC gain is determined in Equation 4:

EQUATION 4:
R
2
G = ------
R
1
where G = DC gain

DS01353A-page 4 2011 Microchip Technology Inc.


AN1353
Resistors R1 and R2 are selected based on the For an input frequency under 600 kHz, the circuit
application design: performs properly. For frequencies larger than this
For a general purpose application, the resistors value, the output signal is distorted.
value should be between 1 k and 100 k.
For a high speed application, the resistors value 1
should be between 100 and 1 k (consume 0.8
more power) 0.6
For portable applications between 1 M and 0.4

Magnitude (V)
10 M. 0.2
0
The R3 is added to minimize the error caused by the -0.2
input bias current. -0.4
-0.6
VOUT
EQUATION 5: -0.8 VIN
-1
R R
1 2 Time (0.2 s/div)
R 3 = --------------------
R1 + R2
FIGURE 14: Circuit Behavior with
600 kHz Input Frequency.
Advantages and Disadvantages To design a negative half-wave rectifier using the same
Table 3 shows the main advantages and components, we only have to invert the diodes, as
disadvantages of an improved half-wave rectifier. shown in the circuit in Figure 15.

TABLE 3: ADVANTAGES AND


DISADVANTAGES OF THE R2
CIRCUIT
Advantages Disadvantages VIN R1 D2
- D1 VOUT
- Good linearity - Uses more components +
AO1
- The second diode - Low impedance R3 RL
prevents the op amp from because of R1
swinging into the negative
cycle

Practical Example
FIGURE 15: Negative Half-Wave
The example in Figure 13 is based on the circuit in Rectifier.
Figure 12, and uses the MCP661 op amp, two
MBRM110LT3 Schottky diodes, RL = 1 k, R2 =10 k
and R1 = 1 k. The input frequency is 1 kHz. 0.2
VOUT
0.15 VIN

0.1
RL = 1 k:
Magnitude (V)

0.2 0.05
0.15 0
0.1
Magnitude (V)

-0.05
0.05 -0.1
0
-0.15
-0.05
-0.2
-0.1
VOUT Time (1 ms/div)
-0.15 VIN

-0.2
FIGURE 16: Negative Cycle Rectifier
Time (1 ms/div)
Sample.
FIGURE 13: Improved Half-Wave
Rectifier with RL = 1 K.

2011 Microchip Technology Inc. DS01353A-page 5


AN1353
ACTIVE FULL-WAVE RECTIFIER SELECTING THE RESISTORS
Full-wave rectifiers are more complex, compared to the When selecting the resistors for the circuit in Figure 17,
half-wave circuits. Full-wave rectifiers output one -GM must be equal to GP. The result is shown in
polarity of the input signal and invert the other. A circuit Equation 7:
for a full-wave rectifier is illustrated in Figure 17. EQUATION 7:

R2 ( R1 + R2 + RL ) = R1 RL
R2

V+
VIN R1 R3 is added to minimize the error caused by the input
- VOUT
bias current. Refer to the section Selecting the
+
AO1 D1 Resistors, in the section Improved Op Amp Half-Wave
R3 RL Rectifier, for details on the selection of the resistor.

Advantages and Disadvantages

TABLE 4: ADVANTAGES AND


FIGURE 17: Full-Wave Rectifier Circuit. DISADVANTAGES OF THE
CIRCUIT
When in the negative cycle of the input signal, diode D1
is forward biased, and the output voltage follows the Advantages Disadvantages
input. When the input signal (VIN) is positive, D1 is non- - Uses only one op amp - Low input resistance
conductive and the input signal passes through the - Uses a small number - The source and load
feedback resistor (R2), which forms a voltage divider of external components resistance affect rectifying
with R1 and RL. Equation 6 shows the calculation for
the output voltage: - Uses a single supply - A reactive load (capacitor
or coil) cannot be tolerated
without a buffer
EQUATION 6:
- Has a low impedance
V OUT = V IN GM ; V IN < 0 because of R1

VOUT = V IN GP ; VIN > 0 Practical Example


This design uses an MCP661 and a general purpose
Where: R2 diode rectifier 1N4148. The input frequency is 1 kHz.
GM = --------- Table 5 shows the resistor values recommended to
R1
obtain the same amplitude with each input cycle:
RL
GP = ----------------------------------- TABLE 5: VALUES FOR RECTIFIED,
R1 + R2 + RL EQUAL AMPLITUDE
Resistor Value (k)
When -GM = GP, the full-wave output is symmetric. R1 2
Note that the output is not buffered, so it should be
R2 1
connected only to a circuit with high impedance, much
higher than RL. RL 3

The values of the resistors can be scaled depending on


Choosing the Components the application: high speed, portable or general
Refer to the section Selecting the Diode in the section purpose. For more details, refer to the section
Basic Rectifiers, and to the section Selecting the Op Selecting the Resistors, in the section Improved Op
Amp in the section Active Half-Wave Rectifier, for Amp Half-Wave Rectifier. Figure 18 shows the result of
details on choosing the appropriate components. the full-wave rectifier circuit simulation.

DS01353A-page 6 2011 Microchip Technology Inc.


AN1353
EQUATION 8:
0.2
V O1 = V IN G, when V IN > 0
0.15
0.1 Where:
Magnitude (V)

0.05 R1
G = ---------
0 R2
-0.05
-0.1 VOUT V = 0, when V <0
O1 IN
VIN
-0.15
-0.2 Equation 9 calculates the output voltage:
Time (1ms/div)
EQUATION 9:
FIGURE 18: Full-Wave Rectifier Circuit R 5 V O1 R5 V IN
Simulation with the Recommended Values of the V = ------------------------ -----------------------
OUT R R
Resistors. 3 4

TWO STAGE OP AMP FULL-WAVE Choosing the Components


RECTIFIER
To obtain a good performance for the two stage circuit,
Another full-wave rectifier can be obtained by including the tolerance of resistors R1 to R5 should be 1%, or
an adder to the single-wave rectifier, which subtracts better; this makes the gains (for negative and positive
VIN from the rectified signal. The rectifier stage consists VIN) match well. The circuit in Figure 19 has a good
of AO1, R1, R2, D1 and D2, while the adder stage linearity, down to a couple of mV at low frequencies, but
consists of AO2, R3, R4 and R5. the high-frequency response is limited by the op amp
bandwidth.
R2 Refer to the section Selecting the Diode in the section
Basic Rectifiers, and to the section Selecting the Op
D2
Amp in the section Active Half-Wave Rectifier, for
VIN R1 R3 R5 details on choosing the appropriate components.
- D1
+
VO1 SELECTING THE RESISTORS
AO1 VOUT
-
R4 + R1 and R2 give the gain for the first stage; R3 and R5
AO2 for the second stage.
R6
To get the same amplitude for both cycles, choose
R1 = R3 = R4 and R2 = R5 = 2 x R1.

EQUATION 10:
FIGURE 19: Two Stage Op Amp Full- R (V +V )
5 O1 IN
Wave Rectifier Circuit. V
OUT
= ----------------------------------------------
R1
When VIN is positive, D1 is forward-biased and D2 is
reverse-biased, while when VIN is negative, D2 is
forward-biased and D1 is reversed-biased. The second R6 is added to minimize the error caused by the input
stage adds VIN and VO1 and inverts the polarity of the bias current. Refer to the section Selecting the
resulting signal. The output voltage for the positive Resistors, in the section Improved Op Amp Half-Wave
cycle of the input voltage is calculated in Equation 8. Rectifier, for details on choosing the appropriate
components.
For the negative cycle of the input voltage (VIN), D1
blocks the signal, while D2 conducts the whole current If a greater sensitivity and high frequency is desired, it
coming from the input. In this case, the output voltage is recommended to use lower resistance value, high
for the first stage is VO1 = 0V. speed diodes and faster op amps.
For the positive cycle of the input signal, VO1 is
negative and, in this case, the adder stage combines
the input signals with equal amplitudes, one positive
and one negative.

2011 Microchip Technology Inc. DS01353A-page 7


AN1353
Advantages and Disadvantages BASIC PEAK DETECTORS
Table 6 shows the advantages and disadvantages of a The purpose of this circuit is to detect the maximum
two stage op amp full-wave rectifier. magnitude of a signal over a period of time. The
operation of a peak detector can be illustrated using a
TABLE 6: ADVANTAGES AND simple diode and capacitor, as shown in Figure 22.
DISADVANTAGES OF THE
CIRCUIT
VIN D1 VOUT
Advantages Disadvantages
- Very good performance - Uses two op amps C1
R1
- Low output impedance - Low input resistance
- Multiple passive
components

Practical Example
FIGURE 22: Basic Peak Detector
This example uses the MCP6021 device, two 1N4148 Operation.
diodes, R1 = 1 k, R2 = 2 k, R3 = 1 k, R4 = 1 k,
and R5 = 2 k. The input signal frequency is f = 1 kHz. Choosing the Components
Figure 20 shows the result of the simulation for the full-
When choosing the resistor, the limits must be
wave rectifier shown in Figure 19:
considered: rdf << R1 << rdr, where rdf is the resistance
of the diode when forward biased, and rdr is the
1 resistance of the diode when reverse biased.
0.8
The capacitor is charged with the time constant
0.6
1 = rdf x C1, and will be discharged with the time
0.4
Magnitude (V)

constant 2=R1 x C1.


0.2
0 The variation of output voltage will be:
-0.2
-0.4 EQUATION 11:
-0.6 VOUT V PEAK
-0.8 VIN
V = -------------------
-1 f 2
Time (1 ms/div) Where:
VPEAK = Amplitude maximum value
FIGURE 20: Full-Wave Rectifier Circuit
f = Input signal frequency
Simulation.
2 = Discharge time constant
For more topologies of the full-wave rectifier, refer to
the Appendix section. Generally the minimum of 2 is 2 = 10/f.
Figure 21 shows the behavior of the circuit at the This is the case for a sine signal, but we may need to
maximum frequency tolerated. detect the peak for other types of signals, such as
square waves, sensors or modulated signals.
1 For example, on an amplitude modulated signal, the
0.8 capacitor voltage discharges according to:
0.6
0.4 EQUATION 12:
Magnitude (V)

0.2
VDROP = VPEAK exp -----
0
t

-0.2 2
-0.4 Where: 2 = time constant
-0.6
VOUT
-0.8 VIN This produces a negative peak clipping that distorts the
-1 output. To avoid the negative peak clipping, choose a
Time (10 s/div) smaller value for 2, but to reduce the ripple, 2 must be
as large as possible. In practice we choose a value
FIGURE 21: Circuit Behavior when Input between: 1/fm >> 2 >> 1/fc, where fm is the modulation
frequency and fc is the carrier frequency.
Frequency = 100 kHz.

DS01353A-page 8 2011 Microchip Technology Inc.


AN1353
Advantages and Disadvantages
R2 R4
Table 7 identifies some of the advantages and
disadvantages of the peak detectors. VOUT
- R3 -
VIN +
TABLE 7: ADVANTAGES AND R1
+
AO1
D1 AO2
R5 C1
DISADVANTAGES OF THE
CIRCUIT
Advantages Disadvantages
- Uses few - The output voltage is one
components diode drop below the actual out- FIGURE 24: Two-Stage Peak Detector
put Circuit.
- Very low cost - The input impedance is The time constant for charging C1 is very short, and
variable due to the input primarily consists of the C1 and the forward resistance
characteristics of the diode of the diode. Thus, C1 charges almost instantly to the
- The discharge is very slow due peak output of the input signal (VIN). When VIN goes
to the leakage current below the output signal (VOUT), diode D1 becomes
reverse-biased. The only discharge path for C1 is
Practical Example through R5, via leakage or op amp bias currents. The
discharge time constant is much longer than the charge
The simulation in Figure 23 shows that this circuit does time constant, so C1 holds its charge and presents a
not reach the peak amplitude of the input signal, but is steady input voltage to AO2 that is equal to the peak
good for quickly following sudden changes in the amplitude of the input signal. AO2 is a buffer amplifier
signal's amplitude. However, it has significant ripple. that prevents unintentional discharging of the C1,
This example uses a 1N4148 diode, C1 = 1 F, caused by the loading impedance of the following
R1 = 100 k and f = 1 kHz. circuit. If the R5C1 time constant is too short, then the
voltage on C1 will not be constant, and will have a high
18
value of ripple. On the other hand, if the R5C1 time
VOUT

16 VIN constant is too long, the circuit cannot respond quickly


14
to the changes in the input amplitude.
Magnitude(V)

12 The lower frequency limit is the frequency that causes


10 the ripple voltage to exceed the maximum allowable
8 level. It can be estimated by applying the basic
6 discharge equation for capacitors (Equation 13):
4
2 EQUATION 13:
0 1
f = ----------------------------------------------------------
Time (20 ms/div) O VV
o
R C ln ----------------
5 1 VV
c
FIGURE 23: Peak Detector Simulation.
Where:
Two-Stage Active Peak Detector V = Capacitors discharge voltage
In many applications, the voltage drop is not desired. VC = Minimum allowable voltage on the
To avoid this, we need to include a diode into the loop capacitor
of the op amp, as shown in Figure 24. VO = Initial charge of the capacitor
A two-stage peak detector is shown in Figure 24. In this
The response time describes how quickly C1 can
circuit, AO1, R1, R2, D1, R5 and C1 represent the first
respond to the decreases in the magnitude of the input
stage, while AO2, R3 and R4 is the second stage. AO1
signal. This can be computed from the basic discharge
charges the capacitor up to the peak value, and AO2
equation. However, if we assume that the capacitor is
acts as an output buffer. AO1 removes the variability of
charged to peak and discharges towards an eventual
the input impedance, while AO2 removes the variability
value of 0, we can use the simplified form
of the output impedance.
(Equation 14).

2011 Microchip Technology Inc. DS01353A-page 9


AN1353
EQUATION 14: For more topologies on the peak detectors, refer to the
Appendix.
V
PK ( old )
t = R C ln ---------------------------
R 5 1 V
PK ( new )
BASIC CLAMP
Where: A clamp is used to shift the DC reference level of the
input signal. Figure 26 shows a basic diode clamp. Its
VPK(old) = Peak input signal amplitude purpose is to shift the average or the DC level of the
before the decrease input signal without altering the wave shape.
VPK(new) = Peak input signal amplitude after When VOUT > VREF and the input signal is fast, D1 is off,
the decrease C1 acts like a short circuit, and VOUT looks like the
input. With slow signals, C1 acts like an open circuit and
VOUT will exponentially decay towards VREF.
Choosing the Components
When VOUT < VREF, VOUT becomes VREF - VD(on), D1
Refer to the section Selecting the Diode in the section turns on and C1 is forced to accept a new voltage that
Basic Rectifiers, and to the section Selecting the Op shifts the input to the desired minimum VOUT.
Amp, in the section Active Half-Wave Rectifier, for
details on choosing the appropriate components. For low-amplitude signals, the diode drop becomes
significant. In fact, the circuit cannot be used at all if the
SELECTING THE RESISTORS peak input signal is below the diode threshold, since
the diode cannot be forward-biased. An active clamp is
R3 limits the current into the positive input of the AO2
needed for signals with an amplitude of millivolts.
when power is disconnected from the circuit. Without
this resistor, the AO2 may be damaged as C1 Figure 26 shows a negative clamp; it clamps the
discharges through it. For capacitors smaller than 1 F, negative extreme of the signal to (near) VREF.
resistor R3 can normally be omitted. Resistor R4 Reversing the diode creates a positive clamp.
minimizes the effects of the bias currents in AO2.
Resistor R2 limits the current into the negative input of C1
AO1 when power is removed from the circuit. VOUT
There are two conflicting circuit parameters that affect
D1
the choice of the values for R5 and C1: allowable ripple AC R1
voltage across C1 and response time. In general, a VREF
faster response time leads to greater ripple.
Refer to the section Selecting the Resistors, in the
section Improved Op Amp Half-Wave Rectifier, for
details on choosing the appropriate components.
FIGURE 26: Basic Diode Negative
Practical Example Clamp.
Figure 25 illustrates the simulation result for one peak
detector, realized with MCP661 device, diode 1N4148, Practical Example
R5 = 100 k and C1 = 1 F. Input signal has the Figure 27 shows a simulation for the above schematic
frequency equal to 1 kHz. with VREF = 2V, C1 = 1 nF and diode 1N4148. The
input signal has the frequency equal to 500 Hz.
0.2
0.19 4
VOUT
0.18 3.5 VIN
VOUT
Magnitude (V)

0.17 VIN 3
0.16
Magnitude (V)

2.5
0.15 2
0.14 1.5
0.13
1
0.12
0.5
0.11
0
0.1
-0.5
Time (1 ms/div) -1

Time (10 ms/div)

FIGURE 25: One Peak Detector


Simulation Results. FIGURE 27: Basic Diode Clamp
Circuit Simulation.

DS01353A-page 10 2011 Microchip Technology Inc.


AN1353
Active Clamp EQUATION 15:
To reduce the threshold voltage of the diode, and for 16.7
C1 = -------------------
linearization, the circuit needs a diode in the feedback R f low
loop of the operational amplifier.
Where:
Figure 28 shows an op amp clamp where the input
signal is positive and D1 is forward-biased. The diode flow = minimum frequency desired
converts the circuit into a voltage follower with
reference to the positive input. This means that the
R = rdr || R (-) || R (+)
output of the op amp has approximately the same
voltage as the reference voltage. When the input signal Where:
is negative, the diode is reversed-biased. The op amp rdr = Reversed diode resistance
will also be at the reference voltage level. Capacitor C1
is charged with the difference of potential between VIN R(-) = Input resistance on the negative
and VREF. This effectively disconnects the op amp from terminal of AO1
the circuit so the output will be the same as VIN plus R(+) = Input resistance on the positive ter-
C1s voltage. The capacitor has no rapid discharge path minal of AO1 for voltage follower
and will act as a DC source, providing the clamping
action.
R(-) and R(+) are calculated as a ratio between the
maximum voltage allowed by the circuit on the input
terminal and the maximum input bias current.
C1
VIN R1
- + VOUT Advantages and Disadvantages
+
AO1 D1 -
Table 8 shows the main advantages and
AO2 disadvantages of the clamp circuit.

VREF TABLE 8: ADVANTAGES AND


DISADVANTAGES OF THE
FIGURE 28: Op Amp Clamp. CIRCUIT
Advantages Disadvantages
Choosing the Components - Uses only one op amp - The input impedance var-
Refer to the section Selecting the Diode, in the section ies with the input frequency
Basic Rectifiers, and to the section Selecting the Op - Few external - The output impedance
Amp, in the section Active Half-Wave Rectifier, for components varies with the input
details on choosing the appropriate components. frequency
- Adjustable level for - Uses a potentiometer
SELECTING THE RESISTANCE AND THE
voltage reference
CAPACITOR
- Uses a positive and
The input impedance of the circuit varies with the input a negative voltage
frequency and with the state of the circuit. As frequency reference
increases, the reactance of C1 decreases and lowers
the input impedance. Practical Example
Usually, R1 gives the input impedance, so the chosen
This example uses the MCP6021 device, a 1N4148
resistance should be the minimum of the desired
diode, C1 = 150 nF, R1 = 1.2 k, R2 = 43 k,
impedance.
R3 = 47 k, VREF = 0.7V. The input frequency is
The value of C1 is shown in Equation 15: 10 kHz. Figure 29 shows the simulation result for this
example.

2011 Microchip Technology Inc. DS01353A-page 11


AN1353

4
3.5
3
2.5
Magnitude (V)

2
VOUT
1.5 VIN
1
0.5
0
-0.5
-1

Time (100 ms/div)

FIGURE 29: Op Amp Clamp Circuit


Simulation Result.

CONCLUSION
This application note examined the circuits that can
rectify the amplitude signal, detect the peak signal and
change the DC level of waveforms. The op amp-based
solutions bring improvements to the basic solutions,
such as operating with millivolt signals or isolating the
output and input impedance. The applications
proposed are based on low cost op amps, and offer
circuits with few peripheral components, giving
designers simple, but effective solutions to their
problems.

DS01353A-page 12 2011 Microchip Technology Inc.


AN1353
APPENDIX
R2
This Appendix includes schematics for additional half
and full-wave rectifiers, peak detectors and clamps. D2 VOUT
Each of these can be implemented using the rules VIN R1
- D1 VOUT
presented in this application note.
+
AO1 VIN
Half-Wave Rectifiers
Figures 30 33 show more half-wave rectifiers with
their DC transfer functions.
FIGURE 33: Negative Half-Wave
Rectifier 2.
R2
VOUT Every one of these circuits can be used to design full-
wave rectifiers by adding an op amp adder. This
R1 AO1 method is illustrated in Figure 19.
- D1 VOUT
+
VIN D2
VIN Full-Wave Rectifiers
The circuits shown in this section are based on half-
wave rectifiers. For example, the circuit in Figure 36
contains two half-wave rectifiers, one for the positive
cycle, the other for the negative cycle, and one
FIGURE 30: Positive Half-Wave difference (or adder) amplifier.
Rectifier 1. For Figures 34 36, VOUT is positive. Reversing the
diodes creates a negative rectifier.

R2
R2 R3
VOUT
R1 AO1
- D1 VOUT D1
+ VIN - VOUT
VIN -
VIN D2 +
+ AO2
AO1 D2
R1 R4

FIGURE 31: Negative Half-Wave


Rectifier 1.
FIGURE 34: Two Stage Full-Wave
Rectifier 1.
R2
D2 VOUT
VIN R1 R5
D1 VOUT R3 D1
-
+ VIN
AO1 R2 D2 R4
- VOUT
+
AO2
VIN R1
AO1
-
FIGURE 32: Positive Half-Wave +

Rectifier 2.
R4

FIGURE 35: Two Stage Full-Wave


Rectifier 2.

2011 Microchip Technology Inc. DS01353A-page 13


AN1353
For Figure 38, VOUT is positive. Reversing the diode
creates a negative rectifier.
R2

VIN R1 D2
- D1
+ R6 VIN D1 - VOUT
AO1 +
+
R5 - AO2
R3 - VOUT AO1
+
R4 AO3
R7
R2

R1 D2 FIGURE 38: Peak Detector Rectifier 2.


D1
-
+
AO2
For Figure 39, VOUT is positive. Reversing the diodes
R3
creates a negative rectifier. To reset this circuit, we can
use a relay reed, or a transistor with a low leakage
current.

FIGURE 36: Three Stage Full-Wave R2


Rectifier.
C2
Peak Detectors
D2 D1 - VOUT
The circuit in Figure 37 has the capacitor discharge VIN - +
+
through R2, which causes the output to droop. Diode AO1 AO2
D2 provides the local feedback around AO1, once a Reset -VC
peak has been detected. This prevents AO1 from C1
0V
saturating during the peak hold mode and decreases
the peak acquisition time. You can omit D2, but the Run
circuit will be slower when detecting peaks.

FIGURE 39: Peak Detector Rectifier 3.


R2
Clamp
VIN R1 D2 VOUT
- D1 - Figure 40 shows another positive active clamp where
+
+ AO2 the reference voltage can be adjusted. If the diode is
AO1
C1 inverted, a negative active clamp will result.
R3
C2
VIN R1 AO1
- VOUT
+
D1
VREF
FIGURE 37: Peak Detector Rectifier 1. C1

+V R2 P1 R3 -V

FIGURE 40: Active Clamp Sample.

DS01353A-page 14 2011 Microchip Technology Inc.


Note the following details of the code protection feature on Microchip devices:
Microchip products meet the specification contained in their particular Microchip Data Sheet.

Microchip believes that its family of products is one of the most secure families of its kind on the market today, when used in the
intended manner and under normal conditions.

There are dishonest and possibly illegal methods used to breach the code protection feature. All of these methods, to our
knowledge, require using the Microchip products in a manner outside the operating specifications contained in Microchips Data
Sheets. Most likely, the person doing so is engaged in theft of intellectual property.

Microchip is willing to work with the customer who is concerned about the integrity of their code.

Neither Microchip nor any other semiconductor manufacturer can guarantee the security of their code. Code protection does not
mean that we are guaranteeing the product as unbreakable.

Code protection is constantly evolving. We at Microchip are committed to continuously improving the code protection features of our
products. Attempts to break Microchips code protection feature may be a violation of the Digital Millennium Copyright Act. If such acts
allow unauthorized access to your software or other copyrighted work, you may have a right to sue for relief under that Act.

Information contained in this publication regarding device Trademarks


applications and the like is provided only for your convenience
The Microchip name and logo, the Microchip logo, dsPIC,
and may be superseded by updates. It is your responsibility to
KEELOQ, KEELOQ logo, MPLAB, PIC, PICmicro, PICSTART,
ensure that your application meets with your specifications.
PIC32 logo, rfPIC and UNI/O are registered trademarks of
MICROCHIP MAKES NO REPRESENTATIONS OR
Microchip Technology Incorporated in the U.S.A. and other
WARRANTIES OF ANY KIND WHETHER EXPRESS OR countries.
IMPLIED, WRITTEN OR ORAL, STATUTORY OR
OTHERWISE, RELATED TO THE INFORMATION, FilterLab, Hampshire, HI-TECH C, Linear Active Thermistor,
INCLUDING BUT NOT LIMITED TO ITS CONDITION, MXDEV, MXLAB, SEEVAL and The Embedded Control
QUALITY, PERFORMANCE, MERCHANTABILITY OR Solutions Company are registered trademarks of Microchip
FITNESS FOR PURPOSE. Microchip disclaims all liability Technology Incorporated in the U.S.A.
arising from this information and its use. Use of Microchip Analog-for-the-Digital Age, Application Maestro, CodeGuard,
devices in life support and/or safety applications is entirely at dsPICDEM, dsPICDEM.net, dsPICworks, dsSPEAK, ECAN,
the buyers risk, and the buyer agrees to defend, indemnify and ECONOMONITOR, FanSense, HI-TIDE, In-Circuit Serial
hold harmless Microchip from any and all damages, claims, Programming, ICSP, Mindi, MiWi, MPASM, MPLAB Certified
suits, or expenses resulting from such use. No licenses are logo, MPLIB, MPLINK, mTouch, Omniscient Code
conveyed, implicitly or otherwise, under any Microchip Generation, PICC, PICC-18, PICDEM, PICDEM.net, PICkit,
intellectual property rights. PICtail, REAL ICE, rfLAB, Select Mode, Total Endurance,
TSHARC, UniWinDriver, WiperLock and ZENA are
trademarks of Microchip Technology Incorporated in the
U.S.A. and other countries.
SQTP is a service mark of Microchip Technology Incorporated
in the U.S.A.
All other trademarks mentioned herein are property of their
respective companies.
2011, Microchip Technology Incorporated, Printed in the
U.S.A., All Rights Reserved.
Printed on recycled paper.

ISBN: 978-1-60932-931-0

Microchip received ISO/TS-16949:2002 certification for its worldwide


headquarters, design and wafer fabrication facilities in Chandler and
Tempe, Arizona; Gresham, Oregon and design centers in California
and India. The Companys quality system processes and procedures
are for its PIC MCUs and dsPIC DSCs, KEELOQ code hopping
devices, Serial EEPROMs, microperipherals, nonvolatile memory and
analog products. In addition, Microchips quality system for the design
and manufacture of development systems is ISO 9001:2000 certified.

2011 Microchip Technology Inc. DS01353A-page 15


Worldwide Sales and Service
AMERICAS ASIA/PACIFIC ASIA/PACIFIC EUROPE
Corporate Office Asia Pacific Office India - Bangalore Austria - Wels
2355 West Chandler Blvd. Suites 3707-14, 37th Floor Tel: 91-80-3090-4444 Tel: 43-7242-2244-39
Chandler, AZ 85224-6199 Tower 6, The Gateway Fax: 91-80-3090-4123 Fax: 43-7242-2244-393
Tel: 480-792-7200 Harbour City, Kowloon Denmark - Copenhagen
India - New Delhi
Fax: 480-792-7277 Hong Kong Tel: 45-4450-2828
Tel: 91-11-4160-8631
Technical Support: Tel: 852-2401-1200 Fax: 45-4485-2829
Fax: 91-11-4160-8632
http://www.microchip.com/ Fax: 852-2401-3431
India - Pune France - Paris
support
Australia - Sydney Tel: 91-20-2566-1512 Tel: 33-1-69-53-63-20
Web Address:
Tel: 61-2-9868-6733 Fax: 91-20-2566-1513 Fax: 33-1-69-30-90-79
www.microchip.com
Fax: 61-2-9868-6755 Germany - Munich
Atlanta Japan - Yokohama
China - Beijing Tel: 81-45-471- 6166
Tel: 49-89-627-144-0
Duluth, GA
Tel: 86-10-8528-2100 Fax: 49-89-627-144-44
Tel: 678-957-9614 Fax: 81-45-471-6122
Fax: 86-10-8528-2104 Italy - Milan
Fax: 678-957-1455 Korea - Daegu
China - Chengdu Tel: 82-53-744-4301
Tel: 39-0331-742611
Boston
Tel: 86-28-8665-5511 Fax: 39-0331-466781
Westborough, MA Fax: 82-53-744-4302
Fax: 86-28-8665-7889 Netherlands - Drunen
Tel: 774-760-0087 Korea - Seoul
Fax: 774-760-0088 China - Chongqing Tel: 82-2-554-7200 Tel: 31-416-690399
Tel: 86-23-8980-9588 Fax: 82-2-558-5932 or Fax: 31-416-690340
Chicago
Itasca, IL Fax: 86-23-8980-9500 82-2-558-5934 Spain - Madrid
Tel: 630-285-0071 China - Hong Kong SAR Tel: 34-91-708-08-90
Malaysia - Kuala Lumpur
Fax: 630-285-0075 Tel: 852-2401-1200 Tel: 60-3-6201-9857 Fax: 34-91-708-08-91
Cleveland Fax: 852-2401-3431 Fax: 60-3-6201-9859 UK - Wokingham
Independence, OH China - Nanjing Tel: 44-118-921-5869
Malaysia - Penang
Tel: 216-447-0464 Tel: 86-25-8473-2460 Fax: 44-118-921-5820
Tel: 60-4-227-8870
Fax: 216-447-0643 Fax: 86-25-8473-2470 Fax: 60-4-227-4068
Dallas China - Qingdao Philippines - Manila
Addison, TX Tel: 86-532-8502-7355 Tel: 63-2-634-9065
Tel: 972-818-7423 Fax: 86-532-8502-7205 Fax: 63-2-634-9069
Fax: 972-818-2924
China - Shanghai Singapore
Detroit Tel: 86-21-5407-5533 Tel: 65-6334-8870
Farmington Hills, MI Fax: 86-21-5407-5066 Fax: 65-6334-8850
Tel: 248-538-2250
China - Shenyang Taiwan - Hsin Chu
Fax: 248-538-2260
Tel: 86-24-2334-2829 Tel: 886-3-6578-300
Indianapolis Fax: 86-24-2334-2393 Fax: 886-3-6578-370
Noblesville, IN
Tel: 317-773-8323 China - Shenzhen Taiwan - Kaohsiung
Fax: 317-773-5453 Tel: 86-755-8203-2660 Tel: 886-7-213-7830
Fax: 86-755-8203-1760 Fax: 886-7-330-9305
Los Angeles
Mission Viejo, CA China - Wuhan Taiwan - Taipei
Tel: 949-462-9523 Tel: 86-27-5980-5300 Tel: 886-2-2500-6610
Fax: 949-462-9608 Fax: 86-27-5980-5118 Fax: 886-2-2508-0102

Santa Clara China - Xian Thailand - Bangkok


Santa Clara, CA Tel: 86-29-8833-7252 Tel: 66-2-694-1351
Tel: 408-961-6444 Fax: 86-29-8833-7256 Fax: 66-2-694-1350
Fax: 408-961-6445 China - Xiamen
Toronto Tel: 86-592-2388138
Mississauga, Ontario, Fax: 86-592-2388130
Canada China - Zhuhai
Tel: 905-673-0699 Tel: 86-756-3210040
Fax: 905-673-6509 Fax: 86-756-3210049

02/18/11

DS01353A-page 16 2011 Microchip Technology Inc.

You might also like