Making my first power supply, help! - Page 1
Forum section: electronics / projects

author: MoighonFweeman
author_rank: Contributor
timestamp: February 28, 2015, 02:03:58 am
content: I'm working on making my first variable power supply:Two LM317s, one for current regulation, and one for voltage regulationThere will be a diode across the two regulators for protectionPowered with a 18v DC adapter. I don't want to fiddle with mains just yet.Voltage goes from 1.25V to roughly 12.5V with R1 = 1100 ohms and R2 = 0 to 10K ohms (10 turn pot)Current goes from 10mA to roughly 320mA with a 3.9 ohm resistor and a 100 ohm pot in seriesEverything is in a plastic enclosure with no ventilation at all (the horror!) so I need to pay attention to temperatureNow, I have a couple of questions:I don't plan on having any kind of display, so I'll need to measure the voltage and max current using a multimeter. I know I can measure the voltage with the multimeter. However, I'm not sure if I can use the multimeter to measure the maximum current. Can I just plug the meter in and set it to current, effectively shorting the whole thing out, and measure it? Or will terrible things happen (fires, explosions, demonic possessions, etc)? My meter is fused for 400mA.Also, would a fuse be needed? If so, should I put it before or after the regulators? Should I use a generic fuse or something like a polyfuse?Finally, I'm a bit worried about that 3.9 ohm resistor for the current regulator. Would a 5W resistor suffice? Or should I get a 10W for a better safety margin? How much heat would it dissipate?How large of a heatsink would I need on the regulators in order to avoid melting the plastic enclosure?Do you guys have any other suggestions?Thanks, and sorry for all the questions.

author: MoighonFweeman
author_rank: Contributor
timestamp: February 28, 2015, 03:55:48 am
content: Whup-de-do, big brain fart right there. I just now realized how low of a current cap 320mA really is. I guess I'll use a 1.2, 1.3, or 1.5 ohm resistor in place of the 3.9 ohm one.

author: rdl
author_rank: Super Contributor
timestamp: February 28, 2015, 04:16:59 am
content: If there is no load on the voltage regulating LM317, it won't regulate with R1=1100 ohms. You can permanently hook up an LED or something on the output, or you could lower R1 to around 120-150 ohms.

author: Didix
author_rank: Regular Contributor
timestamp: February 28, 2015, 04:41:24 am
content: Quote from: MoighonFweeman on February 28, 2015, 02:03:58 amCould you please show us the schema of your circuit?-Didix

author: MoighonFweeman
author_rank: Contributor
timestamp: February 28, 2015, 05:10:30 pm
content: Here is the schematic.I feel as if several of my capacitors are redundant...Also, I forgot to add a switch between the power jack and the circuit.I think I may just exchange POT1 with a rotary switch to select between different resistors, as I cannot find a good 10ohm potentiometer.

author: rdl
author_rank: Super Contributor
timestamp: February 28, 2015, 06:02:49 pm
content: That doesn't look too bad. The two caps on the voltage regulating LM317 adjust pin (c4, c5) can probably be combined. Just use a single 100uf.It's best not to leave one end of the pots unconnected. If the wiper looses contact, the resistance goes infinite. Not so bad on the current pot (just no output), but on the regulator pot, this will cause a spike on the output up to the maximum possible voltage.

author: Didix
author_rank: Regular Contributor
timestamp: February 28, 2015, 09:47:42 pm
content: Quote from: MoighonFweeman on February 28, 2015, 05:10:30 pmI think, there is an idea behind that:The large elco ensures stable input voltage.The small capacitor acts as a shortcut filter for high frequency noise.The elco can't do that due to its inductance.Somebody with better knowledge may correct me ..-Didix

author: rdl
author_rank: Super Contributor
timestamp: February 28, 2015, 10:14:05 pm
content: Yes, electrolytic caps are not effective at higher frequencies, so you use a smaller cap for that. Ceramic or film, either is probably just as good here, though some would argue the point. I think the only redundant caps were on the adjust pin, but having both won't hurt anything. By the way, you want to connect the smaller caps (c3, c7) as close as possible to the voltage regulator and c6 as close as possible to the output.

author: MoighonFweeman
author_rank: Contributor
timestamp: March 01, 2015, 12:28:42 am
content: If the capacitors aren't hurting anything, I think I'll keep them as they are. As someone said, the smaller caps are for high frequency noise.The main things I'm concerned with here are:The heatsinking (plastic enclosure). I only have teensy little 14cm x 20cm heatsinks. I don't suppose those will suffice.The current adjustment potentiometer. I simply cannot find a good 10 ohm potentiometer that can withstand a high wattage. The only ones I can find are crusty-looking ones from china. Can anyone think of a good alternative? A rotary switch along with some sort of power resistor assortment sounds nice, but I can't find any power resistor "kits" at a reasonable price.And that's a good point on connecting the ends of the potentiometers. I'll do that.

author: Vgkid
author_rank: Super Contributor
timestamp: March 01, 2015, 01:33:30 am
content: http://www.mouser.com/ProductDetail/CTS-Electronic-Components/026TB32R100B1A1/?qs=sGAEpiMZZMtC25l1F4XBU9ebFVlJKl0pjysm4JF5p50%3d10 ohm 5watt, relatively cheap

