Audio test set

GroupDIY Audio Forum

Help Support GroupDIY Audio Forum:

This site may earn a commission from merchant affiliate links, including eBay, Amazon, and others.

njm

Well-known member
Joined
Oct 16, 2010
Messages
116
Location
London
I've been thinking for a while about building my own test rig. Not a high resolution set up. Just a portable function generator and a meter that will read Vrms and dBu. I'm thinkig multimeter size. I've tried a couple of cheap DIY oscilloscope things from ebay, just for monitoring waveforms while fault finding. But I'd like something more.

I'm starting this thread as an idea. If anyone with more experience wants to step in, be my guest! I've done a bit of analogue design, digital stuff is new to me. I'm currently reading a book about PICs and my ideas are flowing. But I think this "audio multimeter" would be useful to everyone on this forum. It warrants the knowledge of the pros! I'd like to include an ESR measurement feature too...

Anyway.

So I'm thinking a box, with LCD meter. 9V PP3 battery, XLR in and out. Function generator and level meter all controlled by a PIC.

METER:
XLR input
Switchable input impedance (balanced) 100k, 10k, 600ohms
will read Vrms, Vpk, dBu
uses that2252 rms converter and 8 bit ADC built into PIC (see app note an119)
2 ranges:
-100dBu to +20dBu @ 0.5dB resolution (Noise floor & whatever you like)
-30dBu to +30dBu @ 0.25dB resolution (frequency repsonse and headroom testing)
Peak hold/clear switch

FUNCTION GENERATOR:
XLR output
Uses DDS chip of some sort
Sine/Square waveforms and pink noise
Variable frequency/level
Maxiumum output level from 9V battery ~11dBu. Problem?? Other than headroom testing?
How do you meter what the function generator is doing I hear you say? well when you adjust the function gen the LCD meter automatically switches to read the function gen. Clever eh!?

What about USB connectivity!
*Charges battery?
*Automation of frequency sweeps?
*What else??


Am I naive to think this is possible? Why hasn't it been done before??

I'm not fussed if it's accurate. It's just a useful pocket meter to read line level stuff at various frequencies...Who wants one??
 
this thing is more or less available... NTI minirator pro and minilyser ML2... that's what I am using now. of course it would be cool to have a DIY one. maybe with your reduced function set, but I doubt this is an easy project.

- Michael

 
I have given this more than a little thought... and I also have some experience as I designed the Loftech TS-1 back in the '80s which had a sine wave, DB meter, and frequency counter in one unit.

I have resisted the strong temptation to design a modern version, but if I did here are a few thoughts.

#1- I would absolutely use a digital micro as the heart of the system.
#2- Why use a function generator chip.? You can program a look up table into the micro and output to a DAC (Microchip has 2x 16b DACs built into one recent DSPic family).
#3- I haven't looked at using the 2252 as a meter front end. Back in the '80s I made my own log conversion using a cheap transistor array. It might take 2x 2252 to generate the 0dB reference and temperature compensate?  There are accuracy issues with analog conversion that a pure digital approach should be able to get around.  Note: Back in the '70s(?) DBX made a slick stand alone dB meter.
#4-cheap PICs have as much as 12 bit A/D, while 16b+ external A/D can be had for $1 or so. You can further expand the measurement range with the equivalent of smart front end auto-ranging. If the micro brain knows it is measuring a small voltage it can add low noise voltage gain in front of that extending the low end of the measurement range. For measuring high voltages a smart pad. 

Pretty much every thing about my old TS-1 could be improved and done for lower cost using modern technology but, there are so many cheap alternate solutions that I can't get very excited about going there. 

JR
Here is discrete rms-log
RMS.gif

here is whole TS-1
Loftec_TS1.jpg

larger images here
http://www.proaudiodesignforum.com/forum/php/viewtopic.php?f=12&t=404
Warning lots of unconventional circuitry in my old TS-1... enjoy.
 
