Detecting the peak value

Hi,

I built the circuit that can detect the peak of the 100KHz , 2 Volts peak to peak sine wave but its not accurate or may be not working right. The problems seem to be choosing the right R and C values. Is there any way that I can do this with out using a Capcitor and a resistor and if not than whats the best possible way to choose the R and C values.

I do require the edge to occur as close as possible to the sine wave positive and negative peaks.

I used Low Pass filter. you can find the diagram of the circuit and the waveform at the following links.

formatting link

formatting link

Thanks John

Reply to
john1987
Loading thread data ...

That's not a peak detector, you're only comparing your signal to the "sorta-integral" of the signal.

Surf on peak detector. There's many ways to do it, depending on your final needs... one-at-time or tracking. ...Jim Thompson

--
| James E.Thompson, CTO                            |    mens     |
| Analog Innovations, Inc.                         |     et      |
| Analog/Mixed-Signal ASIC's and Discrete Systems  |    manus    |
| Phoenix, Arizona  85048    Skype: Contacts Only  |             |
| Voice:(480)460-2350  Fax: Available upon request |  Brass Rat  |
| E-mail Icon at http://www.analog-innovations.com |    1962     |

                   Spice is like a sports car... 
     Performance only as good as the person behind the wheel.
Reply to
Jim Thompson

--
Yes, there are several.
Reply to
John Fields

Reading more carefully :-(

You really are after a peak "finder".

So use a differentiator and run the result thru a comparator... current in differentiating capacitor reverses at the peak.

OR...

If frequency is stable, use the all-pass I recently posted to get an accurate 90° phase shift, then thru a comparator.

Fields idea sounds good too... I'm guessing use a tracking A-to-D and watch for count direction reversal?? ...Jim Thompson

--
| James E.Thompson, CTO                            |    mens     |
| Analog Innovations, Inc.                         |     et      |
| Analog/Mixed-Signal ASIC's and Discrete Systems  |    manus    |
| Phoenix, Arizona  85048    Skype: Contacts Only  |             |
| Voice:(480)460-2350  Fax: Available upon request |  Brass Rat  |
| E-mail Icon at http://www.analog-innovations.com |    1962     |

                   Spice is like a sports car... 
     Performance only as good as the person behind the wheel.
Reply to
Jim Thompson

Hi, Thanks for your response. I need analog or digital solution to implement it. I have doe search on peak detector on the internet and found many circuits. But I need something that can do what I mentioned in the diagram. Ideally with out those capacitor and resistor. If you can direct me in correct way than I wil be thankful.

John

Reply to
john1987

I think that I am doing what are suggesting to use the differeniator. But is there another analog way to do it meant without using the RC circuit.

Reply to
john1987

You have an integrator (of sorts).

I don't know of any way to find a sinusoid's peak without using a capacitor or a tracking A-to-D.

This seems to work pretty well...

formatting link

"U1" is a comparator. ...Jim Thompson

--
| James E.Thompson, CTO                            |    mens     |
| Analog Innovations, Inc.                         |     et      |
| Analog/Mixed-Signal ASIC's and Discrete Systems  |    manus    |
| Phoenix, Arizona  85048    Skype: Contacts Only  |             |
| Voice:(480)460-2350  Fax: Available upon request |  Brass Rat  |
| E-mail Icon at http://www.analog-innovations.com |    1962     |

                   Spice is like a sports car... 
     Performance only as good as the person behind the wheel.
Reply to
Jim Thompson

Hi,

Can you give some advice about how to use tracking A/D option to do this?

Thanks

John

Reply to
john1987

One method is to use a track/hold and a comparator--you put the T/H in track mode when its output is less than its input, and in hold mode otherwise. Of course that's also an RC in disguise, but it does have the advantage of storing the peak value for you to use elsewhere.

Cheers

Phil Hobbs

--
Dr Philip C D Hobbs
Principal
ElectroOptical Innovations
55 Orchard Rd
Briarcliff Manor NY 10510
845-480-2058
hobbs at electrooptical dot net
http://electrooptical.net
Reply to
Phil Hobbs

That's Fields area of expertise. He uses such off-the-shelf devices. I don't, I design microchips, so I don't keep up with what's available. ...Jim Thompson

-- | James E.Thompson, CTO | mens | | Analog Innovations, Inc. | et | | Analog/Mixed-Signal ASIC's and Discrete Systems | manus | | Phoenix, Arizona 85048 Skype: Contacts Only | | | Voice:(480)460-2350 Fax: Available upon request | Brass Rat | | E-mail Icon at

formatting link
| 1962 |

Spice is like a sports car... Performance only as good as the person behind the wheel.

Reply to
Jim Thompson

Hi,

Can you suggest any part number?

Thanks

John

Reply to
john1987

The peak of a sinewave is a point at which the time-change behavior is minimum; timing on a peak detector is ALWAYS dealing with noise against a small signal (because there's small time dependence at that part of the waveform).

For accuracy, you need to use a phase-locked loop or some other history-sensing technique, detecting not just the peak behavior but sensitive to the waveform before that peak. Either an integrator or differentiator circuit can help, and bandwidth limiting filtration is also useful.

Note especially that op amp distortion sometimes causes either the zero-crossing (with resistive load) or peak (with capacitive load) points to be poorly characterized. If your source is a push-pull amplifier, it matters a lot how you load it.

Reply to
whit3rd

Il Thu, 29 Jul 2010 10:17:29 -0700, john1987 ha scritto:

It sounds to me more like an "edge detector", not a peak detector. Actually I reverse engineered an old barcode reader that used exactly the same circuit. R and C values were tuned to get the right amount of phase shift (at a given scanning rate) needed by comparator to get its job done. Output pulses were feed to a timer/counter.

Track and hold is a better way to design a peak detector.

Reply to
SilverLeo

Thanks for the replies. Are track and hold circuits available as chips that I buy or I have to build one. How does the block diagram of the circuit look like?

John

Reply to
john1987

--
First things first.

How accurate do you need this thing to be?
Reply to
John Fields

That's not peak detector, it's the classic data recovery where chop level follows average signal DC level.

Use it to sample the peak, perhaps that's what you meant?

Yes, take previous sample when current sample is lower absolute value, common thing working with sampled data. Once detected peak, rearm the peak detector for next cycle.

Sometimes you need to qualify the peak if there's noise coming in.

Grant.

Reply to
Grant

Hi,

+/- 10 %

thanks John

Reply to
john1987

Also see my post in reply to Jim T.

You can do it in software, but not easily for 100kHz. That's need DSP techniques, I think?

You just want to follow the peak voltage, there's lots of peak detector circuits out there, in the opamp circuit collections, say AN31 from national for starters, application notes from other manufacturers too.

Need the cap to hold the peak voltage, resistor across it to define droop rate, duplicate the circuit upside down to follow negative peaks.

What you want to do with the output?

Grant.

Reply to
Grant

Sample / hold with differentiator to drive it to sample the peak.

Reply to
Grant

Ten percent of what? The cycle time of a 100 kHz sinewave is 10 us, do you mean +/- 1 us? Or the peak value is 2V, and you need to detect at or above 1.8V (that'd be plus/minus

25 degrees)?

Is the frequency fixed and accurate at 100 kHz? Is the amplitude fixed and accurate at 2V? If amplitude varies, a phase-locked loop or phase-shift network is preferred. If frequency varies, an integrator or differentiator will be better than an RC phase shifter. will be preferred. If both are

Reply to
whit3rd

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.