# what's the diode function in the peak-detector

Status
Not open for further replies.

#### shanmei

Why there is a diode as in the red cycle in the peak-detector circuit? Thanks. It compensates for the voltage drop across the upper diode.

In theory the voltage at the inverting input should be the same as the voltage across Ro.
The output of the op amp being one diode drop higher than both.

• shanmei

### shanmei

Points: 2
Without the extra diode the output voltage from the peak detector is a diode forward voltage drop (0.65V) less than the peak input voltage. If the diodes match then the output voltage is the same as the input peak voltage.

• shanmei

### shanmei

Points: 2
It also compensates for the Vf of the diode changing with temperature.
Frank

• shanmei

### shanmei

Points: 2

No.
Due to the high open-loop gain of the op amp, the voltage at c will be whatever it takes to make the voltage at b equal to the voltage at a.
Thus the voltage at c will be one diode drop higher than the voltage at a so that the voltage at d equals the voltage at e, b, and a.
The means e (Vo) equals the peak voltage of the input.

• shanmei

### shanmei

Points: 2
voltage c > voltage b, so diode D2 is not forward biased?

voltage c > voltage b, so diode D2 is not forward biased?
No.
If D2 were forward biased when the peak voltage is being measured then the voltages a and b would not be equal, would they?
D2 only conducts when the input is below the peak voltage and the output of A1 starts to go negative.
This closes the feedback loop around A1 and prevents it from going into reverse (negative) saturation.

So the negative feedback loop is through D1 when it is tracking the peak positive voltage and through D2 when the input voltage is below the peak voltage stored in C.

You need to think about how negative feedback works with op amps.
An op amp will generate whatever output voltage is needed (within its saturation limits) to keep the (-) input voltage essentially equal to the (+) input voltage.
Any solution that has the two inputs at a different voltage is an incorrect solution.

• shanmei

### shanmei

Points: 2
Wow, I see, really appreciate your analysis.

When input is the peak positive voltage, D2 is off, and D1 is on.

When input is below the peak voltage, D2 is on, and D1 is off.

Wow, I see, really appreciate your analysis.

When input is the peak positive voltage, D2 is off, and D1 is on.

When input is below the peak voltage, D2 is on, and D1 is off.
You got it, grasshopper. :grin:

You can check the same circuit in Fundamentals of microelectronics by Razavi Chapter 8
He is discussing the peak detector the first stage you are using.

• shanmei

Points: 2