I had initially planned to use a standard peak detector circuit with an op amp of a much lower bandwidth than the signal I want to measure - my assumption was that given a high enough time domain the low bandwidth wouldn't matter "some" of the signal would make it through and I would read the correct value eventually. I'm now starting to doubt this based on some articles such as this from Analog Devices that claims inaccuracies at high frequencies.

This is for a pico driven function generator using an AD9833 module, that needs to be able to sample peak to peak for closed-loop gain control of the signal amplifier. I'm using a DAC with more than enough accuracy for my purposes (<5 mV steps over the 24 V range I'm using) to provide the reading, I just require a way to process a signal to convert the peak to DC - though I'm open to other solutions for how to solve this. I plan to potentially use a calibration curve, so some inaccuracy can be dealt with but wanted to ask some more qualified people how to solve this problem.

The signal will be anywhere from ~1-24V p-p and (hopefully) useful within ~0.05 Hz to 10 MHz, though feel free to tell me if this is a lofty goal.

  • \$\begingroup\$ Is anything preventing you from doing this digitally? \$\endgroup\$
    – Voltage Spike
    Jun 22 at 21:54
  • \$\begingroup\$ You mean sampling so fast I can figure it out that way, or calculating the amplitude based off my understanding of the circuit? For the first is speed - I don't believe I'll be able to sample fast enough on the pico. For the second, I plan to, but want closed loop control to (hopefully) provide better accuracy Edit: let me know if the idea of closed loop control for such a circuit is silly - i honestly have no clue \$\endgroup\$ Jun 22 at 22:09
  • \$\begingroup\$ If your circuit is generating the signal, shouldn't you know the amplitude? \$\endgroup\$
    – bobflux
    Jul 1 at 15:18
  • \$\begingroup\$ In theory yes, but in practice a lot of the components have changing impedance over the frequency range - and being able to measure directly would allow for a far quicker production of calibration data versus the use of the oscilloscope I have \$\endgroup\$ Jul 3 at 13:39

1 Answer 1


The signal will be anywhere from ~1-24V p-p and (hopefully) useful within ~0.05Hz to 10MHz, though feel free to tell me if this is a lofty goal.

The big issue is the bandwidth of the amplifiers and transistors and possibly the slew rate (but if the slew rate is a problem you can attenuate the signal from 24V down to a more manageable voltage like 5V.

Another thing is peak detection may not be the best thing to do, a precision rectifier might work in this case.

The problem with both circuits is they need a significant amount of bandwidth in the active elements because of the sharp edges of the signal (ie the peak detector needs to run at (say) least an order of magnitude faster to be able to rise faster than the frequency of interest). Either way you'll probably need a faster opamp than the ones in the article. Once you get to designing analog circuits faster than 50MHz parasitics come into play and the design is more difficult than replicating a circuit from an article, much care must be taken to layout and passives - otherwise the signal will be flattened from peak to peak. You could always simulate the same circuits with a faster opamp and see the results, then throw in parasitics.

Another way you could do this is feed in the 10MHz signal into an SDR and measure the amplitude.

  • \$\begingroup\$ Would you say 10MHz may be a too lofty goal then? I don't really need it but the ad9833 is capable and I'm down for designing and ordering circuit boards with significant consideration for it. I have two ultra high slew rate op-amps but one is limited to 10v p-p, the other is being used for the main amplification. Specifically the AD8042ARZ is actually dual op-amp and is apparently good to 160MHz, 200V/us slew so maybe that could be used? Ofc this would still involve significant considerations to high frequency domains. \$\endgroup\$ Jun 22 at 23:01
  • \$\begingroup\$ Actually, I've been looking into making a function generator with the pico at its heart for a while, trying to avoid inputs that are completely ignorant of the digital side like a pot to control gain, how would I go about doing this might be the more important question? \$\endgroup\$ Jun 22 at 23:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.