Likely, I'm missing something, but -
Isn't the behavior of the peak of the wave a whole lot more important than the zero-crossing behavior for level indicator application? What does distortion of the rectified wave even matter here? Wayne: are you looking at that output behavior so critically because you have another purpose like a compressor level detector or something?
Reading/digesting the recommended sources - I'm a big fan of Rod Elliott's site already, it was good to see the ESP logo pop up when I clicked, thanks very much!
-j
Level Detectors, Absolute Value, Peak and RMS
- mediatechnology
- Posts: 5578
- Joined: Sat Aug 11, 2007 2:34 pm
- Location: Oak Cliff, Texas
- Contact:
Re: Level Detectors, Absolute Value, Peak and RMS
Good catch.Likely, I'm missing something, but
Isn't the behavior of the peak of the wave a whole lot more important than the zero-crossing behavior for level indicator application? What does distortion of the rectified wave even matter here? Wayne: are you looking at that output behavior so critically because you have another purpose like a compressor level detector or something?-
Yes, there is another purpose.
In most cases the accuracy of the peak level is the most important attribute.
In my application I want smooth, not hard corners, in the transition region.
Re: Level Detectors, Absolute Value, Peak and RMS
You're missing the crux of the biscuit (at least of my biscuit)
Wayne's scope traces are for a couple volts of signal. As I have mentioned several times now the precision rectifier issue is a product of frequency and how low the level is.
That deviation from perfect rectification around the zero crossing becomes a much larger fraction of the waveform for very small signals.
Not a big issue for a peak meter of compressor side chain. for designing test equipment it's a huge deal.
JR
[edit- its a little like crossover distortion in a power amp... at high level the HF waveform looks clean. At low level it looks and sounds like crappo /edit
Wayne's scope traces are for a couple volts of signal. As I have mentioned several times now the precision rectifier issue is a product of frequency and how low the level is.
That deviation from perfect rectification around the zero crossing becomes a much larger fraction of the waveform for very small signals.
Not a big issue for a peak meter of compressor side chain. for designing test equipment it's a huge deal.
JR
[edit- its a little like crossover distortion in a power amp... at high level the HF waveform looks clean. At low level it looks and sounds like crappo /edit
Cancel the "cancel culture", do not support mob hatred.
- mediatechnology
- Posts: 5578
- Joined: Sat Aug 11, 2007 2:34 pm
- Location: Oak Cliff, Texas
- Contact:
Re: Level Detectors, Absolute Value, Peak and RMS
FWIW the first pic was a 10 mV (peak) 20 kHz photo.Wayne's scope traces are for a couple volts of signal
I really should put a couple of trims on it and see where it bottoms out.
Re: Level Detectors, Absolute Value, Peak and RMS
mediatechnology wrote:FWIW the first pic was a 10 mV (peak) 20 kHz photo.Wayne's scope traces are for a couple volts of signal
I really should put a couple of trims on it and see where it bottoms out.
Yup, and you can already see how the top waveform is seeing the effect of inadequate loop gain.. Instead of sharp edges around the zero crossing they are rounded off and slewing slower. As the level drops lower it gets worse.
JR
Cancel the "cancel culture", do not support mob hatred.
- mediatechnology
- Posts: 5578
- Joined: Sat Aug 11, 2007 2:34 pm
- Location: Oak Cliff, Texas
- Contact:
Re: Level Detectors, Absolute Value, Peak and RMS
That's one of the reasons I've always favored current-boosted comparators for peak detectors.
Re: Level Detectors, Absolute Value, Peak and RMS
Yup, perhaps the reason I suggested a lm339... actual comparator designed to compare.mediatechnology wrote:That's one of the reasons I've always favored current-boosted comparators for peak detectors.
Accuracy of peak detection at -50 dBu is not a huge concern , try to FW rectify, take the average, then log, then convert to dB down low enough for noise measurments. But like I've probably already said recently, a couple dollar micro will do all this and more, easy peasy.
JR
Cancel the "cancel culture", do not support mob hatred.
- mediatechnology
- Posts: 5578
- Joined: Sat Aug 11, 2007 2:34 pm
- Location: Oak Cliff, Texas
- Contact:
Re: Level Detectors, Absolute Value, Peak and RMS
What A/D sample rate and number of bits do you get for $2?But like I've probably already said recently, a couple dollar micro will do all this and more, easy peasy.
What sample rate and number of bits did you use in your prototype meter?
Re: Level Detectors, Absolute Value, Peak and RMS
I don't have the sample rate details off the top of my head...mediatechnology wrote:What A/D sample rate and number of bits do you get for $2?But like I've probably already said recently, a couple dollar micro will do all this and more, easy peasy.
The micro family I am familiar with offers multiple 12 bit A/D channels per $2 (and change depending on qty) , The physical part actually has 4x 10 bit A/Ds that can be configured as 4 parallel 10 bit convertors, or combined to make one 12 bit conversion. This one convertor has an input multiplex so you can selectively convert between 10 inputs or more (I don't recall exact upper limit).
The sample rate is programmable so you can make it arbitrarily fast, but the settling time for the internal SAR (Successive approximation register) will limit how fast you can convert inputs and get full bit resolution.
Actually the meter I did with APB went into a production console several years agoWhat sample rate and number of bits did you use in your prototype meter?
http://apb-dynasonics.com/products/Prod ... oDesk.html
The one micro was generating 4 meter outputs. The 12 bit A/D was multiplexed between 4 of 6 possible inputs, I handled the solo logic, for the meter in the micro too. When you multiplex between multiple inputs there is another accuracy vs timing constraint. The input sample and hold has an acquisition time also, so toggling between inputs too rapidly causes ghosting (on meters) or residual readings from the former signal being converted. On a meter this looks like crosstalk.
I don't recall the exactly where my sample rate ended up in the APB meter. IIRC I disregarded Nyquist/Shannon criteria of 2x 20kHz, since I observed allowing the signals to alias down below sampling rate, still gave usable meter results, with the possible exception of a fixed sine wave at exactly the sample rate, but IIRC I dithered the sample rate a little too so even that wouldn't happen. One strategy to work around the input S/H capture time, I would take something like 4 samples per input after changing inputs and average, or discard the first sample if it was inconsistent with others. I vaguely recall one software tweak after release to push up the serial communication rate to shift the tiny noise leaking in to the console noise floor up above 30 kHz.
Of course a console meter is much easier than test equipment. If I were revisiting my TS-1 using today's technology I would probably use one of the economy audio codecs doing 18 bit+ 20 Khz stereo for <$2 last time I looked. I could stick a DPOT in front of this to scale gain and pick up a few more bits of dynamic range.
But I have a rule against doing products that can be performed by an IPHONE app... Even though they are selling drum tuners these days in IPHONE apps, they don't work as good as mine. (while < 1/100th the price).
JR
Cancel the "cancel culture", do not support mob hatred.
- mediatechnology
- Posts: 5578
- Joined: Sat Aug 11, 2007 2:34 pm
- Location: Oak Cliff, Texas
- Contact:
Re: Level Detectors, Absolute Value, Peak and RMS
OK, I get the part about how conveniently the micro can scan and scale the display, provide ballistics etc.
It's a nice functional meter with a fairly low BOM and in it's application killer. Need to find the link to the vid you posted.
I suspect the LEDs are the greatest cost.
PICs eventually seem to enter most threads here.
But with a theoretical DR of 72 dB (for a 12 bit conversion) and with sub 40 kHz sampling I don't see how you can claim greater accuracy than a continuous time (analog) absolute value circuit costing pennies (5532 + 2X inexpensive dual transistors) that has at least 60 dB of usable range at 20 kHz. I may be wrong but I think that's what I heard.
Sampling 20 kHz only 1-1/2 times per waveform period the odds of actually hitting the peak value seem rather slim to me.
I get the averaging across samples part and understand how an 18 bit higher-speed converter would make it better.
But I'm not buying how a 10-12 bit aliased sampled input that's "blind" to the waveform more often that it isn't can be more accurate than a dual op amp and handful of diode-connected transistors. (Or for that matter just diodes.)
It seems that the HF accuracy limitations of the sampled approach exist at any level whereas the analog approach suffers it's greatest errors only at low levels.
What it looks like to me is that using a PIC allows you to do all this housekeeping and add a lot of functionality at low cost with reduced accuracy due to low sample rate.
Kinda like an iPad or iPhone-based drum tuner...
It's a nice functional meter with a fairly low BOM and in it's application killer. Need to find the link to the vid you posted.
I suspect the LEDs are the greatest cost.
PICs eventually seem to enter most threads here.
But with a theoretical DR of 72 dB (for a 12 bit conversion) and with sub 40 kHz sampling I don't see how you can claim greater accuracy than a continuous time (analog) absolute value circuit costing pennies (5532 + 2X inexpensive dual transistors) that has at least 60 dB of usable range at 20 kHz. I may be wrong but I think that's what I heard.
Sampling 20 kHz only 1-1/2 times per waveform period the odds of actually hitting the peak value seem rather slim to me.
I get the averaging across samples part and understand how an 18 bit higher-speed converter would make it better.
But I'm not buying how a 10-12 bit aliased sampled input that's "blind" to the waveform more often that it isn't can be more accurate than a dual op amp and handful of diode-connected transistors. (Or for that matter just diodes.)
It seems that the HF accuracy limitations of the sampled approach exist at any level whereas the analog approach suffers it's greatest errors only at low levels.
What it looks like to me is that using a PIC allows you to do all this housekeeping and add a lot of functionality at low cost with reduced accuracy due to low sample rate.
Kinda like an iPad or iPhone-based drum tuner...