LM317 experiments and measurements

Status
This old topic is closed. If you want to reopen this topic, contact a moderator using the "Report Post" button.
Just another Moderator
Joined 2003
Paid Member
I tried to verify this on my breadboarded circuit, but my scope resolution was not good enough. I'm going to try a trick I saw another diy audio member do http://www.diyaudio.com/forums/power-supplies/184068-psu-rc-multistage-filtering.html which is to record the rails of the PS and use an fft to view the harmonics, that may verify/debunk the results of my sims.
.

Well I've had some success using the above method, though I haven't got any plots to show just yet. The noise was actually quite good (after I realised I hadn't put in a jumper that grounded my adjust pin cap. I'd redone the circuit on the breadboard and missed it DOH).

Last night I completed the second reg on the breadboard (haven't tied the two together yet) and wondered why I was getting a -75db peak at 100Hz (whereas it was at -103db on the other reg circuit. Note that this is after being fed via a 10X gain preamp to the pc soundcard)..

After going over the circuit, I realized I'd placed the last 4700uF cap 1 pin off in the breadboard so it wasn't in circuit at all. I put it in the right spot, and the measurement was the same as for the other circuit. So from this I conclude that the extra filtering really does make a difference to the post output ripple.

I'm also going to make one reg with the standard resistive divider and compare to my circuit to see how much difference the bc560c makes. Hopefully should have all the results by the end of the week :)

Tony.
 
Just another Moderator
Joined 2003
Paid Member
OK I thought I post a few results as I thought they were interesting :)

I haven't yet done any comparison between standard reg circuit and mine but thought that these comparisons of the difference that bigger caps pre-reg vs smaller and also with and without adjust pin bypass cap were worth posting!

Tests were done using my on board sound card as my Audigy seems to be playing up and I couldn't get anything resembling reality (everything was -117db regardless of configuration).

scope probe was connected to output and the ground pin on the last cap pre reg. I'm using a soundcard preamp set to 10X gain.

The pre reg filtration consists of 3 caps with 3.3r resistors between, ie CRCRC

The first pic compares 3 X elna silmic II 1000uf caps VS 1 X 10000uF Nichicon KG followed by 2 X 4700uF nichicon FW's.

left channel (white trace) is the 3 X 1000uF

The second pic compares the 1000uF 4700uF 4700uF with and without adjust pin bypass cap. I don't think I need to say which is which!!! adjust pin bypass cap is a 4.7uF polyester cap.

The third pic is a comparison between the preamp with scope probe shorted, and the output of the reg for the 10000uF 4700uF 4700uF config, just to give an idea of what contribution the reg is giving to the noise levels.

Fourth pic is the schematic of the reg circuit under test. I have only built half of the dual supply at this stage.

Tony.
 

Attachments

  • 3X1000uF_vs_10000uF_2X4700uF.png
    3X1000uF_vs_10000uF_2X4700uF.png
    20 KB · Views: 3,052
  • bypass_vs_no_bypass_10000_2X4700.png
    bypass_vs_no_bypass_10000_2X4700.png
    22.2 KB · Views: 2,975
  • soundcard_preamp_vs_reg_output.png
    soundcard_preamp_vs_reg_output.png
    19.4 KB · Views: 2,949
  • reg_circuit.png
    reg_circuit.png
    11.6 KB · Views: 3,052
Last edited:
Just another Moderator
Joined 2003
Paid Member
yes that's the one :) I've got the day off tomorrow so I'm going to reconfigure for standard operation and do the measurements again so I can get some objective measurements of what the effect is.

Note that at the moment the circuit is still on the breadboard so there is likely to be extra noise as a result. :) as you can see from the pic below, less than ideal ;)

DSC_7234.jpg


Tony.
 
Member
Joined 2002
Paid Member
In terms of noise, these are excellent results.

When you will end up building these psus, it would be nice to do some more dynamic measurements with the intended load (amplifier) connected.

But this for later.

Thank you for sharing.

Regards
George
 
Just another Moderator
Joined 2003
Paid Member
Thanks George! I just found another thing. Perhaps the first set of measurements should be taken with a grain of salt... The earth point I used for the scope probe in the first measurements was the lead of the last cap. If I take the measurement instead off the earth side of the load resistor the result is quite different, I guess this is a good indicator of how important layout is! There is probably a few cm's of wire between the leg of the last cap and the rest of the earth points on the bread board.

I took out the second cap to see what difference it made (after changing my probe earth point) and to my surprise it made no difference! put the earth probe back on the leg of the last cap and big difference!

1st pic is the exact same circuit, just the earth point moved for the two measurements. left channel is with earth point on the earth side of the 56R load resistor, right is with the earth point on the leg of the last cap. This is without the second cap in place.

Second pic is the comparison between with and without second cap except the scope earth was placed on the earth leg of the load resistor for both measurements! right channel is without second 4700uF cap. left has the second 4700uF cap. As you can see there is very little difference, the biggest difference is the spike at 62Khz which is actually worse with the second cap...

Third pic is comparison between 10000uF_4700uF_4700uF vi 3X 1000uF as per original post but with the different scope earth point... virtually no difference, and any difference could probably be put down to random noise...

So Whilst at first I thought that my Overkill was making a difference, it certainly seems now that it is not! I will now try with just a single 1000uF cap and no resistors to see what the result is, I have a suspicion it's going to be similar! I may have some spare caps for another project and a much simpler PS board as a result of these tests!

edit: I've just realised why it makes such a difference. Because I had the earth pickup on the actual leg of the cap, it would have been picking up the pulses that were going back through the resistors to the diode bridge, picking a point elsewhere in the circuit will not have this pollution. and one more pic ;)
fourth pic is comparison between 3 X 1000uF (with the 3r3's between) and a single 1000uF no resistors measurement point was across the load resistor. So this at least shows that the CRCRC does make a difference, even if my cap values were WAY overkill ;)

Tony.
 

Attachments

  • 10000uF_2X4700uF_vs_3X1000uf_II.png
    10000uF_2X4700uF_vs_3X1000uf_II.png
    29.1 KB · Views: 369
  • with_and_without_second_cap_right_without.png
    with_and_without_second_cap_right_without.png
    28.8 KB · Views: 430
  • importance_of_measurement_point.png
    importance_of_measurement_point.png
    30.6 KB · Views: 501
  • 3X1000uF_vs_1X1000uf.png
    3X1000uF_vs_1X1000uf.png
    21.4 KB · Views: 411
Last edited:
Member
Joined 2002
Paid Member
Hi Tony

edit: I've just realised why it makes such a difference. Because I had the earth pickup on the actual leg of the cap, it would have been picking up the pulses that were going back through the resistors to the diode bridge, picking a point elsewhere in the circuit will not have this pollution. and one more pic

This is for to remind you, when you’ll do your final lay-out to have a look again at your posting :) http://www.diyaudio.com/forums/power-supplies/184068-psu-rc-multistage-filtering-3.html#post2487825 that is, do not forget to connect Q1 collector and ground sides of C8, U2 as close to your load as possible.

Third pic is comparison between 10000uF_4700uF_4700uF vi 3X 1000uF as per original post but with the different scope earth point... virtually no difference, and any difference could probably be put down to random noise...

So Whilst at first I thought that my Overkill was making a difference, it certainly seems now that it is not! I will now try with just a single 1000uF cap and no resistors to see what the result is, I have a suspicion it's going to be similar! I may have some spare caps for another project and a much simpler PS board as a result of these tests!

That the 10000uF_4700uF_4700uF gives the same noise results at the regulators output (you may have a look at the difference on the input side) with the 3X 1000uF, is an indication that the LM317 is doing a good job.

Remember though that these results are valid for a fixed value load.

When the PSU will be connected to a variable load (Class AB/B amplifier), things may not be that easy for the LM317. *PS

So, please test this before you start removing caps from your final lay-out.

Regards
George

*PS: Unless you plan to use this PSU to feed a pure class A amplifier (which has constant current draw = acts as a fixed value load)

>Edit: Also make sure that the measuring signal coming into your audio card is of adequate amplitude (not very low), or else the spectrum measurements will not spell the real situation (I've done this mistake myself)
 
Last edited:
Just another Moderator
Joined 2003
Paid Member
Since I've pretty much Hijacked Uncle Pauls thread, I'm going to ask one of the mods to split this off into another thread :)

I think I'll call it "LM317 experiments and measurements"

I'll reply then George and post some more measurements as well :)

Tony.
 
Just another Moderator
Joined 2003
Paid Member
I've decided to open this thread as I had Hijacked Uncle Paul's thread where he had questions about the LM317. http://www.diyaudio.com/forums/power-supplies/188361-power-supply-questions.html

I've built (at this stage on breadboard) a Dual rail +- 10V supply using only LM317's. The reg circuit is based on Fred Dieckmann's 1 transistor addition idea which he posted here http://www.diyaudio.com/forums/powe...ing-lm3x7-regulator-circuit-2.html#post356154

The original design can be seen on my blog page here http://www.diyaudio.com/forums/blog...egulated-power-supply-updated-2011-02-10.html

Some follow up measurements are in this blog post, mainly showing the effectiveness of the CRCRC on the pre reg ripple. http://www.diyaudio.com/forums/blogs/wintermute/574-yarps-finally-some-progress.html

I came up with this design using LT spice, It wasn't until I finally built it that I realised how much overkill the caps were ;) yeah in spice they made a difference but in the real world, those differences were so small as to be buried in the noise floor. Though as George (who's methods I'm using to do these tests http://www.diyaudio.com/forums/power-supplies/184068-psu-rc-multistage-filtering.html) has pointed out until I test with a real load I shouldn't discount the bigger caps outright.

Anyway I connected the two reg circuits together last night, and can happily say that I get + and - 10V and the noise performance remains as it did when measuring one or the other channels. There is a slight difference in the noise performance above 30Khz which I'm still trying to get to the bottom of, but this could be related to the implementation on the breadboard.

Attached are a couple of pics of the test set-up. first doing some measurements, and 2nd a close-up of the board, in this instance comparing the 10000uF R 4700uF R 4700uF set-up with 1000uF R 1000uF R 1000uF

I'll wait till I have got a mod to split of the other posts before I add anything to this thread :)

Tony.
 

Attachments

  • DSC_7384.jpg
    DSC_7384.jpg
    154.8 KB · Views: 767
  • DSC_7390.jpg
    DSC_7390.jpg
    177.3 KB · Views: 874
Just another Moderator
Joined 2003
Paid Member
The best laid plans of mice and men often go awry

Well Post #9 was supposed to be the first post in this thread but due to the forums mechanics and the fact that my introductory post was more recent than any of the others it ended up last. Oh well :rolleyes:

So I did do quite a few more measurements, I'll post some more now.

1st pic is a comparison of the original 10,000uF_4700uF_4700uF vs 3 X 100uF caps. right channel is quite obviously the 100uF caps. As can be seen there is a point where the ripple pre-reg is just too much for it to be able to filter out.

2nd pic is a comparison between the bc560c version of the circuit and a bog standard LM317 implementation. Basically I took out the bc560c and the 1K resistor, and substituted in a 235 (actually 2 470 ohms in parallel as that is what I had on hand) ohm resistor for the 10K and a 10K pot for the 50K pot, and adjusted for 10V

From this it seems that the main difference the BC560 makes is at low frequencies. This makes sense as the RC filter formed between the 10K resistor and the 4.7uF cap has a much lower corner frequency (around 3Hz) compared to the 235 ohm resistor and 4.7uF cap (around 144Hz).

I wouldn't take the differences at higher frequencies too seriously, as the measurements were done on the two reg circuits as and a later measurement will show there are some differences between the two even when running identical setup.

The third pic shows the difference between an 11uF cap and a 4.7uF cap on the adjust pin with the BC560c Circuit. left channel is the 11uF cap, as you can see not a lot of difference. 4.7uF is polyester, 11uF is polypropylene.

