an1353 op amp rectifiers, peak detectors and clamps · applications, such as half-wave rectifiers,...

16
© 2011 Microchip Technology Inc. DS01353A-page 1 AN1353 INTRODUCTION This application note covers a wide range of applications, such as half-wave rectifiers, full-wave rectifiers, peak detectors and clamps. Many of the circuits are simple in terms of component count, but they play important roles in overall systems design, such as: AC to DC Power Conversion Automatic Gain Control Loops Power Monitoring Applications AM Demodulator BASIC RECTIFIERS The basic rectifiers have been designed with diodes. Figure 1 shows such a simple series circuit, driven by 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 must be used to configure a bridge, as shown in Figure 3. The input signal must be larger than the voltage across the diode to ensure that the diode is forward biased. FIGURE 1: Negative Half-Wave Rectifier. FIGURE 2: Positive Half-Wave Rectifier. FIGURE 3: Full-Wave Rectifier. Choosing the Components SELECTING THE DIODE When choosing the diode, the most important parameters are the maximum forward current (I F ), and the peak inverse voltage rating (PIV) of the diode. The peak inverse voltage is the maximum voltage the diode can withstand when it is reverse-biased. If this voltage is exceeded, the diode may be destroyed. The diode must have a peak inverse voltage rating that is higher than the maximum voltage applied to it in an application. In many diode data sheets, PIV is referred to as peak reverse voltage (PRV). Author: Dragos Ducu, Microchip Technology Inc. AC R L D 1 V OUT t V V OUT V IN AC D 1 V OUT R L V OUT V IN V t V OUT R L t V V OUT V IN Op Amp Rectifiers, Peak Detectors and Clamps

Upload: others

Post on 23-Oct-2020

8 views

Category:

Documents


1 download

