Author Topic: Fast precision rectifier/absolute-peak-detector  (Read 10606 times)

0 Members and 1 Guest are viewing this topic.

Offline EliminateurTopic starter

  • Regular Contributor
  • *
  • Posts: 179
  • Country: ar
  • Electronic's Technician
Fast precision rectifier/absolute-peak-detector
« on: February 28, 2011, 08:10:23 pm »
Hello again,
this time i'm racking my brains on another module of my bigger project and i turn to you guys as i've hit a larger brick wall than before.
I need to measure ripple in a DC line and also monitor large spikes(overvoltage/undervoltage).
for the spike part, i was thinking of a windows comparator using 2 opamps/comparators and a flip/flop/scr output to stay latched(so that the uC can read it and i don't miss the pulse, i could also use an interrupt pin as well but i'm pin constrained), nothing fancy, it needs to catch large and or fast spikes of several volts outside norm.
Dc input would be AC coupled to rectifier, i'm expecting a freq from 0 to 150kHz in the ripple, and also asymmetric ripple.

now... for the ripple part, my initial idea was to use a precision rectifier followed by a peak-detector, then input that to my ADC and done with it..., as a side note, i think it would also catch the spikes i mentioned before... i think....

I've been trying to find example circuits of fast precision rectifiers but come up short, the examples i've seen(TI sboa68.pdf for example) show problems in the negative cycle, or totally fail in high frequencies.
I've also come across a peak detector circuit using LM393, but it appears it only works for the positive cycle(i would have to put this after the precision rect output) http://www.discovercircuits.com/PDF-FILES/peakdet1.pdf

so.. i'm kind of baffled in this part, looks like the "perfect" device would be an absolute peak-detector..
Also, how do i AC couple in a 0 to 150kH< range without compromising the signal?, a lowpass RC filter with 150kHz~ cutoff?

refs i've seen:
http://sound.westhost.com/appnotes/an001.htm
http://www.analog.com/static/imported-files/application_notes/AN-573.pdf
http://ecelab.com/circuit-window-comp.htm
http://www.analog.com/static/imported-files/application_notes/130445851AB109.pdf
http://www.electronics.dit.ie/staff/ypanarin/Lecture%20Notes/K235-1/7%20Precision%20Rectifiers.pdf
and TI sboa68.pdf can't find the url
 

Offline Simon

  • Global Moderator
  • *****
  • Posts: 18056
  • Country: gb
  • Did that just blow up? No? might work after all !!
    • Simon's Electronics
Re: Fast precision rectifier/absolute-peak-detector
« Reply #1 on: February 28, 2011, 08:35:34 pm »
for the spike detection you could use just a comparator that detects anything over a certain voltage and then sets some sort of holding circuit.

What exactly are you trying to achive for the ripple ? if your just trying to check the ripple stays under a certain voltage you could AC decouple the voltage with a capacitor and rectify the ripple and smooth it and measure it with a comparator. Now sure how you would do both neg and pos, you may have to mirror everything and use a dual supply although someone else might be able to advise on how to keep it all on the positive side of the rail
 

Online EEVblog

  • Administrator
  • *****
  • Posts: 38715
  • Country: au
    • EEVblog
Re: Fast precision rectifier/absolute-peak-detector
« Reply #2 on: March 01, 2011, 06:19:34 am »
For a fast (20MHz) full wave precision rectifier, try the AD8036:
http://www.analog.com/static/imported-files/data_sheets/AD8036_8037.pdf
See the app note.
Mentioned in blog #38

Dave.
 

Offline scrat

  • Frequent Contributor
  • **
  • Posts: 608
  • Country: it
Re: Fast precision rectifier/absolute-peak-detector
« Reply #3 on: March 01, 2011, 11:11:59 am »
Of course, since AC voltage at 0Hz is a contraddiction itself, perfect AC coupling in the 0-150kHz range is not possible.

If you need to monitor very low-frequenc noise and DC error too, and the DC has a fixed known value, you could reproduce it (with a good voltage reference) and subtract to center the measuring range around zero. Low-pass filtering couldbe then added, if needed.

If you don't need precise time response (i.e. you can accept some delay between the spike or noise amplitude change and its detection), you can use >1 order low-pass filters to effectively limit bandwidth at the desired value. If possible (enough high sampling rate), I'd consider digital filtering as an option, too.
One machine can do the work of fifty ordinary men. No machine can do the work of one extraordinary man. - Elbert Hubbard
 

Offline tecman

  • Frequent Contributor
  • **
  • Posts: 444
  • Country: us