The fourth pic shows the difference between an 11uF cap and a 4.7uF cap on the adj pin with the standard LM317 implementation. In this instance increasing to 11uF clearly does make a difference.

Well that's it for this post.

Tony.
 

Attachments

  • 11uFadj_vs_4.7uFadj_fd_mod.png
    11uFadj_vs_4.7uFadj_fd_mod.png
    25.7 KB · Views: 712
  • fd_mod_vs_standard.png
    fd_mod_vs_standard.png
    23.8 KB · Views: 718
  • 10000uF_2X4700uF_vs_3X100uF_II.png
    10000uF_2X4700uF_vs_3X100uF_II.png
    25.9 KB · Views: 1,074
  • 11uF_adj_vs_4.7uF_adj_std.png
    11uF_adj_vs_4.7uF_adj_std.png
    27.9 KB · Views: 730
Last edited:
Just another Moderator
Joined 2003
Paid Member
Hi Tony

That the 10000uF_4700uF_4700uF gives the same noise results at the regulators output (you may have a look at the difference on the input side) with the 3X 1000uF, is an indication that the LM317 is doing a good job.

Yes there was a BIG difference on the input side, that is why I originally went down the route of the big caps, but it seems that the LM317s's ability to filter out that ripple (at least with the adjust pin transistor mod) makes it less of an issue.

Remember though that these results are valid for a fixed value load.

When the PSU will be connected to a variable load (Class AB/B amplifier), things may not be that easy for the LM317. *PS

So, please test this before you start removing caps from your final lay-out.
That's going to be a bit difficult unfortunately, as I haven't even started on the project it is going to power yet ;) I have an idea what the load current will be, but I don't know how variable it will be. It is going to be powering my "synergy active crossover" which can be seen here --> http://www.diyaudio.com/forums/blogs/wintermute/245-synergy-active-crossover.html. As I was planning on using the same breadboard that is currently hosting the PS for protyping the synergy, experimenting will be a tad diffcult ;)

I did test with load current of 180mA and also 360mA with basically identical results, though in both cases the current is constant. I did do some tests with the scope before and this post ---> http://www.diyaudio.com/forums/power-supplies/187857-help-making-sense-measurements.html#post2553939 shows what happened when I used the supply to drive a square wave generator, however this was before the recent revelation as to how much of a difference scope probe placement makes to the measured result.

I'm actually thinking I'm going to drop the 10,000uF caps and change to 4700uF 3r3 4700uF 3r3 1000uF I could upgrade the supply in my chipamp with the spare 10,000uF caps (I actually have four due to a previous blonde moment). This will also mean the board is not so tight and give me a bit of extra room to improve the layout.

*PS: Unless you plan to use this PSU to feed a pure class A amplifier (which has constant current draw = acts as a fixed value load)

>Edit: Also make sure that the measuring signal coming into your audio card is of adequate amplitude (not very low), or else the spectrum measurements will not spell the real situation (I've done this mistake myself)

Well I guess the B1 buffer parts of the circuit will be class A, but I don't think the GIC and FDNR will be.

I'm not sure how low the amplitude is.. I know the noise on the scope (just wideband noise) measured at less than 2mV peak to peak, so with 10X gain on the sound card preamp, it could be around 20mV for the noise floor and anything above the noise floor will be higher than that. Do you think that should be enough?

Tony.
 
Member
Joined 2002
Paid Member
Hi Tony
I see you are doing progress.

Ref. the behaviour of the regulator with a variable load:

As your intended load circuit is not yet built, think of this
http://www.diyaudio.com/forums/power-supplies/126929-low-cost-regulator-between-jung-flea-4.html#post1572320

It is really helpful when it comes to testing.Make the resistanse suitable to your needs.
(A very brute alternative to this circuit is a manual SPDT switch) ;)

I'm not sure how low the amplitude is.. I know the noise on the scope (just wideband noise) measured at less than 2mV peak to peak, so with 10X gain on the sound card preamp, it could be around 20mV for the noise floor and anything above the noise floor will be higher than that. Do you think that should be enough?

Although I really think this signal is very low , you have to check it.

