Projects / Peak detector and hold

Peak detector and hold

Intermediate1 hGuided buildReviewed

Build it step by step

0 of 7 done
  1. LM35824.9°C

    Build the follower

    Wire the op-amp as a follower with the pot as input and check the output tracks it.

  2. Add the diode and capacitor

    Place the diode in the loop and the 1 µF capacitor on the hold node.

  3. Raise the pot

    The held voltage follows the pot upwards.

  4. Lower the pot

    The held voltage stays near the peak and falls slowly through the 100 kΩ.

  5. Press reset

    The hold node drops to near zero through the 1 kΩ resistor.

  6. Try a changing input

    Turn the pot up and down and note the meter keeps the highest point.

  7. Remove the bleed resistor

    See the hold last much longer.

In short

How do you build a peak detector and hold?

An op-amp, diode and capacitor hold the highest voltage seen, with a button to reset. You need LM358 Op-Amp, Signal Diode 1N4148, Electrolytic capacitor 1 µF, Resistor 1 kΩ, Resistor 100 kΩ, Resistor 10 kΩ, Potentiometer 10 kΩ, Tactile push button 6 mm, Digital multimeter, Breadboard 830 Tie Points, 9 V battery and 9 V battery snap with DC jack. It takes 7 steps and about 60 minutes.

Level
Intermediate
Time
About 60 min
Parts
12

Parts list

Tick what you already own. It saves to My Garage, so “Build with what I have” knows.

Wiring

FromToWhy
9 V battery ++ railSupply
9 V battery -- railGround
LM358 pin 8+ railPower
LM358 pin 4- railGround
10 kΩ resistor+ rail and potentiometer topLimits the signal to about 4.5 V
Potentiometer bottom- railSignal source
Potentiometer wiperLM358 pin 3 (IN+A)Input signal
LM358 pin 1 (OUT-A)1N4148 anodeOutput to the diode
1N4148 cathodeHold node HHold node, bar on the diode towards H
Hold node HLM358 pin 2 (IN-A)Feedback from the held voltage
1 µF capacitorHold node H and - rail, + on HHold capacitor
100 kΩ resistorHold node H and - railSlow bleed so the hold can fall
Button and 1 kΩ resistor in seriesHold node H and - railReset
MultimeterHold node H and - railRead the held voltage

No code needed

No code. The diode is inside the feedback loop, so the op-amp makes up for the diode drop and the capacitor charges to the true input peak. The diode stops the capacitor discharging back through the op-amp when the input falls. The 100 kΩ resistor lets the hold droop slowly (a time constant of 0.1 s with 1 µF), which is useful for watching it on a meter; remove it if you want the hold to last for many seconds, and it will then droop only through the capacitor and meter leakage. The LM358 input range stops about 1.5 V below the supply, so the series 10 kΩ resistor keeps the pot below 4.5 V.

Test checklist

What you should see at each check. If a reading is far off, stop and use the troubleshooting list.

CheckExpected
Pot raised to 3 V then loweredMeter stays near 3 V and decays slowly
Reset pressedHold node drops to near 0 V
Without the bleed resistorHold stays for tens of seconds
Pot raised again after resetHold follows up again

If it does not work

Hold voltage low by 0.6 V

Take the feedback from the cathode side of the diode, not the op-amp output.

Hold voltage does not rise

Check the diode direction and that pin 3 is the signal.

Hold falls too fast

Use a larger bleed resistor or none.

Reset does nothing

Check the button wiring to the hold node.

Still stuck? Find the fault step by step with your multimeter →

Ask Lark AI

Common questions

What parts do I need for the peak detector and hold?

LM358 Op-Amp, Signal Diode 1N4148, Electrolytic capacitor 1 µF, Resistor 1 kΩ, Resistor 100 kΩ, Resistor 10 kΩ, Potentiometer 10 kΩ, Tactile push button 6 mm, Digital multimeter, Breadboard 830 Tie Points, 9 V battery and 9 V battery snap with DC jack.

How long does the peak detector and hold take to build?

About 60 minutes for a intermediate maker, in 7 steps.

How do I know the peak detector and hold works?

Pot raised to 3 V then lowered: Meter stays near 3 V and decays slowly. Reset pressed: Hold node drops to near 0 V. Without the bleed resistor: Hold stays for tens of seconds.

Hold voltage low by 0.6 V: what should I check?

Take the feedback from the cathode side of the diode, not the op-amp output.

Hold voltage does not rise: what should I check?

Check the diode direction and that pin 3 is the signal.

Hold falls too fast: what should I check?

Use a larger bleed resistor or none.

Reset does nothing: what should I check?

Check the button wiring to the hold node.