LM338 Regulator - Voltage And Current Adjustment.

Discussion in 'The Projects Forum' started by vol_, Apr 5, 2016.

  1. vol_

    Thread Starter Member

    Dec 2, 2015
    93
    3
    Hello everyone!

    Various misfortunes drive me in a state where i need to construct a LM338 voltage regulator.

    I attach the schematic drawing. This is a combination of two schematics found on the internet. I also attached these schematics (solar battery charger and variable dc power supply).

    What I want is not only to set the output voltage, but also set the current limit of the LM338s' output. This is because i want to use it as a power supply but also as a battery charger for small amperage batteries, like 900mAh @ 3.7V. In this perspective, i need a charging current of 90mA.

    So in my schematic i modified the variable dc power supply adding the bc547 transistor (from the solar battery charger), which sets the current limit. When the output current rises the R3 and POT2 parallel combination set the value of the output current that will turn the transistor on, which draws current from LM338 ADJ pin, and so the LM338 turns off.

    My question is about the values of R3 and POT2. I choose them close to the R2 and POT1 values. Is this ok?
    Is there anything wrong with the schematic?

    I also attach a very good LM338 datasheet for Texas Instruments.

    Thanks!
     
  2. Dodgydave

    Distinguished Member

    Jun 22, 2012
    4,979
    744
    Looking at the top circuit,,, R3 sets the output voltage with pot1, the current limit is set by pot 2, when 0.7v is across it, the transistor turns on and pulls the output voltage down, so if you want 90ma, thats 7.8ohms.


    Also your drawing has the transistor shorted out with the ground, unless you made a mistake..
     
  3. vol_

    Thread Starter Member

    Dec 2, 2015
    93
    3
    No thats not a mistake. The transistors emitter is shorted out to the input ground in every schematic i saw for the LM338. Why do you think is wrong?

    I got to go now, I ll check these later.

    I was supporting liverpool some years before. I now only have the liver bird on my left shoulder. Still like it though. Whatever..

    Cheers mate!
     
  4. Colin55

    Member

    Aug 27, 2015
    191
    19
    Your circuit will not work. For current limiting you only need 1 resistor.
     
  5. vol_

    Thread Starter Member

    Dec 2, 2015
    93
    3
    Need one resistor? Where?
    What about for adjustable current limiting?
     
  6. Dodgydave

    Distinguished Member

    Jun 22, 2012
    4,979
    744
    This is like the circuit you need to draw, R1 sets the current, the pot sets the voltage.

    circuit
     
    vol_ likes this.
  7. AnalogKid

    Distinguished Member

    Aug 1, 2013
    4,532
    1,249
    The GND symbol on the right next to PAD4 is incorrect. It does create a short circuit around the T1 base resistors. The intent of this circuit is that PAD4 (and the battery return) are *not* connected to GND. All of the battery charging current returns through R3, POT2, and the T1 base-emitter junction. As noted above, this means that the resistors have unusually low values and high currents. The pot selection will be difficult.

    You combined the two schematics correctly (except for the GND symbol), but that's not the problem. The battery charger schematic you used has low-value fixed resistors for a reason. If POT2 is 10 ohms and R3 is 20 ohms (per the original schematic) the minimum charging current will be 60 mA. As you turn down the pot to increase the charging current, you risk burning up the pot. This is a common problem with this type of current limiter - all of the output current goes through the resistor you have to vary to get adjustable current limiting. The same is true for DD's circuit in post #6, and the vast majority of the other circuits on that page. The alternative is the current limiting in a lab or bench supply, which buffers the voltage across a fixed shunt resistor with an opamp, and then compares that output to a low-power adjustable reference voltage.

    Colin - as always, thanks for that very helpful response.

    ak
     
  8. vol_

    Thread Starter Member

    Dec 2, 2015
    93
    3
    [​IMG]

    Can someone please explain me why R4 is there for? Is it just to provide current to the base? And the current provided at the base is ( R1 // R4 ) x 0.7V ?
    So R4 has nothing to do with the charging current and R1 sets the charging current equal to Imax= 0.7V / 0.56R ?

    And what the C3 capacitor is used for? Connected for base to positive rail? Is it there to give a time lug between the transistor and the 317?
     
  9. Colin55

    Member

    Aug 27, 2015
    191
    19
    R4 is called a safety resistor.
    C3 is to prevent 1MHz osc.
     
  10. vol_

    Thread Starter Member

    Dec 2, 2015
    93
    3
    Safety for what?

    Is this right?

    Thanks everyone!
     
  11. AnalogKid

    Distinguished Member

    Aug 1, 2013
    4,532
    1,249
    R4 limits the base current in T1, and can work to suppress oscillations in the control loop. Your equation for the base current is incorrect because R1 and R4 are not directly in parallel. But you are correct in that R4 does not help in setting the constant current value, and your equation for Imax is correct. If you look more closely, you will see that C3 is connected directly to the output return. This part is required by the LM317, again to help with stability. It does not create any time lag.

    ak
     
    vol_ likes this.
  12. crutschow

    Expert

    Mar 14, 2008
    13,002
    3,232
    R4 is likely there to limit the momentary short circuit base current (primarily from C3) when the output is suddenly shorted. It's not needed for normal operation.

    C3 is just a decoupling capacitor across the plus and minus outputs to improve the output transient response.

    If you want a wide range of current limit values from maximum down to 90 mA then you will likely have to switch different values of R1 into the circuit, to avoid excess power dissipation in the resistor at higher currents.
    What's the maximum current limit you want?
     
    vol_ likes this.
  13. vol_

    Thread Starter Member

    Dec 2, 2015
    93
    3
    I would like a 50mA - 4.5A regulator. But as i see it gets complicated. I will need a rotary switch and various values of R1..
     
  14. vol_

    Thread Starter Member

    Dec 2, 2015
    93
    3
    Also found this schematic. I like that the current adjustment pot is not connect on the charging current path, but i cant understand why the INPUT pin is connected with the adjustment pin, while the LM317 has a reference voltage between its OUT and adjustment pin.. Is this a mistake by the author?
     
  15. Colin55

    Member

    Aug 27, 2015
    191
    19
    The circuit above is mine.

    Why don't you try these circuits instead of asking so many irrelevant questions.
    Anything above 1 amp is getting into complex territory.
     
  16. Colin55

    Member

    Aug 27, 2015
    191
    19
    "but i cant see why the input is connected with the adjustment pin"

    These circuits are way over your head.

    Just buy a bench power supply.
     
  17. vol_

    Thread Starter Member

    Dec 2, 2015
    93
    3
    Yes they are. But I m trying to understand stuff, with the minor knowledge i got. An answer like "no the author is not wrong" it would be perfect for me.

    No I wont. I will built one. Tomorrow i ll start experimenting on the circuits i ll choose tonight.

    Thanks anyway.
     
  18. vol_

    Thread Starter Member

    Dec 2, 2015
    93
    3
    I ll also try your circuit, and maybe make it mine.. I talk about its physical product.
     
  19. crutschow

    Expert

    Mar 14, 2008
    13,002
    3,232
    Since the circuit's author doesn't want to answer your questions, I'll take a stab at it.
    Yes, I also don't understand why he used a separate 12V zener reference voltage to adjust the output voltage when the LM317 has a built-in reference. :confused: Seems unnecessary.

    Also the current sense resistor is in series with the charging current path, don't see why you think otherwise.

    It's the same current limit scheme you posted in post #8 except it adds a pot to provide some adjustment.

    Note that the 1W, 6.8 ohm current sense resistor shown is limited to a maximum current of 0.38A before the resistor overheats, with a minimum current adjustment of about 100mA.
     
  20. Colin55

    Member

    Aug 27, 2015
    191
    19
    "Yes, I also don't understand why he used a separate 12V zener reference voltage to adjust the output voltage when the LM317 has a built-in reference. :confused: Seems unnecessary."

    a 12v zener is 20 cents.

    You are so smart, design the circuit without the 12v zener.
     
Loading...