Head-Fi.org › Forums › Equipment Forums › Sound Science › OK, so what CAN I reliably measure from a PC soundcard ?
New Posts  All Forums:Forum Nav:

OK, so what CAN I reliably measure from a PC soundcard ?

post #1 of 46
Thread Starter 

Hey All,


     We all know the drill - I cant link to the blog or paste his opinions, but most of you will have read the scathing criticisms of RMAA as a measurement tool etc. Those who want to turn this into another philosophical debate, please read no further.


     My needs are extremely modest - I want to measure output power and output impedance on various amps : headphone and speaker amps.  'Just look at the specs page !', I hear you cry - please, don't even go there with me or you will unleash a keyboard warrior the likes of which hasnt been seen since the Playstation Network was hacked .... evil_smiley.gif


    Having established that some folk cant be bothered publishing meaningful specs (take a bow, Ray !) and others will publish everything except output impedance, I get very p*d off with a nunber of manufacturers, 


   If I have a criticism of V's stance, its an obvious one - anyone without the 6-10K needed for a decent analyser might as well just rely on him to post measurements for whatever kit comes into his possession. I also wonder how many other software tools he has tried beyond RMAA given that he already has excellent tools. As I said earlier, this isnt about V or his philosophy - its about a dufus who just wants to be able to verify two measurements he deems important, comprende ?  I'll leave the rest of you to argue the toss on everything else, given that even the Stereophile measurements are routinely questioned : thats a debate I'm not even remotely interested in.


   Informed feedback most welcome. Happy to hear what you are using out there - soundcards and software - regardless of whether or not it coincides with the Dark Lord's mandates against using RMAA as a valid measurement tool for publishing objective 'data'. I will be installing a soundcard anyway for games and movies - might as well take a shot at a few measurements for the amusement of my fellow Head-Fiers, 






PS for those who routinely bitch about the lack of measurements included in subjective reviews, do you own or hope to own a 6K+ spectrum analyser ? Just curious. wink.gif

post #2 of 46
Thread Starter 

'Hello, Radio Shack ? Yes, its me again - the idiot - thats right ...'




'Yeah, thanks - I got that, but now all I need is a way to measure output impedance'


post #3 of 46

On a side note, as buggy as RMAA is, it can be pretty helpful.  To be honest, V's reservations against RMAA results seem to be mostly about the people who are misusing it and producing garbage results, rather than the program itself.  For a couple crude measurements, you don't need much more.


I'm pretty sure I've heard of some kind of hacks or elaborate setups to supplement soundcard-based measurements; hopefully somebody remembers those and can bail us out.  I'm just guessing here based on basic knowledge.


The issue with using a sound card to measure amps is that many amps can output quite a bit higher voltage than the line in of a sound card can take.  There can also be some grounding issues, particularly with certain grounding arrangements on some amps.  To measure max output power, you need to determine if the output is clipping yet or not, which is where a sound card or audio analyzer would be handy.  Pretty much what you would need to do is connect a voltage divider in parallel with the load, so you can measure a scaled-down version of the signal that is not too large for the sound card to handle.  Like below, you'd be measuring about 1/10th of the voltage the load sees.  Something like RMAA (even just the calibration signal at the beginning) can help you tell the THD at that given level.  Measure the voltage with a multimeter at that level, and then you can calculate how much that power was by P = V^2 / Z.





For just output impedance, that's really easy.  Play a tone and measure the output with a multimeter with no load:  call the result V1.  Then play the same tone (same volume) with a load attached and measure the voltage across the load:  call the result V2.  V2 will be smaller than V1 unless the output impedance is 0.  If Z_s is the source output impedance and Z_L is the load impedance , the output impedance can be calculated via (approximately):

V2 = V1 * Z_L / (Z_s + Z_L)




Z_s = Z_L * [ (V1 / V2) - 1]

Edited by mikeaj - 5/9/12 at 9:48pm
post #4 of 46
Thread Starter 

@mikeaj, thank you so much for that. You are an asset to this board.


I've spent the afternoon researching the PCIe version of the E-MU 0404 - apparently its useless for gaming, but good as a measurement tool. Will keep chipping away at this - as I said, it frustrates the hell out of me that people who charge good money for electronics cant be bothered to do the calculation you have outlined above and publish that figure. Truly pathetic - not universal, but annoying nonetheless. 

post #5 of 46
Originally Posted by mikeaj View Post


Note that many sound cards have fairly low input impedance, for example in the case of the Xonar series it is only about 4 kiloohms. Therefore, lower resistor values would work better.

Although the EMU0404 does seem to have high impedance (and even differential) inputs. Still, adding high serial resistance can degrade the signal to noise ratio (see here).

Edited by stv014 - 5/10/12 at 12:25am
post #6 of 46

Originally Posted by estreeter View Post


     We all know the drill - I cant link to the blog or paste his opinions, but most of you will have read the scathing criticisms of RMAA as a measurement tool etc. Those who want to turn this into another philosophical debate, please read no further.


Most of those criticisms are related to the limitations of the RMAA software. Although there are some physical limitations of most (but not all) sound cards that make it tricky at best to use them as measurement tools, such as grounding problems due to the lack of isolated inputs and outputs, low input impedance, and limited voltage range. These can be worked around to various extents, but do make PC based measurements more challenging for most people.


RMAA is not quite the only software that can be used for testing/measurement/analysis purposes, however what is available is obviously not as easy and convenient to use as a high cost commercial solution, and bugs can also be a problem. I do use Visual Analyser (it is a quite useful tool, but does have some bugs, and 24 bit audio can be problematic on Windows - I normally use it under Linux with WINE), Cool Edit Pro (old commercial audio editor that I unfortunately still find more usable than the free Audacity), and various scripts/small programs I write myself in scripting languages designed specifically for audio DSP, and even C/C++. There are obviously more alternatives if you search around.

Obviously, having a decent DMM, and basic DIY equipment (soldering iron, various resistors for creating test loads and voltage dividers, etc.) and skill are very useful for a major step up from the typical unloaded RMAA loopback test.


Edit: some of my utilities for audio processing and analysis are now available, and there is a download link later in this thread here.


For simple output impedance and power measurements, you can use the method already described above by mikeaj. With a voltage divider (if necessary) and Visual Analyser, it is also easy to find the clipping level of an amplifier in real time.

Edited by stv014 - 2/25/13 at 9:14am
post #7 of 46
Thread Starter 

Thanks stv014 - excellent info in there and I'll add it to my steadily growing 'database', I wouldn't mind writing the odd Perl script (or Python/Ruby if those were my only options) to automate my testing, but C is just tedious, Probably OK for someone who uses C on a daily basis, but if thats the only option I was given for automation I'd rather wait for Stereophile or V to get around to that particular piece of kit. 

post #8 of 46
Originally Posted by estreeter View Post

Thanks stv014 - excellent info in there and I'll add it to my steadily growing 'database', I wouldn't mind writing the odd Perl script (or Python/Ruby if those were my only options) to automate my testing, but C is just tedious, Probably OK for someone who uses C on a daily basis, but if thats the only option I was given for automation I'd rather wait for Stereophile or V to get around to that particular piece of kit. 


I was referring mainly to audio programming languages, of which there are several, and some are quite powerful. I used C to write a simple utility (note: the Mediafire link is no longer working) that generates maximum length sequences and is useful for frequency response testing, and some other utilities for analysis purposes, but these are not of much importance.

post #9 of 46

To work around grounding related issues with sound card loopback tests, I tried the following simple circuit (the power supply is not shown):



At the cost of minor quality degradation, this allows for more reliable testing of noise, crosstalk, and distortion when ground loops would otherwise interfere with the measurement (which can easily happen if the test is more complex than just a loopback cable between the output and input of the same sound card).


Edit: decreased output resistors from 100 ohms to 47 ohms.

Edited by stv014 - 7/14/12 at 11:36am
post #10 of 46

Some RMAA problems/bugs I have found, there are probably more:

- the noise and dynamic range values are "off" by 2-2.5 dB (i.e. they are worse in reality than shown, maybe it is an attempt to compensate for the additional noise by the A/D converter)

- similarly, the crosstalk does not seem to be calculated correctly, and the program "improves" the real crosstalk by up to ~6 dB

- the swept THD test does not seem to work at all for me, although I wrote an utility for this type of test:


post #11 of 46

I did some experiments with the differential amplifier circuit shown above, using both RMAA 6.2.3 and scripts/programs I wrote. First, here are the RMAA results for driving a pair of 22 ohm resistors by the headphone amplifier of the Xonar STX through the front panel jack, at a 0 dBFS level of about 1.48 Vrms. For recording, I used both a Xonar D1 and STX, with and without the differential amplifier.

Summary and frequency response:

169    247

Dynamic range and 1 kHz THD:

247    247




On the frequency response, there is not much interesting to see, it is almost identical in all cases; the A/D converter on the Xonar D1 rolls off the treble slightly more. The noise and dynamic range are much worse when not using the adapter, because the ground noise of the PC is picked up, while it is rejected by the differential input. However, it does pick up some 50/100 Hz AC hum instead, which seems to depend on the ground impedance between the amplifier and the sound card input. The distortion does not vary much, except in the case of recording with the Xonar D1 and not using the adapter, which is worse again because of grounding issues. The crosstalk looks better without the differential amplifier, but it is actually incorrect then because crosstalk through the long common ground wire to the front panel headphone jack is ignored by the unbalanced inputs. With a DMM, I measured a crosstalk of about -47 dB at 1 kHz. However, even with the adapter, RMAA shows a better value. That is actually a bug in RMAA, here is the graph I created for the STX->STX (differential) case using my own program for analyzing sine sweeps:




The green trace is the L->R crosstalk, while the red one is R->L. This is close to what was measured with the DMM.

I also created a set of 0 dBFS THD graphs using the same sine sweep analysis program. This was configured to test up to 7th order harmonic distortion, and with a bandwidth of 60000 Hz. The yellow, green, blue, and red traces correspond to the white, green, cyan, and magenta ones on the RMAA graphs above, respectively. The traces with lighter color are for the left channel. Apparently, the TPA6120A2 does not really like the low impedance load:




Because of the grounding problems without the adapter, the distortion is increased, especially in the STX->D1 case.


Finally, I tested the 0 dBFS distortion driving only the left (green) and right (red) channel in the STX->STX differential configuration. The lower traces are cross-distortion, i.e. THD products appearing on the other channel. The spikes in the treble range are due to ultrasonic interference being mistaken as THD, and can be ignored.




More tests will follow that try to find out how much quality degradation is caused by the adapter itself.

Edited by stv014 - 7/14/12 at 1:25pm
post #12 of 46

A few more tests, this time a simple Xonar STX line out -> line in loop back with and without the differential amplifier, and the line output of the onboard Realtek ALC887 codec. First, the same set of RMAA results and graphs as in the previous post:


169    247

247    247




What these show is that grounding problems with sound card loopback tests can be bad enough that even the noise level of onboard audio is significantly degraded. In the STX->STX loopback, the adapter does not make much difference, other than slightly increasing the noise level, adding the already mentioned low level AC hum, and having somewhat different crosstalk (it depends on the cables and connectors).


Now some graphs created using my sine sweep analysis utility, starting with THD vs. frequency at 0 (ALC887) or -1 (Xonar STX) dB relative to maximum volume, and both channels driven:



Blue: ALC887 without adapter, yellow: ALC887 with adapter, green: STX without adapter, red: STX with adapter; lighter color: left channel, darker color: right channel. Bandwidth = 50 kHz, max. THD order = 3 (ALC887) or 5 (STX).


The ALC887 graphs are very noisy (not too surprisingly for onboard audio), but at the highest frequencies the adapter seems to slightly reduce distortion. In the case of the STX, the left channel interestingly seems to have significantly higher (but still low) distortion; this apparently comes from the DAC, rather than the input. However, the differential amplifier seems to make little difference, it is generally within +/- 1 dB relative to the fairly low distortion of the sound card on both channels.


Since the crosstalk test in RMAA is not reliable, I tested that separately, too. The left graph compares the STX loopback with (blue: L->R, yellow: R->L) and without (green: L->R, red: R->L) the adapter. The right one contains two samples using the adapter, to show the difference that even small random contact changes can make. For 108 dB stereo separation with a 4300 Ω load (Xonar STX line input), a total impedance of about 17 mΩ is needed for the ground connection between the amplifier and the input of the sound card.


194    208


Finally, a few more tests of the quality of the differential amplifier:

- top left: frequency response (with adapter: blue: left, yellow: right; without adapter: green: left, red: right)

- top right: THD vs. frequency (-1 dBFS) with only one channel driven, the colors are the same as above. The bottom traces are cross-distortion, but these contain mostly noise, and do not really tell much in practice

- bottom left: 19 + 20 kHz IMD test at almost clipping level (near 2 Vrms), with the differential amplifier in the signal path

- bottom right: same as above, but with direct loopback


194    194


208    208


The most notable difference here is the 1 kHz (2nd order distortion) signal in the high frequency intermodulation test, but it is still a minor difference (likely in the 0.000x % range from the adapter itself).


The following table shows detailed noise (24 kHz bandwidth) and L/R level values calculated with a script I wrote in an audio programming language:


  Direct L Direct R Differential L Differential R
