Home » Battery Charger » How to Make an Automatic 12 volt Battery Charger Circuit Using IC LM 338

Have a Question?

Please feel free to ask any circuit related question and get a quick solution from me.

How to Make an Automatic 12 volt Battery Charger Circuit Using IC LM 338

The IC LM338 is an outstanding device which can be used for
unlimited number of potential electronic circuit applications. Basically the
main function of this IC is voltage control and can also be wired for
controlling currents through some simple modifications. Battery charger circuit
applications are ideally suited with this IC and we are going to study one
example circuits for making a 12 volt automatic battery charger circuit using
the IC LM338.

Referring to the circuit diagram we see that the entire circuit is
wired around the IC LM301, which forms the control circuit for executing the
trip off actions. 
The IC LM338 is configured as the current controller and as
the circuit breaker module. The whole operation can be analyzed trough the
following points:
The IC LM 301 is wired as a comparator with its non
inverting input clamped to a fixed reference point derived from a potential
divider network made from R2 and R3.
The potential acquired from the junction of R3 and R4 is
used for setting the output voltage of the IC LM338 to a level that’s a shade
higher than the required charging voltage, to about 14 volts.
This voltage is fed to the battery under charger via the
resistor R6 which is included here in the form of a current sensor.
The 500 Ohm resistor connected across the input and the
output pins of the IC LM338 makes sure that even after the circuit is
automatically switched OFF, the battery is trickle charged as long as it
remains connected to the circuit output.
The start button is used to initiate the charging process
after a partially discharged battery is connected to the output of the circuit.
R6 may be selected appropriately for acquiring different
charging rates depending upon the battery AH.

Circuit Functioning Details (As Explained By +ElectronLover)

” As soon as the connected battery is charged fully, the potential at the inverting input of the opamp becomes higher than the set voltage at non-inverting input of the IC. This instantly switches the output of the opamp to logic low.”


According to me:
V+ = VCC – 74mV
V- = VCC – Icharging x R6
VCC= Voltage on pin 7 of Opamp.
When The battery charges fully Icharging reduces. V- become greater than V+, output of the Opamp goes low, Turning on the PNP and LED.
Also,
R4 gets a ground connection through the diode. R4 becomes parallel to R1 reducing the effective resistance seen from the pin ADJ of LM338 to GND. 
Vout(LM338) = 1.2+1.2xReff/(R2+R3), Reff is the Resistance of pin ADJ to GND.


When the Reff reduces the output of LM338 reduces and inhibit charging.

  

