Peak Detector For Audio Frequencies.

Thread Starter

erezMASTER

Joined Jan 11, 2012
25
Hello dear community,
I was wondering for a long time about a precision Peak Detector with low error rate, that will work from 0Hz up to 20kHz.
All this is for an Audio Project that I'm planning.

I was thinking about using the structure provided in the pic,
Here are a few questions.

1) I managed to conclude that I may have an Oscillation problem with the Capacitor - Is that true, and how? (the cap has no where to discharge)

2) In general will this Peak Detector suffice when the sole input will be an Audio Signal after Pre-Amplification?

3) If you have a better structures or suggestions, please share them!

Thanks a bunch,
I realy dont take your comments as granted.
Sincerely,
Erez.
 

Attachments

JasonL

Joined Jul 1, 2011
47
For the capacitor to discharge, you can add a resistor in parallel to the capacitor. The rate for discharge depends on your RC value.
 

Alec_t

Joined Sep 17, 2013
14,313
All the peak detectors I've seen have had a discharge path for the cap; i.e. it's usual to have a 'leaky peak detector'. You don't really want to detect one peak which occurred over several hours of measurement do you?
 

Thread Starter

erezMASTER

Joined Jan 11, 2012
25
All the peak detectors I've seen have had a discharge path for the cap; i.e. it's usual to have a 'leaky peak detector'. You don't really want to detect one peak which occurred over several hours of measurement do you?
I know what you mean.
I will make an immediate discharge method via a separate circuit once I'll be sure the current detection method using this circuit has no mistakes.

I left the discharge issue to the end because the discharge time must vary for each frequency domain -
Low freqs - Vey low discharge time, in order to read the Output reliably.
High freqs - Fast discharge time, in order not to miss the next Peak.
(Those facts should not worry you, that's just the needs of the project)
 

MrChips

Joined Oct 2, 2009
30,795
You need to describe what you plan to do with the output of the peak detect.
What is your quantitative specification of "very fast detection time"?
You can reduce the value of the storage capacitor to suit your needs.

There are two ways to discharge the capacitor:

1) a resistor in parallel with the capacitor
2) a reset switch consisting of a FET or analog switch across the capacitor.
 

Thread Starter

erezMASTER

Joined Jan 11, 2012
25
I intend to insert the Peak reading into an A\D Converter and process the outcome with an micro-controller.
Main project target is a Spectrum Analyzer.
 

ronv

Joined Nov 12, 2008
3,770
You maybe don't have an oscillation problem, but you might have some others. Even though you are running at audio frequencies you still need a fairly fast op amp and one that can drive some current so it can charge the cap on a cycle by cycle basis like you are looking for.
 

crutschow

Joined Mar 14, 2008
34,412
I'm sorry but using a spectrum analyzer with a peak detect circuit does not compute. :rolleyes: The output of peak detector is basically DC so it doesn't have a spectrum. What are you trying to measure?
 

Alec_t

Joined Sep 17, 2013
14,313
I agree with Crutschow. If the audio input signal is a mix of frequencies how will you know which frequency is responsible for the detected peak?
 

MrChips

Joined Oct 2, 2009
30,795
If you want to create a spectrum analyzer using a microcontroller (MCU), there is a straight forward way of doing this.

Sample the audio waveform at the required rate and perform the FFT (Fast Fourier Transform).

If you are looking at a 16-channel frequency display, this is very doable on a MCU.
 

Thread Starter

erezMASTER

Joined Jan 11, 2012
25
I agree with Crutschow. If the audio input signal is a mix of frequencies how will you know which frequency is responsible for the detected peak?
I will process each DC level for each Frequency.
One at a time, 1st freq DC peak then 2nd freq DC peak etc...

Taking note that sampling only 16 channels wont take to much time so there wont be delay on the spectrum.
 

Thread Starter

erezMASTER

Joined Jan 11, 2012
25
Simple -
Each frequency band (divided parts of 0Hz~20kHz) has its own
Active Band Pass Filter,
and I'm willing to do about 16 of those.

I intend to do it using the Analog way, not the FFT.
 

crutschow

Joined Mar 14, 2008
34,412
Instead of a peak detector, you may want to consider using a precision rectifier and filter the output to measure the signal average value. That may be an easier circuit to build.
 
Top