What is the preferred method for computing the RMS value of a signal?  Something like the integer based version of Newton's Method?  What is a good sampling window to use?
 
Matador said:
What is the preferred method for computing the RMS value of a signal?  Something like the integer based version of Newton's Method?  What is a good sampling window to use?

I don't know what Newton's method is, but square root of integral of signal squared, is what is literally going on in the top schematic. When I was working on my last digital console meter, I coded up a RMS conversion. It took a little extra work since there isn't a simple square root function inside the micro's I used. To square the signal before integration is a simple (fast) multiply but I wrote a dedicated routine, using a fast multiply iteratively, that only took a couple clock ticks per bit. A test set does not need to be as fast as a console meter so calculation is not a stopper, if you really need it.

I ultimately ended up not using the RMS inside my console meter because frankly I didn't see much difference between RMS and simple average, when the integration time was set exactly the same (x^2... averaged... square rooted, vs X averaged) .

Over the years, DBX has made a big deal about RMS being more accurate for tape noise reduction, I can't easily test that**, but for console metering using typical program material I did not see a useful difference. Some argue it makes a difference in dynamics processors, IMO far far less than simple attack/release times.

JR

  ** logically the phase shift inherent in tape recording media could significantly alter peak to average of complex waveforms, I am  not sure that RMS helps or hurts that. Peak response can indeed be erroneous for tape noise reduction purposes (i have seen that on the bench while designing tape NR back on the '70s).
 
Newton's method is a successive approximation method to integrate a time-varying function.  The nice this about this algorithm is that the previously computed RMS value can seed the input approximation for the next value, which allows it to converge much more rapidly.

It can be done with integer math as well, which is good for those using standard C libraries (new lib or libc), as their math routines can suck up a lot of code space and can be slow.

I suppose the nice this about squaring is that you get to convert all of the "negative" samples to positive for free as part of the calculation (without rectification).

 
Matador said:
I suppose the nice this about squaring is that you get to convert all of the "negative" samples to positive for free as part of the calculation (without rectification).

But if you use analog rectification you need less range when converting, so LSB will be higher voltage for the same range having higher S/N... Useless in 24bit ADC but in a 8 or 10 bit ADC may be usefull... I've see a osciloscope using arduino that use rectified analog input and use one digital input for polarity to get better definition of the wave when put the rectified signal and the sign together in digital domain.

JS
 
Matador said:
Newton's method is a successive approximation method to integrate a time-varying function.  The nice this about this algorithm is that the previously computed RMS value can seed the input approximation for the next value, which allows it to converge much more rapidly.

It can be done with integer math as well, which is good for those using standard C libraries (new lib or libc), as their math routines can suck up a lot of code space and can be slow.

I suppose the nice this about squaring is that you get to convert all of the "negative" samples to positive for free as part of the calculation (without rectification).

I can see how seeding with a previous result could save a few ticks, my approach written in machine code only uses a few ticks per bit so not bad, and you only need to do the square root to generate an output result.

Yes the squaring eliminates polarity, but you still need to determine an actual true AC zero which is as much work as the rectification.

JR
 
joaquins said:
Matador said:
I suppose the nice this about squaring is that you get to convert all of the "negative" samples to positive for free as part of the calculation (without rectification).

But if you use analog rectification you need less range when converting, so LSB will be higher voltage for the same range having higher S/N... Useless in 24bit ADC but in a 8 or 10 bit ADC may be usefull... I've see a osciloscope using arduino that use rectified analog input and use one digital input for polarity to get better definition of the wave when put the rectified signal and the sign together in digital domain.

JS

Yes, but practical analog rectification can be a constraint for frequency response accuracy at low level measurements.

If you look at the schematic I posted above the rectifier circuit uses some transistors in a current mirror like connection with some addition voltage gain added to the output of the opamp and I still was down -3 dB at 20 kHz at -50 dBu. Bandwidth doubled or halved for every 10 dB of level, so -60dB was -3dB at 10kHz.

Before I added the extra loop gain and other tricks to the rectifier, measurements of low level wide band noise reported much lower (quieter) results than reality because the opamp just didn't have enough gain to swing the rectifiers from - a diode drop to + a diode drop, before budging the actual rectifier output. I was measuring -100dB and more for paths that I knew were not much better than -60 or 70 dBu.

If you don't believe me just pad down a simple sine wave 60 dB and look at the output of any conventional active opamp analog rectifier at 100 Hz and then 10 kHz.

So yes, you lose one bit by performing the rectification in the digital domain, but since you are integrating this conversion result over time, the result of this integration accumulates more bits of resolution. As i already suggested adding some front end gain/pad can also increase the measurement range.

I bet using something like a Digitally controlled mic preamp gain set (TI or THAT) could make a nice front end for a test set, where the the test set micro controller could dial in X dB of front end gain or pad under cybernetic control. Then add or subtract that from the measurement.  A bunch of gain/pad in front could make even a 10-12b A/D more respectable.

It might be instructive to look at some Audio precision schematics. They weren't around when I designed my old TS-1, but I wasn't going after the high end bench market, just the other 99% of the world that only needs to make measurements adequate to dial in a tape recorder bias, or troubleshoot a console.

JR

   
 
Whatever route you take you need input and output signal conditioning circuits. This might be a useful sub-project in its own right.

A while back I suggested building an audio test set around the Raspberry Pi. At the time the downside was that it lacked an I2S interface which would have helped ensure the capture of high quality data. Fortunately the new MKII version has twice the RAM of the original and has added an I2S interface.

Perhaps a signal conditioning PCB with an I2S interface?

Cheers

Ian
 
ruffrecords said:
Whatever route you take you need input and output signal conditioning circuits. This might be a useful sub-project in its own right.

A while back I suggested building an audio test set around the Raspberry Pi. At the time the downside was that it lacked an I2S interface which would have helped ensure the capture of high quality data. Fortunately the new MKII version has twice the RAM of the original and has added an I2S interface.

Is this I2S interface able to run at sample rates higher than 48 kHz and with sample word lengths greater than 16 bits? I'm playing with the Silicon Labs ARM processors and they have an I2S interface which has those limits. I don't think they were targeting the pro-audio market with the part, though, but perhaps with JR's clever cybernetic control of a programmable-gain preamp the 16-bit sample width isn't a show-stopper.

-a
 
ruffrecords said:
Whatever route you take you need input and output signal conditioning circuits. This might be a useful sub-project in its own right.

A while back I suggested building an audio test set around the Raspberry Pi. At the time the downside was that it lacked an I2S interface which would have helped ensure the capture of high quality data. Fortunately the new MKII version has twice the RAM of the original and has added an I2S interface.

Perhaps a signal conditioning PCB with an I2S interface?

Cheers

Ian

I ordered one of the new RaspberryPi boards, will give the I2s a go when I have a spare moment (2015?).... I am looking forward to this frontend thing, but I am pretty sure this might be a difficult one. some requirements:

1) single channel Input, gain range adjustable - maybe three ranges?
2) single channel Output, PC signal, 24 bit DAC, sampling frequency to be determined. my converters are much noisier @ 192kHz, maybee only because of larger BW, but really much noisier by a lot.
3) switchable high precision sine generator, maybe a  fixed frequency or a set of different frequencies. note that this would be used only for very low THD measurements, optionally with additional analog filter in the input channel to attenuate the base frequency.
4) transformer coupled isolated output
5) transformer coupled isolated input?
6) battery operation to assure lowest noise (?)
7) RMS milivolt meter
eight) gain range easily adjustable with nice big steps? -40dB / 0dB / 40dB

