LM317 - Limit output voltage - Page 1
Forum section: electronics / beginners

author: made2hack
author_rank: Frequent Contributor
timestamp: December 22, 2014, 03:36:35 pm
content: Hey all,So I'm using the following schematic.Is there a way to limit my output to 9V?My VIN is 12V. Without a load, I can get a Max VOUT of around 11.5V. Under load, around 10.8V. However, I'm driving a DC motor recommended 6-9V.What can I do to limit the VOUT to MAX 9V? And, if so, Where am I dropping the potential of 3V? I don't necessarily want to add another IC (ex a 7809), I would like to know if I can do it within the current schematic.Thanks

author: Simon
author_rank: Unknown
timestamp: December 22, 2014, 03:40:12 pm
content: Well if it's not too much of a stupid question but why are you using the LM317 in the first place? You need to set the trimmer for 9V, it sounds like you have it set for 12V and so the regulator is doing all it can to provide that but under load the overhead of the regulator goes up.the 3V is supposed to go into the regulator, the regulator acts as an automatic variable resistor to hold the voltage steady.

author: Zero999
author_rank: Super Contributor
timestamp: December 22, 2014, 03:57:41 pm
content: You need to select values for R1 (240R in your case) and R2 (the trimmer) which give a maximum output voltage of 9V.http://www.reuk.co.uk/LM317-Voltage-Calculator.htmSimon is right though: the LM317 isn't really the right way to do motor speed control.

author: Simon
author_rank: Unknown
timestamp: December 22, 2014, 04:04:03 pm
content: Quote from: Hero999 on December 22, 2014, 03:57:41 pmI meant that if he is asking this what prompted the use of the LM317 in the first place, I think it's a case of a 9V motor on a 12V supply.

author: made2hack
author_rank: Frequent Contributor
timestamp: December 22, 2014, 04:08:52 pm
content: Well, this is sort of a hack. I have this little model train that my SO decided needed fixing 3 days before the holidays, so, I need to regulate I guess the "speed" of the locomotive by adjusting the voltage.It is an old unit from the 70s that, by default had a "resistive" speed control unit (basically a switch which goes over 3 types of contacts and the resistance changes from 100 Ohms to around 2 Ohms. However, when I measured the output, it hardly varied from 12 V.The VIN is just an old PSU I have lying around, and with 12V the motor seems to run OK (albeit a bit fast). But since with this setup, only 10.8V comes out (at "Max speed"). I have another motor on order which should arrive tomorrow (a 6-9V unit), as a backup in case this old motor dies.So, since I had some LM317s around, and some basic caps, I figured it was the best way to hack together a quick speed regulator.What do you guys suggest? PWM the output with a 555? And use a transistor? Or do I need a FET?

author: made2hack
author_rank: Frequent Contributor
timestamp: December 22, 2014, 04:11:34 pm
content: @Simon is correct.I have a 12V supply, I want to use the variable voltage to run the train at "different speeds", but, if possible, not exceed 9V in the process.

author: kxenos
author_rank: Frequent Contributor
timestamp: December 22, 2014, 04:15:10 pm
content: You can place a 7,5V zener in adj pin to ground if you don't want much precision

author: LabSpokane
author_rank: Super Contributor
timestamp: December 22, 2014, 04:15:59 pm
content: First off, that bottom Vout is not Vout, it is Ground. Only use the top Vout, which is how the schematic is shown on the datasheet.The equation to set the resistors is Vo=1.25(1+R2/R1), where R1 is the 240 ohm feedback resistor.Doing a wee bit of algebra, one gets R2 = 240(9/1.25-1) = 1488 ohm, so you just need to set your bottom trimpot correctly. My guess is you have a wiring problem somewhere, or your draw is much greater than the 317 is capable of regulating. Have you checked the current draw of your motor?

author: LabSpokane
author_rank: Super Contributor
timestamp: December 22, 2014, 04:34:30 pm
content: {Ignorance removed}

author: macboy
author_rank: Super Contributor
timestamp: December 22, 2014, 04:54:09 pm
content: Quote from: LabSpokane on December 22, 2014, 04:34:30 pmNo, when wiring a pot as a rheostat, it is always preferable to connect the wiper to the far end. This prevents the resistance from going any higher than the pot value if the wiper goes open (dirty, etc.).LabSpokane is correct; use a 1.5 kOhm pot for R2 to limit the regulator to a maximum of 9V. You can also put a resistor in parallel to the pot if you don't have the precise one needed. e.g. a 2.5 k pot and a 3.9 k resistor in parallel. The tracking will be a little non-linear but it will work fine. It is also desirable to put a roughly 10 uF cap in parallel to R2 in LM317 circuits like this.

author: AG6QR
author_rank: Frequent Contributor
timestamp: December 22, 2014, 05:07:26 pm
content: Quote from: LabSpokane on December 22, 2014, 04:34:30 pmNo, having terminal 3 and 2 shorted together does absolutely nothing in theory, but in practice it's generally a good idea, because it limits the maximum resistance of the pot for the case when the wiper is a bit dirty and not making solid contact to the winding. That's not the source of the problem. In the original schematic, the resistance of R2 could be between 0 and 5K, and in your modified schematic it could also be between 0 and 5K, unless the wiper was a bit dirty, in which case the resistance could jump up to infinity. That's the wrong direction.If the objective is to limit the max value of the output voltage, you want to do that by limiting the max resistance of R2, the pot. Ideally, you'd find a pot off the shelf that had the desired value. But if that's impossible, you can put another resistor in parallel with the pot.Try something like a 2.2k resistor in parallel with the pot. The response of the pot won't quite be linear any more, but the range of the parallel combination of a 5k pot with a 2.2k fixed resistor is from 0 to around 1.5k.Or you can swap the pot for a lower value one, and you can also consider changing the value of R1, if you don't have exactly the right value of pot in your parts bin. Just be sure that you maintain enough output current to keep the LM317 in regulation.

author: LabSpokane
author_rank: Super Contributor
timestamp: December 22, 2014, 05:12:52 pm
content: Quote from: macboy on December 22, 2014, 04:54:09 pmOops. I stand corrected.

author: dannyf
author_rank: Super Contributor
timestamp: December 22, 2014, 09:44:17 pm
content: QuoteYes. The reference voltage is 1.25v, across the 240ohm resistor. So the current going through the pot is 0.5ma (give or take). That means to hit a 9v output voltage, the voltage drop on the pot is 9v-1.25=7.75v. That means the max value for the pot is 7.75v/0.5ma=15k, give or take.

author: AG6QR
author_rank: Frequent Contributor
timestamp: December 22, 2014, 10:02:25 pm
content: Quote from: dannyf on December 22, 2014, 09:44:17 pmThere's a misplaced decimal point in those calculations. Current produced by 1.25V through 240 ohms is about 5 mA, and required pot value is about 1.5k. Note that the actual pot value was 5k, and this was causing the voltage to exceed the limit.

author: LabSpokane
author_rank: Super Contributor
timestamp: December 22, 2014, 10:03:06 pm
content: Quote from: dannyf on December 22, 2014, 09:44:17 pmAside from the fact that I'm too ignert to connect a trimpot properly as witnessed above, I think you might be off by decimal place. Or I am...again....

author: dannyf
author_rank: Super Contributor
timestamp: December 22, 2014, 10:15:46 pm
content: Yeah, the decimal point is off,The basic principle is the same: you want to pick the pot to limit the highest output voltage.

author: tautech
author_rank: Super Contributor
timestamp: December 22, 2014, 10:24:19 pm
content: Furthermore OP you should measure the voltage sag under load in the "transformer you had lying around" to see if it is really up to the task.