LM317: getting proper voltage... - Page 1
Forum section: electronics / beginners

author: MyHeadHz
author_rank: Regular Contributor
timestamp: July 13, 2017, 12:34:32 am
content: backstory, in case you're wondering: I just finished a project and it requires a regulated 9v DC power supply, but I only have regulated 12v power supplies. So, I decided to turn a 12v supply (wall wart) into a 9v DC power supply for my project. This is my first time using a breadboard, and my first time using a design where I calculated what I needed on my own. I'll probably end up using an NTE596 (LM7809) in the final board. I just wanted to try out configuring the LM317 first.(screenshot of schematic)So I watched some youtube videos and learned the basics of how to use voltage regulators, specifically the LM317. I followed the formula and came up with this:R2=((9/1.25-1)x220 -> R2=1364I left R1 as 220 (per Dave's recommendation) and I used 2 resistors in series (measured exactly 1360 ohms) for R2. That should get me to almost exactly 9 volts (8.97).(my breadboard. Be gentle, it's my first. I'm surprised it worked at all)When I measured the actual output, it was only 8.23v. Are the calculations only theoretical- assuming 100% efficiency, a square cow, and so forth? I can just change the resistor values to compensate, but I want to make sure I'm not missing something since I'm so new to this.My power supply (powering my circuit) is 12.12 volts (no load)- not exactly 12 volts, if that matters. I used quite a bit of bodge wire. Is it possible that my design would work, even though the voltage is off because of excessive bodge wire resistance?According to the datasheet I should have enough voltage overhead (3 volts). Am I just cutting it too close for it to properly regulate?In Dave's LM317 video he said he usually uses 220 ohm resistors instead of 240 because it usually doesn't matter. Is it possible that since I don't have a large voltage difference, I should recalculate R2 and use 240 ohms (220+22) for R1?

author: alm
author_rank: Super Contributor
timestamp: July 13, 2017, 01:05:31 am
content: That schematic is for the LM117. The LM317 has a higher required load current of 10 mA worst case. To satisfy that, R1 should be lowered to 120 Ohm and R2 should be halved. You can use a lower value for R1 (will increase power consumption). As long as you adjust R2 accordingly. In addition to this, measure the resistance from Voutpin to adjust pin, and from adjust pin to the negative input lead. This will show you the extra resistance introduced by the breadboard.3 V voltage overhead should be sufficient for, assuming the ripple is not excessive. You should be able to measure this with a DMM set to ACV on the +12 V rail. If you have long wires from the 12 V power supply to the regulator, you may also want to add a small electrolytic cap near the input of the regulator.There is really no point in buying jellybean parts like an LM317 or LM7809 through NTE. If they are available locally to you, then it may be convenient, but realize that you are likely paying quite a premium for NTE-branded parts. And I would double check thatNTE596part number.

author: Audioguru
author_rank: Super Contributor
timestamp: July 13, 2017, 01:06:37 am
content: Didn't you see the datasheet? The "1.25V" is actually a minimum of 1.20V and a maximum of 1.30V. Your resistors might be a little high or a little low. Then do the math.The datasheet shows 240 ohms for R1 only for the more expensive LM117 and arithmatic shows 120 ohms for the LM317. Then R2 needs to be re-calculated.

author: floobydust
author_rank: Super Contributor
timestamp: July 13, 2017, 03:41:01 am
content: OP, check your pinout on theLM317it looks mixed up to me. A-O-I

author: Zero999
author_rank: Super Contributor
timestamp: July 13, 2017, 08:03:49 am
content: Component tolerances are most likely to blame. Cheap resistors have a 5% tolerance and the LM317 4%. Although 8.23V is very low: -8.25% out so should be investigated.What's the voltage between the output and adjust pins?I doubt R1 being on the high side is a problem because that would most likely make the output voltage higher, than calculated, not lower.Try R1 = 120R & R2 = 750R, which will give 9V and eliminate the possibility of the R1 being to blame.

author: MyHeadHz
author_rank: Regular Contributor
timestamp: July 13, 2017, 08:05:17 am
content: Thanks everyone!So I made several mistakes apparently. I had actually originally planned for an electrolytic cap but I somehow forgot. whoopsSo I did add a 10 mic.I don't know how I missed the lm117 bit. It was on the same sheet as others in the series, and I somehow assumed that it would be the same for the LM317. So I changed my resistors to suit. And I used NTE because it was available locallyIt was a dollar or two more expensive, but it was here in hand today. I will likely get a few common parts to keep on hand so I can avoid that as much as practical.The biggest goof was the pinout... I somehow had it completely wrong.But I checked it carefully and corrected my mistakes there.After all the above, I checked it again: 9.02 volts!

author: 3db
author_rank: Frequent Contributor
timestamp: July 13, 2017, 08:23:52 am
content: Congratulations on your success.I'd recommend you cut back on all that wire for your next breadboard circuit.3DB.