Building an AC-DC PSU - Page 1
Forum section: electronics / beginners

author: System Error Message
author_rank: Frequent Contributor
timestamp: July 21, 2016, 01:32:23 pm
content: After the annoyance with PSUs that use screws to hold everything down (both the AC in and DC out), i got sick of having to recrimp wires and resolder just to keep everything down. It also seems that the solder absorbed the heat from metal case and melted away.This time i want to solder things onto a board so that the cables and connectors do not fall out or get crushed off. My mains is the standard 240V 50hz and my required output is 24V 5A. Although the device i am powering has a large voltage range, 24V is recommended.I would like to make my own PSU and learn things in the process. Is a typical prototyping board able to handle 5A? What types of PSUs are there (like traditional transformer based or switching or with an inductor or more that i dont know about)?I want to use heatsinks and case but i would also like to add safety and earth for safety but not have the DC output earthed not only for measuring but the device input has no earth and earth was originally connected to metal case. I would also like to make the PSU as efficient as possible but also with safety. I may add a fan if heat will be an issue.What components would i need and does anyone have any tutorials or schematics available? I dont mind having to learn much or use a lot of components. Is it alright to add lots of capacitors for fun? If i have the output voltage slightly higher (like 24.5 or 25V) and step it down to 24V using a linear converter or with just a transistor would the output be smoother?Is there a way to accommodate the variances of AC? Like is it 220V?230V or really 240V? Or that it may not exactly be 50Hz?

author: danadak
author_rank: Super Contributor
timestamp: July 21, 2016, 07:20:36 pm
content: Google this "power supply design videos", quite a few out there.There are also tools for design like National/TI Webenchhttp://www.ti.com/lsds/ti/analog/webench/overview.page?DCMP=analog_power_mr&HQS=webench-prRegards, Dana.

author: System Error Message
author_rank: Frequent Contributor
timestamp: July 22, 2016, 06:37:14 am
content: thanks the website is certainly helpful although i'm not sure if it includes AC-DC conversion.Compared to the traditional transformer + linear regulator to switching which produces less heat? Assuming the transformer output voltage is very close to the linear regulator voltage.

author: MosherIV
author_rank: Super Contributor
timestamp: July 22, 2016, 08:53:14 am
content: QuoteUsually, the linear will always produce more heat because the linear is dissipating the difference in voltage where a switcher regulates to the set point voltage so there is no extra voltage to dissipate.The linear will dissipate more heat with more load, ie current. With no load the heat sink will not rise in temp at all.

author: ovnr
author_rank: Frequent Contributor
timestamp: July 22, 2016, 09:16:22 am
content: Well, making a PSU is probably going to be "fun", for reasonably small quantities of "fun". Still, educational value and all that.Since your main problem seems to involve the quality and connectors of cheap enclosed PSUs, have you considered buying a proper one with proper connectors?Digikey has a nice selection- but of course they're rather a bit more expensive than your cheap eBay specials.

author: System Error Message
author_rank: Frequent Contributor
timestamp: July 22, 2016, 03:37:07 pm
content: i didnt buy them from ebay. searching on google i couldnt find any that uses connectors that you can solder instead.I've decided to first build a linear PSU as it is much easier to understand. Later i'll build a switched one.So the device itself actually only needs 70W but the original PSU was rated for delivering 24V 4A which i suppose is for capacitors. So i've gotten a 240V-24V 6A transformer, super capacitors (i checked the amount of capacitance i need for smoothing is in mili farads, quite high value) so putting 10 super caps in series should do the trick compared to having to solder 100 typical caps that have mili farads.I've decided to go with using 2 LM338 (the one with 5A), some big heatsinks and putting them in parallel for a little distribution and failover.Since the device accepts 13V-30V what output should i use for the LM 338? Im hoping to smooth out the DC as much as possible before putting into the LM338 so that i can use a voltage as close as possible to the transformer output. I dont have equipment to measure mains voltage here in the UK so im not entirely sure if the transformer will output 24V or 23V.What value resistor should i use to drain the capacitors? I want to put an LED with the resistor in parallel to the capacitors and another LED for the output of the LM338.What happens when voltage drops below the output of the LM338? Does the output voltage of the LM338 drop to the same value as the voltage in?