TRANSCRIPT

  • AN1353Op Amp Rectifiers, Peak Detectors and Clamps

    INTRODUCTIONThis application note covers a wide range ofapplications, such as half-wave rectifiers, full-waverectifiers, peak detectors and clamps. Many of thecircuits are simple in terms of component count, butthey play important roles in overall systems design,such as:

    • AC to DC Power Conversion• Automatic Gain Control Loops• Power Monitoring Applications• AM Demodulator

    BASIC RECTIFIERSThe basic rectifiers have been designed with diodes.Figure 1 shows such a simple series circuit, driven byan AC source. When the diode is reverse-biased, itacts as a very high impedance device. Figure 1showsa negative half wave rectifier. It outputs nearly the fullinput voltage across the diode when reverse biased. Asimilar circuit in Figure 2 shows a positive half-waverectifier. If a full-wave rectifier is desired, more diodesmust be used to configure a bridge, as shown inFigure 3. The input signal must be larger than thevoltage across the diode to ensure that the diode isforward biased.

    FIGURE 1: Negative Half-Wave Rectifier.

    FIGURE 2: Positive Half-Wave Rectifier.

    FIGURE 3: Full-Wave Rectifier.

    Choosing the Components

    SELECTING THE DIODEWhen choosing the diode, the most importantparameters are the maximum forward current (IF), andthe peak inverse voltage rating (PIV) of the diode. Thepeak inverse voltage is the maximum voltage the diodecan withstand when it is reverse-biased. If this voltageis exceeded, the diode may be destroyed. The diodemust have a peak inverse voltage rating that is higherthan the maximum voltage applied to it in anapplication. In many diode data sheets, PIV is referredto as peak reverse voltage (PRV).

    Author: Dragos Ducu,Microchip Technology Inc.

    AC

    RL

    D1 VOUT

    t

    V

    VOUTVIN

    ACD1

    VOUT

    RL

    VOUTVIN

    V

    t

    VOUT

    RL

    t

    V

    VOUTVIN

    © 2011 Microchip Technology Inc. DS01353A-page 1

  • AN1353

    D

    The peak inverse voltage of the diode will be equal to:

    EQUATION 1:

    Every diode has a parasitic capacitance and, bydefault, has a time charge storage. This charge storagemechanism is nonlinear, leading to a nonlinearcapacitance. This effect is very important because thenonlinearity of the diode can generate harmonics. Forexample, the output voltage becomes negative for ashort time. This period is called reverse recovery time.During the transition, the diode’s parasitic capacitancewill interact with the circuit resistors to modify thecircuit’s behavior.For most general purpose applications, low powersignal diodes such as 1N4148, are adequate. For highaccuracy applications, where offset errors and reversediode leakage current are critical, a low leakage FETtransistor can be used as a diode (short Drain andSource together), such as 2N4117A. In applicationswhere speed is important, silicon Schottky barrierdiodes are worth considering, since they have a lowforward ON voltage of only 0.4V and are fast.

    SELECTING THE RESISTORThe resistor is selected based on the load current.One limitation is the value of load resistor. The value ofthe load resistor must be less than the diode resistancewhen in reverse bias. The parasitic capacitance of thediode interacts with the load resistor causing a timeconstant. If this constant is large, the output voltage willhave a delayed recovery.

    Advantages and DisadvantagesThe major disadvantage of these circuits is thenonlinearity of the diodes. If the input signal is smallerthan the threshold voltage of the diode, the signalcannot be recovered. To reduce the threshold voltageof the diode and improve linearity, we need to includethe diode into the feedback loop of the operationalamplifier.

    Practical ExamplesFigures 4 – 6 show practical samples when using the1N4001 diode and RL = 1 kΩ. The frequency isf = 1 kHz.

    FIGURE 4: Negative Half-Wave Rectifier Sample.

    FIGURE 5: Positive Half-Wave Rectifier Sample.

    FIGURE 6: Full-Wave Rectifier Sample.

    VPIV rating( ) VPK max( ) VD on( )+≥Where:

    VPIV = Peak inverse voltageVPK(max) = Maximum peak amplitude

    VD(on) = Diode voltage on when in

    TABLE 1: ADVANTAGES AND DISADVANTAGES OF THE CIRCUIT

    Advantages Disadvantages

    - Uses few compo-nents

    - Poor accuracy

    - Simple design - The rectified voltage depends on the diode voltage threshold

    -1.5

    -1

    -0.5

    0

    0.5

    1

    1.5

    Time (1 ms/div)

    Mag

    nitu

    de (V

    )

    VOUTVIN

    -1.5

    -1

    -0.5

    0

    0.5

    1

    1.5

    Time (1 ms/div)

    Mag

    nitu

    de (V

    )

    VOUTVIN

    -1.5

    -1

    -0.5

    0

    0.5

    1

    1.5

    Time (1 ms/div)

    Mag

    nitu

    de(V

    )

    VOUTVIN

    S01353A-page 2 © 2011 Microchip Technology Inc.

  • AN1353

    ACTIVE HALF-WAVE RECTIFIERThe simplest op amp half-wave rectifier is shown inFigure 7. When the VIN is positive, the diode is forwardbiased; the signal can be found on the RL load. Whenthe VIN is negative, the diode is non-conductive, andthe output signal is ground (0V).

    FIGURE 7: Op Amp Half-Wave Rectifier.The big advantage of this circuit is represented by thesmall threshold voltage and linearity. This is moreconvenient than the basic rectifiers, since this circuit isable to rectify signals smaller than the diode thresholdvoltage.

    FIGURE 8: Circuit Behavior on Low Frequency.This circuit has limitations. The rectifier’s speed islimited by the op amp bandwidth. This effect isillustrated in Figure 9, where the rectified output signaloverlaps the input signal. The maximum frequencythat can be rectified is determined by the slew rate ofthe op amp.

    FIGURE 9: Output Limitation on High-Frequency Input Signals.

    Choosing the Components

    SELECTING THE OP AMPWhen selecting the op amp, two importantcharacteristics must be considered:• Gain Bandwidth Product• Slew Rate (SR)The minimum gain bandwidth product requirement canbe estimated in Equation 2.

    EQUATION 2:

    The next parameter that needs to be considered is theslew rate (SR). This is the maximum time rate changeat the output of the op amp; it shows how fast the outputcan follow the input signal. The SR parameter can befound in the selected op amp’s data sheet.The full bandwidth product (FPBW) defines the highestfrequency sine wave that will not be distorted by theslew rate limit.

    EQUATION 3:

    SELECTING THE DIODE AND THE RESISTORRefer to the sections Selecting the Diode and SelectingThe Resistor, in the Basic Rectifiers section, for detailson choosing the appropriate components.

    Advantages and DisadvantagesTable 2 shows the main advantages anddisadvantages of a half-wave rectifier.

    VOUT

    RLVIN

    -+AO1 D1

    -1.50

    -1.00

    -0.50

    0.00

    0.50

    1.00

    1.50

    Time (1 ms/div)

    Mag

    nitu

    de (V

    )

    VOUT

    VIN

    -1.5

    -1

    -0.5

    0

    0.5

    1

    1.5

    Time (50 µs/div)

    Mag

    nitu

    de (V

    )

    VOUTVIN

    TABLE 2: ADVANTAGES AND DISADVANTAGES OF THE CIRCUIT

    Advantages Disadvantages

    - Uses few components - Load dependant- Good linearity - Limited op amp bandwidth

    fGBWP 10 G× fINPUT×=

    Where:

    fGBWP = Gain bandwidth productG = DC gain

    fINPUT = Maximum input frequency

    SR ΔVOUTΔT

    -----------------max

    =

    FPBW SRπ VOUT p p–( )×-------------------------------------=

    © 2011 Microchip Technology Inc. DS01353A-page 3

  • AN1353

    Practical ExampleThis example of a half-wave rectifier uses anMBRM110LT3 Schottky diode and the MCP661 opamp with different load resistors. For this example, thevalue of the load resistor is less than 1 kΩ, to avoidglitches in the negative cycle. The Schottky diode ischosen for higher speed than a small signal silicondiode. Figures 10 and 11 below are examples of a1 kHz input signal and different load resistors. Note thatfor the small values of the resistor (i.e. 100Ω), the glitchis smaller.

    FIGURE 10: Half-Wave Rectifier with RL = 100Ω.

    FIGURE 11: Half-Wave Rectifier with RL = 1 kΩ.

    Improved Op Amp Half-Wave RectifierFigure 12 shows a half-wave rectifier circuit withimproved performance. The additional diode preventsthe op amp's output from swinging to the negativesupply rail. The low level linearity is also improved.Although the op amp still operates in open-loop at thepoint where the input swings from positive to negativeor vice versa, the range is limited by the diode and theload resistor.When the input signal is positive, D1 is open and D2conducts. The output signal is zero because one sideof R2 is connected to the virtual ground, with no currentthrough it. When the input is negative, D1 conducts andD2 is open. The output follows the positive input cyclewith a gain of G = -R2/R1.

    FIGURE 12: Have-Wave Rectifier Circuit Improvement.This type of circuit also has limitations. The inputimpedance is determined by the input resistor. It mustbe driven from a low-impedance source. Likewise, theinput resistor R3 shown in Figure 12 is also optional,and is needed only if there is no DC path to ground.

    Choosing the ComponentsRefer to the section Selecting the Op Amp in the ActiveHalf-Wave Rectifier section, and to the sectionSelecting the Diode in the section Basic Rectifiers, fordetails on choosing the appropriate components.

    SELECTING THE RESISTORSThe DC gain is determined in Equation 4:

    EQUATION 4:

    -0.2-0.15

    -0.1-0.05

    00.05

    0.10.15

    0.2

    Time (500 µs/div)

    Mag

    nitu

    de (V

    )

    VOUT VIN

    RL = 100 Ohm

    -0.2-0.15

    -0.1-0.05

    00.05

    0.10.15

    0.2

    Time (500 µs/div)

    Mag

    nitu

    de (V

    )

    RL = 1 k�

    ��������VOUT VIN

    VOUT

    RL

    VIN R1

    R2

    D1

    D2-+AO1

    R3

    R2R1------

    where G = DC gain

    G = –

    DS01353A-page 4 © 2011 Microchip Technology Inc.

  • AN1353

    Resistors R1 and R2 are selected based on theapplication design:• For a general purpose application, the resistor’s

    value should be between 1 kΩ and 100 kΩ.• For a high speed application, the resistor’s value

    should be between 100 Ω and 1 kΩ (consume more power)

    • For portable applications between 1 MΩ and 10 MΩ.

    The R3 is added to minimize the error caused by theinput bias current.

    EQUATION 5:

    Advantages and DisadvantagesTable 3 shows the main advantages anddisadvantages of an improved half-wave rectifier.

    Practical ExampleThe example in Figure 13 is based on the circuit inFigure 12, and uses the MCP661 op amp, twoMBRM110LT3 Schottky diodes, RL = 1 kΩ, R2 =10 kΩand R1 = 1 kΩ. The input frequency is 1 kHz.

    FIGURE 13: Improved Half-Wave Rectifier with RL = 1 KΩ.

    For an input frequency under 600 kHz, the circuitperforms properly. For frequencies larger than thisvalue, the output signal is distorted.

    FIGURE 14: Circuit Behavior with 600 kHz Input Frequency.To design a negative half-wave rectifier using the samecomponents, we only have to invert the diodes, asshown in the circuit in Figure 15.

    FIGURE 15: Negative Half-Wave Rectifier.

    FIGURE 16: Negative Cycle Rectifier Sample.

    TABLE 3: ADVANTAGES AND DISADVANTAGES OF THE CIRCUIT

    Advantages Disadvantages

    - Good linearity - Uses more components- The second diode prevents the op amp from swinging into the negative cycle

    - Low impedance because of R1

    R3R1 R2×

    R1 R2+--------------------=

    -0.2-0.15-0.1

    -0.050

    0.050.1

    0.150.2

    Time (1 ms/div)

    Mag

    nitu

    de (V

    )

    RL = 1 k�

    VOUT VIN

    -1-0.8-0.6-0.4-0.2

    00.20.40.60.8

    1

    Time (0.2 µs/div)

    Mag

    nitu

    de (V

    )

    VOUTVIN

    VOUT

    RL

    VIN R1

    R2

    D1D2-+AO1

    R3

    -0.2

    -0.15

    -0.1

    -0.05

    0

    0.05

    0.1

    0.15

    0.2

    Time (1 ms/div)

    Mag

    nitu

    de (V

    )

    VOUT VIN

    © 2011 Microchip Technology Inc. DS01353A-page 5

  • AN1353

    ACTIVE FULL-WAVE RECTIFIERFull-wave rectifiers are more complex, compared to thehalf-wave circuits. Full-wave rectifiers output onepolarity of the input signal and invert the other. A circuitfor a full-wave rectifier is illustrated in Figure 17.

    FIGURE 17: Full-Wave Rectifier Circuit.When in the negative cycle of the input signal, diode D1is forward biased, and the output voltage follows theinput. When the input signal (VIN) is positive, D1 is non-conductive and the input signal passes through thefeedback resistor (R2), which forms a voltage dividerwith R1 and RL. Equation 6 shows the calculation forthe output voltage:

    EQUATION 6:

    When -GM = GP, the full-wave output is symmetric.Note that the output is not buffered, so it should beconnected only to a circuit with high impedance, muchhigher than RL.

    Choosing the Components

    Refer to the section Selecting the Diode in the section Basic Rectifiers, and to the section Selecting the Op Amp in the section Active Half-Wave Rectifier, for details on choosing the appropriate components.

    SELECTING THE RESISTORSWhen selecting the resistors for the circuit in Figure 17,-GM must be equal to GP. The result is shown inEquation 7:

    EQUATION 7:

    R3 is added to minimize the error caused by the inputbias current. Refer to the section Selecting theResistors, in the section Improved Op Amp Half-WaveRectifier, for details on the selection of the resistor.

    Advantages and Disadvantages

    Practical ExampleThis design uses an MCP661 and a general purposediode rectifier 1N4148. The input frequency is 1 kHz.Table 5 shows the resistor values recommended toobtain the same amplitude with each input cycle:

    The values of the resistors can be scaled depending onthe application: high speed, portable or generalpurpose. For more details, refer to the sectionSelecting the Resistors, in the section Improved OpAmp Half-Wave Rectifier. Figure 18 shows the result ofthe full-wave rectifier circuit simulation.

    VOUT

    R3

    +-

    VIN R1

    R2

    V+

    D1RL

    AO1

    VOUT VIN GM× VIN 0;=

    GPRL

    R1 R2 RL+ +-----------------------------------=

    TABLE 4: ADVANTAGES AND DISADVANTAGES OF THE CIRCUIT

    Advantages Disadvantages

    - Uses only one op amp - Low input resistance- Uses a small number of external components

    - The source and load resistance affect rectifying

    - Uses a single supply - A reactive load (capacitor or coil) cannot be tolerated without a buffer- Has a low impedance because of R1

    TABLE 5: VALUES FOR RECTIFIED, EQUAL AMPLITUDE

    Resistor Value (kΩ)

    R1 2R2 1RL 3

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

    DS01353A-page 6 © 2011 Microchip Technology Inc.

  • AN1353

    FIGURE 18: Full-Wave Rectifier Circuit Simulation with the Recommended Values of the Resistors.

    TWO STAGE OP AMP FULL-WAVE RECTIFIERAnother full-wave rectifier can be obtained by includingan adder to the single-wave rectifier, which subtractsVIN from the rectified signal. The rectifier stage consistsof AO1, R1, R2, D1 and D2, while the adder stageconsists of AO2, R3, R4 and R5.

    FIGURE 19: Two Stage Op Amp Full-Wave Rectifier Circuit.When VIN is positive, D1 is forward-biased and D2 isreverse-biased, while when VIN is negative, D2 isforward-biased and D1 is reversed-biased. The secondstage adds VIN and VO1 and inverts the polarity of theresulting signal. The output voltage for the positivecycle of the input voltage is calculated in Equation 8.For the negative cycle of the input voltage (VIN), D1blocks the signal, while D2 conducts the whole currentcoming from the input. In this case, the output voltagefor the first stage is VO1 = 0V. For the positive cycle of the input signal, VO1 isnegative and, in this case, the adder stage combinesthe input signals with equal amplitudes, one positiveand one negative.

    EQUATION 8:

    Equation 9 calculates the output voltage:

    EQUATION 9:

    Choosing the ComponentsTo obtain a good performance for the two stage circuit,the tolerance of resistors R1 to R5 should be 1%, orbetter; this makes the gains (for negative and positiveVIN) match well. The circuit in Figure 19 has a goodlinearity, down to a couple of mV at low frequencies, butthe high-frequency response is limited by the op ampbandwidth.Refer to the section Selecting the Diode in the sectionBasic Rectifiers, and to the section Selecting the OpAmp in the section Active Half-Wave Rectifier, fordetails on choosing the appropriate components.

    SELECTING THE RESISTORSR1 and R2 give the gain for the first stage; R3 and R5for the second stage.To get the same amplitude for both cycles, chooseR1 = R3 = R4 and R2 = R5 = 2 x R1.

    EQUATION 10:

    R6 is added to minimize the error caused by the inputbias current. Refer to the section Selecting theResistors, in the section Improved Op Amp Half-WaveRectifier, for details on choosing the appropriatecomponents.If a greater sensitivity and high frequency is desired, itis recommended to use lower resistance value, highspeed diodes and faster op amps.

    -0.2

    -0.15

    -0.1

    -0.05

    0

    0.05

    0.1

    0.15

    0.2

    Time (1ms/div)

    Mag

    nitu

    de (V

    )

    VOUT VIN

    VOUTR4

    VIN R1 R3

    R2

    R5D1

    D2

    VO1AO1

    AO2

    -+

    -+

    R6

    VO1 VIN G when ,× VIN > 0=

    Where:

    GR1–

    R2---------=

    VO1 0 when VIN 0

  • AN1353

    Advantages and DisadvantagesTable 6 shows the advantages and disadvantages of atwo stage op amp full-wave rectifier.

    Practical ExampleThis example uses the MCP6021 device, two 1N4148diodes, R1 = 1 kΩ, R2 = 2 kΩ, R3 = 1 kΩ, R4 = 1 kΩ,and R5 = 2 kΩ. The input signal frequency is f = 1 kHz.Figure 20 shows the result of the simulation for the full-wave rectifier shown in Figure 19:

    FIGURE 20: Full-Wave Rectifier Circuit Simulation.For more topologies of the full-wave rectifier, refer tothe Appendix section.Figure 21 shows the behavior of the circuit at themaximum frequency tolerated.

    FIGURE 21: Circuit Behavior when Input Frequency = 100 kHz.

    BASIC PEAK DETECTORSThe purpose of this circuit is to detect the maximummagnitude of a signal over a period of time. Theoperation of a peak detector can be illustrated using asimple diode and capacitor, as shown in Figure 22.

    FIGURE 22: Basic Peak Detector Operation.

    Choosing the ComponentsWhen choosing the resistor, the limits must beconsidered: rdf τ2 >> 1/fc, where fm is the modulationfrequency and fc is the carrier frequency.

    TABLE 6: ADVANTAGES AND DISADVANTAGES OF THE CIRCUIT

    Advantages Disadvantages

    - Very good performance - Uses two op amps- Low output impedance - Low input resistance

    - Multiple passive components

    -1-0.8-0.6-0.4-0.2

    00.20.40.60.8

    1

    Time (1 ms/div)

    Mag

    nitu

    de (V

    )

    VOUT VIN

    -1-0.8-0.6-0.4-0.2

    00.20.40.60.8

    1

    Time (10 µs/div)

    Mag

    nitu

    de (V

    )

    VOUT VIN

    C1

    D1VIN VOUT

    R1

    ΔVVPEAK

    f τ2×-------------------=

    Where:

    VPEAK = Amplitude maximum value f = Input signal frequency

    τ2 = Discharge time constant

    VDROP VPEAKt

    τ2-----–⎝ ⎠

    ⎛ ⎞exp×=

    Where: τ2 = time constant

    DS01353A-page 8 © 2011 Microchip Technology Inc.

  • AN1353

    Advantages and DisadvantagesTable 7 identifies some of the advantages anddisadvantages of the peak detectors.

    Practical ExampleThe simulation in Figure 23 shows that this circuit doesnot reach the peak amplitude of the input signal, but isgood for quickly following sudden changes in thesignal's amplitude. However, it has significant ripple.This example uses a 1N4148 diode, C1 = 1 µF,R1 = 100 kΩ and f = 1 kHz.

    FIGURE 23: Peak Detector Simulation.

    Two-Stage Active Peak DetectorIn many applications, the voltage drop is not desired.To avoid this, we need to include a diode into the loopof the op amp, as shown in Figure 24.A two-stage peak detector is shown in Figure 24. In thiscircuit, AO1, R1, R2, D1, R5 and C1 represent the firststage, while AO2, R3 and R4 is the second stage. AO1charges the capacitor up to the peak value, and AO2acts as an output buffer. AO1 removes the variability ofthe input impedance, while AO2 removes the variabilityof the output impedance.

    FIGURE 24: Two-Stage Peak Detector Circuit.The time constant for charging C1 is very short, andprimarily consists of the C1 and the forward resistanceof the diode. Thus, C1 charges almost instantly to thepeak output of the input signal (VIN). When VIN goesbelow the output signal (VOUT), diode D1 becomesreverse-biased. The only discharge path for C1 isthrough R5, via leakage or op amp bias currents. Thedischarge time constant is much longer than the chargetime constant, so C1 holds its charge and presents asteady input voltage to AO2 that is equal to the peakamplitude of the input signal. AO2 is a buffer amplifierthat prevents unintentional discharging of the C1,caused by the loading impedance of the followingcircuit. If the R5C1 time constant is too short, then thevoltage on C1 will not be constant, and will have a highvalue of ripple. On the other hand, if the R5C1 timeconstant is too long, the circuit cannot respond quicklyto the changes in the input amplitude. The lower frequency limit is the frequency that causesthe ripple voltage to exceed the maximum allowablelevel. It can be estimated by applying the basicdischarge equation for capacitors (Equation 13):

    EQUATION 13:

    The response time describes how quickly C1 canrespond to the decreases in the magnitude of the inputsignal. This can be computed from the basic dischargeequation. However, if we assume that the capacitor ischarged to peak and discharges towards an eventualvalue of 0, we can use the simplified form(Equation 14).

    TABLE 7: ADVANTAGES AND DISADVANTAGES OF THE CIRCUIT

    Advantages Disadvantages

    - Uses few components

    - The output voltage is one diode drop below the actual out-put

    - Very low cost - The input impedance is variable due to the input characteristics of the diode- The discharge is very slow due to the leakage current

    02468

    1012141618

    Time (20 ms/div)

    Mag

    nitu

    de(V

    )

    VOUTVIN

    VOUT

    R5

    VIN

    C1R1

    R2

    D1

    R3

    R4

    AO1AO2

    -+

    -+

    fO1

    R5 C1× ln×V Vo–

    V Vc–----------------

    ----------------------------------------------------------=

    Where:

    V = Capacitor’s discharge voltage VC = Minimum allowable voltage on the

    capacitorVO = Initial charge of the capacitor

    © 2011 Microchip Technology Inc. DS01353A-page 9

  • AN1353

    EQUATION 14:

    Choosing the ComponentsRefer to the section Selecting the Diode in the sectionBasic Rectifiers, and to the section Selecting the OpAmp, in the section Active Half-Wave Rectifier, fordetails on choosing the appropriate components.

    SELECTING THE RESISTORSR3 limits the current into the positive input of the AO2when power is disconnected from the circuit. Withoutthis resistor, the AO2 may be damaged as C1discharges through it. For capacitors smaller than 1 µF,resistor R3 can normally be omitted. Resistor R4minimizes the effects of the bias currents in AO2.Resistor R2 limits the current into the negative input ofAO1 when power is removed from the circuit. There are two conflicting circuit parameters that affectthe choice of the values for R5 and C1: allowable ripplevoltage across C1 and response time. In general, afaster response time leads to greater ripple.Refer to the section Selecting the Resistors, in thesection Improved Op Amp Half-Wave Rectifier, fordetails on choosing the appropriate components.

    Practical ExampleFigure 25 illustrates the simulation result for one peakdetector, realized with MCP661 device, diode 1N4148,R5 = 100 kΩ and C1 = 1 µF. Input signal has thefrequency equal to 1 kHz.

    FIGURE 25: One Peak Detector Simulation Results.

    For more topologies on the peak detectors, refer to theAppendix.

    BASIC CLAMPA clamp is used to shift the DC reference level of theinput signal. Figure 26 shows a basic diode clamp. Itspurpose is to shift the average or the DC level of theinput signal without altering the wave shape.When VOUT > VREF and the input signal is fast, D1 is off,C1 acts like a short circuit, and VOUT looks like theinput. With slow signals, C1 acts like an open circuit andVOUT will exponentially decay towards VREF.When VOUT < VREF, VOUT becomes VREF - VD(on), D1turns on and C1 is forced to accept a new voltage thatshifts the input to the desired minimum VOUT.For low-amplitude signals, the diode drop becomessignificant. In fact, the circuit cannot be used at all if thepeak input signal is below the diode threshold, sincethe diode cannot be forward-biased. An active clamp isneeded for signals with an amplitude of millivolts.Figure 26 shows a negative clamp; it clamps thenegative extreme of the signal to (near) VREF.Reversing the diode creates a positive clamp.

    FIGURE 26: Basic Diode Negative Clamp.

    Practical ExampleFigure 27 shows a simulation for the above schematicwith VREF = 2V, C1 = 1 nF and diode 1N4148. Theinput signal has the frequency equal to 500 Hz.

    FIGURE 27: Basic Diode Clamp – Circuit Simulation.

    tR R5 C× 1

    VPK old( )VPK new( )---------------------------ln×=

    Where:

    VPK(old) = Peak input signal amplitude before the decrease

    VPK(new) = Peak input signal amplitude after the decrease

    0.10.110.120.130.140.150.160.170.180.19

    0.2

    Time (1 ms/div)

    Mag

    nitu

    de (V

    ) VOUT VIN

    AC

    C1

    D1

    VOUT

    VREF

    R1

    -1-0.5

    00.5

    11.5

    22.5

    33.5

    4

    Time (10 ms/div)

    Mag

    nitu

    de (V

    )

    VOUTVIN

    DS01353A-page 10 © 2011 Microchip Technology Inc.

  • AN1353

    Active ClampTo reduce the threshold voltage of the diode, and forlinearization, the circuit needs a diode in the feedbackloop of the operational amplifier. Figure 28 shows an op amp clamp where the inputsignal is positive and D1 is forward-biased. The diodeconverts the circuit into a voltage follower withreference to the positive input. This means that theoutput of the op amp has approximately the samevoltage as the reference voltage. When the input signalis negative, the diode is reversed-biased. The op ampwill also be at the reference voltage level. Capacitor C1is charged with the difference of potential between VINand VREF. This effectively disconnects the op amp fromthe circuit so the output will be the same as VIN plusC1’s voltage. The capacitor has no rapid discharge pathand will act as a DC source, providing the clampingaction.

    FIGURE 28: Op Amp Clamp.

    Choosing the ComponentsRefer to the section Selecting the Diode, in the sectionBasic Rectifiers, and to the section Selecting the OpAmp, in the section Active Half-Wave Rectifier, fordetails on choosing the appropriate components.

    SELECTING THE RESISTANCE AND THE CAPACITORThe input impedance of the circuit varies with the inputfrequency and with the state of the circuit. As frequencyincreases, the reactance of C1 decreases and lowersthe input impedance.Usually, R1 gives the input impedance, so the chosenresistance should be the minimum of the desiredimpedance.The value of C1 is shown in Equation 15:

    EQUATION 15:

    R(-) and R(+) are calculated as a ratio between themaximum voltage allowed by the circuit on the inputterminal and the maximum input bias current.

    Advantages and DisadvantagesTable 8 shows the main advantages anddisadvantages of the clamp circuit.

    Practical ExampleThis example uses the MCP6021 device, a 1N4148diode, C1 = 150 nF, R1 = 1.2 kΩ, R2 = 43 kΩ,R3 = 47 kΩ, VREF = 0.7V. The input frequency is10 kHz. Figure 29 shows the simulation result for thisexample.

    VOUTR1VIN

    VREF

    C1

    D1

    -+ -

    +

    AO1AO2

    TABLE 8: ADVANTAGES AND DISADVANTAGES OF THE CIRCUIT

    Advantages Disadvantages

    - Uses only one op amp - The input impedance var-ies with the input frequency

    - Few external components

    - The output impedance varies with the input frequency

    - Adjustable level for voltage reference

    - Uses a potentiometer

    - Uses a positive and a negative voltage reference

    C116.7

    R flow×-------------------=

    Where:

    flow = minimum frequency desired

    R = rdr || R (-) || R (+)Where:

    rdr = Reversed diode resistanceR(-) = Input resistance on the negative

    terminal of AO1R(+) = Input resistance on the positive ter-

    minal of AO1 for voltage follower

    © 2011 Microchip Technology Inc. DS01353A-page 11

  • AN1353

    FIGURE 29: Op Amp Clamp Circuit Simulation Result.

    CONCLUSIONThis application note examined the circuits that canrectify the amplitude signal, detect the peak signal andchange the DC level of waveforms. The op amp-basedsolutions bring improvements to the basic solutions,such as operating with millivolt signals or isolating theoutput and input impedance. The applicationsproposed are based on low cost op amps, and offercircuits with few peripheral components, givingdesigners simple, but effective solutions to theirproblems.

    -1-0.5

    00.5

    11.5

    22.5

    33.5

    4

    Time (100 ms/div)

    Mag

    nitu

    de (V

    )

    VOUTVIN

    DS01353A-page 12 © 2011 Microchip Technology Inc.

  • AN1353

    APPENDIXThis Appendix includes schematics for additional halfand full-wave rectifiers, peak detectors and clamps.Each of these can be implemented using the rulespresented in this application note.

    Half-Wave RectifiersFigures 30 – 33 show more half-wave rectifiers withtheir DC transfer functions.

    FIGURE 30: Positive Half-Wave Rectifier 1.

    FIGURE 31: Negative Half-Wave Rectifier 1.

    FIGURE 32: Positive Half-Wave Rectifier 2.

    FIGURE 33: Negative Half-Wave Rectifier 2.Every one of these circuits can be used to design full-wave rectifiers by adding an op amp adder. Thismethod is illustrated in Figure 19.

    Full-Wave RectifiersThe circuits shown in this section are based on half-wave rectifiers. For example, the circuit in Figure 36contains two half-wave rectifiers, one for the positivecycle, the other for the negative cycle, and onedifference (or adder) amplifier.For Figures 34 – 36, VOUT is positive. Reversing thediodes creates a negative rectifier.

    FIGURE 34: Two Stage Full-Wave Rectifier 1.

    FIGURE 35: Two Stage Full-Wave Rectifier 2.

    R2

    D1

    D2

    R1

    VOUT

    VIN

    VOUT-+

    AO1

    VIN

    VOUT

    VIN

    R2

    D1

    D2

    R1 VOUT-+

    AO1

    VIN

    R2

    D1

    D2R1

    VOUT

    VINVOUT-

    +AO1

    VIN

    VOUT

    VIN

    R2

    D1

    D2R1 VOUT-

    +

    VIN

    AO1

    VOUT

    R4

    VIN

    R1

    R3R2

    D1

    D2AO1AO2

    -+

    -+

    R4

    R3

    R2

    D1

    D2

    R1

    R4

    R5

    VOUT

    AO1AO2

    -+

    -+

    VIN

    © 2011 Microchip Technology Inc. DS01353A-page 13

  • AN1353

    FIGURE 36: Three Stage Full-Wave Rectifier.

    Peak DetectorsThe circuit in Figure 37 has the capacitor dischargethrough R2, which causes the output to droop. DiodeD2 provides the local feedback around AO1, once apeak has been detected. This prevents AO1 fromsaturating during the peak hold mode and decreasesthe peak acquisition time. You can omit D2, but thecircuit will be slower when detecting peaks.

    FIGURE 37: Peak Detector Rectifier 1.

    For Figure 38, VOUT is positive. Reversing the diodecreates a negative rectifier.

    FIGURE 38: Peak Detector Rectifier 2.

    For Figure 39, VOUT is positive. Reversing the diodescreates a negative rectifier. To reset this circuit, we canuse a relay reed, or a transistor with a low leakagecurrent.

    FIGURE 39: Peak Detector Rectifier 3.

    ClampFigure 40 shows another positive active clamp wherethe reference voltage can be adjusted. If the diode isinverted, a negative active clamp will result.

    FIGURE 40: Active Clamp Sample.

    VOUT

    VIN R1

    R2

    R1

    R3

    R3

    R2

    D1D2

    D1D2

    R5

    R4

    R6

    R7

    AO1

    AO2

    AO3

    -+

    -+

    -+

    VOUTVIN R1

    R2

    R3

    D1D2

    AO1-+ AO2

    -+

    C1

    D1 VOUT-+

    AO1

    -+

    AO2

    VIN

    VOUTVIN

    R2

    D1D2

    AO1 AO2-+

    -+

    C2

    -VC

    Run

    0VReset

    C1

    VOUTR1

    +-

    VIN

    P1 R3R2

    C1

    C2

    D1

    +V -V

    AO1

    VREF

    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 Microchip’s 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 ourproducts. Attempts to break Microchip’s code protection feature may be a violation of the Digital Millennium Copyright Act. If such actsallow 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 deviceapplications and the like is provided only for your convenienceand may be superseded by updates. It is your responsibility toensure that your application meets with your specifications.MICROCHIP MAKES NO REPRESENTATIONS ORWARRANTIES OF ANY KIND WHETHER EXPRESS ORIMPLIED, WRITTEN OR ORAL, STATUTORY OROTHERWISE, RELATED TO THE INFORMATION,INCLUDING BUT NOT LIMITED TO ITS CONDITION,QUALITY, PERFORMANCE, MERCHANTABILITY ORFITNESS FOR PURPOSE. Microchip disclaims all liabilityarising from this information and its use. Use of Microchipdevices in life support and/or safety applications is entirely atthe buyer’s risk, and the buyer agrees to defend, indemnify andhold harmless Microchip from any and all damages, claims,suits, or expenses resulting from such use. No licenses areconveyed, implicitly or otherwise, under any Microchipintellectual property rights.

    © 2011 Microchip Technology Inc.

    Trademarks

    The Microchip name and logo, the Microchip logo, dsPIC, KEELOQ, KEELOQ logo, MPLAB, PIC, PICmicro, PICSTART, PIC32 logo, rfPIC and UNI/O are registered trademarks of Microchip Technology Incorporated in the U.S.A. and other countries.

    FilterLab, Hampshire, HI-TECH C, Linear Active Thermistor, MXDEV, MXLAB, SEEVAL and The Embedded Control Solutions Company are registered trademarks of Microchip Technology Incorporated in the U.S.A.

    Analog-for-the-Digital Age, Application Maestro, CodeGuard, dsPICDEM, dsPICDEM.net, dsPICworks, dsSPEAK, ECAN, ECONOMONITOR, FanSense, HI-TIDE, In-Circuit Serial Programming, ICSP, Mindi, MiWi, MPASM, MPLAB Certified logo, MPLIB, MPLINK, mTouch, Omniscient Code Generation, PICC, PICC-18, PICDEM, PICDEM.net, PICkit, 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

    DS01353A-page 15

    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 Company’s 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, Microchip’s quality system for the design and manufacture of development systems is ISO 9001:2000 certified.

  • DS01353A-page 16 © 2011 Microchip Technology Inc.

    AMERICASCorporate Office2355 West Chandler Blvd.Chandler, AZ 85224-6199Tel: 480-792-7200 Fax: 480-792-7277Technical Support: http://www.microchip.com/supportWeb Address: www.microchip.comAtlantaDuluth, GA Tel: 678-957-9614 Fax: 678-957-1455BostonWestborough, MA Tel: 774-760-0087 Fax: 774-760-0088ChicagoItasca, IL Tel: 630-285-0071 Fax: 630-285-0075ClevelandIndependence, OH Tel: 216-447-0464 Fax: 216-447-0643DallasAddison, TX Tel: 972-818-7423 Fax: 972-818-2924DetroitFarmington Hills, MI Tel: 248-538-2250Fax: 248-538-2260IndianapolisNoblesville, IN Tel: 317-773-8323Fax: 317-773-5453Los AngelesMission Viejo, CA Tel: 949-462-9523 Fax: 949-462-9608Santa ClaraSanta Clara, CA Tel: 408-961-6444Fax: 408-961-6445TorontoMississauga, Ontario, CanadaTel: 905-673-0699 Fax: 905-673-6509

    ASIA/PACIFICAsia Pacific OfficeSuites 3707-14, 37th FloorTower 6, The GatewayHarbour City, KowloonHong KongTel: 852-2401-1200Fax: 852-2401-3431Australia - SydneyTel: 61-2-9868-6733Fax: 61-2-9868-6755China - BeijingTel: 86-10-8528-2100 Fax: 86-10-8528-2104China - ChengduTel: 86-28-8665-5511Fax: 86-28-8665-7889China - ChongqingTel: 86-23-8980-9588Fax: 86-23-8980-9500China - Hong Kong SARTel: 852-2401-1200 Fax: 852-2401-3431China - NanjingTel: 86-25-8473-2460Fax: 86-25-8473-2470China - QingdaoTel: 86-532-8502-7355Fax: 86-532-8502-7205China - ShanghaiTel: 86-21-5407-5533 Fax: 86-21-5407-5066China - ShenyangTel: 86-24-2334-2829Fax: 86-24-2334-2393China - ShenzhenTel: 86-755-8203-2660 Fax: 86-755-8203-1760China - WuhanTel: 86-27-5980-5300Fax: 86-27-5980-5118China - XianTel: 86-29-8833-7252Fax: 86-29-8833-7256China - XiamenTel: 86-592-2388138 Fax: 86-592-2388130China - ZhuhaiTel: 86-756-3210040 Fax: 86-756-3210049

    ASIA/PACIFICIndia - BangaloreTel: 91-80-3090-4444 Fax: 91-80-3090-4123India - New DelhiTel: 91-11-4160-8631Fax: 91-11-4160-8632India - PuneTel: 91-20-2566-1512Fax: 91-20-2566-1513Japan - YokohamaTel: 81-45-471- 6166 Fax: 81-45-471-6122Korea - DaeguTel: 82-53-744-4301Fax: 82-53-744-4302Korea - SeoulTel: 82-2-554-7200Fax: 82-2-558-5932 or 82-2-558-5934Malaysia - Kuala LumpurTel: 60-3-6201-9857Fax: 60-3-6201-9859Malaysia - PenangTel: 60-4-227-8870Fax: 60-4-227-4068Philippines - ManilaTel: 63-2-634-9065Fax: 63-2-634-9069SingaporeTel: 65-6334-8870Fax: 65-6334-8850Taiwan - Hsin ChuTel: 886-3-6578-300Fax: 886-3-6578-370Taiwan - KaohsiungTel: 886-7-213-7830Fax: 886-7-330-9305Taiwan - TaipeiTel: 886-2-2500-6610 Fax: 886-2-2508-0102Thailand - BangkokTel: 66-2-694-1351Fax: 66-2-694-1350

    EUROPEAustria - WelsTel: 43-7242-2244-39Fax: 43-7242-2244-393Denmark - CopenhagenTel: 45-4450-2828 Fax: 45-4485-2829France - ParisTel: 33-1-69-53-63-20 Fax: 33-1-69-30-90-79Germany - MunichTel: 49-89-627-144-0 Fax: 49-89-627-144-44Italy - Milan Tel: 39-0331-742611 Fax: 39-0331-466781Netherlands - DrunenTel: 31-416-690399 Fax: 31-416-690340Spain - MadridTel: 34-91-708-08-90Fax: 34-91-708-08-91UK - WokinghamTel: 44-118-921-5869Fax: 44-118-921-5820

    Worldwide Sales and Service

    02/18/11

    http://support.microchip.comhttp://www.microchip.com

    IntroductionBasic RectifiersFIGURE 1: Negative Half-Wave Rectifier.FIGURE 2: Positive Half-Wave Rectifier.FIGURE 3: Full-Wave Rectifier.Choosing the ComponentsTABLE 1: Advantages and Disadvantages of the Circuit

    Practical ExamplesFIGURE 4: Negative Half-Wave Rectifier Sample.FIGURE 5: Positive Half-Wave Rectifier Sample.FIGURE 6: Full-Wave Rectifier Sample.

    Active Half-Wave RectifierFIGURE 7: Op Amp Half-Wave Rectifier.FIGURE 8: Circuit Behavior on Low Frequency.FIGURE 9: Output Limitation on High-Frequency Input Signals.Choosing the ComponentsAdvantages and DisadvantagesTABLE 2: Advantages and Disadvantages of the Circuit

    Practical ExampleFIGURE 10: Half-Wave Rectifier with RL = 100W.FIGURE 11: Half-Wave Rectifier with RL = 1 kW.

    Improved Op Amp Half-Wave RectifierFIGURE 12: Have-Wave Rectifier Circuit Improvement.

    Choosing the ComponentsAdvantages and DisadvantagesTABLE 3: Advantages and Disadvantages of the Circuit

    Practical ExampleFIGURE 13: Improved Half-Wave Rectifier with RL = 1 KW.FIGURE 14: Circuit Behavior with 600 kHz Input Frequency.FIGURE 15: Negative Half-Wave Rectifier.FIGURE 16: Negative Cycle Rectifier Sample.

    Active Full-Wave RectifierFIGURE 17: Full-Wave Rectifier Circuit.Choosing the ComponentsAdvantages and DisadvantagesTABLE 4: Advantages and Disadvantages of the Circuit

    Practical ExampleTABLE 5: Values For rectified, equal amplitudeFIGURE 18: Full-Wave Rectifier Circuit Simulation with the Recommended Values of the Resistors.

    Two Stage Op Amp Full-Wave RectifierFIGURE 19: Two Stage Op Amp Full- Wave Rectifier Circuit.Choosing the ComponentsAdvantages and DisadvantagesTABLE 6: Advantages and Disadvantages of the Circuit

    Practical ExampleFIGURE 20: Full-Wave Rectifier Circuit Simulation.FIGURE 21: Circuit Behavior when Input Frequency = 100 kHz.

    Basic Peak DetectorsFIGURE 22: Basic Peak Detector Operation.Choosing the ComponentsAdvantages and DisadvantagesTABLE 7: Advantages and Disadvantages of the Circuit

    Practical ExampleFIGURE 23: Peak Detector Simulation.

    Two-Stage Active Peak DetectorFIGURE 24: Two-Stage Peak Detector Circuit.

    Choosing the ComponentsPractical ExampleFIGURE 25: One Peak Detector Simulation Results.

    Basic ClampFIGURE 26: Basic Diode Negative Clamp.Practical ExampleFIGURE 27: Basic Diode Clamp – Circuit Simulation.

    Active ClampFIGURE 28: Op Amp Clamp.

    Choosing the ComponentsAdvantages and DisadvantagesTABLE 8: Advantages and Disadvantages of the Circuit

    Practical ExampleFIGURE 29: Op Amp Clamp Circuit Simulation Result.

    ConclusionAppendixHalf-Wave RectifiersFIGURE 30: Positive Half-Wave Rectifier 1.FIGURE 31: Negative Half-Wave Rectifier 1.FIGURE 32: Positive Half-Wave Rectifier 2.FIGURE 33: Negative Half-Wave Rectifier 2.

    Full-Wave RectifiersFIGURE 34: Two Stage Full-Wave Rectifier 1.FIGURE 35: Two Stage Full-Wave Rectifier 2.FIGURE 36: Three Stage Full-Wave Rectifier.

    Peak DetectorsFIGURE 37: Peak Detector Rectifier 1.FIGURE 38: Peak Detector Rectifier 2.FIGURE 39: Peak Detector Rectifier 3.

    ClampFIGURE 40: Active Clamp Sample.Corporate OfficeAtlantaBostonChicagoClevelandFax: 216-447-0643DallasDetroitIndianapolisTorontoFax: 852-2401-3431Australia - SydneyChina - BeijingChina - ShanghaiIndia - BangaloreKorea - DaeguKorea - SeoulSingaporeTaiwan - TaipeiFax: 43-7242-2244-393Denmark - CopenhagenFrance - ParisGermany - MunichItaly - MilanSpain - MadridUK - WokinghamWorldwide Sales and Service

    TrademarksWorldwide Sales and Service