Lab Bench PSU - Page 1
Forum section: electronics / beginners

author: PotatoBox
author_rank: Regular Contributor
timestamp: August 24, 2016, 04:25:22 am
content: Hello everyone,I have a 300w atx psu I salvaged from an old computer and I want to convert it into a variable bench power supply. Now, I wanted to use an LM317 to adjust the voltage on the 12v rail from the psu. In the texas instruments datasheet on page 10 shows the suggested schematic. Now, which resistors do I use for R1 and R2? it shows a 240ohm resistor for R1 but Ive seen people use different resistors for R1.http://www.ti.com/lit/ds/symlink/lm317.pdf

author: gigabyte091
author_rank: Contributor
timestamp: August 24, 2016, 04:53:39 am
content: I usually use 10k pot with LM317, if you have -12 or -5V on PSU you could use it and have output voltage adjustable from 0V instead of 1.25V.

author: Mechatrommer
author_rank: Super Contributor
timestamp: August 24, 2016, 12:01:28 pm
content: there!...R2 = [(Vo / 1.25) - 1] * R1ignore Iadj * R2 as starting point...

author: newbrain
author_rank: Super Contributor
timestamp: August 24, 2016, 02:59:22 pm
content: Quote from: PotatoBox on August 24, 2016, 04:25:22 amA couple of thoughts:* About the resistor: the LM317 datasheet specifies the minimum load current with a typical value of 3.5mA and a maximum of 10mA. This means that in the general case 240ohms are enough, but to be safe 120ohms should be used. LM117, OTOH, with its 5mA as maximum is guaranteed to work with 240ohms.* Remember that the negative terminal of your supply (and the PSU chassis) is connected to earth ground, so your power supply will not be floating. This has both safety and practical implications. And no, cutting the ground connection is not a good idea.

author: PotatoBox
author_rank: Regular Contributor
timestamp: August 24, 2016, 04:15:20 pm
content: Sooo the resistor values are all dependant on the the maximun voltage I want in the circuit? But what if I wanted to have my psu output more than 10ma? Would I just use a higher resistor for R1?

author: macboy
author_rank: Super Contributor
timestamp: August 24, 2016, 04:56:05 pm
content: Quote from: PotatoBox on August 24, 2016, 04:15:20 pmNo, resistor R1 provides a minimum load when nothing is connected to the output. Notice that there is always 1.25 V across R1 (this is the reference voltage) so 1.25 / 240 ohm = 5.2 mA. That amount of current always flows through R1 (and R2) regardless of the output voltage setting or the connected load.Any load you connect will simply add to this load. So if you connect some load that draws 100 mA, the LM317 will be required to supply 105 mA total.

author: buffoon
author_rank: Newbie
timestamp: August 25, 2016, 12:36:34 am
content: Quote from: PotatoBox on August 24, 2016, 04:15:20 pmA few things:1) Keep R1 constant around 240ohm. The 5mA calculated by newbrain goes into the feedback loop. Use the equation mechatrommer posted above to choose R2 depending on your output needs (or use a pot to make a variable PSU).2) What will be your output voltage and current? Keep in mind that the voltage doesn't just disappear. The power dissipated as heat will be (Vin - Vout) * current

author: PotatoBox
author_rank: Regular Contributor
timestamp: August 25, 2016, 01:51:16 am
content: Quote from: buffoon on August 25, 2016, 12:36:34 amWell I want to have a variable output voltage between 1.5-12 volts.

author: newbrain
author_rank: Super Contributor
timestamp: August 25, 2016, 09:41:32 pm
content: Quote from: PotatoBox on August 25, 2016, 01:51:16 amTake into consideration that the LM317 will not work correctly with Vout-Vin smaller than about 2.5÷3V.So the maximum regulated voltage you can expect to obtain is ~9V; of course you can get the 12V directly from the ATX PSU

author: PotatoBox
author_rank: Regular Contributor
timestamp: August 27, 2016, 01:14:42 am
content: Should I try to use an LM2576 instead?