You are recording the output of the voltage regulator with some software program (a wave editor) right?
Usually all these programs show - at least while recording-the input amplitude with some "VU meters".
These VU meters are the ones you have to watch for to see if you have enough signal for to (later) spectrum analyse, or you are just analysing the noise of your soundcard *PS

If your signal is really low (I wouldn’t go with anything lower than –60 to –70dB Vu meter reading), then you have to increase the gain of the preamplifier (make it X100 at least) and recheck.

[Note: If your oscilloscope has a “Y Out” you can use it to feed your soundcard.
The probe will be connected to the Y Input of the oscilloscope, so effectively you are using the scope’s preamplifier/adjustable attenuator as a good quality adjustable preamplifier. :) ]

Keep on good work (and report here)

Regards
George



*PS: I think, this is what was actually happening here:
as my Audigy seems to be playing up and I couldn't get anything resembling reality (everything was -117db regardless of configuration).

http://www.diyaudio.com/forums/power-supplies/188975-lm317-experiments-measurements.html#post2568395
 
Last edited:
Just another Moderator
Joined 2003
Paid Member
Thanks George :) yes I am using audacity to record, Levels were around -72db so probably maginal, though I did do a test to make sure I was seeing a difference between the sound cards noise floor and the measurements of the reg. see pic three in post #3 You could be right about the audigy though! I was running it with zero db gain, the onboard card I don't know but possibly is running with some gain, I just set it to get the lowest noise floor with input shorted.

not sure if my scope has a y output, will have to check! I could take a look at the preamp circuit, not sure if it would handle a gain of 100X :)

Tony.
 
Member
Joined 2002
Paid Member
not sure if my scope has a y output, will have to check!

Tony
If it has, it will be at the back (usually a BNC).
If there isn't one but you have a schematic circuit of your scope, then you can add one. It is useful.


I could take a look at the preamp circuit, not sure if it would handle a gain of 100X

Post the schematic and it will :)

Regards
George
 
Just another Moderator
Joined 2003
Paid Member
Hi George, I checked the manual, and no Y out, though I do have a complete circuit diagram and description of the circuit.

I'll have to dig up the schematic but I found it uses an LM324. The opamp itself can easily manage 100X gain, what I'm not sure is whether the rest of the circuit can handle it ;)

I thought I should also mention that I have done the final (full) circuit, ie the + and - rails and can happily report that it worked flawlessly (well at least based on the meter reading and sound card measurements)

I am going to have to be careful where I take the common ground point from though, as it is even more critical than the point I was taking the other measurements. Unfortunately I don't think I saved the really bad one, but I can easily do it again.

The measurements below were taken with the scope probes on either side of the load resistors once again, they were not taken with a common ground point, mainly because the only places I could easily attach scope probes were the resistor leads, and sharing a common load resistor lead as the ground point gave VERY bad results.

1st pic is the comparison between the +ve (left) and -ve (right) outputs I did the measurements separately as my mic preamp, sound card (and possibly the different scope probes) give different results when recorded in stereo.

2nd pic shows what I get when I measure both + and - at the same time with stereo recording.

3rd pic shows the difference between the 1000uF elna Silmic II on the output of the reg and a 100uF nichicon FG. left is the 1000uF right is the 100uF

4th pic shows difference with and without the 0r33 in series with the output cap. Both were taken with a 100uF output cap. I'm uncertain why in this instance I got a much flatter result than with the other measurements for the one with the 0r33 as all of the other measurements (unless stated) had the 0r33 in circuit, the only thing I can think of is I may have removed the 470nf that is connected directly from rail to ground for that measurement.

Anyway I guess that is enough for now :)

Tony.

PS, you may have noticed the variations in the 50 Hz, this seems to vary depending on the time of day, and I get the same 50Hz hump even with the scope probe shorted, so it is either the preamp picking up hum or the soundcard.
 

Attachments

  • +and-_measured_separately.png
    +and-_measured_separately.png
    27.3 KB · Views: 1,174
  • +and-_measured_together.png
    +and-_measured_together.png
    28.7 KB · Views: 862
  • 1000vs100_on_output.png
    1000vs100_on_output.png
    28.4 KB · Views: 879
  • 100uF_output_left_with_right_without_0r33.png
    100uF_output_left_with_right_without_0r33.png
    29.1 KB · Views: 868
