Head-Fi.org › Forums › Misc.-Category Forums › DIY (Do-It-Yourself) Discussions › LM338 power supply PCB. I want to design one for personal use.
New Posts  All Forums:Forum Nav:

LM338 power supply PCB. I want to design one for personal use.

post #1 of 20
Thread Starter 

Hello.

I need to design a LM338 regulated power supply for myself. I will be using it to power two small amplifiers that I have. One TA2020 and another TDA7297. The ta2020 requires about 13.5V and the tda7297 about 16V. I think that both should require a maximum of 2A, maybe 3A tops. I won't be using them at max since I have a pair of 96db spl speakers so it's mostly for relaxing not partying. 

So I started to look for some schematics and I settled for LM338. I think it's ok for what I need and it's good practice in eagle :) This is my first board design so please excuse any errors I've been making. I'm here to learn and make the pcb better if possible with your guidance. Also the board is free for anyone's use, as long as you're not making money off it :)

I will be posting the complete files for everyone.

So, I've also read this thread and inspired a couple of ideas:

http://www.head-fi.org/t/478881/lm317-dual-rail-power-supply

For LM338 the layout should be basically the same.

I've also included the option for LT1084 as it's similar, only has some different output capacitor requirements that I've tried to also note on the pcb itself. Also I've included the possibility to parallel two resistors to dial in the output voltage as close as possible. If you don't need it you can just leave it blank. The LED will probably be off the board anyway so I just placed it without much regard.

I'm using to220 diodes for rectification, I just noted them MUR860 as I've seen many people are using them, but I guess you could use any.

I don't know how critical the bypass is for the rectifying diodes, but I left it out. I only used a capacitor on the VAC line.

 

If you have any ideas on how I could make this board better you are welcomed! 

 

 

Also I've tried to keep the board in the limit of 5cmx10cm so I fit in a price range when I'll be ordering them. 

By the way, are there any companies that are cheap for 3-5 pcb production? 

 

 

 

Hmm, seems I cannot add images/files.

Here are the links to the board and schematic pictures:

http://imageshack.com/a/img69/9069/9frb.png
http://imageshack.com/a/img834/6016/40z2.png

post #2 of 20

I think your board will work, but it's not quite how I'd do it.

 

Your design is very similar to the one here:-

 

http://www.decdun.me.uk/gainclone6.html

 

I'd use a bridge rectifier.

 

I'd get rid of R1, after all, you've got the LED and its resistor in there, and anyway, the advisability of bleeding these caps @ low voltages is moot.

 

I'd get rid of C8.

 

I'd make C1, C2 and C3 all one cap, or put a res between C1, C2 and C2, C3 to get some smoothing.

 

I doubt the necessity or usefulness of a snubber here. PSU snubbers were discussed extensively here:-

 

http://www.diyaudio.com/forums/chip-amps/48942-carlos-snubberized-gainclone-power-supply.html

 

and here...

 

http://www.diyaudio.com/forums/chip-amps/52312-carlos-snubberized-gainclone-power-supply-part-ii.html

 

Although many claim there is an audible improvement, the theoretical basis is inconclusive and the blind-test evidence is nonexistent.

 

seeedstudio.com for PCBs.

 

w

post #3 of 20

I cant be bothered to check, but does the LM338 have a minimum output current?

Does your design have any safety features to account for that in the event the power supply is turned on with no amp attached? 

post #4 of 20
Thread Starter 

Hello,

 

I guess my design is similar to about every other LM338 design inspired from the datasheet :) It's LM317 design and there are a few things differentiating them, when used in this form.

 

You are right about R1. I added the LED just before I posted so I forgot completely :) I removed that.

I saw C8 in one design I think, can't remember where. I thought it wouldn't hurt.

Snubber is optional, for someone who believes that it helps somehow, I might try it since it's not hurting the board in any way. I'd prefer it to be there so I could experiment with it.

Regarding C1-C3 I was thinking that that will lower the ESR of the caps so it wouldn't hurt. Why is one better than three? Usually it's the other way around. I already got the board to a dimension point that is ok, at least for me, so I don't see it getting much smaller anyway. Regarding the resistors, what value would suit there? I have to take the Vdrop on them as well into consideration when I'll be sizing the transformer. Would I benefit from them? I guess that they will make a filter with the caps so is it anything in particular that I should consider when sizing the resistors?

 

Thank you for your involvement wakibaki :)

post #5 of 20
Thread Starter 
Quote:
Originally Posted by nikongod View Post
 

I cant be bothered to check, but does the LM338 have a minimum output current?

Does your design have any safety features to account for that in the event the power supply is turned on with no amp attached? 

 

I guess I could put the LED on the other side of the reg :) As I read the datasheet it's 3.5mA so a LED should cover that.

But then I need a bleeding resistor on the input caps.


