Shop OBEX P1 Docs P2 Docs Learn Events
LM317 Dual ADJ with single POT? — Parallax Forums

LM317 Dual ADJ with single POT?

JBWolfJBWolf Posts: 405
edited 2013-12-12 18:32 in General Discussion
Just a quick question I'd like to check on before trying out....
I use the LM317 regulators alot, typically with a potentiometer between the ADJ and OUT pin to set current.
This time I need to use two LM317's to power two different sets of lights... what I would like to do is use a single potentiometer so that as one is dimmed, the other gets brighter (both could never be full brightness at same time).
The way I was thinking this could be done is with a center tap potentiometer... each LM317 OUT pin connected to the opposite ends of the pot, and both ADJ pins sharing the center tap.
This would create the exact resistance scenario desired to dim one into the other.
Although... I'm afraid they would interfere with each other or worse, parallel the resistance and send all current to a single output.
I' m expecting I'll need a dual output pot... just curious how this configuration would result.

Here is a wiring diagram to illustrate:
I have left out all other components such as cap's, diodes and limit resistors for when pot hits 0.
Dual LM317.jpg
928 x 919 - 667K

Comments

  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2013-12-10 09:46
    When used as a current regulator, the load gets connected to the '317's ADJ pin, not the OUT pin.

    Why not use two ganged pots? And make sure to get ones that can handle all of the lamp current. For that reason, it may be better to use the '317s in voltage-regulation mode, since the lamp current would not need to run through the pots.

    -Phil
  • CuriousOneCuriousOne Posts: 931
    edited 2013-12-10 11:38
    Take look at attachment. This should works. But please, choose resistor values according to datasheet. The 1K values are given just for reference there.
    694 x 444 - 16K
  • Beau SchwabeBeau Schwabe Posts: 6,566
    edited 2013-12-10 12:06
    It's in the application notes on page 16 of the PDF

    http://physics.gac.edu/~huber/classes/phy270/SpecSheets/LM317.pdf
  • CuriousOneCuriousOne Posts: 931
    edited 2013-12-10 12:09
    It won't work like you've suggested, because user wants proportional control - while one increases, other decreases. The schematics you've provided will increase or decrease both regulators at same time, not vice-versa.
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2013-12-10 12:17
    CuriousOne,

    I think the circuit you propose will work. However, the adjustment current from both regulators will pass through R2, which may be an issue -- I'm just not sure. I'm also not sure that R2 is even necessary. Even with the adjustment pin grounded, the output will be 1.2V.

    -Phil
  • Beau SchwabeBeau Schwabe Posts: 6,566
    edited 2013-12-10 12:17
    CuriousOne,

    Oh sorry missed that part.... In that case In the schematic that you provided I would remove R2 so that it is NOT common to both regulators, but instead place a separate limiting series resistor on each "outside" leg of the pot
  • kwinnkwinn Posts: 8,697
    edited 2013-12-10 14:25
    CuriousOne,

    I think the circuit you propose will work. However, the adjustment current from both regulators will pass through R2, which may be an issue -- I'm just not sure. I'm also not sure that R2 is even necessary. Even with the adjustment pin grounded, the output will be 1.2V.

    -Phil
    R2 is not needed. The minimum output without R2 will be 1.2V and the maximum will depend on the resistor values chosen and of course the input voltage. The voltage adjustment will be linear with respect to the pot position.
  • JBWolfJBWolf Posts: 405
    edited 2013-12-10 17:46
    Beau: Nice find! most thorough LM317 sheet i have seen... I usually get mine from digikey where I purchase most components: http://www.fairchildsemi.com/ds/LM/LM317.pdf
    Seems odd though that the pot would connect to gnd, they made the part so I'll take their word for it... but looking at it, wouldnt that create a short?
    Doing the math: 1k + 129 = 1129ohm @ max pot resistance, or 129ohm @ minimum pot resistance --> (1.25vref / 1129 = 1ma) or (1.25vref / 129 = 9.7ma)) says between 1ma and 10ma would ground out.
    Unfortunately that schematic is for an identical array (all outputs will be the same), which is not what I need to accomplish.

    I just realized I mislabeled the 317 pin assignments... from right to left they are IN - OUT - ADJ on a TO220. (I mislabeled them IN - ADJ - OUT)
    I have been using it for almost a decade with a pot & limit resistor between adj & out, with the ADJ going to the circuit output... no ground used on the pot. an example of this can be seen by googling "DDL driver"
    This provides a very precise and stable; current limited, voltage regulated output (filter caps necessary). I have used it as a continuous power source on everything from custom power supply's to LED's and even high amperage laser diodes.
    This is the first time I have needed to control two outputs with a single pot though, and to make it more difficult, their outputs need to be inversely proportional.
    I do not see an application example for this in the datasheets, not even the very in-depth one you provided beau.
    seems likely I will need a dual centertap pot (1 adjustment, 2 isolated terminal sets... like a DPDT switch)

    Curious: Wouldnt R1 & R2 be excluded by the circuit as R3 or R4 is the only path between each ADJ? I have never used a GND in the 317 vref to set a current... but I do see this in application examples.
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2013-12-10 19:31
    JBWolf wrote:
    This provides a very precise and stable; current limited, voltage regulated output (filter caps necessary).
    Without a ground reference in the ADJ leg, the '317 regulates current but not voltage. (The LM317 maintains a constant 1.2V differential between its OUT and ADJ pins. And that's all it does.) The problem with the current-regulation configuration in your app is that all of the lamp current has to pass through the pot, and most pots are not rated for high current. That's one reason for selecting the voltage-regulation configuration instead, although it may not give you the complementary current ratios you need with incandescent lamps, since they are non-Ohmic.

    -Phil
  • CuriousOneCuriousOne Posts: 931
    edited 2013-12-10 20:31
    The absence of R2 will cause ADJ pin shorted to ground in edge positions of pot, which is not advisable.
  • kwinnkwinn Posts: 8,697
    edited 2013-12-10 20:57
    The circuit in post 3 will work without R2 as long as the wiper is connected to ground and R3/R4 are selected to provide reasonable currents.

    For the values in the post 3 schematic the current from out to adj would be 1.2V / 1K = 1.2mA for both regulators.

    If the wiper of R1 is at the left most position the output of the left regulator would be 1.2V since R3 is connected to ground.

    The output of the right regulator would be 1.2V + (1.2mA x 1K) = 2.4V

    If the wiper of R1 was centred both regulators would output 1.2V + (1.2mA x 0.5K) = 1.8V.

    The major concern for this circuit would be to select R3/R4 values that provide a low enough current that the pot is not damaged, but high enough for a stable output voltage. Something in the range of 240 to 470 ohms should work.

    PS CuriousOne - Yes the adj pins will be shorted to ground at the edge positions but this is not a problem since the currents are fixed by the values of R3/R4. They produce a constant current between the out and adj pins, and that current through the resistance between the end of the pot and the grounded pot wiper determine the output voltage.
  • JBWolfJBWolf Posts: 405
    edited 2013-12-11 12:41
    Hi Phil... im gonna have to question that. I can wire it exactly as mentioned (without gnd feedback to 317), run 12vdc through it and power a 10v load with a current set by the pot.
    I find the max output voltage is roughly 1.5v minus the input voltage, it stays the same no matter what current i set with the pot.
    I always took it as the regulator is using the 1.25v for internal feedback and another .25v is lost from inefficiency margin.

    I notice there are many ways to use the 317, some are voltage limited, some are voltage regulated... my example has always worked as voltage regulated, for example I can power a single red led from a 25v source, or a 12v fan from the exact same circuit (current is set with pot: 30ma for led, 150ma for fan).
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2013-12-11 13:19
    JBWolf wrote:
    I notice there are many ways to use the 317, some are voltage limited, some are voltage regulated... my example has always worked as voltage regulated, for example I can power a single red led from a 25v source, or a 12v fan from the exact same circuit (current is set with pot: 30ma for led, 150ma for fan).
    You call it "voltage regulated," but the examples you cite are current regulation. Without a ground reference, there is no divider to provide voltage feedback for voltage regulation. To illustrate my point, try this with your circuit:

    1. Set the current to, say, 30 mA.
    2. Power a 510-ohm resistor with it and measure the voltage across the resistor.
    3. Power a 270-ohm resistor with it and measure that voltage.

    If the '317 were regulating voltage, the two would be the same. But they will not be because the currents are the same, and Ohm's law says ... Well, you get the idea.

    -Phil
  • JBWolfJBWolf Posts: 405
    edited 2013-12-11 16:09
    I might check that out, learning alot and good experiments to learn more from. I used to check current by using a 1ohm resistor in series with 5 silicon diodes to simulate a load... the voltage always stayed fixed. I have a nice MM now that can withstand that kind of output.
    What I do know for sure... the higher power laser diodes I use do not have a steady voltage consumption, rather the voltage consumption rises along with current.
    If the voltage were to always be fixed, the diodes would not work as current gets increased from 50ma to over 1A... the voltage requirement rises over 2v from threshold to max. And the diode would burn out if the voltage were too high or low in relation to current... laser diodes are very sensitive.

    Can you shed light on why I can use the exact same circuit with 25v in to power anything from a very low voltage led (around 2v?) to a 12v fan? I manually set the current output with a pot, but never have to worry about the voltage... only heat dissapation.
    Both devices should burn out if the voltage were too high.
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2013-12-11 16:53
    JBWolf wrote:
    Can you shed light on why I can use the exact same circuit with 25v in to power anything from a very low voltage led (around 2v?) to a 12v fan? I manually set the current output with a pot, but never have to worry about the voltage...

    In cases where current is a static, monotonically increasing function of voltage, fixing either one will keep the other one constant as long as the load itself doesn't change. But under cases of changing load, you have to decide which to regulate; voltage or current; you can't do both simultaneously. Your LM317 circuit topology regulates current. If the output voltage doesn't change either, it's only because the load doesn't change. In like manner, if the ADJ pin connects to a voltage divider from the output to ground, the LM317 will regulate the voltage on its output pin by virtue of keeping the differential between OUT and ADJ fixed at 1.2V. In this case the voltage will stay fixed, but the current will change if the load changes.

    IOW, what you see as "voltage regulation" is merely the inherent consequence of regulating the current to a static load. It's not something the regulator is doing explicitly.

    -Phil
  • JBWolfJBWolf Posts: 405
    edited 2013-12-12 09:58
    hmm, guess I've been thinking about it backwards lol.
    I have always thought of it as 'voltage regulated, current limited' because the current is permanently set or 'limited' to one value... and that the voltage automatically gets 'regulated' to whatever the load uses... assumed it could sense what the load uses, sort of like the float switch in a toilet's resivoir tank.
  • jmgjmg Posts: 15,173
    edited 2013-12-12 18:32
    JBWolf wrote: »
    The way I was thinking this could be done is with a center tap potentiometer...

    It can, but using the circuit in #3, starting with R2=0, and usually R3=R4=120 ohms

    Some things to note on LM317
    * It has a minimum load current requirement for regulation, hence the common 120 ohm upper bias values.
    * If using the circuit of #3, you will need a low value pot (1.08k for 12V max Vo, 10mA load )
    Because 1.08k is not common, you can trade some minimum voltage, for the upper end.
    eg R2 = 40 ohms, (10mA load current*2) and a 1k (exactly) pot will adjust to 12V
    * Beware of wiper noise, and an momentary open wiper will spike the voltage to the maximum of Vin-Vdropout.
    Some largish capacitors on the REF pins, could mitigate this effect.

    * Circuit #3 will give complementary tracking voltage output, load current is not defined by this circuit.

    * You can use LM317 in Current mode, where you vary the upper divider resistor. ( Io = 1.2v/Ru )
    This has no common terminals, so a tandem POT would be needed.
    Current transfer is inverse, unlike Voltage above which is linear.
    Current Mode has the load current thru the pot, so that's likely a wire-wound pot..

    If you want easy adjust of Current, it might be better to find a regulator or driver with proper Current-Set pins.
Sign In or Register to comment.