anything else on the wish list?

the project will probably have to be postponed to 2018 from my side....

- Michael
 
audiomixer said:
ruffrecords said:
Whatever route you take you need input and output signal conditioning circuits. This might be a useful sub-project in its own right.

A while back I suggested building an audio test set around the Raspberry Pi. At the time the downside was that it lacked an I2S interface which would have helped ensure the capture of high quality data. Fortunately the new MKII version has twice the RAM of the original and has added an I2S interface.

Perhaps a signal conditioning PCB with an I2S interface?

Cheers

Ian

I ordered one of the new RaspberryPi boards, will give the I2s a go when I have a spare moment (2015?).... I am looking forward to this frontend thing, but I am pretty sure this might be a difficult one. some requirements:

1) single channel Input, gain range adjustable - maybe three ranges?
2) single channel Output, PC signal, 24 bit DAC, sampling frequency to be determined. my converters are much noisier @ 192kHz, maybee only because of larger BW, but really much noisier by a lot.

A lot here depends on the choice of codec. Those that operate from a +5V supply are limited to about +4dBu max input so an attenuator would be needed to cater for higher levels. I need to be able to make measurement at up to +30dBu. Those operating on a 12V supply can just about manade +14dBu. Similar considerations apply fro the output. We will need some extra gain to be able to generate high output levels.