Edited by bob808 - 1/3/14 at 3:18pm
post #6 of 20
Thread Starter 
Quote:
Originally Posted by wakibaki View Post
 

I'd make C1, C2 and C3 all one cap, or put a res between C1, C2 and C2, C3 to get some smoothing.

 

w

 

Using Ohm's Law I cannot figure what kind of resistor I could put between the caps. I guess the trace resistance is enough :) If let's say I assume a 2A current draw from the transformer and a resistor of only 5 ohms I'll have 10V drop on it and about 20W wasted. Either I'm not understanding this or you meant something else?

 

I decided to keep the to220 format of the diodes. This is the current layout. I did not install any bleeding resistor anymore as wakibaki recommended, I removed C8 and moved the LED on the output of the regulator to provide some load.

Also I only grounded the left side mounting holes, I left the right side unconnected. I figured I'd make a ground loop if I connect it to an earthed case.


Edited by bob808 - 1/3/14 at 3:25pm
post #7 of 20
Thread Starter 

I've been reading some more and found a discussion regarding LT1085. Some people have found that larger (330uF) ADJ capacitor gave better results so I increased the footprint of this capacitor and the output capacitor just to be safe. Also I've rearranged some output components. I've removed completely the input/output connectors as I'm probably going to solder my cables directly to the board.

The ta2020 has it's own power reservoir caps (also bypassed with lower values, but I'm going to test this as well). Is it worth to add a 0.1uF film cap on the output of this regulator as well? I guess I do have some space left there, especially if I remove the snubber :)

I've added R.LOAD resistor of 300 ohm that will serve as a load for the regulator. Should keep it at 45-55mA in my 13.5V-16V range. I moved the LED on the input side of the regulator. I could have moved the positive connection hole next to the negative one but I prefer the trace as short as possible.

Also I am not yet sure about the reservoir caps, should I leave all three or better a larger one and a smaller one? Something like 6800uF and 100uF.

 

 

later edit:

I like the forum interface :) can edit much later.

So, another thing that I haven't yet figured out: how do I put solder pads on the heatsink's pins? I want to secure it to the pcb but for one it does not have any electrical connection so I could connect some pads in the schematic. And adding padded holes does not work from what I've tried. Any ideas?


Edited by bob808 - 1/3/14 at 9:59pm
post #8 of 20
Quote:
Originally Posted by bob808 View Post
 

later edit:

I like the forum interface :) can edit much later.

So, another thing that I haven't yet figured out: how do I put solder pads on the heatsink's pins? I want to secure it to the pcb but for one it does not have any electrical connection so I could connect some pads in the schematic. And adding padded holes does not work from what I've tried. Any ideas?

 

 

 

 

Use SK129-pad

post #9 of 20

You can find some information about power supply design here:- http://www.southalabama.edu/engineering/ece/faculty/akhan/Courses/EE334-Fall07/EE%20334-chapter-2.pdf, or google 'PSU RC filter ripple calculator' 

 

Basically the bigger the resistor the smaller the ripple. You have to calculate how much voltage drop you can afford given your transformer loaded output and mains frequency and voltage variation. This isn't the whole story, but it's enough for now.

 

So you look at the tolerance allowed by the power company and figure out the transformer output during a brownout. Then, you're using a capacitor input filter so you calculate peak output voltage as being transformer output * sqrt(2). Then you look at the regulator dropout voltage (~2V5) and subtract that from the peak voltage. Then you look at the anticipated ripple and subtract that from the remaining voltage. That's how much voltage you've got to play with before you regulate it down.

 

Now, if you're pulling 2A, then a 1 ohm resistor will cost you 2V and dissipate 2W (needs to be 5W). So if you have one between each of 3 caps, that'll cost you 4 volts, but you get a little reduction in the ripple voltage, so that's all to the good in terms of the voltage available to the regulator and ultimately reduction of the regulator output ripple. Or of course you can put in jumpers if you decide that ultimately the power output is more important than the hum which you may not be able to hear.

 

You can't simply use a higher voltage transformer because there's a limit to how much voltage the regulator can handle, there's a limit to how much power it can dissipate, and in that case you have to take into consideration how high the voltage from the mains may be.

 

You can calculate the significance of the final output ripple from the ripple rejection ration (60dB) in the regulator datasheet. The PSRR of the TA2020 is 65dB min. and the TDA2797 40dB min, so the worst case net hum on the audio from the supply will be 100dB down given no other leakage, almost certainly below the threshold of audibility in all circumstances, it's just that if you split the capacitance 3 ways then you have the opportunity to reduce the ripple still further. Otherwise I'd put in 2 dissimilar capacitors because they will have different resonant frequencies.

 

w

post #10 of 20
Thread Starter 
Quote:
Originally Posted by Avro_Arrow View Post
 

 

 

Use SK129-pad