author: newbrain
author_rank: Super Contributor
timestamp: August 27, 2016, 08:50:44 am
content: Quote from: PotatoBox on August 27, 2016, 01:14:42 amUsing a LM2576 will reduce the drop out voltage, according to thedatasheet, Figure 3, it will be about 1V for a 1A load at 50°C. $\Omega$But:This is a switching regulator: PCB layout is very important and the design process is more complex, see the chapters 8.2 and 9 in the DS.It still won't get you 12V. You would need a buck-boost type of switching regulator.I think the LM317 idea is good, for a beginner's project, my initial warnings were for a couple a things that might go unnoticed (everybody uses 240\$\Omega\$ with the LM317, but that's not guaranteed to work with very small loads).When you need 12V just get them straight from the ATX PSU...Another alternative: there are buck-boost modules for sale oneBayoAliExpress.They usually workalmostas advertised, but the learning value of just connecting a couple of wires is next to zero...The next step for LM317: thermal design!How much current do you need? Do you need that maximum current at the minimum voltage?

author: PotatoBox
author_rank: Regular Contributor
timestamp: August 28, 2016, 04:58:17 am
content: Quote from: newbrain on August 27, 2016, 08:50:44 amSo, are you saying I should go with the lm317 over the lm2576? Arent the lm2576 used in those buck converters?

author: spacedementia87
author_rank: Contributor
timestamp: August 28, 2016, 10:10:15 am
content: I have seen posts on this forum before telling people not to use ATX supplies as a bench supply.Safety, accuracy all come out as reasons, but not here.Why not?Sent from my ONE A2003 using Tapatalk

author: newbrain
author_rank: Super Contributor
timestamp: August 28, 2016, 01:04:42 pm
content: Quote from: PotatoBox on August 28, 2016, 04:58:17 amIt's up to you and the confidence you have in your skills. Since you started simple, and this is the beginner section I imagined you were after a simple starter project.Yes, they are used in buck (==down) converters, that means the output voltage will be lower than the input one.Quote from: spacedementia87 on August 28, 2016, 10:10:15 amIf using an ATX PSU involves modification of the internals (holes and wiring changes) and removal of the ground connection (as seen in some horror video on YT), I'm all against it.If the supply is simply used as the input source for a regulator stage as seems to be the case here, I do not see major problems, when done carefully.One of the things that might be overlooked is that all the output voltage are referenced to earth ground, that's why I pointed it out in my first answer.Another point is that an ATX supply can provide a lot of current, especially on the 12V rail, though good ones have protections (don't know about the OP one).The post regulator (LM317) section should at least be fused appropriately.

author: PotatoBox
author_rank: Regular Contributor
timestamp: August 28, 2016, 05:52:34 pm
content: Well, what I might actually do is scrap the atx psu idea and just make a power supply from scratch with a transformer and such. Get a better learning experience out of that.

author: newbrain
author_rank: Super Contributor
timestamp: August 28, 2016, 07:50:35 pm
content: Quote from: PotatoBox on August 28, 2016, 05:52:34 pmI definitely agree.A small linear PSU is a typical initial project, a good learning value and a useful tool (I still have mine, it might be 30 yo, and still goes strong...).

author: PotatoBox
author_rank: Regular Contributor
timestamp: August 29, 2016, 02:06:12 am
content: Quote from: newbrain on August 28, 2016, 07:50:35 pmThe good thing is, I could just salavge most of the parts from the atx psu i already have!

author: Mechatrommer
author_rank: Super Contributor
timestamp: August 29, 2016, 03:17:53 am
content: Quote from: PotatoBox on August 29, 2016, 02:06:12 amfor linear? not really, not even the transformer. been there... well there are some you can salvage, like some misc resistors, wires, and the metal case (if that suits your taste)..

author: PotatoBox
author_rank: Regular Contributor
timestamp: August 29, 2016, 05:20:45 am
content: Quote from: Mechatrommer on August 29, 2016, 03:17:53 amLinear... What does that mean?

author: Jay_Diddy_B
author_rank: Super Contributor
timestamp: August 29, 2016, 08:30:34 am
content: Quote from: PotatoBox on August 29, 2016, 05:20:45 amIn this context it means:Using a LDO style regulator, like a LM317 or similar part. The alternative is to use a switching power supply design. The construction of a switching supply is more difficult, especially for a beginner.A little bit of metal work is required, linear supplies need a heatsink for the main power device.Using a 60 Hz transformer, instead of an off-line switching power supply. This is much safer. There is less exposed high voltage.I am sure that many members of the forum built these supplies as one of their first projects. When I started electronics, (shortly after electricity was invented), the low cost bench power supplies, we find today, were not available and there were relatively few surplus power supplies (hp, lambda etc.) and these were expensive.Regards,Jay_Diddy_B

