A 100kHz Zero Droop Precision Peak Detector

Sdílet
Vložit
  • čas přidán 14. 07. 2024
  • Here's an inexpensive precision peak detector circuit that accurately tracks the peak voltage of input signals at frequencies up to 100kHz and has zero voltage droop over an indefinite period of time...no microcontrollers required! Additional references and schematics can be found at: www.analogzoo.com/2016/02/a-10...
  • Věda a technologie

Komentáře • 50

  • @w2aew
    @w2aew Před 8 lety +42

    I did a similar thing years ago using a simple counter and DAC - before digipots were widely available. Nice video as always.

    • @Analogzoo
      @Analogzoo  Před 8 lety +14

      +w2aew Nice! The first time I saw a DAC used like that was in a Jim Williams circuit - it was an epiphany for me that DACs had useful applications beyond interfacing microcontrollers with the "real world". :)

    • @brendandsilva4498
      @brendandsilva4498 Před 3 lety +2

      @@Analogzoo Late here, but wouldn't the high load capacitance and replacing the 1st OPAMP with a comparator (no compensation capacitor) make the comparator circuit unstable at high frequencies?

  • @scarpia519
    @scarpia519 Před 2 lety +6

    This video saved me one thousand bucks, thanks!! I was close to acquiring a scope with a companion arbitrary wave generator (Siglent) so I could make Bode plots of analog audio bandpass peaking filters that I make for my ham receivers. I made the circuit (with the op amp not the digital resistor version) as described in the video and it did indeed work. Applying the peak detector to my filter's output after sweeping the filter's input, my scope displayed a neat Bode plot of the filter's response; however, the plot did not tell me anything that I did not already know from using the scope's FFT function not to mention basic cursor data. For my application, the Bode plot isn't as valuable as I thought it could be. I might go forward and get a new scope anyhow but at much less $$$ than I would have spent just to have the Bode plot function. For the record, my analog scope is a Tek 2247A and my 'digital' scope is a Tek TDS1002. The Bode plot can still be useful in the audio/low frequency range but rather than dropping a kilobuck, I'll repackage the peak detector and use it as a tool if I ever need to see cut off frequencies of low or high pass filters, etc.

  • @Avionics1958
    @Avionics1958 Před 4 lety +2

    What a beautiful circuit design. Thanks

  • @microlatinamicrocontrol1240

    Such a great technique and so well explained. I will use it for a new project I have. Thanks and greetings from Buenos Aires, Argentina.

  • @damny0utoobe
    @damny0utoobe Před 5 lety +1

    Very good tutorial. Thanks for passing the EE knowledge.

  • @dancollins1012
    @dancollins1012 Před 4 lety +4

    This is what CZcams is all about - great content... good one!

  • @BR.
    @BR. Před 6 lety +1

    Thanks! Very nicely explained.

  • @ohmedarick1
    @ohmedarick1 Před 5 lety

    Thank you great video as always

  • @bvillas
    @bvillas Před 8 lety +1

    Thanks for the nice video. I had problems with a similar circuit using lm324. Definitely going to use the lm393 solution.

    • @user-ue1ti3ri3w
      @user-ue1ti3ri3w Před 4 lety

      Hello, pls could you explain what sort of problem you had met. Im goin to build a circuit like this. So been aware of different issues is a big deal. Thanks a lot

  • @jb3757
    @jb3757 Před 2 lety

    loved it, you are simply great.

  • @ydonl
    @ydonl Před 4 lety +1

    Something not discussed is that in the original circuit, the op-amp goes into saturation toward the negative supply on the negative half-cycle of the input, and thus has to devote quite a bit of time and effort to desaturate and get back to normal operation in order to track the next positive half-cycle. This is a basic problem that's worth solving, and one approach is to use a second diode to control the negative half cycle, converting the the circuit to more or less a unity gain buffer, and keeping away from that crazy saturation. It's still a pretty simple circuit, and might off some performance improvements -- or, depending on what you're doing... maybe no big deal. :)

    • @g1ld
      @g1ld Před 3 lety

      Interesting, do you mean a second diode from the inverting to non inverting input to keep it within 0.7V? Also maybe decreasing the 100k input resistor could make it a bit faster at high freq?

    • @ydonl
      @ydonl Před 3 lety

      @@g1ld There are various capacitances in the opamp, and when they're fully charged, and it's going to take a long time to pull all that charge back out. When an opamp goes into saturation, it takes a while to recover. When the next positive half cycle comes in, we're still trying to get from full negative back to zero so we can start tracking it. So the goal is to prevent the output from driving toward negative infinity as it tries to balance the inputs (which can never happen because of the diode). To do that, you can use another diode "inside" the other one in the feedback loop, reversed from the other one, such that it essentially puts the opamp in unity gain on the negative half cycle. Then the output doesn't have to work so hard, and recovery time increases, and frequency response goes up.
      My main point was that the slew rate is being "abused" a bit with this simple circuit, and it's on the negative (otherwise uninteresting) half cycle. The MCP602 has a unity-gain bandwidth of 2.8MHz. My theory is that the reason the comparator went faster in this test is that the comparator may have less capacitance, but more interestingly, it just gets pulled to ground on the negative half cycle rather than being pulled all the way to a negative rail.
      Or so it seems to me, an interested amateur!
      Google "fast peak detector," and look for two diodes.

    • @g1ld
      @g1ld Před 3 lety

      Thank you for the explanation @Phreadrick !

  • @2LukeLOL
    @2LukeLOL Před 4 lety +2

    This is very professionally done, congrats! out of curiosity, what power consumption did you get from this circuit? I am using a peak detector for my circuit using a low power CMOS op-amp and the circuit itself drains around 1 mA of power, did you find the AD5220 draws a lot of current?

  • @dwDragon88
    @dwDragon88 Před 8 lety +1

    Nice! I hadn't thought of using a digital pot in that way.

    • @Analogzoo
      @Analogzoo  Před 8 lety +2

      +dwDragon88 Me either. :) Saw it in a Maxim app note and thought it was a pretty clever use of a digital pot.

  • @chronobot2001
    @chronobot2001 Před 5 lety

    Brilliant !

  • @adilmalik7066
    @adilmalik7066 Před 8 lety +1

    amazing as always. love your love for analog :). one question: why do you have a pull up and pull down on the relaxation oscillator. i havnt seen that before in standard implementations.

    • @Analogzoo
      @Analogzoo  Před 8 lety +2

      +Adil Malim In dual supply circuits the "pull up" is not needed, since the "pull down" resistor is connected to ground, which is half way between the voltage rails. The "pull up" is added to single supply circuits such as this. See the "Astable Circuit Operation" section of this page (it explains it nicely with schematics and scope traces much better than I can describe it in a youtube comment! :) : www.learnabout-electronics.org/Oscillators/osc42.php

    • @adilmalik7066
      @adilmalik7066 Před 8 lety

      +devttys0 thanks for the link! i see why now! one resistor sets the appropriate schmitt trigger threshold for single supply operation and the other prevents cross over distortion. thanks!

  • @jalarmas1
    @jalarmas1 Před 6 lety

    hello how are you, excellent explanation, I want to consult you for a detection circuit from peak to peak but it is to measure the power delivered by an ignition coil, from now thank you

  • @henryrobinson9837
    @henryrobinson9837 Před 4 lety +1

    i'm kinda new at this, got any good ideas for a 100hz LPF with an op-amp. its used with automotive diagnostics with a cheap scope

  • @Ahmadnaweed786
    @Ahmadnaweed786 Před 4 lety +1

    What if we want that droop? So that the output is always precisely equals to the current peak value of the input not previous one.

  • @josephcote6120
    @josephcote6120 Před 6 lety +1

    It looks like it wouldn't be all that hard to use an LM398 style sample-and-hold chip. Same comparator setup to drive the sample pin.

  • @rulyvideo
    @rulyvideo Před 8 lety

    interesting project, can it be used to detect 1 period of 100khz wave? i mean i need to detect peak of a single wave of 100khz,. (100.000 times detect-reset-detect-reset) and still accurate? or at least how fast it detect the peak? 20 ns, or 50 will be ok, any clue?

  • @SegawaKS
    @SegawaKS Před 6 lety +1

    Hello, wich diodes ure using ?

  • @brendandsilva4498
    @brendandsilva4498 Před 3 lety

    Late here, but wouldn't the high load capacitance and replacing the 1st OPAMP with a comparator (no compensation capacitor) make the comparator circuit unstable at high frequencies?

  • @SomeRandomPerson163
    @SomeRandomPerson163 Před 5 lety

    Nice video! but I have some doubts about 6:28 - should we use diod on LM393 output like before? Is it correct that we have positive feedback? Or it's all just little mistake while drawing?

    • @BEdmonson85
      @BEdmonson85 Před 5 lety

      You don't need the diode since we're not charging a capacitor here. We're only holding the CS line low while the clock sets the digipot output.

  • @qzorn4440
    @qzorn4440 Před 2 lety

    wow is it possible to make a good quality multimeter based on voltage to frequency counter, instead of the op-amp range resistors front end? thanks..:)

  • @DeeegerD
    @DeeegerD Před 8 lety

    Thought I might find this info useful for a problem I'm working on. I need to detect the peak voltage of an RF signal prior to feeding it into a circuit with a limited input. If the voltage is above the safe limit I would switch in an attenuator. Unfortunately I don't think I will find something with a slew rate fast enough for HF. Any ideas?

    • @Analogzoo
      @Analogzoo  Před 8 lety

      +Digger D It's common in RF to just use a Germanium or Schottky diode to rectify the signal and charge up a capacitor for the peak detection. For general input protection I think this would work fine, just remember that there's a 200-300mV drop across the diode, so you'd want to switch in the attenuator if the peak detector output is within ~300mV of your max safe value. I don't know your specific application, but for input protection I don't think you'd need it to be super precise...if the input signal gets anywhere near the max voltage level, you'll want to switch in the attenuator!

    • @DeeegerD
      @DeeegerD Před 8 lety

      devttys0 Thanks for your reply. As I was pondering your video and my problem, I questioned the need for that precision as well. I plan on putting a frequency counter module PLJ-8LED from eBay into a case and I was thinking that adding automatic attenuation of a signal to protect the module would be a nice feature. So your reply and solution should work fine. I will use an LED to indicate attenuation, etc... Thanks again.

  • @izunnanwokoye7725
    @izunnanwokoye7725 Před 3 lety

    Can this be used to detect 500MhZ signals. If not how fast can it go?

  • @nicolarosano
    @nicolarosano Před 4 měsíci

    Is there a detailed schematic for this?

  • @dmrt8828
    @dmrt8828 Před 10 měsíci

    Link in your description is unaviable. Could you tell parametres of all used elements or redirect to enabled source for information?

  • @riccardoanzil5998
    @riccardoanzil5998 Před 4 lety +1

    Nice!! Thank you :) What about going up to 250KHz with the first comparator circuit? What components would you change? What comparator specs?

  • @subhankarde3300
    @subhankarde3300 Před 8 lety

    +devttys0 Why is the 1k resistor connected to the output of LM393 ?

    • @Analogzoo
      @Analogzoo  Před 8 lety

      +Subhankar De The LM393 has an open collector output, which means that it will pull the output low when it needs to output a 0V state, but doesn't actively drive the output high during a high output state. To ensure a high output voltage when the comparator "goes high", you have to add a pull up resistor on the output pin.

    • @subhankarde3300
      @subhankarde3300 Před 8 lety

      +devttys0 Thanks Craig.

  • @sergsapov2927
    @sergsapov2927 Před 4 lety

    What about 80 MHz?

  • @akashprajapati2384
    @akashprajapati2384 Před 4 lety

    Will it be able to detect 1mV of peak?

  • @martinmartinmartin2996

    4:01/10:41 BIG PROBLEM: what happens when NO input signal is connected to LM393 ?
    clue: consider pdf1.alldatasheet.com/datasheet-pdf/view/172081/STMICROELECTRONICS/LM393.html
    Input Offset Voltage =1mv

  • @SegawaKS
    @SegawaKS Před 6 lety

    Our circuit doesn’t work 🙄