Level Detectors, Absolute Value, Peak and RMS

Where we discuss new analog design ideas for Pro Audio and modern spins on vintage ones.
User avatar
JR.
Posts: 2059
Joined: Sat May 24, 2008 7:21 pm

Re: Level Detectors, Absolute Value, Peak and RMS

Post by JR. » Tue Mar 26, 2013 8:36 am

tubegeek wrote:Excuse me, Wayne, but in another thread, JR had assigned me to design my own peak detector. You've TOTALLY screwed THAT up.

Now, I do NOT suffer from NIH and this is an embarrassment of riches. Thank you.

But it seems like I'm going to miss a learning opportunity..... of course, understanding what these circuits DO is not a bad one either...

-j
If you have any hope of becoming a design engineer, read all the posted schematics, then design one of your own... 8-)

I saw a few in there along the lines of what I had in mind based on 339... The schematic of what I used in my old console design does not look very elegant to me now, and was influenced by the type of bi-color LED was already in the system at Peavey, etc..

JR

User avatar
mediatechnology
Posts: 2706
Joined: Sat Aug 11, 2007 2:34 pm
Location: Oak Cliff, Texas
Contact:

Re: Level Detectors, Absolute Value, Peak and RMS

Post by mediatechnology » Tue Mar 26, 2013 8:41 am

The LM339 ones were some I had done. The '339 makes an excellent peak detector particularly the full-wave NPN boosted one.
"There does seem to be a pattern where, the more difficult a truth is to stomach, the higher the hysteria levels go internally at Google."
Visit RockmoreLabs on Etsy https://www.etsy.com/shop/RockmoreLabs
http://www.ka-electronics.com

User avatar
JR.
Posts: 2059
Joined: Sat May 24, 2008 7:21 pm

Re: Level Detectors, Absolute Value, Peak and RMS

Post by JR. » Tue Mar 26, 2013 8:42 am

mediatechnology wrote:
But it seems like I'm going to miss a learning opportunity..... of course, understanding what these circuits DO is not a bad one either...
Just build all of them and figure out which is best. You'll learn a lot from it.

Symetrix used the Buff log detector though there does seem to be a bias resistor missing.

Image
Symetrix 425 Level Detector
Yup, looks pretty similar, but..... They are missing the 10k pull up resistor at the base of top resistor, As drawn the circuit will work, but opamp U6B must slew from - 1 diode drop to + 1 diode drop. With the 10k in place the, opamp only needs to slew +/- 1/2 diode drop at zero crossings.

JR

User avatar
mediatechnology
Posts: 2706
Joined: Sat Aug 11, 2007 2:34 pm
Location: Oak Cliff, Texas
Contact:

Re: Level Detectors, Absolute Value, Peak and RMS

Post by mediatechnology » Tue Mar 26, 2013 8:50 am

Yup, looks pretty similar, but..... They are missing the 10k pull up resistor at the base of top resistor, As drawn the circuit will work, but opamp U6B must slew from - 1 diode drop to + 1 diode drop. With the 10k in place the, opamp only needs to slew +/- 1/2 diode drop at zero crossings.
I saw that too. I kept thinking "did they forget to draw it?"
That 2*Vf versus 1*Vf difference is significant in terms of HF performance.
I want to build Buff's circuit.

Note the two sets of rectifiers in the Symetrix: One output for avg one for peak.
"There does seem to be a pattern where, the more difficult a truth is to stomach, the higher the hysteria levels go internally at Google."
Visit RockmoreLabs on Etsy https://www.etsy.com/shop/RockmoreLabs
http://www.ka-electronics.com

User avatar
JR.
Posts: 2059
Joined: Sat May 24, 2008 7:21 pm

Re: Level Detectors, Absolute Value, Peak and RMS

Post by JR. » Tue Mar 26, 2013 9:53 am

