I?ve been reading through some old DAC-related threads, and found some folks making a rather surprising claim that op-amps are unsuitable for audio DAC I/V conversion. The thread where this is mentioned is called ?Best opamp for I/V conversion? (DAC)?, over at ?the other place?. The justification given for the statement about op-amps was that an article by Barrie Gilbert, which was unavailable on the web at the time, proves the point. This article, ironically titled ?Op-amp Myths?, had been removed from the web a while back. In a recent web search, I found the article again, along with another Gilbert article called ?Are Op-amps Really Linear?? which has already been the subject of another very long thread about PIM distortion. These articles can be found here
http://archive.chipcenter.com/analog/c014.htm and here
http://archive.chipcenter.com/analog/c007.htm.
The quote that apparently led to the conclusion that op-amps are unsuitable for audio DAC I/V conversion is as follows:
(Begin Gilbert's words) ??consider an OPA used to convert the output current from a DAC to a voltage, that is, the classical transresistance function. Let the feedback resistor that scales this function be RF. Now model the op amp as an integrator -- which you really must -- and consider the voltage swing at that "virtual ground" in response to a current step. To begin with, the output from the op amp doesn't move at all; its initial response is ramp-like, as the amplifier performs the operation VOUT = -VIN/sT1. But what is VIN in this case? Well, it is simply the DAC output current step, call it IDAC, times the feedback resistor RF. For a typical case of IDAC = 2 mA, RF = 5 kohms (for a final output of 10 V) the input step is also 10 V!? (End Gilbert's words)
And yet Elso, in this post
http://www.diyaudio.com/forums/showthread.php?postid=397071#post397071 measured the voltage at the inverting input of the op-amp at his DAC output and found it to be 10 mVp-p. So there?s three orders of magnitude difference between Elso?s measurement and Gilbert?s calculation of the same quantity. This begs a couple of questions:
1.) What?s different (if anything) about the conditions of Gilbert?s calculation and Elso?s measurement?
2.) Do these differences in conditions account for the vast difference between Gilbert?s predicted results and Elso?s actual results?
Fortunately, the answer to (2) is ?yes?, assuming Elso?s circuit is similar to that recommended by Burr-Brown/TI in their DAC data sheets. To see this, I?d like to determine two things:
1.) What?s the worst-case current step of the DAC given that the digital signal was produced using an A/D whose analog input was band-limited to 20 kHz?
2.) Given that DAC current step and the real-world component values and op-amps of the manufacturer?s recommended application circuit, what?s the worst-case differential input voltage to the DAC op-amp (between pins 2 and 3)?
For this analysis, let?s assume a Burr-Brown PCM-1794 DAC with an output stage as recommended in the data sheet in Figure 24.
Gilbert?s analysis assumes a full-scale jump in the DAC bit count. Is this reasonable given the band-limited nature of the analog circuitry prior to the A/D? Jocko asked that same question here
http://www.diyaudio.com/forums/showthread.php?postid=401769#post401769. Boholm answered in the following post that a 22.05 kHz full-scale sine wave, sampled at the peaks, will make that happen. It turns out that a sine wave at exactly one-half the sampling frequency doesn?t meet the Nyquist criterion. To see this, assume the samples are shifted by a quarter of a period from the peaks. The first and all subsequent samples will be at the zero crossing, so it can?t be reconstructed. But suppose we take a 20 kHz sine wave that?s full-scale, and assume the zero crossing of the sine wave is exactly half way between the sampling instants, and the sine wave is rising during that time. In this case, the peak-to-peak digital value will be:
Sample step = sin(pi * 20 / 44.1) * full scale, or
Sample step = 0.9894 * full scale.
This might as well be full scale. This is beginning to look bad. But what?s the effect of an oversampling digital filter? The first sample above for the rising sine wave is very near the negative peak, and the second near the positive peak. For an oversampling digital filter, this single step will be split into N steps, and since we?re assuming a PCM1794, N will be 8. What will the intermediate samples look like? Well, if the digital filter is doing its job, those samples should look like a reconstruction of the original sine wave, since the shape of a sine wave is invariant to filtering. Since the sine wave looks approximately like a line in this interval, it becomes clear from a graphical argument that the step size of the DAC will be reduced by a factor of approximately N, the oversampling ratio. So for 8x oversampling, we?re looking at a worst-case DAC step of 1/8 of full scale for a digitized full-scale 20 kHz sine wave. A non-oversampling DAC is at a disadvantage here.
This is an improvement, but not nearly enough to account for the discrepancy between Elso?s measurements and Gilbert?s calculations. So what else is different? Looking at the application circuit of the PCM1794 in Figure 24 of its data sheet, you can see that there?s a capacitor of 2200 pF in parallel with the 750 Ohm feedback resistor. Does this capacitor make a difference? To see, look back at Gilbert?s assumptions. He?s assuming the feedback network is just a resistor. A large current step causes a large differential voltage to appear at the op-amp input, because the voltage across the feedback resistor changes almost instantaneously due to the current step. But in the case of the application circuit, the capacitor prevents this instantaneous voltage change. In the ideal case, the I/V converter acts as a low-pass filter with a time constant of 750 Ohms and 2200 pF. A typical technique for determining whether the circuit will go into slew rate limiting is to compute the output response assuming linear operation, calculate the maximum time rate of change of the output, and if that rate of change is much less than the slew rate, the assumption of linear operation was a good one. Let?s proceed in that way and look at the deviation of the output from its DC value under an ideal op-amp assumption. That becomes:
v_out(t) = I_DAC * R * (1 ? exp(-t / (R*C))
Taking the derivative at t = 0 to get the maximum value, we get:
dv_out / dt max = I_DAC / C.
The current I_DAC is 7.8 mA. For the non-oversampling case, this results in a slew rate of 3.55 V/us, and for the 8x oversampling case, the slew rate is 0.44 V/us. The non-oversampling case is enough to produce significant distortion in a mediocre op-amp, but the oversampling case is out of trouble for a good op-amp.
Now let?s look at how to compute the differential input voltage. The open-loop transfer function A(s) of the op-amp is:
A(s) = A0 * w0 / (s + w0)
Approximating this as an integrator, we get:
V0(s) = Vi(s) * A0 * w0 / s
Solving for the input, we get:
Vi(s) = s * V0(s) / (A0 * w0)
In the time domain, this is:
vi(t) = (1 / (A0 * w0)) * d/dt { v0(t) }
That is, the input voltage is the derivative of the output voltage, divided by the gain-bandwidth product in radians/sec. The output voltage rate of change must be in Volts/sec. This voltage is the peak voltage for an output step in only one direction. The peak-to-peak voltage will of course be twice that above.
Let?s compute the peak-to-peak input voltage for the application circuit of Figure 24 in the TI data sheet. Since I don?t know what the gain-bandwidth product of the 5534 is when an external compensation cap of 22 pF is used, I?m going to ?arbitrarily? assume the gain-bandwidth product is 14 MHz. Plugging this number into the formula above and multiplying by two to get p-p values, and assuming the 8x oversampling case we get:
Vp-p = 2 * 0.44E6 / (2 * pi * 14E6) = 10 mV p-p
Now you know why I picked 14 MHz :-). With 8x oversampling, a feedback capacitor of 2200 pF and a gain-bandwidth product of 14 MHz in the I/V op-amp, the differential input voltage will be about 10 mV p-p for a full-scale 20 kHz sine wave. This is what Elso measured, and there?s nothing unreasonable about this number at all.
I?d have to conclude from this that the claims of op-amps being unacceptable for audio DAC I/V conversion are greatly exaggerated, if not outright false. This assumes the I/V converter has a sufficiently large feedback capacitor. Note that I?m not saying that improvements can?t be made with discrete circuits, but rather that they are not strictly speaking necessary.
This brings up another point, associated with Jocko?s experiences with current feedback op-amps as DAC I/V converters. Current feedback op-amps will oscillate with a feedback capacitor, and therefore can?t see the benefit of this configuration and the reduced output time rate of change that it brings to voltage feedback designs. The current feedback op-amp output will be forced to change very rapidly, which is completely unnecessary considering that the final output must be low-pass filtered anyway. This results in transients of current at the inverting op-amp input, giving unnecessary stress on the op-amp. In fact, the worst situation I can imagine is a non-oversampling DAC feeding a current feedback op-amp.