Member
Joined 2002
Paid Member
I checked the manual, and no Y out, though I do have a complete circuit diagram and description of the circuit.

If you e-mail them (scans or internet link if they are posted somewhere) and I will try to sketch a solution. I have done the same on my scope (a Hameg) and works OK.

I'll have to dig up the schematic but I found it uses an LM324. The opamp itself can easily manage 100X gain, what I'm not sure is whether the rest of the circuit can handle it

What is in the rest of the circuit that is so "fragile"?

PS, you may have noticed the variations in the 50 Hz, this seems to vary depending on the time of day, and I get the same 50Hz hump even with the scope probe shorted, so it is either the preamp picking up hum or the soundcard.

Most probably so.

Regards
George
 
Just another Moderator
Joined 2003
Paid Member
Hi George, here is a link to the manual for my scope, quality isn't great, but I don't have a scanner at home. If this isn't good enough I'll take the manual into work and do a good quality scan of the schematic :) http://bama.edebris.com/download/bwd/824/BWD 824_001.pdf

what's so fragile about the preamp? probably nothing, just that I read that the 2002 silicon chip one is supposed to be superior, this is an Electronics Australia design and I'm a bit concerned it could be noise prone if the gain is increased too much. It is in a plastic jiffy box too, so no shielding.

Tony.
 
Just another Moderator
Joined 2003
Paid Member
Thanks George! :)

Here is the schematic for the sound card preamp. Note that they made a mistake (and left out the +1 in the gain calculation) The actual feedback resistors are R5 82K and R6 9.1K To get a gain of 100 I could just change R6 to 825 ohms.

Note that the original circuit also had a quite early rolloff on the low end and I replaced the 10nf input cap with a 68nf one which substantially improved it, however this is the first time I've looked at the circuit since (and I know a bit more now) and I can see that potentially some more improvement could be made by increasing the 10uF feedback cap as well, as it appears that at present the corner frequency it produces would be around 17Hz. Increasing the cap to 47uF would bring it back to around 3Hz.

Also as mentioned in another thread, the second pic is a comparison between a single 1000uF smoothing cap vs 3 X 1000uF smoothing caps separated by 3r3 resistors. As with all the other measurements this was taken with 20db (ie 10X) gain on the soundcard preamp.

Tony.
 

Attachments

  • DSC_7457.jpg
    DSC_7457.jpg
    591 KB · Views: 1,117
  • 3X1000uF_vs_1X1000uf.png
    3X1000uF_vs_1X1000uf.png
    21.4 KB · Views: 752
Member
Joined 2002
Paid Member
Tony, the amplification of this circuit is accomplished with only one op. amp. per channel.
So for an op.amp when we increase the gain from X10 to X100, we unfortunately divide the bandwidth by 10. This is the gain X bandwidth rule.

I breadboarded this non inverting gain block using TL074, C3,R5 and R6 only.

With
C3=10uF
R5=100k
R6=10k
Gain=X11
Bandwidth (-3dB): LF=1.5Hz, HF=340kHz

With
C3=10uF
R5=100k
R6=1k
Gain=X101
Bandwidth (-3dB): LF=15Hz, HF=34kHz (At 20kHz it is ~ -1.3dB)

With
C3=100uF
R5=100k
R6=1k
Gain=X101
Bandwidth (-3dB): LF=1.5Hz, HF=34kHz (At 20kHz it is ~ -1.3dB)

With
C3=10uF
R5=1M
R6=10k
Gain=X101
Bandwidth (-3dB): LF=1.5Hz, HF=34kHz (At 20kHz it is ~ -1.3dB)

The last implementation retains the low bass roll-off and you have to change only R5.

If the HF roll-off is OK for you, you are set.;)

If not , I think you have to go for a two stage amplifier :mad:

Regards
George
 
Status
This old topic is closed. If you want to reopen this topic, contact a moderator using the "Report Post" button.