author: MosherIV
author_rank: Super Contributor
timestamp: July 22, 2016, 05:07:38 pm
content: Quote1st do NOT use super capacitors for the smoothing. Use normal electrolitic caps, just high value ones eg 33000uF. I do not know exactly what will happen if you use super caps but I do not think they can handle the ripple current.I do not think you can just put 2 voltage regulators in parallel, they will end up fighting each other.Try a bypass transitorhttp://www.eleccircuit.com/high-current-12v-30a25a20a15a-ham-radio-power-supply/A 24V rated transformer will probably output something like 27-30VAfter this has been rectified and smoothed with the large capacitors, a high load will drop the voltage to the 24V when the capacitors empty and then charge back up to the 27-30 volts.This should be fine for the LM338 regulator.You should not need any resistor to bleed the large capacitors, the LM338 will bleed them. The LEDs should also further bleed the capacitors.Yes, if the input voltage to the voltage regulator drops below the minimum rated voltage, it can no longer regulate and the output will drop, either to the input voltage or could be a few volts below.

author: System Error Message
author_rank: Frequent Contributor
timestamp: July 22, 2016, 06:36:44 pm
content: thanks, i'll just use the normal electrolytic caps i guess. Its just seems more cost effective to use super caps. I will need around 400milifarad of capacitance so its a lot of caps. If i go with the caps in the millifarad range, the most are only 16V that are available so i will have to put 2 of them in series to create some sort of series + parallel arrangement meaning i will need around 20-40caps depending on what is available.Im sure linear voltage regulators can be used in parallel if you use diodes to prevent any sort of backflow. Im not looking for any load balancing, just some simple OR-ing of 2 linear voltage regulators using diodes. They may not distribute the load perfectly but it means 2 heatsinks and less amps across one.Since the transformer says it has inrush protection and is rated 6A, would there be any use of using an inrush limiter?So since you're saying the transformer will have a minimum have 24V that it would be safe to set the LM338 to output 24V? If the voltage does drop below 24V wouldnt that mean the output DC voltage of the regulator would have ripples instead? I know the device has a huge voltage range but i want to make a PSU as good as possible so i can the design for other things.

author: Kilrah
author_rank: Unknown
timestamp: July 22, 2016, 06:50:17 pm
content: Quote from: System Error Message on July 22, 2016, 06:36:44 pmThat's why nobody would make a PSU that way. You rather accept to have more ripple at the input of the regulator by choosing a transformer that provides you with the appropriate rectified DC so that even with the worst ripple (at max design current) there's still enough margin for the regulator to work properly.

author: MosherIV
author_rank: Super Contributor
timestamp: July 22, 2016, 07:33:14 pm
content: QuoteI have never found any rules for how much capacitance to use for smoothing, just as much as you can. 1mF or even 500uF will do. It will depend on how much load (Amps) there is.No, you cannot use voltage regulators in parallel, one will try to push current into the other and end up destorying both. Not sure if diode ORing will work, be prepared for disaster.The best approach is the transistor bypass, the transistor is in emiiter follower mode, so the emitter will just output what ever voltage is on the base. Try looking up the data sheet or application notes for Lm78xx series voltage regulators, they have examples of other simpler circuits. The simplest one I have seen is the one with PNP transistor. I am not confident with PNP transistors, so I orefer to work with NPN.You only need to worry about inrush current when you go above 50 to 100Watts. You are close but do not worry about it until you get the rest of it working (one thing at a time).Technically, yes the source voltage may become too low for the regulator to work but see what the unregulated, unloaded voltage is before the regulator. With full wave rectification, the capacitors get topped up at 100Hz How quickly they become drained depends on the load. You can improve the situation with more capacitance or a higher voltage transformer.

author: System Error Message
author_rank: Frequent Contributor
timestamp: July 22, 2016, 08:14:47 pm
content: The factors that determine capacitance is % ripple and load. Too much and the capacitors wont be able to charge up quickly enough that there will be a significant delay before you get your desired waveform, too little and you will have too much ripple.ORing will work but it requires that you place diodes on the input, output and ground of each regulator, essentially any part where there is a line to the other regulator. This way even if the voltage of a regulator is 0.1V higher it will not push into the other regulator and the variances between them will load balance some of the load so 1 regulator wont be handling all the load all the time and if a regulator fails it wont cause the device to go into a reboot loop. The existing PSU that failed is switched based and when you power it on it works for a few minutes before voltage drops below device tolerance. It was also unstable when powering the usb port on the device that the raspberry pi froze after a few hours.

author: Zero999
author_rank: Super Contributor
timestamp: July 22, 2016, 08:36:30 pm
content: Quote from: System Error Message on July 21, 2016, 01:32:23 pmWhat's the voltage range? If it's really wide, then the regulator can be skipped, leaving you with just a bridge rectifier and smoothing capacitor, which will be much more efficient and not get as hot as a linear regulator.In Europe, the mains voltage is 230V -6% +10%, a range of 216V to 253V, meaning the output voltage of the transformer will also vary by the same percentage. On top of that, the transformer's load regulation needs to be taken into account: the secondary is specified at full load, when less current is draw, the voltage will be higher.

