Power Supply Voltage Potentiometer

Discussion in 'The Projects Forum' started by doug3460, May 3, 2009.

  1. doug3460

    Thread Starter Active Member

    Oct 19, 2008
    87
    0
    Sorry for a lengthy start, but I hope to avoid later explanations. :)

    Please take a look at the attached drawing. The problem I'm having is with the linear potentiometer: it's too sensitive for easy adjustment & doesn't have linear sweep. Please read on for more background & what I've done so far.

    Background:
    Over the past few months I've made a few posts of a PSU in various stages of development. I have received lots of great help from the senior members & moderators. A couple notes from those posts:
    Ron H noted, I would not get full sweep from the 5K pot & he recommended R1 be dropped to 82Ω & R2 changed to 2K (see "What I've Done So Far," below).
    eblc1388 & Audioguru noted, R1, often shown as 240Ω in countless 317 references, should be 120Ω instead. After considering their in-put, completing a lot of research, & doing some Ohm's Law calculations (which I posted in that thread), I settled on using a 130Ω resistor in the schematic because mathmatically it made sense to me. (see "What I've Done So Far," below).
    beenthere noted, in considering a resistor placed in parallel with R2 to limit the range, that it would have "...a deleterious effect on the adjustment pot." This threw me a bit since basically it was an application from Vol VI, Chap 3 of the AAC guides. But I removed the resistor as he suggested.
    About the PSU: This unit is the second part of a two unit set mounted in one enclosure. The other unit is an ATX PSU break-out (which is completed). In the course of working on this project I obtained a rack-mount type enclosure which I gutted for components & re-finished the face to the new applications. I am at the point of building the stand-alone adjustable supply for the unit. As noted in other posts, it is planned as dual rail with selectable current limiting (ranges: 50mA, 100mA, 250mA, 500mA & 1A) & voltage adjustable within the range of the 317/337 ICs. So, no, I haven't made a final decision on the supply voltages. I intend to use an op-amp to simultaniously control the out-put of the rails.

    At the moment, I'm working strictly on the positive rail, using either 12V or 15V as the supply. I was under the impression that V\small_{IN} wouldn't matter so long as it was within the operating range of the 317 specs. But there is some difference in how the range of the pot is affected (i.e., the higher V\small_{IN} allows a slight increase in range, but essentially the sensitivity up to that point remains unchanged).

    WHAT I'VE DONE SO FAR: First, I confirmed the pots are linear type. Next, I researched the problem & found that linear pots aren't always completely linear. I located some sources for adjusting the output of the pot, so if it were graphically represented, it could be made more log or even anti-log. I have tried some of these techniques without positive results. I do not want to limit the range of the pot (Vol VI, Chap 3 stuff) - I simply want a reasonable sweep to V\small_{OUT}, especially (& if doable, lol) for at least 90% of the sweep.

    I have tried R1 in ranges from 120Ω to 1kΩ & R2 at 2k, 5k & using Vol VI techniques, some variations of these two. The 2k provides a far better ratio of movement to output in the lower ranges, but still reaches the upper limit well before the stop. With either pot, the last 40%+ of sweep is only adjusting the mV of the upper limit. You can figure the time I've spent messing with the combinations/permutations in adjusting these two variables. Interestingly, I did find the combination of R1=680Ω & R2=2kΩ provided a nice ratio of sweep to output, however, I could no longer swing completely down to 1.2V & the upper limit was capped regardless of the supply V\small_{IN}.:(

    I would prefer to use a single pot on my panel since it's a lot of work to refinish (lol, live & learn - I hadn't anticipated this particular problem since this configuration is so widely used & there are numerous commercial supplies with a single pot for adjustments).

    Obviously I'm doing something wrong. Is this fixable by modifying the circuit or adding components or do I need to begin exploring a digital solution?:confused:
     
    Last edited: May 3, 2009
  2. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    In the LM317 datasheet, you will find that guaranteed regulation is provided when 10mA <= Iout <= 1.5A.
    You will also find that Vref (measured from the ADJ to OUT terminals) is nominally 1.25v (when the output load is 10mA to 1.5A), but values anywhere from 1.2v to 1.3v are acceptable.

    For this reason, 120 Ohms is typically specified for R1, as it guarantees that the minimum 10mA load will be on the output of the LM317, even if Vref is at the minimum threshold: 1.2v/120 Ohms = 10mA. You can use a lower value than 120 Ohms for R1 if necessary, but remember that current through R1 takes away from the maximum output current.

    You can get by with a somewhat higher value for R1, as long as your load makes up for the difference in order to get the guaranteed regulation. If R1 is considerably higher than the standard value, Iadj (current sourced from the ADJ pin, typically 50uA but may be as high as 100uA) will have an increasingly significant impact on the output voltage.

    I see that your C2 is rated for 25v. In that case, you should not count on your regulator output voltage to be higher than 12.5v, as capacitors should have a voltage rating of twice that expected in the circuit.

    With R1 at a value of 120 Ohms, a typical Vref of 1.25v (ADJ to OUT voltage), and a typical Iadj (current sourced from the ADJ terminal) of 50uA, R2 should not be greater than 1073 Ohms to provide a 12.5v output. If you are using a standard 5k linear 3/4 turn pot, you'll only have a useable adjustment range of about 54°, or around 1/7 of a turn, and it will seem very "finicky".

    Change R2 to a 1k pot. If you wish to have a "fine" and "coarse" control, use a 1k pot and a 100 Ohm pot in series.

    If you need more than 12.5v output, then you will need more changes; like C2's voltage rating.

    What is your minimum and maximum output voltage requirement?
     
    Last edited: May 3, 2009
  3. doug3460

    Thread Starter Active Member

    Oct 19, 2008
    87
    0
    Thanks Sarge.

    Forgot to mention that I was using a 120ohm in the breadboard but the schematic hadn't been changed (I had put the schematic together back when working on the other thread so just reposted it here since it depicts the board layout pretty closely). I also forgot to mention that I had tried Ron H's recommendation of R1 at 82 ohm with R2 at 2k.

    I had tried R1 @ 120 coupled with R2 @ 2k but didn't get the desired result. Since I don't have a 1k pot available, can I parallel 2k to R2, or will it have the "deleterious" effect beenthere had warned of?

    I would like to proto this so I can set V\small_{IN} in one of two ranges -the dual 12V rails and the dual rails for the higher range (getting the correct size center tap transformer & what the desired maximum adjusted out volts will be is what's causing me to remain undetermined on the supply). I can't think at present of needing more than 24V max out. Even 18Vmaxout would probably suffice. Anyway, is this doable. Am I misunderstanding the V\small_{REF}? I thought it was always a 1.25V between them (internally controlled), or is it changing depending on the V\small_{IN}?
     
    Last edited: May 3, 2009
  4. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    With R1=82 and R2 = 0 to 2k, your output range would 1.2v - 32v; much more than C2 is rated for.

    With R1 = 120 Ohms and R2 = 0 to 2k, you would have a range of 1.2v-22.3v; still more than C2 should be used at.

    If you attempt to parallel a 2k resistor with [eta] R2 = 0 to 5k, you'll have a very non-linear response from the pot.
    At max, you'll get about 1.43k Ohms.
    At 90%, 1.385k
    At 80%, 1.334k
    At 70%, 1.273k
    At 60%, 1.2k
    At 50%, 1.111k
    At 40%, 1k
    At 30%, 857 Ohms
    At 20%, 667 Ohms
    At 10%, 400 Ohms.
    As you can see, the last 30% of travel will have the lion's share of variation.

    Yes, but keep in mind that the power dissipation in the regulators for a given current at a given Vin will increase as the output voltage decreases.

    For example, if you have Vin=20v, Vout=5v and a 1A current, your load power dissipation is 5V x 1A = 5W, while your regulator dissipation is (20V-5V) x 1A = 15V x 1A = 15W.

    Vref is nominally 1.25v, and it is internally controlled. It might be as low as 1.2v, or as high as 1.3v, and still be within the manufacturer's specifications. The LM317A has closer tolerances for Vref.

    In any event, if you're planning on being able to output up to 24v, better use 50v rated caps on the output, and 63v or higher for the bridge filter caps - as well as a much higher capacitance rating for the bridge filter.
     
    Last edited: May 3, 2009
  5. eblc1388

    Senior Member

    Nov 28, 2008
    1,542
    102
    It seems to me you are not aware of the "drop out" voltage of the LM317. The drop out voltage is the headroom that the LM317 requires to do its job properly.

    The data sheet indicates that this is about 2.4V at 1.5A load current.

    So even if you supply Vin=12V to the LM317, the most you can get from its output is 12-2.4=9.6V @1.5A load current, regardless of how you set your resistor. This would explain why the output voltage won't change when you reached the upper part of the VR.

    Since you have already got a 2K VR, let's design with this requirement in mind. A combination of R1=180Ω and R2=2KΩ VR on LM317 would give linear changing voltage output from 1.25V to about 15.3V. The prerequisite is that Vin is at least 17.7V or higher. To compensate for the increase of min. loading resistor from 120Ω to 180Ω, an extra loading resistor is needed on the LM317's output to make sure that min. loading is back to 120Ω. Its value from Ohm's law for parallel resistors works out to be 360Ω.

    @Sgt: You won't get 1.43K max. when 2K is parallel with a 2KVR.
     
    Last edited: May 3, 2009
  6. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    OK, the minimum dropout voltage for the LM317 is 1.7v with a 10mA load on the output; the dropout naturally increases with the load on the output.

    I'm afraid this scheme won't work very well, as I=E/R. You can't sink current from the 360 Ohm resistor (let's call this R3) via the pot, as that will increase the current through the pot, thus increasing the output voltage (within Vin's limits and voltage drop vs current, of course). You couldn't connect R3 to ground either, as I=E/R, so as the output voltage was changed, the current through R3 would also change.

    Somehow, I only saw the 5k pot mentioned; I completely missed the 2k pot. :rolleyes: The numbers I gave were for a 2k fixed resistor and a 5k pot in parallel.
     
  7. eblc1388

    Senior Member

    Nov 28, 2008
    1,542
    102
    I know the current will change with increased output voltage.

    At 1.25V output, the combined current of this resistor and 180Ω amounts to 10mA.

    At 12V output, an additional 33mA will flow through this resistor. Not ideal but it satisfied the minimum loading requirement of the LM317.
     
  8. doug3460

    Thread Starter Active Member

    Oct 19, 2008
    87
    0
    SgtWookie & elbc1388 - Thanks to you both for the replies. Couple notes.
    SgtWookie wrote:
    I replaced that output cap to 35V for now (largest Tant I have readily available). Since 15V (13.5V\scriptsize_{OUT} is the maximum being tested on the circuit at present, I knew the 25V cap was pushing it but thought it would be okay (13.5V x 2 = 27V). I will increase all caps in the final to your recommended ranges. BTW, the electolytic cap is 50V.
    elbc1388 wrote:
    I was aware. The actual measured difference in the circuit as set-up on my board is 1.54V for either the 12V or 15V supply (for the 12V line from the ATX, there's 11.77V at the board-in & 10.23V at the 317 OUT pin; for the 15V Lambda, it's 15.04V and 13.50V respectively). The "capped" range I referred to (the 680Ω & 2kVR) dropped the V\scriptsize_{OUT} to 9V something, regardless of the supply. Using your example, logically, there should have been an increase in the output when I switched to the 15V source (15V - 2.4V = 12.6V), which didn't happen.

    I tried increasing R1 to 180Ω without any additional resistors. The result was VR was less sensitive (less "finicky") but the overall sweep range was only slightly increased (maybe by 10°). Adding 360Ω parallel as you suggested simply set the VR sweep back to as if I just had R1 as 120Ω. Additionally, as I noted earlier, the current will be limited to 1A max (using a 317 in series with the one for the voltage).
    So, unfortuneately, the problem remains. Of the 270° rotation for the VR (i.e., R2), I'm hitting V\scriptsize_{OUTMAX} (based on limit imposed by V\scriptsize_{IN}) at about the 210° rotation. In other terms (more for my clarification, lol ;)), if VR is set to minimum, the dial is at the 7 o'clock position. When rotated to about 2:30 o'clock, the near maximum out the supply & circuit can produce is reached. Only the final few mV adjustments to the absolute max are available from the 2:30 to 5 o'clock positions. That leaves about 60° of basically useless rotation. Adjustments between 7 & 10:30 o'clock positions are very "finnicky" or so sensitive that it's problematic.

    Couple other notes.
    Sarge, I cannot duplicate your math! I'm using:

    V\scriptsize_{OUT}=1.25V(1+\small\frac{R2}{R1})

    Is this wrong?

    With R1 = 120Ω, R2 = 2kΩ, I get max = 22.08V. Where'd the extra .3 come from in your samples? Just trying to make sure I'm not missing something (which, based on past experience, would be quite the norm for me! :D)
    I would prefer to keep only one knob on the panel for voltage adjustment so I don't have to re-face the panel, but I will go to the coarse/fine arrangement if that will fix this problem.

    One final thought: I have no real load on the V\scriptsize{OUT} on the breadboard. I have a wire to connect to my DVM and a 1kΩ resistor connected to a cheap LED so I have a visual reference. Is that the problem - no load?

    I'm off tonight, so am going to go pick-up some components today (1k pot, etc.). I will continue to try to modify this to get the linear sweep I want.

    As always, thanks very much the time & assistance.
     
  9. eblc1388

    Senior Member

    Nov 28, 2008
    1,542
    102
    To reduce the upper end of the voltage output value of LM317, one can add a resistor(R5) in parallel with the center terminal of the VR.

    The result is shown as the red trace in the image, which now has a reduced max. voltage output from 15.4V down to 13.6V. The blue trace is the 180Ω & 2KΩ VR without this R5, plotted as reference.

    You can use smaller value for this R5 and the LM317 max. V_out will then reduces more say to 11V or less. e.g. R5=10K for 13V and R5=5K6 for 11.5V.

    [​IMG]
     
  10. doug3460

    Thread Starter Active Member

    Oct 19, 2008
    87
    0
    eblc1388 -

    Thank you for the graph & option to lower the maximum voltage out. I will find a use for that info sometime. However, I don't want to reduce the voltage range, in fact, I want as much as the circuit will deliver from whatever V\scriptsize_{IN} I apply (within the limits of the 317 requirements).

    The problem is the rotation of the VR (i.e., R2) doesn't sweep from stop to stop in regard to V\scriptsize_{OUT}. It's too sensitive in the lower ranges & too quick to reach the maximum out.

    Maybe I'm not grasping how it's supposed to work. Intuitively, if I rotate a linear pot 25 degrees, then I would expect the output to be 25% higher than it was. So if the pot is in the off position, I would expect no voltage; 1/2 way would be 50%; etc.. But that's not what is happening. I'm hitting 50% of the out put at about 25% rotation & 100% at about 65% rotation.

    I have to wonder if the output I'm seeing is the normal for these simple circuits. I have looked at dozens & dozens of schematics that show the 317 with a 240 ohm resistor & 5k pot. While shopping today, I looked at the schematic/owner manual for a commercial PS they had on the shelf. It's using the 317 set up with a 240 & 5k. But I tried that combination for R1 & R2 after the 120 & 2k didn't get the result I wanted & I still had the same problem. I'm wondering if more complex circuitry is required.

    Anyway, thanks again for explaining & graphing the output if I put a resistor on the wiper. I picked up a 1k pot today, so sometime this evening I'll try it. One can only hope it improves! ;)
     
  11. eblc1388

    Senior Member

    Nov 28, 2008
    1,542
    102
    Please do a simple test to confirm that the 2KΩ VR you have got is really linear as it should.

    You can do that by noting every 30° rotation against resistance measured. No point go further if the POT is not linear.

    You can also input the LM317 voltage output relationship into a spreadsheet and see the actual result instantly once the R1 or VR value has been changed.
     
  12. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    You're forgetting to add Iadj x R2 to your result. Iadj is typically 50uA, but can be as high as 100uA and still be within manufacturer's specifications.

    The lower R1's value is, the less effect Iadj has on the output voltage, since it's relatively small compared to R1's current.
     
    Last edited: May 5, 2009
  13. doug3460

    Thread Starter Active Member

    Oct 19, 2008
    87
    0
    elbc1388 - As I noted in the original post, I confirmed all the pots are linear (both by case markings & by connecting/testing them with my DVM). I had thought about graphing the output as you suggest & I may still put a spreadsheet together for it. It's a good idea (I process better visually anyway ;)).

    Sarge - lol, knew I'd missed something. I had read somewhere that the last part of that equation was usually not critical so I got in the habit of dropping it. Then I forgot it. Darn. :p

    I picked up a dual gang linear pot (1kΩ/500Ω) yesteday, so gonna try it. Got side tracked making knobs for it because they didn't have any (remember I shop surplus, so while they have a ton of stuff, it's not like ordering from digi-key or mouser!). Anyway, knobs are finished, so going to wire it up in a bit & see how it goes. Also, worked out a series/parallel resistor set to drop the 500Ω to 100Ω (i.e., 120Ω + (10Ω ll 10Ω) if needed.

    As always, thanks for the help!
     
  14. doug3460

    Thread Starter Active Member

    Oct 19, 2008
    87
    0
    Well, it's been a bit to get back on this, but I have made some progress. The addition of the multigang potentiometer (1kΩ & 500Ω) smoothed things to a much more manageable level (read that, at least now I have some actual control over the freakin' thing!) However...:rolleyes:

    Please take a look the attached graphs. Sorry it's in Word, but I don't know how to export the charts as BMP images to just embed them in my post. Anyway, my questions:

    I thought the output would be the sum of two potentiometers (connected in series). The charts show that's not true. There appears to be a ratio of some sort, with one pot contributing more than the other. Of course the overall output is limited by V\scriptsize_{IN}. Which brings me to my next question:


    The actual output is not really very close to the predicted output based on the formula for the LM317. I realize there is a voltage drop in the LM317 which will limit the output based on supply. Is the remaining error attributable to variances in component quality, the other resistor, capacitors & diodes in the circuit? Is the error one that would be considered significant?

    Finally, based on my experience in this project so far, I'm beginning to wonder if the regulators (so far there are 4: two LM317s (one for current, one for voltage), a 7805 for panel current level indicators & a 7809 for the LED Volt Display) are going to be driving the transformer size up significantly. If each regulator drops between 1.5V & 3V, that's a 12V (safe side) buffer I'd need. There has to be some additional voltage used in the remainder of the circuits, although I suspect the overall impact is less. Anyway, going with an additional 3 volts for comfort, that's 15V total just to make the circuit work. If I desire an output of 0 - 20V, 1A, then I'd need 35V off the transformer secondary. That's getting close to the max the regulators can handle. Plus, it seems to me as if there will be a lot of wasted power.I have large heat sinks ready, but if I understand correctly P = (Volts - Volts used) * Current. (35V - 15V) * 1A = 20 watts! Ouch!
    My first stereo didn't crank that much & this isn't going in to making music, just heat!:(

    Any thoughts?
     
  15. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    One way to do it:
    1) Press Ctrl+PrintScreen or Alt+PrintScreen to capture the screen image to a buffer.
    2) Start MS Paint.
    3) Press Ctrl+V to paste the screen image.
    4) Crop to suit.
    5) Save in .PNG format. I prefer .PNG format for this forum, since .BMP files are very large, and .JPG files are too "lossy" for line drawing and text images. PNG files are relatively compact and sharp.

    [​IMG]

    [​IMG]

    It's going to be the voltage across the pot(s), which is controlled by the current flowing through R1, and also to some extent by Iadj flowing from the ADJ pin (nominally 50uA).

    Note that your garden-variety linear pots aren't precisely linear. If you want a really linear pot, you can spend somewhere between $10 and $80 for a 10-turn precision potentiometer. Your ganged 1k and 500 Ohm pots are probably not precisely aligned with each other, which will make them seem even more non-linear, particularly towards either end of the pots' travel. Your charts show that this assertion is true.

    What are you reading for your Vref? Put the DMM's negative lead on the LM317's ADJ terminal, and the positive lead on the OUT terminal, and set the pot to midrange.

    OK, wait a minute.

    If you are using an LM317 in current regulation mode, it will drop about 3v across itself.
    If you are using an LM317 in voltage regulation mode, it will drop at least 1.7v across itself, but more as load current increases; perhaps as much as 2.5v.

    If you are planning on using two LM317's in series, one as a current limiter and one as a voltage regulator, you'll need a filtered unregulated supply that's about 6v more than the desired output voltage. That's it.

    You should probably stick with a transformer rated for 24vac at the current you desire. With no load on the unregulated side of the bridge rectifier, you'll be reading around 33v. As load increases, the unregulated side will decrease in voltage.

    Linear regulators dissipate power as heat. That's why new designs have gone to synchronous rectification, switching regulators and buck/boost technology. They're much more complex than a simple linear regulator, but far more efficient; some designs are better than 94% efficient in their intended applications.

    On the other hand, if you're powering a 5v load at 1A with your linear supply, you'll be dissipating 5w in the load, and (24v-5v)x1A = 19W in your regulators for a rather dismal 20.8% efficiency rating. It's just one of those nasty facts of life.
     
  16. doug3460

    Thread Starter Active Member

    Oct 19, 2008
    87
    0
    Thanks Sarge for the help! I'll do the check with the DMM as you indicated.

    BTW, the data for the graphs (which I'll attempt to post later) is not real accurate because I had to guesstimate the knob position - 9, 12 & 3 o'clock weren't too bad because the potentiometer case had marks I could reference. The in-between positions were best guess. Anyway, it gave me ballpark numbers.
     
  17. doug3460

    Thread Starter Active Member

    Oct 19, 2008
    87
    0
    I'm a bit frustrated about the adjustment pots. According to my calculations, using the dual gang pot I obtained (1kΩ & 500Ω independently adjustable) for R2 with a 120Ω R1 is going to limit the LM317 below my target level. The attached table shows the problem.


    If R1 is changed to 100Ω I can get the desired 20V max output, but then I will need to correct for the difference in load for the LM317 (although on the breadboard it seems to have negligible affect). Problem is I don't have any supply higher than 15V to check the circuit.

    Suggestions?
     
  18. David Bridgen

    Senior Member

    Feb 10, 2005
    278
    0
    Doug,

    Are you determined to achieve an acceptable solution just by juggling resistors, or will you consider one which uses a few more components - including an op-amp?
     
  19. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    Doug,
    Don't get too hung up on the pots vs R1. Try to keep in mind that this is an interim project; it's not going to be the end-all, be-all power supply; it's just going to "get you through" until you learn how to build something better.

    Even if it only has an adjustment range of 1.3v to around 15v, that will likely be plenty for most (if not all) hobbyist-type circuits.

    Don't let your desire for perfection trip you up at this point, or you'll never get the project completed, so that you can progress to the next project.
     
  20. doug3460

    Thread Starter Active Member

    Oct 19, 2008
    87
    0
    David Bridgen wrote:
    Actually, I had planned on incorporating an op-amp to control the negative rail (schematic/plans/circuits from Laurier Gendron's site, Bill Bowden's &, of course, AAC :D). I am open to ideas, but read on...

    Sgt Wookie wrote:
    Well said & perfect timing. After having some exploratory medical work yesterday, I decided I needed to quit screwing around with this & just put it together with what I have, lol.:rolleyes:

    OT & BTW (this references a project from last fall). I never did thank you Sarge for the idea of using a LM317 in current limit mode on the motorcycle's LEDs. Brilliant solution to the fluctuating voltage. Wired it onto a mini-board with a barrier strip for the line connections. Works perfect!
     
Loading...