author: MoighonFweeman
author_rank: Contributor
timestamp: March 01, 2015, 02:41:23 am
content: QuoteDo you suppose 5 watts will do? The maximum power this thing will have to handle will be about 10 watts.

author: Vgkid
author_rank: Super Contributor
timestamp: March 01, 2015, 03:55:02 am
content: How often will you be running it at maximum power, you could always grab a rheostat off ebay.

author: MoighonFweeman
author_rank: Contributor
timestamp: March 01, 2015, 02:35:57 pm
content: http://www.ebay.com/itm/25W-15-15-Ohm-Power-Wirewound-Rheostat-Rotary-Potentiometer-25-WATT-/351106904764?pt=LH_DefaultDomain_0&hash=item51bf9a32bcDo you suppose something like that would be particularly trustworthy? It seems a bit... crusty.

author: rdl
author_rank: Super Contributor
timestamp: March 01, 2015, 03:04:39 pm
content: I've never tried to use an LM317 foradjustablecurrent limiting. Supposedly it doesn't work all that well. I'm not sure why, maybe because of the pot.Have you watched Dave"s Lab Power Supply videos? I think the first one is #221, in it are some good ideas in it on implementing current limiting.

author: Seekonk
author_rank: Super Contributor
timestamp: March 01, 2015, 04:32:46 pm
content: I don't trust high current pots over time. A simpler way to do it is to use a fixed low ohm resistor and a pot across that. A resistor is needed in series with to give the correct operating range. Likely two power resistors in series with a switch between the two for a high and low range.

author: electrophiliate
author_rank: Regular Contributor
timestamp: March 02, 2015, 02:02:30 am
content: The current-setting resistor does not have to dissipate 10W.IIRC, the LM317 regulates itself by maintaining about 1.2V or so between the output pin and adjust pin (exact voltage may differ between manufacturers).So for example, if you have chosen 1.2R for the set resistor to achieve 1A current limiting (I=1.2/R1), the dissipation will be 1.2W (P=V^2/R).The dissipation decreases with higher values e.g. 400mW dissipation for the 3.9R resistor chosen earlier for 320mA limiting.Do you know the thermal resistance (C/W) of the 14cm x 20cm heatsinks? They may be OK. In the worse case scenario, going from 18V to 1.25V @ 1A will dissipate 16.75W of heat shared between the LM317s, distribution depending on the load. That is quite a lot of heat for a small area so the lack of ventilation in the enclosure could be an issue. How big is the enclosure? Is it possible to mount the (electrically-isolated) heatsink(s) on the outside?Measuring the current when shorted (but current-limited) will be OK, but will increase heat dissipation in the current-limiting LM317.The LM317 has internal protection, so it will temporarily shut down if overloaded or overheated.+1 for the recommendation to watch Dave's video series on making power supplies, starting with #221.Someone has compiled a list of the videos in the power supply series:https://www.youtube.com/playlist?list=PLVFkJtAnCHLasx8eBhfvIeDNGNE53mLAc

author: MoighonFweeman
author_rank: Contributor
timestamp: March 02, 2015, 10:13:18 pm
content: At this point I am *considering* using a LT3080 (as Dave suggests) for voltage regulation. Can anyone explain to me what the advantages of doing so would be? As far as I know, the only big point is that it has a much lower dropout than the LM317. But that really doesn't help me all that much, because I plan to power this whole thing from a wall adapter, and those wall adapters are commonly only made in 3V increments anyway.

author: MoighonFweeman
author_rank: Contributor
timestamp: March 15, 2015, 08:04:49 pm
content: I'm not sure if I'm supposed to be making a new post, or replying to this one, since this one is relatively old... so sorry for breaking any rules.Anyways, I've decided to replace the current limiting portion of the circuit with an opamp based circuit, in order to avoid the 3V drop of another LM317. I think it should work. In theory. But something working in theory really doesn't help when it sets your house on fire, so I thought I'd ask for a bit of advice.Ignore the TIP122 darlington pair for now. I'm going to use some sort of PNP transistor, or a N channel mosfet, in order to take advantage of the LM357's ability to output near ground. That should allow me to set the current limit pretty low, I think.One of my main questions is, how much current will be passing through the TIP122 (or whatever I end up replacing it with)?Edit: Taking a look at this circuit, I'm starting to suspect it won't work. Wouldn't the load (regulated by the 317) just source it's voltage from the 12V through the transistor pair? Maybe I'm just crazy.

author: MoighonFweeman
author_rank: Contributor
timestamp: March 15, 2015, 09:00:20 pm
content: Yep, I'm crazy. Here's the new schematic.

author: Seekonk
author_rank: Super Contributor
timestamp: March 17, 2015, 10:35:16 am
content: I'm an old guy, not up on anything trendy. It used to be that a CAD schematic indicated that someone had reached a certain level in their career. In the last few years people who appear to have never opened an electronics book are posting beautiful schematics. Now a pretty schematic means to run, very fast and very far. Not trying to be rude but really what program are they just giving away to everyone? Answer me that and I will help you with your problem.

author: MoighonFweeman
author_rank: Contributor
timestamp: March 19, 2015, 09:28:54 pm
content: I used EagleCAD for those schematics. Many say it has a steep learning curve, but I didn't find it too hard.