Go Back   Home > Forums > Blogs > Wintermutes Rantings

This is just an area I can blab on about stuff without it using up bandwidth in the threads Hopefully someone will find it interesting or useful.

Rate this Entry

YARPS (Yet another regulated power supply) updated 2012/01/02

Posted 18th March 2010 at 11:30 AM by wintermute
Updated 2nd January 2012 at 11:24 AM by wintermute (added formula as well as a few other minor edits)

10 Feb 2011. AndrewT pointed out something really dumb I had done (in a most polite way) in the original circuit. The caps in the filter section are in series and effectively halved in value. The circuit will behave much better simply by deleting half the caps. I've uploaded the latest version of the file. Sorry to the 125 people who have already downloaded, and I hope I didn't cause too much head scratching as to why I had done that, I'm not even sure myself, and I'm surprised I never realised. I'm going to revamp this blog entry as there are some things I have realised since I first posted, but that will be over the next couple of weeks. Hopefully I will finally build it soon.

I have been spending an inordinate amount of time using LTSpice lately. The more I use it the more I like it! For someone like me who is somewhat challenged mathematically, and who's electronics theory knowledge level is well below where it should be (to be doing this sort of design anyway), I've found LTSpice is an invaluable tool!

It basically lets me experiment with what I think might work, and then tweak things until it works well (in the simulation) which will hopefully result in a relatively painless implementation once I start soldering.

Having said that, I know that as a simulation it has it's limitations, and at this stage I have not actually built this power supply so it might not actually work!! edit: it has been built and it does indeed work

The reason I have decided to embark on this design exercise is that I needed* a dual rail regulated supply for my B1 crossover project, and I felt that I wanted something pretty simple that would be able to deliver enough current to power the number of B1's and the gyrator circuits that I would have without any difficulty.

I was initially keen to build a shunt reg, I looked at Salas' simplistic low voltage shunt reg, I thought Hmmmm this one is simplistic...... I also then found out from AndrewT that the output of the shunt reg had to be as close to the load as practical to get the benefits... add the fact that it is strictly low current and I decided a shunt reg wasn't for me.

I toyed with using Rod Elliot's P05B but I didn't like the idea of using an LM337.

After reading the LT317A data sheet a few times (and deciding it didn't look that bad) I did a lot of googling. I was looking for dual rail power supplies using two LM317's instead of the traditional LM317/LM337 approach. I found very little except for a few threads here on diyAudio, none of which had a design. At this point I decided to have a crack at designing my own.

One useful thread here on diyAudio was this one from Fred DieckMann. Post 34 in that thread is what the LM317 part of my circuit is based on. Another one was This thread from jbau, although it steered me in the direction of NOT using a negative regulator at all. The thing that struck me was his subjective evaluation that symmetry in the supply rails made a big difference to the sound of the amplifier. One person commented why don't you just use two LM317's (which in his application wasn't possible) but for me the decision was clear

I also figured I needed a relatively clean supply before the reg circuit if I wanted to get the best results. It may be overkill but I decided to use a CRCRC topology with 10,000uf after the bridge, and then 4700uf for the next two with 1 ohm in between the successive stages. I started out with 3 X 4700 but putting in the 10,000's at the begining greatly smoothed out the eratic pattern in the ripple..

At this point, I'd like to say, anyone who is considering building their own power supply, that I think the time spent learning to use LTSpice (or some other variant) is worth it! I have a much better understanding now of what happens after the rectifier, especially why there is ripple!

The first problem I ran into (and this may be deficiencies in the LM317 model I have) is that to get the 10V DC that I wanted a 10V AC transformer didn't seem to be enough (actually the real first problem was that I wasn't multiplying my 10V AC sinewave by 1.414 before simulating but that is another story). At that stage I only had 0.5 ohms between the caps, but with the fact I need separate bridges for each winding and the small drop the 0.5 causes, it seemed to mean that the LM317 was operating at or slightly below its dropout voltage.

The solution? Uprate to a 12V transformer! which also gave me plenty of excess voltage to play with (yeah I know it isn't green in these days of global warming, but it isn't THAT bad). That extra voltage allowed me the luxury of upping the resistors in the in CRCRC to 1 ohms (reducing ripple before the reg circuit quite a lot) whilst still having enough voltage to run the reg (at least at the currents I will require) above it's dropout voltage.

One aspect I still haven't come to grips with is that if I reduce the dummy load to 8 ohms (which should result in a current of 1.25A (within the capacity of the LM317) the output voltage drops to around 6.5V this is regardless of whether I use the data sheet design or Fred's. Again this might be a limitation with the model I have for the LM317, with LTspice or perhaps I just am missing something obvious! Update 2012/01/02 The reason for this was that the model for the LM317 I had was limited to 500mA output!! switching to a different model solved this problem.

So what is the advantage of this circuit over the data sheet implementation I hear you say? Well the key (I think) is the massive increase in the value of the top resistor in the divider that feeds the adjust pin. By putting in a high hfe (and it is important it is high, using a 560b instead of a 560c will result in significantly worse ripple) transistor it is possible to dramatically raise the resistance (in this case 10K which is what Fred recommended as a minimum) of the first resistor in the divider. What effect does this have? Well that resistor combined with the 5uF film cap that is in series with it I think forms a low pass filter, and the corner freq of that low pass filter is 3.2Hz! This effectively means that frequencies above 3.2Hz (at the base of the transistor) are being attenuated at the rate of 6db/octave resulting in significantly lower noise/ripple at higher frequencies This is of course assuming I understand what is going on.....

Please find attached the circuit diagram, the spice model (along with additional bits necessary to get it working in vanilla LTspice, check the readme file as it has models for the diodes and transistors) and the comparison of the ripple between the Fred Dieckmann version and the standard data sheet implementation (between 40 seconds to 65 seconds in the simulation) with a current draw of 500mA (which is a pretty hefty draw for a preamp ) . Note that R19 and R20 are only there to simulate a load and would not be there in a real application! The difference in the ripple between the two versions is not huge but it is apparent. I'm not sure how to measure the output impedance of the circuit at this stage, as I think the Fred version should be lower.

I may drop the upper resistors (R13 and R15) in the divider back to 10K as the increase to 20K didn't seem to have much effect, and I believe that higher value resistors have higher noise. I've decided to publish this as is now, as otherwise I will just keep tweaking, and never get to building it!

Update: I have made a few additional changes. The 1 ohm resistors between the 1000uf caps on the reg output and ground I have reduced to 0.1 ohms. and I have paralleled a 0.1 uf film cap. 0.1 ohms seems enough in the sim to damp the caps resonance so hopefully will be enough in real life, the 0.1uf cap will ensure that impedance remains low after 1Mhz. I have also dropped the divider back to 10K and 40K. I've uploaded an updated circuit diagram, I also put in 470R resistors as a pre-load to guarantee that the reg always has a minimum of approx 20mA (it requires 10mA) of current draw. The ripple with only 21mA current draw is 2 uV (at it's worst, it has long periods of only 1uV). I also discovered that dropping the maximum time step to 10uS in the sim results in all of the flapping around of the ripple going away. With 250mA load the ripple simulates at just 18uV completely stable. OK the ripple comparison is back 18uV ripple with the transistor and 52uV ripple using standard circuit so an almost 3 fold reduction in the ripple using Fred's mod.