Yup, the dirty secret about precision rectifiers is how they suffer from loop gain. I recall when I first fired up my prototype TS-1 with standard precision rectifier, I was reading a measurement noise floor well below -100 dB. But before patting myself on the back, I figured out I was seeing a measurement error from less than 20 kHz bandwidth. After my best effort I was still getting bandwidth error below -50 dBu. IIRC -60dB was -3dB at 10kHz, -70dB was -3dB @ 5kHz etc. LF and midband noise still reported accurately.

Later I thought of using the rectifier output to drive a gain element so I could effectively compress the input to the rectifier 2:1. This way my -3dB point at 20 kHz and -50dB would map out to - 100 dB. :D There was also benefit from the compression at high level, since I was getting a fraction of a dB error at +20 dBu from the logging transistor's real resistance Rbb. Distortion in this measurement path was not critical, only needed good gain accuracy so I could have used a cheap OTA (or low performance VCA, since I already had a log voltage available inside TS-1).

But nowadays, I'd do it all with a $2 micro... cheaper, better, yadda yadda...

JR

PS: I've seen some other Buff circuits and he was doing pretty slick stuff in the log domain... It's kind of a shame he bailed from the audio business, but he has apparently done well with photography (strobes) and avoided all the competition and price compression we suffered in the audio business. While I expect photography was not a free ride.

User avatar
mediatechnology
Posts: 2706
Joined: Sat Aug 11, 2007 2:34 pm
Location: Oak Cliff, Texas
Contact:

Re: Level Detectors, Absolute Value, Peak and RMS

Post by mediatechnology » Tue Mar 26, 2013 10:38 am

Yup, the dirty secret about precision rectifiers is how they suffer from loop gain.
Graeme talks about how for small signals the required slew rate is the input signal slew rate times the open loop gain. Which is a lot even at modest frequencies. As a practical matter he then discusses that its limited by SR and he uses that point to introduce the reduced transistion voltage half-wave circuit.
Later I thought of using the rectifier output to drive a gain element so I could effectively compress the input to the rectifier 2:1.
That is clever. dBx had the model 81W meter that used that technique for 80 dB range.
I had one at MicMix.
THAT has DN-119 using the 4301: http://www.thatcorp.com/datashts/dn119.pdf
DN-119 operated from a battery supply with a 22 kHz filter (and perhaps a preamp) would be a nice box to have for noise floor measurements.
"There does seem to be a pattern where, the more difficult a truth is to stomach, the higher the hysteria levels go internally at Google."
Visit RockmoreLabs on Etsy https://www.etsy.com/shop/RockmoreLabs
http://www.ka-electronics.com

User avatar
JR.
Posts: 2059
Joined: Sat May 24, 2008 7:21 pm

Re: Level Detectors, Absolute Value, Peak and RMS

Post by JR. » Tue Mar 26, 2013 12:24 pm

Yup, I remember that and Buff also sold a noise/level meter briefly.

Somewhere in my lab I still have a small battery powered gain stage with an "A" noise shaping/weighting filter. handy to throw a fixed X dB gain with noise shaping in series to extend the measurement range of your bench, for low noise design. To boost -100dBu to -60 dBu can be simple two transistor circuit running from 9V battery for reduced ground noise/loops.

Back in the day on small budget you could still do good design without big dollar bench equipment.

JR

tubegeek
Posts: 25
Joined: Mon Mar 18, 2013 12:36 pm
Location: Brooklyn NY

Re: Level Detectors, Absolute Value, Peak and RMS

Post by tubegeek » Tue Mar 26, 2013 7:35 pm

JR. wrote: If you have any hope of becoming a design engineer, read all the posted schematics, then design one of your own... 8-)
Hope. Hmm. I guess I do hope for that. "Instead of a bum, which is what I am," to quote Terry Malloy.

I am at the point, with reference to this design issue, that I don't even know proper questions to ask. Can anyone help with a reference for the subject of peak detection? In Horowitz and Hill there is a window detector that looks similar to one of the posted circuits, but it is not explained in the text, it's one of the "Suggested Circuits" at the end of a chapter. So at this point I'm ready to read the chapter and see if I can get anywhere with that.