Re: Fast precision rectifier/absolute-peak-detector
« Reply #4 on: March 01, 2011, 02:34:54 pm »
What you need is a precision rectifier, followed by a peak detector.  There are quite a few op-amps fast enough to make a fast precision rectifier.  Problem will be one of dynamic range.  You are trying to measure ripple, and large spikes.  The amplitude of the spikes will define the allowable gain of the rectifier.  The limit may be that the amplitude of the ripple may be too small to effectively measure.  You may need a log amp to cover the range, followed by the rectifier-peak detector.

Paul
 

Offline EliminateurTopic starter

  • Regular Contributor
  • *
  • Posts: 179
  • Country: ar
  • Electronic's Technician
Re: Fast precision rectifier/absolute-peak-detector
« Reply #5 on: March 01, 2011, 07:16:45 pm »
thanks for the advice, i had compltely skipped your mention of that part in that vid when i watched it originally.
Very nice device, i ran a quick simulation and seems to work, now to try and get one of those(and they're dip as well, hooray!), i won't be needing the 20Mhz as the ripple will probably be below 1Mhz, but it can't hurt either.
What i do notice is that if i try to AC couple the input, it adds quite the offset to the input after the decoupling cap, does the AD8036 requires a low-impedance input to work?

For a fast (20MHz) full wave precision rectifier, try the AD8036:
http://www.analog.com/static/imported-files/data_sheets/AD8036_8037.pdf
See the app note.
Mentioned in blog #38

Dave.

scrat, actually it won't go down to 0Hz, i think the lowest freqs will be around 20 to 50Hz.
It isn't viable to build a reference value and a diference amplifier as the voltages are high and the values are nominal, thus there can be variations which would be problematic to differentiate.
Time response is not of the essence as long as it outputs the peak.

tecman, the large spikes(under/over) will better be handled by a dedicated window comparator, i rather not dwelve into logarithmic amps and dynamic range issues as i need the best of both world in as simple package as possible.

What's the best way to AC couple the input signal?, a simple CR highpass filter?, or a buffered highpass with an opamp(but that can distortion the original ripple if i'm not careful about the amp) to provide low impedance to the AD8036?
 

Offline scrat

  • Frequent Contributor
  • **
  • Posts: 608
  • Country: it
Re: Fast precision rectifier/absolute-peak-detector
« Reply #6 on: March 02, 2011, 02:28:06 am »
Since the opamp is powered by dual voltage, I see no problem in simply adding a series cap at the input, having 1/(2*pi*Rg*C) << lowest frequency.
One machine can do the work of fifty ordinary men. No machine can do the work of one extraordinary man. - Elbert Hubbard
 

Offline EliminateurTopic starter

  • Regular Contributor
  • *
  • Posts: 179
  • Country: ar
  • Electronic's Technician
Re: Fast precision rectifier/absolute-peak-detector
« Reply #7 on: March 04, 2011, 01:49:49 am »
to narrow down on the design i'll block it this way(and since i have no idea about the clipping on the input of the AD8036):
Active sallen-key highpass filter with 20Hz cutoff based on OP277 or LM310 follower -> AD8036 precision rectifier -> peak-hold/peak-detector -> [possibly x2/x3 opamp] -> ADC input

the problem i'm having is the response of the peak-hold/detector in a wide range of frequencies, i've built this circuit http://www.discovercircuits.com/DJ-Circuits/peakdet1.htm but behaves quite poorly below ~1Khz, and i can dispense of the 2nd LM393 in that circuit as well as i don't need large current capabilities.
the gain stage is because the resulting rectified peaks will be very small (around 100mV~) and that's 10~codes in the 10bit ADC, but maybe i won't need it...
so back to the peak detector, is there any other "fancier" solution(not clock sampled/holdfed, as i need it to be continuous) for wideband peak-holding?

 

Offline scrat

  • Frequent Contributor
  • **
  • Posts: 608
  • Country: it
Re: Fast precision rectifier/absolute-peak-detector
« Reply #8 on: March 04, 2011, 02:20:58 am »
I think the only solution is to lower down the peak detector output "filter" corner.
However, very low pass filtering the AD8036 output should make the peak detector not necessary.
One machine can do the work of fifty ordinary men. No machine can do the work of one extraordinary man. - Elbert Hubbard
 

Offline EliminateurTopic starter

  • Regular Contributor
  • *
  • Posts: 179
  • Country: ar
  • Electronic's Technician
Re: Fast precision rectifier/absolute-peak-detector
« Reply #9 on: March 04, 2011, 02:26:15 am »
the peak detector is to get a stable DC input for the ADC and to have a stable "worse-case" sampling which is what i'm after.
the simple rectified output is too "variable" and i could be missing small very transient spikes in software
of course i could do this in software with max/min, but the microcontroller is already busy with other stuff running and i can't be sampling fast enough to depend on software max/min(and i'd rather not).

i could also use a very-large time constant RC network after the AD8036, but that would skip fast spikes...., even an active one...
« Last Edit: March 04, 2011, 02:31:11 am by Eliminateur »
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf