If I put my notes here, I might be able to find them again later!
Headphone amps are hard.
The $50-from-China-via-ebay NJM4556-based headphone amp, pictured below, fails the "Is thing thing on?" test. With 16 ohm, 104 dB/mW headphones there is a faint-yet-audible background hiss when the unit is powered up and the volume is turned all the way down. The hiss increases only slightly as the volume is turned up (input disconnected).
The output noise of an op amp is normally estimated from the input-referred voltage noise density multiplied by the gain, and the current noise density multiplied by the gain and the sum of the input impedances on the inverting and noninverting inputs. The NJM4556 datasheet does not give a figure for current noise, but a reasonable guess is 1 pA/sqrtHz. The voltage noise density is estimated at 8 nV/sqrtHz.
Total noise is
Vn (output) = sqrt [(i_n R_s)^2 + e_n^2 + 4kT R_s] * Gain
Working from a source impedance of ~10k, I get about 18 nV/sqrtHz or -138 dB.
[Revised according to a more accurate model, explained here there are three extra terms,
Vn (output) = sqrt [ (e_n*Gain)^2 + (i_n R_s Gain)^2 + (i_n R_f Gain)^2 + (sqrt(4kT R_s)*Gain)^2 + (sqrt(4kT R_i)*Gain-1)^2 + (sqrt(4kT) R_f)^2] .
The excel worksheet is provided for download, below.]
I still get 18 nV/sqrtHz or -138.5 dB. (-137 with the volume all the way up.) Only two terms make significant contributions when the volume control is at zero; the voltage noise and the thermal noise of the 10 k resistor on the inverting input.
*****
The measured noise floor [NI-6215 isolated USB DAQ, Labview 2011] is -129 dB with the volume down, -126 dB with the volume all the way up, ~10 dB higher than the calculations.
The input referred noise works out to 100-140 nV/sqrtHz (-137~140 dB). For some reason though my estimates based on the datasheet values and circuit values are are much lower than the measured values, even though the dependency on the source impedances play out exactly as calculated.
This is puzzling.
Why is the noise consistently 5~8 times higher than expected?
*****
Ok, with the help in the comments below and a little extra digging I think I have the answer.
Basically, the FFT noise floor is not directly equal to the noise density. For one, there is a scaling factor inversely proportional to the frequency step and noise bandwidth. For another, the output noise of the op amp has a bandwidth far in excess of the sampling frequency, and the out-of-band noise energy gets shifted back into the measurement bandwidth, increasing the apparent noise floor. At least that is what appears to be happening here, as the noise baseline increases in 10 dB steps as the measurement bandwidth is decreased from 100 kHz to 10 kHz to 1 kHz.
One solution is to put a low pass filter between the test device and the instrument. However, since I know the test device bandwidth (it's about 1 MHz in this case) I can back out that the "true" noise density is about 10 dB less that what is measured at 100 kHz. In rough terms this makes up for the difference I noted above.
On a more general level, I think I've learnt that a 250 kS/s DAQ board is not really the appropriate tool for these kind of measurements. The measurement bandwidth is insufficient to cover the full spectrum noise output from typical audio components.
The output noise of an op amp is normally estimated from the input-referred voltage noise density multiplied by the gain, and the current noise density multiplied by the gain and the sum of the input impedances on the inverting and noninverting inputs. The NJM4556 datasheet does not give a figure for current noise, but a reasonable guess is 1 pA/sqrtHz. The voltage noise density is estimated at 8 nV/sqrtHz.
Total noise is
Vn (output) = sqrt [(i_n R_s)^2 + e_n^2 + 4kT R_s] * Gain
Working from a source impedance of ~10k, I get about 18 nV/sqrtHz or -138 dB.
[Revised according to a more accurate model, explained here there are three extra terms,
Vn (output) = sqrt [ (e_n*Gain)^2 + (i_n R_s Gain)^2 + (i_n R_f Gain)^2 + (sqrt(4kT R_s)*Gain)^2 + (sqrt(4kT R_i)*Gain-1)^2 + (sqrt(4kT) R_f)^2] .
The excel worksheet is provided for download, below.]
I still get 18 nV/sqrtHz or -138.5 dB. (-137 with the volume all the way up.) Only two terms make significant contributions when the volume control is at zero; the voltage noise and the thermal noise of the 10 k resistor on the inverting input.
*****
The measured noise floor [NI-6215 isolated USB DAQ, Labview 2011] is -129 dB with the volume down, -126 dB with the volume all the way up, ~10 dB higher than the calculations.
The input referred noise works out to 100-140 nV/sqrtHz (-137~140 dB). For some reason though my estimates based on the datasheet values and circuit values are are much lower than the measured values, even though the dependency on the source impedances play out exactly as calculated.
This is puzzling.
Why is the noise consistently 5~8 times higher than expected?
*****
Ok, with the help in the comments below and a little extra digging I think I have the answer.
Basically, the FFT noise floor is not directly equal to the noise density. For one, there is a scaling factor inversely proportional to the frequency step and noise bandwidth. For another, the output noise of the op amp has a bandwidth far in excess of the sampling frequency, and the out-of-band noise energy gets shifted back into the measurement bandwidth, increasing the apparent noise floor. At least that is what appears to be happening here, as the noise baseline increases in 10 dB steps as the measurement bandwidth is decreased from 100 kHz to 10 kHz to 1 kHz.
One solution is to put a low pass filter between the test device and the instrument. However, since I know the test device bandwidth (it's about 1 MHz in this case) I can back out that the "true" noise density is about 10 dB less that what is measured at 100 kHz. In rough terms this makes up for the difference I noted above.
On a more general level, I think I've learnt that a 250 kS/s DAQ board is not really the appropriate tool for these kind of measurements. The measurement bandwidth is insufficient to cover the full spectrum noise output from typical audio components.
Total Comments 10
Comments
-
How are you getting the noise figure - I can't see the bandwidth in your equation. Bear in mind if you're reading a datapoint from the FFT, the bandwidth associated with that point is a function of the number of FFT bins, the windowing function (if any) and any averaging your software is doing. Its always considerably lower than the audio bandwidth. This might account for the discrepancy you're seeing.
Posted 12th January 2013 at 10:42 AM by abraxalito -
Posted 13th January 2013 at 06:31 AM by rjm -
Noise density assumes unity bandwidth right? Your FFT bins would only have unity bandwidth by accident. Given that you're finding noise higher than expected, I'm betting that your FFT bins are considerably wider than unity. How many points in the FFT you're running and what's the sample rate? I doubt that windowing can result in a factor of 5 error.
Posted 13th January 2013 at 06:45 AM by abraxalito -
Your noise calculation is incorrect, AFAICS. You're ignoring the feedback resistors' Johnson noise and also the noise produced in them by the opamp current. They're much too big. You can reduce these radically, the 4556 will drive 150R, so they could go to 150R & 33R, say, for roughly the same gain, depending on the true load anticipated.
You can't assume an input impedance of 10k anyway, it'll be shunted by the source impedance which will probably be < 600R for any source expected to drive headphones, and there's the pot. too, although this is obviously much less significant but needs to be taken into consideration depending on setting.Posted 13th January 2013 at 07:15 PM by counter culture
Updated 13th January 2013 at 07:19 PM by counter culture -
@abraxalito
The frequency steps, as luck would have it, are 1.25 Hz. The sampling rate is 20 kHz. The window used is the Hanning type.
@counterculture
The volume pot shunts the 10k resistor on the noninverting input, but the 10k resistor on the inverting input is only in parallel with the 50k feedback resistor. Overall 10k as the total source resistance for noise considerations is a reasonable estimate.Posted 14th January 2013 at 12:46 AM by rjm
Updated 14th January 2013 at 12:49 AM by rjm -
It's giving you the wrong answer, in practice the circuit is noisy. Your measurements aren't at fault, as you said yourself, a tablet can do better. Ergo, there's something you need to fix. Besides, I looked it up in Doug Self's Small Signal book to confirm that my memory wasn't at fault. For best noise performance keep the resistance in the feedback loop as small as practicable.
Going from 3k+1k feedback to 300+100 feedback in a virtually identical configuration with a 5532 gave a 1.1dB reduction in NF. You've got 50k, not 3k.
Of course if you don't want to get a fix for it, just carry on arguing with me. Except, of course, I won't be here to argue with.Posted 14th January 2013 at 01:11 AM by counter culture
Updated 14th January 2013 at 01:16 AM by counter culture -
I won't argue with you. You are not incorrect, just misguided.
I'm normally the type to carefully explain and clarify things to others, but given the way you signed off your previous comment I see there's little use.
Let me instead set it as a homework problem:
Reduce the feedback resistance from 10k and 50k to 1k and 5k. Recalculate the total output noise. Next, determine the typical change in output offset voltage. Feel free to use the NE5532 instead of a NJM4556, they are close enough for pedagogical purposes.Posted 14th January 2013 at 11:00 AM by rjm -
Posted 14th January 2013 at 12:12 PM by rjm -
Oh, and the inductor is redundant, as you'll see if you take a look at the O2 schematic or the Grado RA1, there are hundreds of amps out there using the 4556 for an output stage perfectly satisfactorily without oscillation, and...
...it's not a good idea to include an output resistor within the feedback loop. With a reactive load (like headphones) the voltage drop across the resistor will be out of phase with the output of the 4556. This creates a phase shift in the feedback loop potentially reducing stability (phase margin) increasing the likelihood of oscillation.
Although the datasheet for the 4556 doesn't specify a short circuit tolerance, the large number of amps based on this chip, and the testing done by RocketScientist (nwavguy), make it a racing certainty that the output resistor is unnecessary and counterproductive. And it's the only possible reason why an inductor might be required.
NwAvGuy: O2 Details
Headphone amps aren't hard. Just do a little research into the current SOTA, look at a few of the extant designs (which you obviously haven't done, or you'd have noted the points I've made yourself), read some audio amplifier design textbooks and get up to speed.
Amp still noisy? This is one of the few occasions abraxalito and I might agree, you have to trust your ears, especially when the results chime with your measurements.
I looked at the link you provided regarding noise calculations, he shows a little graph with 0.83 dB improvement by reducing Rf to 3R from the nominal design, but his nominal design uses 300R. Going from 300R to 3k from the graph results in a 4dB increase in noise floor, and as I pointed out previously, you're using 50k.Posted 14th January 2013 at 05:47 PM by counter culture
Updated 14th January 2013 at 06:13 PM by counter culture -
It would be less trouble for both of us if you could read the original post before commenting:
The output resistor is not in the feedback loop.
Also, this is not my design, just a little gadget I got off ebay. I'm aware that the resistors contribute about 3-6 dB to the noise floor, but fixing that will unbalance the DC impedances and increase the output offset voltage, so I'm going to leave it as is.
The point is, the calculated noise (including all the resistors) is 10 dB lower than the measured noise, probably for the reasons abraxalito was kind enough to point out to me.Posted 15th January 2013 at 01:50 AM by rjm