3) switchable high precision sine generator, maybe a  fixed frequency or a set of different frequencies. note that this would be used only for very low THD measurements, optionally with additional analogue filter in the input channel to attenuate the base frequency.

The sine generator would be in software and sent via the I2S. Software too can eliminate the base frequency on the input side.

4) transformer coupled isolated output
5) transformer coupled isolated input?

Not sure about these - probably add more unwanted artifacts.

6) battery operation to assure lowest noise (?)

Also allows the unit to be placed almost anywhere - I do hate mains tethered test kit but bear in mind the high output levels required.

7) RMS milivolt meter
eight) gain range easily adjustable with nice big steps? -40dB / 0dB / 40dB

Again, this can be a software function with true rms or quasi peak measurement for noise etc.

anything else on the wish list?

- Michael

I think we should aim to keep the interface as straightforward and clean as possible and leave the complex stuff for software.

Cheers

Ian
 
Am I correct in believing that certain AP models utilise coupling transformers for I/O? I read this somewhere (here?) a while back. Maybe the SW is designed to compensate for added distortion? The trouble is, t/formers change their distortion characteristic according to frequency and load, so the SW would have to be pretty sophisticated. Am I missing something?

J
 
thermionic said:
Am I correct in believing that certain AP models utilise coupling transformers for I/O? I read this somewhere (here?) a while back. Maybe the SW is designed to compensate for added distortion? The trouble is, t/formers change their distortion characteristic according to frequency and load, so the SW would have to be pretty sophisticated. Am I missing something?

J

Dunno but AP gear is expensive so the transformers they use are likely to be extremely good and they probably use some smart circuits to reduce unwanted artifacts. On the input side you could limit the level passed by the transformer using a primary attenuator.

For our purposes electronically balanced is fine but you can always do what I do which is have a 10k:10k and 600:600 transformer wired to free XLRs so you can just plug one in if necessary.

Cheers

Ian
 
thermionic said:
Am I correct in believing that certain AP models utilise coupling transformers for I/O? I read this somewhere (here?) a while back. Maybe the SW is designed to compensate for added distortion? The trouble is, t/formers change their distortion characteristic according to frequency and load, so the SW would have to be pretty sophisticated. Am I missing something?

J
Indeed the AP sytem 1 and 2 use output transformers. Distorsion cancellation is done by negative impedance. The circuit is not very complicated; the only tricky thing is that it uses a special thermistor for tempco. Their xfmr is quite big because the generator is capable of delivering a few watts into 4 ohms.
For a DIY test set and considering the most likely scope of applications, I think an output stage based on a THAT1646 would be adequate.
 

Latest posts

Back
Top