Electronics & Electrical Engineering Forum:
Ask A QuestionPower
DC Power Supply LM317
Hopefully someone with more knowledge of power supplies can answer this. I’ve built a variable DC power supply based on the LM317 regulator to power my guitar effects. I have a wall wart with 20VAC output connected to a full bridge rectifier I made from individual diodes. The rest of the circuit is one of the designs I’ve seen for the LM317. Some of the designs I’ve seen have additional diodes across the 3 pins of the regulator and some don’t. Mine doesn’t.
When I power the circuit up, the DC voltage out responds well (~2-24VDC) when I turn the adjustment pot. The problem is that I also have an AC component that also responds to turning the pot. I understand that ripple can occur, but the AC voltage goes a high as 70v!
Is this normal? I’d hate to fry one of my guitar effects. Any thoughts would be greatly appreciated.
Another thing to consider: the Max input voltage of a 7812 is 35 volts—that’s around 25V RMS. You’re using a 24VAC transformer. That rating of 24V is probably the voltage under the specified load (i.e. transformer secondary voltages are rated at a particular current, like 24VAC at 1 Amp). The open circuit voltage will be higher, some times substantially higher. Therefore, it’s likely the voltage from the bridge rectifier will peak at a voltage higher than that max 35 volts (24*1.414=34V! so yer already almost there at 24VAC!!).
The LM317, on the other hand, can withstand a 40V differential between the input and the output pins. And, when used to supply 12VDC, the input voltage (i.e. voltage from the rectifiers) can be as high as 40+12 or 52V. So, I would stick with the LM317 and replace the potentiometer with a fixed resistor or a resistor and a trim pot (or get a lower voltage transformer).
BUT, if you’re seeing 70 volts, then, as Kevin said, something is wrong. Try measuring the AC voltage output from the transformer (see if it is also that high). It could be that it has a shorted primary winding, or something (like, perhaps you’re looking at an oscilloscope and seeing the peak-to-peak voltage and calling it 70V.)
If the voltage is indeed peaking that high, then either get a different transformer, or try putting a load across the transformer secondary and measure it again-i.e. see if that lowers the voltage to below the max. The load should be comparable to the minimum current that the guitar effect(s) will draw — you could also put a zener diode (and series limiting resistor) after the rectifiers to protect the regulator (or even just a zener if adding a load did drop the voltage, and the load current is such that a 1W (or higher, if you’ve got it) zener can survive — just food for thought) — but that’s a hack and not recommended unless you’re strapped for cash and need a quick fix — especially since there’s a good chance the high voltage is a symptom of more severe failure modes to follow ;)
good points – and for 25 mA load you can simply add a zener in series to drop that voltage down to 18 VDC on the input or such. or use a transformer that has a lower AC output – like maybe a 15 to 18VAC output from 120 VAC input. the less to go wrong the better.
Kevin
Regarding that “hack”, I realized I didn’t explain it very well. The idea is to get the transformer secondary voltage down (i.e. make sure it never goes above the Max input voltage of whatever regulator you choose to use. You can either find a load that pulls the secondary voltage down without melting the transformer or requiring a high wattage resistor, and if that works, consider using a zener instead—again without drawing more quiescent current from the transformer than it can supply and still have enough head room to power the guitar effects. It’s not power efficient (yer always dumping current that does no work (other than cooking a resistor or zener)) but perhaps you can use it as a foot warmer ;)
Also, if you include a fuse before the zener, then if the transformer does fail more badly, it will blow and protect the regulator and guitar effects, etc. But, you gotta choose the fuse correctly.
Thanks for the additional info, Steve and Kevin.
Here’s some more information:
Transformer: Plug-in Class 2
Input 120VAC, 60Hz, 13W
Output: 20VAC, 10VA
All diodes are 1N4005
I took some additional voltage readings using an analog voltmeter:
NO LOAD, POT ADJUSTED FOR LOWEST OUTPUT
Xformer Out: 22VAC
Gnd to Bridge: 30VDC/68VAC
Gnd to DC Out+: 1.2VDC/0.8VAC
NO LOAD, POT ADJUSTED FOR 12VDC OUTPUT
Xformer Out: 22VAC
Gnd to Bridge: 30VDC/58VAC
Gnd to DC Out+: 12VDC/24VAC
NO LOAD, POT ADJUSTED FOR HIGHEST OUTPUT
Xformer Out: 22VAC
Gnd to Bridge: 25VDC/64VAC
Gnd to DC Out+: 23VDC/60VAC
50 OHM/5W RESISTOR USED AS A LOAD, POT ADJUSTED FOR LOWEST OUTPUT
Xformer Out: 22VAC
Gnd to Bridge: 25VDC/65VAC
Gnd to DC Out+: 1.2VDC/2.6VAC
50 OHM/5W RESISTOR USED AS A LOAD, POT ADJUSTED FOR HIGHEST OUTPUT
Xformer Out: 22VAC
Gnd to Bridge: 24VDC/54VAC
Gnd to DC Out+: 23VDC/50VAC
(I only did this test briefly! 11W on a 5W resistor = HOT!)
As a last test, I repeated the no load-high output test with a diode across the output with the cathod on the + side (reverse biased). This was an attempt to block any AC at the output. It had absolutely no affect on the readings.
It is interesting that the AC readings at the bridge remain between 50-68 VAC, but the AC readings at the output track with the adjustment of the LM317. When the LM317 is wide open, it appears to be passing the bridge voltages on through to the output with little loss for both AC and DC.
I seem to recall that voltmeters are not designed to give accurate measements of AC on top of DC, but I can’t find anything to support this notion.
The AC component after the bridge rectifier and filter capacitor is not sinusoidal. That could be why you’re getting such high VAC readings (though I wouldn’t expect them to be that high. AC Volt meters are calibrated to a sinewave. It could also be a leaky DC blocking capacitor in your meter.
And, if your meter is measuring the AC voltage correctly at the transformer secondary, then you should be OK with a 7812 (22VAC * 1.4 = 31V – 1.4V = 29.4V [the 1.4V is the diode voltage drops]. Though I find it odd that you read 22VAC both with no load and with a 50 ohm load. Kind of makes me wonder if your meter is functioning properly as an AC volt meter. Do you have another meter that you could use to corroborate these readings?
Also, a scope would be much better for seeing what’s really going on.
BTW: I can’t find a datasheet on a 1N1005…did you mean 1N4005?
Another thought (a long shot, actually): does your meter have a “Hold” button (i.e. a button or switch for freezing the meter reading). If so, maybe the meter was in hold while you were getting all those 22VAC readings.
Kevin- I was thinking the exact same thing, except I’d like to use an adjustable supply (please see my response to Steve). A couple of options are to either buy an adjustable DC wall wart or a fixed DC that would satisfy the LM317. That way I won’t have to mess with rectification. I wouldn’t chase something like this at work when there are other alternatives, but sometimes I get obsessed by things like this and want to learn why it is happening.
Is it possable the Wall wart transformer is outputting AC and not DC voltage?
Also be sure to use a heat sink.
Douglas:
Yes the walwart has an AC output. I have a bridge rectifier in the circuit to create DC. I have a heat sink on the LM317. Thanks!
Steve has good advise as well. I suppose at this point I would be tempted to go to radio shack or frys electronics and get a regulated 12 volt DC wall wart and be done with it – cheaper than the time to mess with this… or get a DC unregulated wall wart maybe 15-20 volts unregulated DC then feed it into your regulator circuit… but all good thoughts.
what kind of meter are you using? I would try another like a good fluke DMM or such.
and a scope will be helpful too. add more input filter cap maybe an additional 1000 uf or such on the output of the bridge (watch the polarity) and yes fuse the input of the supply off the mains with a 1 a slow blow or something. you should be able to adjust it to 12 volts and have almost no DC on the output.
Steve,:
Sorry, yes the diodes are 1N4005. My meter is a circa 1980 Micronta (Radio Shack) analog so N/A on the hold button, but I have a nice Fluke meter at work that I can try. I checked the AC readings with a $5 digital Harbor Freight meter and got similar readings.
I think my brother has a scope. If so, I’ll try that.
Another thing I’ll do is look at another PS circuit I built Iast year and put inside of a noise gate. It uses the same AC wall wart aproach, but it has two fixed regulators to produce +/- 15VDC. If my meter sees high AC on that supply’s output, it would make me suspicious of the meter.
As a side note, I intend to use this PS to power a 12AU7 tube based guitar effect. It is a preamp that delivers a nice fat overdrive sound. (http://www.aronnelson.com/DIYFiles/up/12AU7-6111_Valve_Caster_Summary_Rev002.pdf). The designer intended to create a 9VDC based tube effect, but the 12AU7 is designed for 12V. Others have experimented with different voltages on the heater in order to tweak the sound. My plan is to use the adjustable PS to find the sweet spot while staying within a reasonable voltage range for the tube. The pot for adjustment is a trim pot that would be protected inside of the case so it can’t be accidentally bumped.
Nostalgia! I used to have one of those meters (Radio Shack Micronta)!
Steve:
My Dad is an EE and gave me this meter when I was 18 and moved out of the house (attached photo). I’ve gotten a lot of use out of it over the last 31 years!
get some good test equipment – I would not trust anything on that meter you have. Use a fluke or something that has a calibration sticker on it. Scope would be good too. it may be working fine but the meter is giving you bad results.
Well I took it to work and used the Fluke on it and got 0.3mv when the LM317 was adjusted low and 0.5mv when adjusted high. Having the right meter made the difference. Thanks to all you guys for helping me figure this out.
I should have noted that those mv readings were AC measurements on the DC output. Looks like I’m ready to finish my project. Thanks again!
John, I think you may have a measurement issue and not a circuit issue.
An oscilloscope would really help you get to the bottom of this.
Thanks David. We have a high end Fluke at work so I’m going to take the circuit to work tomorrow and see what the Fluke says. If that shows high AC, I’ll try my brother’s scope.






do you have a schematic? dont hook any load up to it before you figure out whats happening. something is wrong.
The diodes are for protection (some of the protection is for the LM317 and some is for the load.
you might have a capacitor that is either bad or has a loose connection.
what is the output voltage and current draw supposed to be for this effects generator?
Thanks for the quick reply! I have attached a schematic. The output voltage is variable, but I’ll be using 12VDC. The effect is supposed to draw 25mA.
I am using a voltmeter across the DC voltage out terminals to measure the DC and AC voltages by using the DC and AC settings on the meter. Is it possible that a voltmeter could give me unusable AC readings because I have it connected to a DC voltage? Would an O-scope instead of a voltmeter the proper (only) way to measure the AC component of a DC supply?
OK got it. since you need a 12 volt supply and it should be fixed (so it does not damage something of bumped and less to go wrong) I would scrap the LM317 and just use an LM7812 fixed regulator. Use the same circuit for input and output decoupling caps. A DMM should show approx 12 volts DC on the output and millivolts or microvolts of AC. You can of course use a scope however the grounding will pick up noise via the probe leads.
something like this circuit (but keep the 0.1 uf on the output as close to the gnd and output leads as you can and add a 0.1 on the input too as close as you can to input and gnd. then the bulk caps can be located wherever they need to be. have a look at these two resources below.. the LM7812 circuit just cant help but work and it should be very forgiving – just make sure you have enough bulk cap on input and output and add those 0.1 decoupling caps and it should work just great for audio apps.
http://www.fairchildsemi.com/ds/LM/LM7812.pdf
http://www.google.com/imgres?imgurl=http://www.phoenixcomputerlabs.com/All-About-Mixers/images/LM7812-1Amp-12v-Power-Supply.gif&imgrefurl=http://www.phoenixcomputerlabs.com/All-About-Mixers/7812-7912.html&h=267&w=582&sz=5&tbnid=TacV3ZzVy7EOHM:&tbnh=58&tbnw=126&prev;=/search?q=lm7812&tbm=isch&tbo=u&zoom=1&q=lm7812&docid=vHyZqChv_XrxwM&hl=en&sa=X&ei=JYFBT-jJO6rq2AXSoaSBCA&ved=0CDoQ9QEwAg
Thank you for the answering my questions and for the suggestion and links, I think I’ll try the LM7812.