122 Comments

      • It should be dependent on the Ah rating of the battery being charged. Normally the charging current of a Lead Acid battery is 1/10 Ah of the battery. So, if a 48 Ah battery is being charged, the calculation of R6 may be as below:

        Charging current = 48/10 = 4.8 A
        Watt = I^2 * R = (4.8)^2 * 0.2 = 4.608 W
        The closest higher value is 5 W (higher is better)

        It may be mentioned here that the IC can handle maximum 5A.

  1. Hi there I'm Looking all over For a simple diagram for a charging circuit with a variable input from 24 volts to about 80 volts AC to a 12 volt 4 to 6 AH can you please help i looked every where on the internet and so far yours was the closest i could find on what I'm looking for..

  2. k sir. thanks alot.

    then I'm going to store half of this energy to the battery, using a 12V 60Ah battery. So can I use the above circuit to charge a 12V 60Ah battery?.. If not, what r the modifications needed.. please help me on this sir…

    Regards!

  3. its obviously not above 100Ah. it's mostly a 60AH one. But sometimes I'll go for a 40AH one. If so is it not required to put a R6 resistor?.

    Then the above circuit without R6 resistor(S/C) con be used right?..

    Are the other components same as like your above circuit sir?. If I need to draw a current nearly 7-8A to charge the battery?.
    If any modifications needed please explain me sir.

    Regards

  4. If i am using a variable input from a turbine generator ranges from 5V to 15V, how should I use that input to charge the battery using this battery charger? what are the modifications needed?. please guide me on this sir.

    regards!

  5. it cannot be open circuited for sure. so then how the comparator works without R6. if shorted always the inverting input voltage will be high and it outputs logic zero, isn't t sir?
    I was confused sir. please help me on this.

  6. then how lm301A works as a comparator?. according to your explanation above R6 only determines the voltage level of inverting input. so if we remove it how the comparison is done?

  7. "According to me:
    V+ = VCC – 74mV
    V- = VCC – Icharging x R6
    VCC= Voltage on pin 7 of Opamp.
    When The battery charges fully Icharging reduces. V- become greater than V+, output of the Opamp goes low, Turning on the PNP and LED."

    you have mentioned this in your article. According to this R6 is controlling and adjusting the voltage according to the current drawn and making the inverting input high after charging.

    Then without R6 how LM301A operates as a comparator?

    • don't worry about the article details, it was submitted by some other reader.

      pin#2 of the IC detects the battery high level, while pin#3 is fixed with a reference. when pin2 level goes beyond the pin3 level, the circuit latches up and stops any further charging of the battery.

  8. Hi Swagatam,

    Im going to use this circuit to charge 12V, 35A battery by using input voltage, 20v-60V AC , what are the modification i need to do?

    Varuna

  9. hi swagatam

    you sayd that when the pnp is on vout=14V is this true? but when pnp is off Vout=15.9V (V=1.2+1.2(R1/R2+R3)
    so when Reff reduce the voltage charger it change from 15.9 to14?
    tell me if something is wrong
    thank you
    alex

    • Hi Alex,the PNP is only for illuminating the LED, it has no relation with the IC. Please refer to the formula presented in the previous comment by me…..it's according to the datasheet and is correct
      the formula which you have used could be incorrect

    • Hello parashar, yes this circuit will work, you can get 3 to 5 amp output from this charger but for charging a 12V batt you will need to apply a minimum 15V input to the IC

  10. sir i have used 1ohm resistor instead of 0.2,will it make a difference??and i hav kept 12v rechargeble lead acid battery from ups to check the o/p,will it work??please let me know asap

  11. Dear sir im going to make above charger.
    i have following problems please answer
    1.how i can put "still charging" and "charging completed" LED's to above circuit?
    2.R3 230 ohm is not available 220ohm will do or not?
    3.what is the value of R6 , 0.2 means ?

  12. Dear,sir I want to build one IR remote control as design by you for the first time to control remotely my ceiling fan.Can you please help from where I can buy the parts and then to begin?

  13. 7 ampere for battery charger I just need the LM317. whether it can be used as a substitute for LM338. and whether it can be replaced with the LM741 to LM301. thank you 🙂

    I am from INDONESIA.

  14. Dear Sir,

    I assembled this battery charger circuit. It’s my favorite project. I used 0.2 Ohm 5W wire wound resistor for R6. When charging the 12V – 10A or more current battery R6 is increase very hot (can’t touch it) My question is, need replace 10W resistor for R6. However I fixed exhaust fan in the enclosure. Please reply me.

    Thanks & Regards
    Krishantha Karunarathne
    Sri Lanka

    • Dear Krishantha, the resistor can be simply removed if the input supply current is correctly set at 1/10th of the battery AH…alternatively as you have mentioned you can try increasing the wattage of the resistor or include a fan for cooling it.

  15. Dear Sir, Thanks for your reply.

    Supply current 5A @ 15Volts of my circuit. I don't like replaced R6 to 10W resistor. Because space of the PCB decide for 5W resistor. Is that enough 5W resistor when charge 50A battery. However I include a cooling fan for whole of the system.

    Thanks & Regards
    Krishantha Karunarathne
    Sri Lanka

  16. Dear Sir,

    I made this Battery charger circuit using the LM338K IC.

    1. First I use the 15V 3A transformer. When I charge the 10A battery, charging current is about 2.5A.

    2. Then I use the 5A transformer for this circuit, charge the 10A battery (Same condition), charging current is about 2A.

    ** In that case 3A transformer warm up than 5A transformer.

    My questions are,

    why decrease the charging current from 5A transformer than 3A?

    Is it correct operation?

    If charge the 50A battery, can get the maximum out put current about 4A or 5A (use with 5A transformer)?

    Thanks & Regards
    Krishantha

    • Dear Krishantha,

      The R6 would restrict the current to some fixed levels, you can remove it for increasing the current output, however the safe and correct charging rate for any lead acid battery should be 1/10th of its, therefore if your battery is 10AH then you must charge it using a 2amp transformer, anything beyond this would mean forcing the battery to charge at an unsafe zone.

      your 3amp transformer is OK and looks more suitable, so you can use it,

      the 5amp trafo should not be used.

      for 50AH you can use the 5amp transformer, and get 5 amp charging rate but make sure to remove R6

  17. Dear Sir,
    Now I connect the 40A discharge battery for this charger. But maximum charging current 2.5A. I replaced the new one for LM338K. But same. What is the faller of my circuit.

    Thanks & Regards
    Krishantha

    • Krishantha, did you remove R6? for confirming whether or not your IC is providing 5amp, you can connect an ammeter set at 10amps range Dc directly across the output, if it shows 5amps then the problem could be in your battery and not in the circuit….and remember the output from the circuit should be 14V in order to induce the specified amount of current in a 12V battery, if its lower then the battery will accept current properly…

  18. Dear Sir, Thanks for all of your advices.

    I Remove R6, Out put current increase very low (about 0.5A) But I think, when remove R6 prevent the trickle charging? I connect an ammeter set at 10amps range Dc directly across the output. but same…

    Then I remove the battery & connect the 5A load (12V Halogen bulb) to out put of the charger. Then Ammeter shows about 5A current.
    Can decision the charger is correct? (It can out the 5A charging current)
    Is this method suitable for check the maximum current of charger?

    Finaly I think battery is not accept the charger. For I can't fully discharge the battery before connect.
    In that condition of the charger can I charge the 50A car battery, under the 5 amp charging rate?

    Thanks & Regards
    Krishantha

    • Dear Krishantha, R6 has nothing to do with trickle charging, it's for restricting the current to a maximum 14/0.2 = 70 amps……so that means here R6 is not relevant at all, and will easily pass 5 amps.

      if your meter shows 5amps with a halogen lamp then it must show the same when connected directly across the output terminals, check it again you might have not connected the meter prods correctly.

      for checking the battery you can connect it directly with a 14V power supply with an ammeter in series, if it shows a high current reading then it's your circuit that might have some problems.

      50ah battery can be also used for confirming the same

  19. Dear Sir,

    I changed the transformer to 18Volts one. Because VIN of your circuit diagram is…
    VIN ≥18V

    Then I can get the maximum current (4.5 or 5A) from my charger. So I think not enough 15V 5A transformer for this charger, I think it should be 18V 5A one.

    15V 5A transformer –
    AC out = 15V & Rectified DC in to the circuit = 18.8V
    (Charger out maximum current about 2.5 or 3A)

    18V 5A transformer
    AC out = 18.6V & Rectified DC in to the circuit = 23.9V
    Charger out maximum current about 4.5 or 5A

    I think better solution of that problem, go to 18V transformer. Am I correct Sir?

    Thanks & Regards
    Krishantha

    • Dear Krishantha,

      you are correct, it should be 18V for the input, because an LM338 requires an input that needs to be at least 3v higher than the intended output….since the charging voltage is 14.3V therefore the input should be at least 17 to 18V.

      But please remember that even though the input is 18V, the LM338 pot must be adjusted precisely to 14.3 V for charging the battery.

  20. If the battery is partially charged, the LED will light before full charge. If I put a diode between Vout of LM 338 and R6, will the magmeter work properly?

Leave a comment

Your email address will not be published. Required fields are marked *

Archives