author: setq
author_rank: Frequent Contributor
timestamp: August 29, 2016, 05:01:30 pm
content: If you're going to do this, please wear safety glasses. ATX supplies can quite happily dump 200W into your load suddenly on one rail. I really wouldn't use one myself. A little TO220 regulator is going to spread its guts across the room pretty sharpish as are your probes, solder joints and anything conductive that temporarily acts as the load by accident. All it takes is one little mistake.

author: janoc
author_rank: Super Contributor
timestamp: August 29, 2016, 07:35:23 pm
content: Quote from: setq on August 29, 2016, 05:01:30 pmYeah, ATX supply without some additional current limiting is a disaster waiting to happen, even though they are protected against short circuit. However, 20A on a 5V rail, no problem! And the same or more on the 12V rail - that's getting into the arc welder territory already.They also produce a rather dirty output, with a lot of switching noise and not great regulation. For PCs it is good enough, because it is assumed that pretty much everything has local regulation and filtering, but good luck testing some noise sensitive circuits with it ...I have one, but I am using it only to power high current things like motors or my fume extractor fan, not as a regular bench supply.

author: Mechatrommer
author_rank: Super Contributor
timestamp: August 30, 2016, 03:16:47 am
content: Quote from: PotatoBox on August 29, 2016, 05:20:45 ami mean... if you want to salvage ATX PSU parts to make a linear regulating bench power supply.

author: Brumby
author_rank: Unknown
timestamp: August 30, 2016, 06:14:06 am
content: Quote from: PotatoBox on August 29, 2016, 05:20:45 amThere are two basic common designs for power supplies: Switch mode and linear.In general:Withswitch mode, the incoming power is turned into DC which powers an oscillator. Sounds like going in a circle, doesn't it? But the oscillator runs at a much higher frequency like 50 kHz to 1 MHz (pick a number). This higher frequency allows for the use of a much smaller transformer. The design also can handle a wide variety of input voltages ... and frequency is hardly relevant. Small and light, this type of supply is usually cheap and easy to make and tends to not waste a lot of power. It does have a down side, though ... and that is, because of the high frequency and switching mechanism, you can get a lot of interference. For some things, this doesn't matter, for others, it does.Lineardesign has the absolute benefit of the lowest levels of interference possible - but it requires a (sometimes big and hefty) transformer designed to operate at the nominated supply voltage and frequency and capable of delivering the current required. Voltage and current control is done by 'linear' circuitry - that is, continuous and smooth changes, much like adjusting the flow of water from a tap. These control mechanisms often have a significant issue with power dissipation, so heatsinks become another necessity - and expense ... but there's no beating a linear power supply for quality of the power it can deliver.

author: PotatoBox
author_rank: Regular Contributor
timestamp: August 31, 2016, 02:29:31 am
content: Could I just rip a transformer from an alarm clock?

author: jeroen79
author_rank: Frequent Contributor
timestamp: August 31, 2016, 03:05:55 am
content: If that transformer meets your voltage and current requirements: yes

author: Brumby
author_rank: Unknown
timestamp: August 31, 2016, 04:25:54 am
content: Quote from: PotatoBox on August 31, 2016, 02:29:31 amQuote from: jeroen79 on August 31, 2016, 03:05:55 amWith that qualification, yes, indeed.The only thing here is ... an alarm clock does not require much power at all and the transformer will be built accordingly. You are not going to get much voltage out of it - maybe 6-12V or a bit more if you are lucky - and you certainly aren't going to get much current capability ... a couple of hundred mA or something in that range.If you want to cannabilise a piece of gear for a transformer, your best bet might be an audio amplifier that pushes out at least 50W RMS per channel.(The RMS rating is very important. This gives you therealpower. Don't think any other so-called 'power ratings' like PMPO have any real meaning. They are justridiculousnumbers that marketing departments cook up so they look good in brochures. There may be some mathematical process used to get those numbers, but it's more in the realm of fantasy than anything else.)

author: Muxr
author_rank: Super Contributor
timestamp: August 31, 2016, 05:11:53 am
content: Quote from: janoc on August 29, 2016, 07:35:23 pmYup.. one of the most useful things about bench power supplies is their current limiting capability. This can not also help you protect your circuits under test (current limiting can often save your accidentally shorted components from letting the magic smoke out), but it's also a safer way to go. It's so easy to miswire a lead on a breadboard or similar.So if you're rolling your own PSU look at current limiting, or at least include some sort of a fuse/polyfuse.