I did, and it looks kind of bad. It clears the top ground plane around the whole heatsink:

 

 

 

Quote:
Originally Posted by wakibaki View Post
 

You can find some information about power supply design here:- http://www.southalabama.edu/engineering/ece/faculty/akhan/Courses/EE334-Fall07/EE%20334-chapter-2.pdf, or google 'PSU RC filter ripple calculator' 

 

Basically the bigger the resistor the smaller the ripple. You have to calculate how much voltage drop you can afford given your transformer loaded output and mains frequency and voltage variation. This isn't the whole story, but it's enough for now.

 

So you look at the tolerance allowed by the power company and figure out the transformer output during a brownout. Then, you're using a capacitor input filter so you calculate peak output voltage as being transformer output * sqrt(2). Then you look at the regulator dropout voltage (~2V5) and subtract that from the peak voltage. Then you look at the anticipated ripple and subtract that from the remaining voltage. That's how much voltage you've got to play with before you regulate it down.

 

Now, if you're pulling 2A, then a 1 ohm resistor will cost you 2V and dissipate 2W (needs to be 5W). So if you have one between each of 3 caps, that'll cost you 4 volts, but you get a little reduction in the ripple voltage, so that's all to the good in terms of the voltage available to the regulator and ultimately reduction of the regulator output ripple. Or of course you can put in jumpers if you decide that ultimately the power output is more important than the hum which you may not be able to hear.

 

You can't simply use a higher voltage transformer because there's a limit to how much voltage the regulator can handle, there's a limit to how much power it can dissipate, and in that case you have to take into consideration how high the voltage from the mains may be.

 

You can calculate the significance of the final output ripple from the ripple rejection ration (60dB) in the regulator datasheet. The PSRR of the TA2020 is 65dB min. and the TDA2797 40dB min, so the worst case net hum on the audio from the supply will be 100dB down given no other leakage, almost certainly below the threshold of audibility in all circumstances, it's just that if you split the capacitance 3 ways then you have the opportunity to reduce the ripple still further. Otherwise I'd put in 2 dissimilar capacitors because they will have different resonant frequencies.

 

w

I will try to insert some resistors but I have to think about it and make some calculations. Thanks for the info.

post #11 of 20

Edit the component and remove the trestrict layer.

 

Edit:

 

Did you connect the pads to the ground plane?


Edited by Avro_Arrow - 1/4/14 at 3:19pm
post #12 of 20
Thread Starter 
Quote:
Originally Posted by Avro_Arrow View Post
 

Edit the component and remove the trestrict layer.

 

Edit:

 

Did you connect the pads to the ground plane?

No, it's not connected to anything. I just need it for mechanical security, and this way I get to mount the regulator directly on the metal.

 

I tried to edit the part but found no way of doing so. I guess it would be ok to remove that limitation as I have the silkscreen protecting between the ground plane and the heatsink. Would I have capacitance problems between the ground plane and the heatsink? It will be connected to the ADJ pin on the LM338.


Edited by bob808 - 1/4/14 at 4:22pm
post #13 of 20

 

If you are going to have the heat sink over the ground plane, it should be connected to it.

Having it over the ground plane and at ADJ potential is just asking for problems.

Isolate the regulator from the heat sink.

post #14 of 20
Thread Starter 
Quote:
Originally Posted by Avro_Arrow View Post
 

 

If you are going to have the heat sink over the ground plane, it should be connected to it.

 

Having it over the ground plane and at ADJ potential is just asking for problems.

Isolate the regulator from the heat sink.

I'm trying but still doesn't want to. I find this weird.

post #15 of 20
Thread Starter 

I found that by putting the heatsink on the bottom then it does not interfere with the top copper ground plane. But that way I have the heatsink outline on the back of the board so I managed to settle for a smaller ground plane in that zone.

This is my outcome so far and I am pretty happy with it:

 

Only need to study some more on the main capacitors to see if I leave them like that or I choose two different values. The thing is that in this setup I can use Panasonic FR, if I go higher I must find some other capacitors and must study dimensions and characteristics.

 

Also as an Eagle exercise I've made a version with snubbers on the rectifying diodes, using a capacitor and resistor in series, paralleled with each diode. They are mounted on the backside, and also there's the silkscreen on the backside. If anyone wants to do this version and doesn't want to pay extra on the bottom silkscreen pay attention to the mounting holes. I guess the footprints are enough for any usual capacitor/resistor used in that spot. This is what the board looks like with snubbers on diodes:

 

Also the eagle files for the schematic and boards attached below.

*well...seems like I'm not allowed to attach files. Anyway, if anyone wants them I can send them by email or some other channel.

I really must sleep :)

New Posts  All Forums:Forum Nav:
  Return Home
Head-Fi.org › Forums › Misc.-Category Forums › DIY (Do-It-Yourself) Discussions › LM338 power supply PCB. I want to design one for personal use.