LM317T Adjustable Voltage Regulator

Discussion in 'The Projects Forum' started by tracecom, Sep 11, 2011.

  1. tracecom

    Thread Starter AAC Fanatic!

    Apr 16, 2010
    3,869
    1,393
    Attached is a schematic for a step adjustable voltage regulator using a LM317T. There are two parallel inputs and two parallel outputs. The idea is to enable the desired voltage by selecting the appropriate resistor with a shorting clip. The voltage choices are 3.3v, 5v, 6v, 9v, and 12v. The LED is just to show that there is voltage out; the current limiting resistor value will be selected to provide operation at 12v with the expectation that the LED will light more dimly at lower voltages.

    I have not prototyped this circuit and would appreciate comments and corrections.
     
    Last edited: Sep 11, 2011
  2. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    Here's a (more or less) constant current circuit for your LED (see the attached).

    V(in) is shown as ranging from 3.3v to 23v, and the LED current extremes are about 6.66mA to 11.12mA. Certainly not perfect, but it'll be more of a consistent intensity over any voltage range you select.

    The advantage of using this kind of constant current circuit is that you can increase the values of your resistive divider, as the 6.66mA minimum contributes to your minimum required LM317 output current to guarantee regulation; 10mA. Your resistive divider circuit now needs to have >= 3.34mA to provide the guaranteed regulation.

    Your worst case will be 1.2v/3.34mA = 352.94 Ohms; the extreme case will be 1.3v/3.34mA = 389.2 Ohms, with nominal being 1.25/3.34mA =374.2 Ohms.
    This is because Vref (the voltage from OUT to ADJ) can vary anywhere from 1.2v to 1.3v and still be within manufacturers' specifications, but the nominal value is 1.25v.

    Since you can now use higher values for R1 (up to 352.9 Ohms) you have more of a selection of resistors that you can use. You may also wish to add a pot to provide a variable output from ~1.25v to Vin-1.7v.

    Right now, the resistor values you have for R2x are all non-standard. Now that you have more leeway with R1, you can calculate a value for it that will allow you to use mostly standard value resistors for R2x.
     
    tracecom likes this.
  3. tracecom

    Thread Starter AAC Fanatic!

    Apr 16, 2010
    3,869
    1,393
    In the original circuit and in the improved LED circuit, what will the output voltage do if no R2x is selected, i.e., the user forgets the shorting clip?
     
  4. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    With no R2x, Vout ~=Vin - 1.7v
     
  5. John P

    AAC Fanatic!

    Oct 14, 2008
    1,632
    224
    I was going to make that point. Suppose the user has some load connected to the supply at 3.3V, and then says "Ho hum, think I'll try 5V" and pulls the clip off? The output will shoot up to nearly the input voltage (higher than 12, very likely) before the user puts the clip back.

    It might be better to do this in some way that switches between output levels simply as a step, with no possibility of going to the maximum in between. Now how could that work? I don't have an immediate answer.
     
  6. tracecom

    Thread Starter AAC Fanatic!

    Apr 16, 2010
    3,869
    1,393
    And that could create a problem for the LED as well as whatever the regulator was powering.

    I wanted something simple (and cheap), and the simplest solution is to warn the user to always remove input power to the regulator before selecting the output voltage. But users (including me) don't always follow the instructions, do they?

    Similar circuits that have only two voltages to select from use a SPDT slide switch, but even that allows for the possibility that the user could leave it in an intermediate (unconnected) position. And even properly operated, I bet there is a short duration voltage spike when the switch is operated.
     
  7. iONic

    AAC Fanatic!

    Nov 16, 2007
    1,420
    68
    Is it possible to use an LED for each output voltage R22a, b, c, d... so that the user would know what voltage was being used?
     
  8. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    The LED would be OK if you used the constant current circuit I posted earlier.
    A rotary switch could be used for the selection of the resistors.
     
  9. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    If Vref = 1.25v, you could use 250 Ohms for R1, so current flow would be 5mA through the rest of the R2x resistors. That makes it fairly easy to select standard resistor values, as you'd get an increase of 0.5v on the output for every 100 Ohms.

    Your lowest output voltage would be Vref, which as was mentioned before is 1.2v to 1.3v, nominally 1.25v.
     
Loading...