author: System Error Message
author_rank: Frequent Contributor
timestamp: July 23, 2016, 03:01:44 am
content: Quote from: Hero999 on July 22, 2016, 08:36:30 pmI specified voltage range of 13V to 30V already in one of the replies. I'd prefer to use a linear regulator to keep the voltage down because on the device itself at 24V reports a usage of less than 2A. This means that on a transformer with secondary of 6A 24V rating it is possible to exceed 30V on very light loads so if i use capacitors + linear the voltage will always be a maximum of what i set it to be. I would just set the linear regulator to 28V so even though Vin is smaller than Vout, Vout=Vin if Vin <28V which would be suitable in protecting device as long as the lower voltage wont damage the linear regulator.Although voltage range is big if the power source isnt good the device will go into a boot loop and one of the reasons for using a linear regulator is because you dont get the same noise and ripples you get with switching PSUs. Sure its not an efficient power source but using components rated for higher loads does improve efficiency and heat output. I will post a schematic later, all that matters is that it works and wont spoil the device or ruin its life span.

author: StillTrying
author_rank: Super Contributor
timestamp: July 23, 2016, 02:54:23 pm
content: I make regulating 28V down to 24V 85% efficient. And 30V to 24 80%, - not too bad at all.

author: System Error Message
author_rank: Frequent Contributor
timestamp: July 23, 2016, 07:39:51 pm
content: This is the schematic for putting 2 LM338s in parallel. The LM338 bit is taken fromhttp://diyaudioprojects.com/Technical/Voltage-Regulator/R1 is 5A inrush resistorS3 is fuse (i plan to use quick blow glass fuse)C1 and C2 are electrolytic capacitor array (could have any number of capacitors)Transformer i will use is step down 240V to 24V 6AI plan to use ceramic capacitors around the LM338 instead of the recommended one.Let me know if my schematic is correct and safe or if i need to add/change/correct things. If you have suggestions please let me know. ORing 2 LM338 will give me a headroom of about 8A total but the reason for doing this is to reduce heat output from a single LM338 even though they will have heatsinks and with the load distributed a bit and fail over so if one goes it will still run fine. Hopefully using 2 LM338s should make things a bit more efficient.How should i use ground for protection? Isolating device from mains is a good safety feature and for measuring but what about some lightning protection to make use of ground before transformer? Or is ground useless and i can just attach ground to chasses?

author: Zero999
author_rank: Super Contributor
timestamp: July 23, 2016, 08:55:31 pm
content: Quote from: System Error Message on July 23, 2016, 03:01:44 amThat's such a large input voltage range, there should be no need for any voltage regulation.Don't use a 24V transformer, use an 18V transformer.With no load and the highest mains voltage, assuming a regulation factor of 10%:Vout = 18*1.1*1.1*root(2) - 1.2 = 29.6VThe minimum output voltage will be:Vout = 18*0.94*root(2)-1.4 = 22.5VFilter capacitor sizing:C = I/(2F*Vripple)Where:C is the minimum capacitor size required in Farads.F is the mains frequency.Vripple is the maximum allowable voltage ripple.I is the maximum load current.In your case, the minimum allowable voltage is 13V so the ripple can be 22.5 = 13 = 9.5VC = 6/(2*50*9.5) = 10,000µFIn practise you'll probably want to use a larger capacitor than that to account for the fact that the capacitance and ESR will increase with age. Use a 10,000µF and 2200µF capacitor in parallel. The capacitors should be rated to a minimum of 35V.

author: StillTrying
author_rank: Super Contributor
timestamp: July 23, 2016, 10:40:07 pm
content: StillTrying, Hero999, ZeTeX, RGB255_0_0, xoom and 3 Guests are viewing this topic.We're all StillTrying to figure out what all them diodes are for.

author: MosherIV
author_rank: Super Contributor
timestamp: July 23, 2016, 10:56:42 pm
content: QuoteNope, you need to use slow blow to counter the in rush current.QuoteIt does not matter how many Voltage Regulators you try to OR together, they need to dissipate the same amount of power in order to regulate, so they will give out the same amount of heat, they cannot be any more efficient.I checked today with some other electronic engineers that I know and they confirmed what I said, they do not think you can OR together Voltage regulators. They said the same as me, use a transistor (or more than 1) to increase the amount of current that can be regualted, they said the same as me, look at the application notes for Voltage Regulators, they show you the different topologies that work.QuoteIf the chassis is metal, then it MUST be grounded. If the chassis is plastic then only the metal transformer needs to be grounded.The fuse and transformer will protect against lightning. Inductors block high freq or spikes, a lightning strike will be like a large spike which should be blocked or absorbed by the transformer. Worst case, it may blow the primary side of the transformer.