author: PotatoBox
author_rank: Regular Contributor
timestamp: August 31, 2016, 05:41:21 am
content: Quote from: Brumby on August 31, 2016, 04:25:54 amHow am I going to know if the transformer is meant to be used for a linear psu?

author: Brumby
author_rank: Unknown
timestamp: August 31, 2016, 09:13:39 am
content: When cannabilising from other gear, this can be a little bit of a challenge.The first step is to check that it does, in fact, connect directly to the mains. This will confirm the primary is designed to handle the voltage. As such, it will be suitable foralinear power supply - but whether it will be suitable for the power supply you want, is another matter.Getting the secondary (or secondaries) voltage is not too difficult - just wire it up and measure the voltages. Finding the current capabilities is a little less straightforward. If you can get the specifications for the transformer, then these questions are immediately answered.Usually, there is a correlation between physical size and weight with voltage and current capabilities - the bigger they are, the more grunt they can deliver. The trick is to have the right voltage(s) on the secondaries, with current capability being equal to or more than you need.Buying a transformer new makes this trivial.As always, when working with mains power .... SAFETY FIRST.

author: Dave
author_rank: Super Contributor
timestamp: August 31, 2016, 03:04:29 pm
content: Quote from: Brumby on August 31, 2016, 04:25:54 amWell, RMS power is marketing wankery of its own. There is RMS voltage and RMS current, but there is just mean power.

author: Gyro
author_rank: Super Contributor
timestamp: August 31, 2016, 05:48:28 pm
content: Not sure about 'marketing wankery'Surely RMS Power is just RMS Voltage * RMS current into a defined load impedance. In the same way as other power measurements, eg. dBm into (edit) 50R.Edit: The term at least has some reliable meaning. 'Mean Power' could be manipulated by a marketing department to mean more or less anything.

author: Dave
author_rank: Super Contributor
timestamp: August 31, 2016, 06:15:44 pm
content: Nope. Have you ever wondered why we do the RMS calculations? We do it to find the equivalent DC voltage/current that would produce the same amount ofpoweron a purely resistive load. You don't calculate the RMS value of power, because it makes zero sense (and the calculation would be absolutely pointless).Mean power couldn't be manipulated in any way, there is no way to make it look bigger on paper than it actually is.

author: Brumby
author_rank: Unknown
timestamp: September 01, 2016, 02:59:55 am
content: OK - Now we're just getting a bit picky. Remember, this is the beginners section and the OP is not going to appreciate the subtleties just yet.The key point here is that - whatever marketing influence has been expressed, the RMS value has some relevance to the discussion at hand. Things like PMPO are just completely useless.

author: PotatoBox
author_rank: Regular Contributor
timestamp: September 02, 2016, 06:31:54 am
content: Just wondering but why aren't transformers as readily available as some other components? I don't have a problem salvaging parts but for example, I can go onto aliexpress and search for resistors, they're a dime a dozen. But when I look for transformers, all that comes up are wall warts and other power supplies. Why is that?

author: Brumby
author_rank: Unknown
timestamp: September 02, 2016, 07:39:24 am
content: Because some sellers are advertising power supplies as transformers.It's annoying, but not mysterious and boils down to 'common usage'. Consumers often do not differentiate between the two. As an example, when I was younger, I had an HO gauge train set, which was powered by my 'train transformer'. In reality it was a stepdown transformer with a rectifier and a rheostat. (Dave did a teardown of the very same unit not that long ago.)There is no such 'common usage' for resistors or MOSFETs, so it's not a problem with those searches. (I was going to add transistor ... except in the early days of solid state radio receivers, the transistor(ised) radio was often referred to as a 'transistor'.)Maybe you could try a search term that includes some of the parameters you are seeking.Oh good grief.....Just tried doing a search on "toroidal transformer"

author: MosherIV
author_rank: Super Contributor
timestamp: September 02, 2016, 09:22:00 am
content: Quote2 main reasons :1. they are heavy and note worth much so it is not economical to sell them, the postal costs out weigh the item costs when posting from China2. they are not used much now, most PSU are switcher, so China based sellers do not have much access to cheap transformers

author: setq
author_rank: Frequent Contributor
timestamp: September 02, 2016, 01:38:03 pm
content: I'm always buying transformers. Not sure why people think they not available. Perhaps from Chinese shit shifters they aren't but mainstream suppliers, no problems at all.