Is there another more google-able name for what we're doing here? And also -
JR. wrote: no funny nonlinear stuff hanging off the immediate audio path.
Am I therefore looking to introduce a buffer or would a series resistor be adequate for isolating the nonlinear stuff adequately? I ask because I am seeing examples of each.

Thanks for the tutelage!

-j

User avatar
JR.
Posts: 2059
Joined: Sat May 24, 2008 7:21 pm

Re: Level Detectors, Absolute Value, Peak and RMS

Post by JR. » Wed Mar 27, 2013 11:53 am

tubegeek wrote:
JR. wrote: If you have any hope of becoming a design engineer, read all the posted schematics, then design one of your own... 8-)
Hope. Hmm. I guess I do hope for that. "Instead of a bum, which is what I am," to quote Terry Malloy.

I am at the point, with reference to this design issue, that I don't even know proper questions to ask. Can anyone help with a reference for the subject of peak detection? In Horowitz and Hill there is a window detector that looks similar to one of the posted circuits, but it is not explained in the text, it's one of the "Suggested Circuits" at the end of a chapter. So at this point I'm ready to read the chapter and see if I can get anywhere with that.

Is there another more google-able name for what we're doing here? And also -
Common names are clip or overload indicators for red, and signal present for green indicators.

Window detectors are a different animal while perhaps a full wave peak detector could be thought of as an "outside the window" detector.
JR. wrote: no funny nonlinear stuff hanging off the immediate audio path.
Am I therefore looking to introduce a buffer or would a series resistor be adequate for isolating the nonlinear stuff adequately? I ask because I am seeing examples of each.
Raise the bridge or lower the water... Non-linear load means anything other than a simple resistance to ground. Non-linear loads like diode in series with a resistor do not draw clean current from source, so any source impedance will reflect this non-linear current draw with error voltage at output. You can raise the bridge by making the source impedance very low, or lower the water by making the load very high impedance and linear. Six of one Half dozen the other.

Thanks for the tutelage!

-j
yo... we need replacement design engineers for old farts moving along.

JR

User avatar
mediatechnology
Posts: 2706
Joined: Sat Aug 11, 2007 2:34 pm
Location: Oak Cliff, Texas
Contact:

Re: Level Detectors, Absolute Value, Peak and RMS

Post by mediatechnology » Wed Mar 27, 2013 11:59 am

These are two good sources for basic peak detector and absolute value circuits.

http://sound.westhost.com/appnotes/an001.htm
http://www.ti.com/lit/an/sboa068/sboa068.pdf

Most of the precision rectifiers shown here are either "trick circuits or log-based.

Before I tear down the biased diode circuit I wanted to document the 20 kHz low and high-level response.
This circuit was built with a THAT340 array and LME49720 with 5% resistors and no offset trim.
I suspect the low-level performance could be improved significantly with either a trim or compound op amp.
Note that bypass and compensation capacitors are not shown.
For the 'scope photos below there were no Cfb.

Image
Absolute Value Circuit Using A Biased Diode Rectifier

Link to printable copy: http://www.waynekirkwood.com/images/jpg ... ematic.JPG

This is 20 kHz at 10 mV peak.

Image
Biased Diode Absolute Value 20kHz 10mV Peak

This is 20 kHz 2V peak (4V P-P).
Based on the rev-Vbe breakdown of the THAT340 diode-connected transistors about 8V peak is the maximum input level.

Image
Biased Diode Absolute Value 20kHz 2V Peak

At 20 kHz you can see a slight "step" coming out of the zero crossing.

The transistion time step around zero crossing is not visible at 1 kHz:

Image
Biased Diode Absolute Value 1kHz 2V Peak
"There does seem to be a pattern where, the more difficult a truth is to stomach, the higher the hysteria levels go internally at Google."
Visit RockmoreLabs on Etsy https://www.etsy.com/shop/RockmoreLabs
http://www.ka-electronics.com

Post Reply

Who is online

Users browsing this forum: No registered users and 6 guests