Also attached are two impedance plots. The first is comparing the output impedance between the standard config (blue) and my design (green). As can be seen here the transistor also provides some benefit with the output impedance at low frequencies. The load current for these plots was 255mA. The first is with the 0.1uf cap on output connected directly to the -ve side of the reg rather than via the 0.1ohm resistor, as it seems to have a resonance at around 21Mhz if it is connected via the 0.1 Ohm resistor. I figured it was better to have the impedance drop again after 10Mhz than to have it peak, so I will more than likely build with the 0.1uF direct to -ve side of the reg circuit (note I didn't say ground because in the negative part of the circuit it isn't!).

OK well I've now gone through the entire asc file and changed all component designations to something more sane (the resistors and capacitors were all over the place). I've uploaded the new schematic (I even put my name on it so I must be feeling more confident that it will work) and I uploaded the new schematic as well.

Order has been placed for most of the parts but the 1000uf silmics are on backorder, so to avoid additional shipping charges I'm going to have to wait a couple of weeks at least

Update 2012/01/02. One thing that had bugged me since the beginning was that I was unable to use the normal formula to calculate the resistor values for a particular output voltage. I tried but was unable to work out a formula. Stormsonic came to the rescue with the following formula:

Vout = ((Vadj + Vbe) * (R9 + VR1)) / R9)
where R9 is the upper resistor in the divider and VR1 is the lower resistor (u2 in the schematic attached here)

post here --> http://www.diyaudio.com/forums/power...ml#post2840458 (correction to the formula a few posts later)

Finally the circuit has been built on Veroboard, and is working well. I shall create another blog post some time real soon now with the details. But some of the tests can been seen in the thread I started http://www.diyaudio.com/forums/power...surements.html

update 20/12/2012 after a question from Gopher regarding resistance in the return lines I decided to sim with double the resistance in the +ve and -ve lines but none in the return lines. The result was an identical ripple before the reg for both implentations. So if anyone is concerned about the resistance in the return lines, omitting it and doubling up the resistance in the +ve and -ve rails seems to give the same level of ripple reduction, and voltage drop.

*I say needed more from the point of view that with possibly as many as 10 B1 circuits, the cost of the coupling caps would have made building as per the original B1 rather expensive, not to mention the degradation that that many caps in the signal path would inevitably have caused.
Attached Thumbnails
Click image for larger version

Name:	ripple_compare.png
Views:	6832
Size:	6.3 KB
ID:	137   Click image for larger version

Name:	impedance_compare1.png
Views:	6448
Size:	15.8 KB
ID:	138   Click image for larger version

Name:	impedance_compare2.png
Views:	1885
Size:	13.0 KB
ID:	139   Click image for larger version

Name:	YARPS.png
Views:	6390
Size:	27.6 KB
ID:	328  
Attached Files
File Type: zip YARPS.zip (6.0 KB, 1030 views)
Posted in misc, Simulation
Views 8383 Comments 2
Total Comments 2


  1. Old Comment
    regiregi22's Avatar
    Have you actually assembled it? Any measure improvements?

    Posted 24th August 2011 at 08:37 PM by regiregi22 regiregi22 is offline
  2. Old Comment
    wintermute's Avatar
    Yes but only on breadboard at this stage, but the inclusion of the transistors does seem to make a difference (whether it is something that will actually make an audible difference though is debatable). I got really into measurements and then found that my setup was compromised. Here is the introductory post in the measurement thread I started http://www.diyaudio.com/forums/power...ml#post2571220 . Towards the end there are a couple of measurements with a bit more fidelity once I sorted out my soundcard preamp.

    I've been sidetracked recently revisiting the crossover in my MTM speaker that I designed. I will get back to the YARPS as I need it for my active crossover project

    So I should probably update the blog entry that the circuit does indeed work though the final implementation is probably going to have 4700uF 3r3 4700uF 3r3 1000uF instead of the original 10,000uF 3r3 4700uF 3r3 4700uF.

    Posted 27th August 2011 at 12:48 PM by wintermute wintermute is offline

New To Site? Need Help?
Copyright 1999-2017 diyAudio