author: System Error Message
author_rank: Frequent Contributor
timestamp: July 24, 2016, 01:26:20 pm
content: thanksThe diodes are for putting the regulators in parallel in a way that they dont interfere with each other. Even though the heat output would be the same at least the heat gets distributed.i thought transformers prevented large inrush currents. The 5A inrush limiter is a 20ohm resistor. So converting the 6A 24V to 240V that would equate to 0.6A if transformer is 100% efficient so if i used a 1.5A quick blow fuse wouldnt that work? If not what value fuse should i use than with a slower fuse?If i were to use an inductor where would i put it? The reason why i chose linear was because i dont know how to use chokes and inductors.

author: MosherIV
author_rank: Super Contributor
timestamp: July 24, 2016, 01:53:21 pm
content: QuoteI doubt 1.5A fuse will work, you will probably have to test by trial and error. However, whatever the value comes out to be, it will defeat the point of the fuse - to protect the transformer from continouse overload current. It is better to use a slow bow fuse at arou d the primary current rating.The 20R in rush limiter must be swiitched out after a short delay, search for in rush circuits.QuoteYou have miss unerstood what I was saying. You do not need to add anything for lightning protection. The inductance of the transformer will block most of the voltage surge from the secondary side. I am not saying that any more inductors need to be added. The fuse will blow on a large enought current surge. The voltage regulator should smooth out a voltage rise.The only thing that may be good is a MOV, it would go across the primary. It would be like plugginb the PSU into a surge protected extension block.

author: Kilrah
author_rank: Unknown
timestamp: July 24, 2016, 07:18:40 pm
content: Quote from: System Error Message on July 24, 2016, 01:26:20 pmThat is not very likely to work, you'll just have one that takes all the load and the other that does absolutely nothing.

author: Zero999
author_rank: Super Contributor
timestamp: July 24, 2016, 07:39:24 pm
content: You're making this unnecessarily complicated.Use the circuit attached.By the way, the transformer should be rated for much more than 6A because more than that will be taken from the secondary and the power factor will be poor but with no wasteful linear regulator, the transformer can be smaller.

author: System Error Message
author_rank: Frequent Contributor
timestamp: July 25, 2016, 03:56:55 am
content: Quote from: Hero999 on July 24, 2016, 07:39:24 pmThe transformer's secondary i am using is already rated on the secondary for 6A, not primary.The LM338 can be used to limit the maximum voltage instead.I get that you're all banging on me that i dont need regulators as the device accepts a large voltage range but i doubt the electronics (talking about a big chip CPU board) likes constant huge changes. The device i am powering is a 36 core TileGx device. So while the board accepts a large voltage range i do care about the longevity of it and the recommended voltage is 24V (even the original PSU) despite the voltage range. It shares a lot of similarities with desktop architecture but there isnt much power circuitry on it so trying to expect it to do well on the margins isnt a good idea.Im also trying to learn more on electronics so not using voltage regulators or transistors isnt helping.

author: Zero999
author_rank: Super Contributor
timestamp: July 25, 2016, 08:22:19 am
content: Quote from: System Error Message on July 25, 2016, 03:56:55 amWhere did I say anything about 6A on the primary?I meant, the transformer should be rated for significantly more than the required DC load. It needs to be at least 40% higher, preferably even more, which is why I suggested using a 160VA 18V transformer which would have a secondary current rating of 8.9A.The power dissipation in a transformer with a rectifier bridge, smoothing capacitors and 5A DC load will be significantly more than the same transformer with a 5A load connected directly to the secondary.QuoteI doubt the electronics care about the huge changes in voltage. It will have a built-in regulator, making any external voltage regulation superfluous.QuoteA big part of learning electronics is to design circuits in an efficient manner, taking into account of the requirements, i.e. not over engineering things.If you really want to learn about regulators, then how about building a small LM317 bench power supply?

author: Kilrah
author_rank: Unknown
timestamp: July 25, 2016, 11:45:54 am
content: Quote from: Hero999 on July 25, 2016, 08:22:19 amAnd using things properly. Implementing a voltage regulator knowing it will fall out of regulation in normal conditions is just messy, it is obvious that it can cause unknown issues/oscillations etc, and is just as dirty/potentially bad as powering your board on an unregulated output...

author: StillTrying
author_rank: Super Contributor
timestamp: July 26, 2016, 12:50:41 am
content: Quote from: Kilrah on July 25, 2016, 11:45:54 amI don't think we're going to be able to convince the OP that the diodes are a daft idea.Although I do like the idea of splitting the GND line of a high current PS and inserting a diode. What could possibly go wrong.....