Another look at the LM317 and LM337 regulators

Status
This old topic is closed. If you want to reopen this topic, contact a moderator using the "Report Post" button.
Member
Joined 2003
Paid Member
jbau said:
<SNIP>

LM317:
out to adjust - 240 ohms
adjust to gnd : 2.7k ohms || 0.12uF
output cap: 1500uF w/ 10uF film
minimum load: 100mA

<SNIP>

Input to output differential : 2.5 volts

I've been following this thread with a lot of interest, partly because of the 'Bau' name, but partly because I've been doing a lot of tweaking on my computer music player with various power supply & regulator upgrades.

On the sound card (ESI Juli@) I've gone to Dexa aftermarket regulators which were marked improvements over the stock SMD chip regulators, even when the card is used only as a SPDIF source for an outboard DAC.

But I'm using LT1083CP's to provide regulated 12V for the P4 processor plug and into a Pico-PSU micro ATX-20 PSU.

Earlier in the thread a remark was made that the 1083 is similar to the 317. So I'm wondering if the LM317 formula above is a good starting point for these regs... I'm currently using the datasheet-stock 120R out to adjust, no adjust to ground cap, and a 1000uf on the output.

Thoughts?

Greg in Mississippi
 
hello.
made some listening tests with spare parts laying around.
conclusio : it works.
lm 317/337 , 120 ohm out,trim pot adjust paralleling 10uf elco.
load was a lm 1876 (similar to a 1875 in stereo).22vdc in/18vdc out.
only one bigger filmcap at the output connected +rail to -rail,
and different output elco............
mostly preferred (by my friends and me) was a 1000uf .
with bigger elco (2700uf and more ) it sounds as "highfi as usually( a little bit toiled )..."
the smaller 470uf sounded well in the high tone , was "good" in the mid and lost in the bass (bass drum kicks..........).
amazingly: the solution of the high tones........and some annoying vocals/instruments went a little bit back.......the "stage was altered......."
so i think that effort was it worth to do.................and go on .
greetings................
 
Greg: Any answer would be speculation until it's tested.

mjf: congrats on being the first to listen to it. I'm unclear from your description, is your in/out diff 4V or 2.5V?

Your phrase "the solution of the high tones........and some annoying vocals/instruments went a little bit back.......the "stage was altered......."" is a good tonal description of what happen when phase is linearized. Phase distortion disembodies the highs from the lows giving a forward, aggressive sound. Every piece of equipment in most systems is doing it, especially speakers. If your speakers were also linear phase, you would "see" the improvement, literally.
 
the in /out diff is 4volt.
we listend in the dark too (at night),this gives more concentration.
what do you think about that: adding a small res (e.g. 100mohm)at the output of the reg............and paralell regs to get a lower res out again?
greetings................
 
the in /out diff is 4volt.
See if you can get it down below 3V (measured loaded), maybe a CRC in front of the regulators? With 18V output, your set resistors are also different, so this affects the results too.
we listend in the dark too (at night),this gives more concentration.
Yes, but more ear fatigue too... a dark room in the day would be better. I learned the hard way as a recording engineer, NEVER make final listening decisions at night!

I don't see a problem paralleling regs to get more output current, as long as the important parameters are maintained.

greierasul: Of course, always use correct load sensing for the adjust circuit, at the load ground. But that's not what we are concentrating on here.
 
Ok, here are some harmonic distortion measurements, comparing an opamp-amplified signal first with the 317/337 pair with standard 10uF adjust caps and more normal 5.4V input/output differential, and then with the optimized adjust caps with 3.0V diff. I don't think HD is going to adequately describe the effect that balancing and linearizing the PS impedance has, but it's a place to start.

The test setup: 1kHz low-distortion (0.0007% THD) sinewave from Amber 3501a THD analyser fed into one side of a TLO72, noninverting with 10dB gain, + and - inputs impedance-balanced (yeah, I'm a nut about that). (Knowing from the past how un-fussy TLOs are about power supplies, I figured if I could see any difference at 1kHz on a TLO72, it would show up with just about anything else.) :) 1VRMS fed in to the TLO, giving 3.1VRMS out.

The opamp output is fed into the 3501a input. The analyser's distortion output is fed into an SA390 FFT analyser input. The 3501a monitor out (a buffered version of the input signal) was used to trigger the FFT for time-synchronous averaging. 256 averages does a great job of reducing the random noise and pulling the harmonics out 140-150dB below the signal level, by phase-synching the data records to the input signal.

The numbers shown are dB's relative to the full-scale input level. The highest peak is the 2nd harmonic, this corresponds to about -98dB on the THD analyser meter. The lower peak to the left is the remainder of the 1kHz input signal, about 16dB below the 2nd harmonic level. Not bad nulling for an "old" meter...

The top plot shows the regs with standard configuration, the bottom one is the optimized setup. I marked the values of the 2nd, 3rd, 5th, and 7th harmonics for easier comparison. As you can see, with the optimized regs, the 2nd is a tad lower and from the 3rd harmonic on up they are all lower by a couple dB. The 4th harmonic was lower too but it was buried in the noise floor so I didn't itemize it.

Like I said, I didn't expect a THD measurement would capture what I imagine to be more of a nonlinear distortion. Nevertheless, even a single jellybean opamp with a signal well within it's linear zone shows lower HD with better balanced and linear phase supply rails.
 

Attachments

  • std-opt.gif
    std-opt.gif
    31 KB · Views: 2,085
Gopher said:
The measurements you've made show precisely ****.



please keep your comments constructive and professional.

jbau is one of few on DIYaudio trying to associate a subjective observation with hard data. He is actually using a control! His effort should be commended and encouraged.

Gopher said:
The answer to any difference you think you hear (and that's a whole new can of worms) is most likely to be found in the transient response of the reg.

The whole point of this experiment is to come up with a measurement that captures, at least in part, what jbau is hearing NOT to quantify the differences in the power supply - something he has already done.

jbau, i have a couple of experimental ideas i'll post later. I've got an experiment to get to right now.
 
This is the way an experiment should go:

1) you start with an hypothesis
2) you design an experiment to test that hypothesis
3) you prove, reject or refine that hypothesis based on the results of the experiment

What jbau is doing, and I'm not ridiculing it by the way, is more of a scatter gun approach where he changes a number of variables without consideration of how one is affected by the others, and then draws questionable conclusions from what he thinks are the results.

Audio circuits, even simple ones like regs, are examples of complex multi-parameter spaces where you need a Monte-Carlo approach to test the effect of multiple parameter variablity within well defined ranges simultaneously.
 
Gopher said:
I am an engineer and a damn good one at that, which is way I get annoyed when I see poor experimental technique and the drawing of unsupportable conclusions from that data.

Here on DIYaudio your ability as an engineer is evaluated by the words you choose not by compliments you give yourself.

Gopher said:
This is the way an experiment should go:

What jbau is doing, and I'm not ridiculing it by the way, is more of a scatter gun approach where he changes a number of variables without consideration of how one is affected by the others, and then draws questionable conclusions from what he thinks are the results.

Audio circuits, even simple ones like regs, are examples of complex multi-parameter spaces where you need a Monte-Carlo approach to test the effect of multiple parameter variablity within well defined ranges simultaneously.

jbau's approach is not "scatter gun" - he changed a single variable, the capacitance of the adjust bypass capacitor. He then measured the THD in response to a 1000hz tone. Jbau already admitted that this was probably not the best measure to capture the effect of the differences in the PS output caused by the change in adjust pin bypass.


Gopher said:
Further more, it doesn't matter how much you tweak an LM317, it's still an LM317 with a crappy amplifier that has totally insufficient bandwidth and phase margin for audio regulator duties. A turd is still a turd no matter how much you burnish it.

Let me ask you - would you make a Jung reg with a 741 and a noisy zener voltage reference? Well that's basically what's in an LM317.

The only way to do it properly is with a Jung type reg or, better still, with totally passive filtering which MUST be designed and tuned for your particular circuit and layout.

everyone reading this thread is already aware that the lm317 is an inferior regulator to the jung when comparing Zout, ripple rejection, noise, and bandwidth. However, I am not aware of any empirical study showing that the output of a audio device is significantly improved by the use of a jung reg. therefore it is ironic to me that you bring up the jung reg since you espouse the use of the scientific method.
 
jbau

if you do decide to move forward with the THD measurement i think it would be a good idea to:

1. repeat it a few times to get a sense of the variability (i suspect you may have already done this).

2. add a positive control. For example, add a resistor in series with either the negative or positive PS output.

An alternative to THD measurement might be frequency response. Would you not expect the frequency response to role off as Zout of the PS rises?

What do you think would be the best test to capture the effect of Zout on the device it is powering?
 
diyAudio Chief Moderator
Joined 2002
Paid Member
Gopher said:
I am an engineer and a damn good one at that, which is way I get annoyed when I see poor experimental technique and the drawing of unsupportable conclusions from that data.

You may be a master engineer or not, nobody asks credentials here, but expressing in such a manner about a member that contributes his experiments does not help, and it disillusions many other members. So contribute technical suggestions of how it must be done best in your knowledge instead. Its just a warning since your posts have not been formally reported to the moderation team yet. Behave.
:cop:
 
Salas: Sorry, I'm still learning my way around this place. Now I know.

Okapi: Yes, of course, I did several THD ensembles to see if the pattern was consistent. I wouldn't have reported anything if it wasn't. As I've said before, I'm trying to restrict my posting to things that matter. I've done several measurements that I have not reported because they yielded no or inconsistent results.

I have never felt that THD was going to show us anything. I'm experimenting with a technique that might show the effects of the + and - rails asymmetry in biased frequency response variations. Because it's time-domain based, it's difficult to get good, repeatable results through the whole postprocessing chain. Little things like trigger jitter, DC offset, and the inherently poor signal/noise ratio of impulse measurements make it tricky going. But initial tests are showing some correlation. I just need to get it consistent and repeatable.
 
A word about the "control" in this experiment.

The target of this experiment is to get the 317 /337 pair into a "low, flat, and as equal as possible" impedance condition. Four variables have proven to be key: the idle currrent, the set resistors, the adjust capacitor, and the input/output voltage difference. The effect of each of those have been isolated and defined well enough to find a combination which achieves better results than I expected for these units.

The "most fair" control would be a setup using the factory recommended values for those variables. In the interest of convenience, I have conceded two of them and left them at their optimum values: the set resistors and the idle current. This doesn't bend anything in my favor; it actually makes it much more difficult to come up with measurements that show a difference, because the control is so much better than the factory values. This is especially true of the idle current. It would be really easy to show measurable differences against a 10mA load on these regs. So the criticism of the control has been unwarranted.

To think that all these variables can be optimized on the basis of regulator transient response measurements is dreaming. Perhaps in a different thread, we can encourage all of the master engineers to post the impedance and phase curves of their power supply designs so we can examine and compare them. I'll bet there wouldn't be many posts. There may be others, but to my knowledge, Jan Didden is the only power supply guy who posts here that is equipped to do it and has looked into it to any degree.

(The hobbyists here are certainly screaming "enough of this - just get on with it and give us the results!" And I totally agree.) :)
 
Will you guys just quit bleating like a bunch of old women. Get over it. BTW - I didn't say I was a master engineer - you made that up. I just said I was a competent one.

Now the technical stuff:

1. the output impedance of the LM317 depends strongly on current draw but always looks like an inductor after a 100 Hertz or so.

2. the inductive output impedance of the LM317 + any output inductance due to pcb traces etc. forms a resonant circuit with the output capacitor. The degree of damping of that resonance depends on the ESR of the capacitor and the resistance of pcb traces between the output of the reg and the output capacitor. This is why plonking an ultra low ESR 'audiograde' electrolytic on the output of a reg can lead to hit and miss results. It all depends on circuit layout, specifically track resistance. Sometimes it sounds good, sometimes it doesn't. Generally it's a bad idea unless you have sufficient pcb track resistance to damp the resonance.

3. This resonance can quite easily fall inside the audio band and will emphasise noise in that band.

So, what you have is a load dependent noise generator which can colour the sound over an unpredictable bandwidth depending on the load current, output capacitor ESR, pcb layout etc. etc. etc. Just imagine what it does to audio signals. Remember that an audio amplifier is just a modulated power supply after all.

So jbau, you see there are far more variable than you have imagined in this and the problem is, your solution is only valid for the exact layout and the type of components you have used. Others will find different results.
 
This is a very interesting thread. I appreciate and thank you all for the efforts you invested in this research.
I am asking myself if we could not move to an other level and have somebody design discrete 317-337 equivalents for the DIY.
I know that fixed regulators are commercialy available, but I would see a project for the hobbyists.
May be such a thread exits, but I am not aware of it.
 
Status
This old topic is closed. If you want to reopen this topic, contact a moderator using the "Report Post" button.