Electronics-Related.com
Forums

Favorite peak detector?

Started by Klaus Kragelund December 28, 2023
On Friday 29 December 2023 at 17:28:24 UTC+1, John Larkin wrote:
> On Fri, 29 Dec 2023 08:11:43 +0000, piglet <erichp...@hotmail.com> > wrote: > >On 29/12/2023 01:25, Lasse Langwadt Christensen wrote: > >> fredag den 29. december 2023 kl. 02.11.07 UTC+1 skrev Klaus Kragelund: > >>> Hi > >>> > >>> I have a voltage, only present for halfsine peak of 2MHz (500ns wide), which is 500V peak. > >>> > >>> I need to know the peak voltage, in an embedded system where the ADC samples at max 5MSa. So way too slow to find the peak. > >>> > >>> Figure 7-23 of this datasheet has a classic peak detector: > >>> > >>> https://www.ti.com/lit/ds/symlink/lmc6482.pdf?HQS=dis-dk-null-digikeymode-dsf-pf-null-wwe&ts=1703760014317&ref_url=https%253A%252F%252Fwww.ti.com%252Fgeneral%252Fdocs%252Fsuppproductinfo.tsp%253FdistId%253D10%2526gotoUrl%253Dhttps%253A%252F%252Fwww.ti.com%252Flit%252Fgpn%252Flmc6482 > >>> > >>> But for a 2MHz signal, I would need a very fast opamp. > >>> > >>> I have done simple peak detection, with a diode, and a sample capacitor, followed with an opamp, but nothing is really good. > >>> In this case I have 95k/5k resistor to bring the voltage down to 24V, since then the simple diode drop won't matter much. But 30V opamps are slooooow, so no real good option. > >>> > >>> I tried using an emitter follower, but it has a funny peak where the base voltage is higher than the peak voltage, and also has potential to die due to Veb voltage. > >>> > >>> One idea I had, use the 24V divider with the diode, then right after the pulse, activate another resistive divider with an FET to bring it to 5V where fast opamps are cheaper. The FET will only turn on as long as to sample the voltage, but seems overly complicated. > >>> > >>> Any favorite peak detector? > >> > >> https://www.analog.com/en/design-notes/peak-detectors-gain-in-speed-performance.html ? > > > >Instead of op-amp use a comparator, they are often much faster? > > > >piglet > > > One could divide down and use a comparator. Basicaslly slowly tease > the other input of the comparator until it's tripping about half the > time. > > If his ADC sample time is fast, he could random or equivalent-time > sample to find the peak. Just make the ADC clock async to the HV > pulse. >
The STM32 needs to aquire the signal right after S/H. But I could add my own sample/hold. Well, that's what I have been doing actually so far.
> Here's the monitor pickoff from my Pockels Cell driver. The pulse is > about 1400v 7ns, sort of half-sine. Could have used a BUF602. > > https://www.dropbox.com/scl/fi/8s5xexx4n9i1eyhgxtps8/T850_Pickoff.jpg?rlkey=bsq2uemyy9ijdruiq6lqnwdw0&raw=1 > > https://www.dropbox.com/scl/fi/rfoqchosbazddbql8smut/DSC02778.JPG?rlkey=wm0k2ys2917n8krscptwvss9p&raw=1
On Friday, December 29, 2023 at 5:05:07&#8239;PM UTC-8, Klaus Kragelund wrote:
> On Friday 29 December 2023 at 03:38:56 UTC+1, John Larkin wrote: > > On Thu, 28 Dec 2023 17:11:03 -0800 (PST), Klaus Kragelund > > <klaus.k...@gmail.com> wrote: > > > > >Hi > > > > > >I have a voltage, only present for halfsine peak of 2MHz (500ns wide), which is 500V peak. > > > > > >I need to know the peak voltage, in an embedded system where the ADC samples at max 5MSa. So way too slow to find the peak.
> > >One idea I had, use the 24V divider with the diode, then right after the pulse, activate another resistive divider with an FET to bring it to 5V where fast opamps are cheaper. The FET will only turn on as long as to sample the voltage, but seems overly complicated. > > > > > >Any favorite peak detector? > > What's the pulse reprate? > 100kHz > > > > Target accuracy? > I would like 5%, but may be difficult
Sounds dead easy to me; just use a diode-capacitor and when the peak is past, the capacitor IS your peak hold value; as long as the event can generate an interrupt to make the ADC do its cycle, that gives you most of ten microseconds to reset the capacitor before the next peak. Heck, you could use a calibrated current sink on the hold capacitor and a comparator with 5MHz clock will resolve about 3% (32 periods full scale) in six of your available 10 us; only takes a counter/timer instead of the full ADC function. Faster clock would also work...
On a sunny day (Fri, 29 Dec 2023 13:11:46 -0800) it happened John Larkin
<jl@997PotHill.com> wrote in <heduoid3ajbkf7blifo5pm91rj5g77cutv@4ax.com>:

>On Fri, 29 Dec 2023 11:10:05 -0800 (PST), Fred Bloggs ><bloggs.fredbloggs.fred@gmail.com> wrote: > >>On Thursday, December 28, 2023 at 8:11:07?PM UTC-5, Klaus Kragelund wrote: >>> Hi >>> >>> I have a voltage, only present for halfsine peak of 2MHz (500ns wide), which is 500V peak. >>> >>> I need to know the peak voltage, in an embedded system where the ADC samples at max 5MSa. So way too slow to find the peak. >>> >>> Figure 7-23 of this datasheet has a classic peak detector: >>> >>> >>> https://www.ti.com/lit/ds/symlink/lmc6482.pdf?HQS=dis-dk-null-digikeymode-dsf-pf-null-wwe&ts=1703760014317&ref_url=https%253A%252F%252Fwww.ti.com%252Fgeneral%252Fdocs%252Fsuppproductinfo.tsp%253FdistId%253D10%2526gotoUrl%253Dhttps%253A%252F%252Fwww.ti.co >>> m%252Flit%252Fgpn%252Flmc6482 >>> >>> But for a 2MHz signal, I would need a very fast opamp. >>> >>> I have done simple peak detection, with a diode, and a sample capacitor, followed with an opamp, but nothing is really good. >>> >>> In this case I have 95k/5k resistor to bring the voltage down to 24V, since then the simple diode drop won't matter much. But >>> 30V opamps are slooooow, so no real good option. >>> >>> I tried using an emitter follower, but it has a funny peak where the base voltage is higher than the peak voltage, and also >>> has potential to die due to Veb voltage. >>> >>> One idea I had, use the 24V divider with the diode, then right after the pulse, activate another resistive divider with an >>> FET to bring it to 5V where fast opamps are cheaper. The FET will only turn on as long as to sample the voltage, but seems overly >>> complicated. >>> >>> Any favorite peak detector? >> >>Does the peak measurement have to be single-shot or it can it take several cycles? If you want single-shot, it's going to be >>pricey. Something like the OPA615 will do it. If you can work with an integrated measurement, it will be 1/3 the cost, something >>like the sampling comparator works well many times. > >Buffer, peak rectify, calibrate against a good scope. >
Voltage divider followed by a simple analog video ADC gives you 8 bit accuracy digital output for digital processing. Plenty of analog video opamps available too to make a fast peak detector. It is almost audio so low.... Yes I know, some audiophiles can hear 2 MHz... Just a voltage divider, diode, capacitor to ground like an AM detector into his slow ADC is the simplest, no opamp needed! Need to know more about the application.
On Fri, 29 Dec 2023 21:45:41 -0800 (PST), whit3rd <whit3rd@gmail.com>
wrote:

>On Friday, December 29, 2023 at 5:05:07?PM UTC-8, Klaus Kragelund wrote: >> On Friday 29 December 2023 at 03:38:56 UTC+1, John Larkin wrote: >> > On Thu, 28 Dec 2023 17:11:03 -0800 (PST), Klaus Kragelund >> > <klaus.k...@gmail.com> wrote: >> > >> > >Hi >> > > >> > >I have a voltage, only present for halfsine peak of 2MHz (500ns wide), which is 500V peak. >> > > >> > >I need to know the peak voltage, in an embedded system where the ADC samples at max 5MSa. So way too slow to find the peak. > >> > >One idea I had, use the 24V divider with the diode, then right after the pulse, activate another resistive divider with an FET to bring it to 5V where fast opamps are cheaper. The FET will only turn on as long as to sample the voltage, but seems overly complicated. >> > > >> > >Any favorite peak detector? >> > What's the pulse reprate? >> 100kHz >> > >> > Target accuracy? >> I would like 5%, but may be difficult > >Sounds dead easy to me; just use a diode-capacitor and when the peak is past, the capacitor IS your peak hold >value;
500 volt diode?
>as long as the event can generate an interrupt to make the ADC do its cycle, that gives you most of >ten microseconds to reset the capacitor before the next peak. >Heck, you could use a calibrated current sink on the hold capacitor and a comparator with 5MHz clock >will resolve about 3% (32 periods full scale) in six of your available 10 us; only takes a counter/timer instead of >the full ADC function. Faster clock would also work...
On Sat, 30 Dec 2023 05:48:47 GMT, Jan Panteltje <alien@comet.invalid>
wrote:

>On a sunny day (Fri, 29 Dec 2023 13:11:46 -0800) it happened John Larkin ><jl@997PotHill.com> wrote in <heduoid3ajbkf7blifo5pm91rj5g77cutv@4ax.com>: > >>On Fri, 29 Dec 2023 11:10:05 -0800 (PST), Fred Bloggs >><bloggs.fredbloggs.fred@gmail.com> wrote: >> >>>On Thursday, December 28, 2023 at 8:11:07?PM UTC-5, Klaus Kragelund wrote: >>>> Hi >>>> >>>> I have a voltage, only present for halfsine peak of 2MHz (500ns wide), which is 500V peak. >>>> >>>> I need to know the peak voltage, in an embedded system where the ADC samples at max 5MSa. So way too slow to find the peak. >>>> >>>> Figure 7-23 of this datasheet has a classic peak detector: >>>> >>>> >>>> https://www.ti.com/lit/ds/symlink/lmc6482.pdf?HQS=dis-dk-null-digikeymode-dsf-pf-null-wwe&ts=1703760014317&ref_url=https%253A%252F%252Fwww.ti.com%252Fgeneral%252Fdocs%252Fsuppproductinfo.tsp%253FdistId%253D10%2526gotoUrl%253Dhttps%253A%252F%252Fwww.ti.co >>>> m%252Flit%252Fgpn%252Flmc6482 >>>> >>>> But for a 2MHz signal, I would need a very fast opamp. >>>> >>>> I have done simple peak detection, with a diode, and a sample capacitor, followed with an opamp, but nothing is really good. >>>> >>>> In this case I have 95k/5k resistor to bring the voltage down to 24V, since then the simple diode drop won't matter much. But >>>> 30V opamps are slooooow, so no real good option. >>>> >>>> I tried using an emitter follower, but it has a funny peak where the base voltage is higher than the peak voltage, and also >>>> has potential to die due to Veb voltage. >>>> >>>> One idea I had, use the 24V divider with the diode, then right after the pulse, activate another resistive divider with an >>>> FET to bring it to 5V where fast opamps are cheaper. The FET will only turn on as long as to sample the voltage, but seems overly >>>> complicated. >>>> >>>> Any favorite peak detector? >>> >>>Does the peak measurement have to be single-shot or it can it take several cycles? If you want single-shot, it's going to be >>>pricey. Something like the OPA615 will do it. If you can work with an integrated measurement, it will be 1/3 the cost, something >>>like the sampling comparator works well many times. >> >>Buffer, peak rectify, calibrate against a good scope. >> > >Voltage divider followed by a simple analog video ADC gives >you 8 bit accuracy digital output for digital processing. >Plenty of analog video opamps available too to make a fast peak detector. >It is almost audio so low.... >Yes I know, some audiophiles can hear 2 MHz...
>Just a voltage divider, diode, capacitor to ground like an AM detector >into his slow ADC is the simplest, no opamp needed!
The numbers might get awkward. And the power dissipation.
>Need to know more about the application. >
Yes.