-3 dBFS 1 kHz sine, unweighted RMS -2.77 dB -2.92 dB -2.84 dB -2.96 dB
-3 dBFS 1 kHz sine, A-weighted -2.77 dB -2.92 dB -2.84 dB -2.96 dB
-60 dBFS residual, unweighted RMS -111.53 dB -111.70 dB -109.99 dB -110.22 dB
-60 dBFS residual, A-weighted -114.91 dB -115.05 dB -113.88 dB -114.11 dB
Dynamic range, A-weighted: 115.14 dB 115.13 dB 114.04 dB 114.15 dB


Note that the dynamic range is consistently about 2.5 dB worse than what is reported by RMAA. Therefore, one program must be wrong, and I suspect it is RMAA again, as I did test my script with synthetic signals that have known levels, and RMAA SNR and dynamic range numbers have already been suspected of being "too good to be true" elsewhere.


How much degradation does the adapter cause to the noise level ? It can be approximated from the above table (assuming uncorrelated noise), but the result is not very accurate for multiple reasons (not sufficiently high precision, the results are not repeatable enough and depend on system activity etc., not exactly matched levels). The dynamic range difference is -120.54 dB on the left channel, and -121.10 dB on the right (A-weighted). The theoretical noise level of the circuit is 120.3 dB A-weighted (ref. 2 Vrms) according to my calculations, and the most significant component is Johnson noise from the 2.7 kΩ resistors. Interestingly, it would only improve by about 1 dB using AD797 op amps.



- when using sound cards with unbalanced inputs and outputs having a common ground for loopback testing, ground loops can be a major problem, and can make the measurements of noise, dynamic range, crosstalk, and distortion (with low impedance loads) very inaccurate; the circuit shown and tested above is one of the possible workarounds. Ideally, one should use audio interfaces with isolated input/output ground

- RMAA (at least the version tested here, but possibly others as well) apparently has bugs that result in incorrect noise, dynamic range, and crosstalk values being printed even if the hardware does allow for reasonably accurate measurements

- it is shown again that "op amp rolling" is rather pointless, and even inexpensive op amps can perform very well in simple and not too demanding applications like a line level buffer or differential amplifier

- the quality of the cable and connectors between the adapter and the input of the sound card does have some effect: a low impedance ground connection reduces AC hum and low frequency crosstalk, while better shielding between the channels improves high frequency crosstalk. Therefore, a short cable, separately shielded channels, low resistance ground wires, and good connectors without contact problems are preferred

- AC hum could be eliminated by powering the circuit with 2x9V batteries; it probably also depends on the type of wall wart used for the power supply

- the 47 ohm output resistors might not be necessary, and removing them could reduce the high frequency crosstalk

- an unbalanced source with very high (well above 100 ohms) output impedance can make the circuit less effective due to the asymmetrical input impedances

- all resistors used were 1% 0.4W metal film ones (the actual variation measured with a DMM was less than 1%); the 150 pF capacitors were also matched

- by changing the 2.7k resistors, the gain could be modified for different input voltages

Edited by stv014 - 7/16/12 at 2:55am
post #13 of 46

Great work stv. I love seeing someone take the time to do these measurements. L3000.gif

post #14 of 46

Just to add to the answers of the original question - It's not specifically what the O.P. wanted to measure, but a decent sound card is great for RoomEQWizard.  That is, measuring speaker frequency response, decay, THD, and THD+N.


You'll need a microphone (calibrated preferably) and pre-amp in addition to the sound card, and a tripod/stand for holding the mic.  I have a Radio Shack SPL meter that works OK for REW.


Measuring your speakers' in-room performance and treating your listening room acoustically is certainly a worthwhile endeavor if you do serious speaker listening.

Edited by BlackbeardBen - 7/15/12 at 10:45pm
post #15 of 46

"POWER vs THD: RMAA cannot perform the classic measurement of output power versus THD. This is a standard benchmark amplifier test that’s widely performed as it’s very revealing of the amplifier’s behavior at different levels. RMAA has no way to perform this critical measurement nor am I aware of any other software that offers this sort of measurement with a sound card."


Fortunately, this is not that hard to implement, as can be seen here. It was not done with a user friendly and publicly available software, though.

New Posts  All Forums:Forum Nav:
  Return Home
  Back to Forum: Sound Science
Head-Fi.org › Forums › Equipment Forums › Sound Science › OK, so what CAN I reliably measure from a PC soundcard ?