Home » Battery Cut off Switch Diagrams » Compact 12 volt Battery Charger Circuit Using IC LM 338
Compact 12 volt Battery Charger Circuit Using IC LM 338

Compact 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. Here we use it to make an automatic 12V battery charger circuit.



 Why LM338 IC

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.

Using LM338 as a Regulator and Opamp as the Comparator

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 my assumption:

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.

Circuit Diagram

Compact 12 volt Battery Charger Using IC LM 338 and LM301 circuit diagram

 

SHARING IS CARING!


About the Author

I am an electronic engineer (dipIETE ), hobbyist, inventor, schematic/PCB designer, manufacturer. I am also the founder of the website: https://www.homemade-circuits.com/, where I love sharing my innovative circuit ideas and tutorials. If you have any circuit related query, you may interact through comments, I'll be most happy to help!



82 thoughts on “Compact 12 volt Battery Charger Circuit Using IC LM 338”


  1. Howdy, Friend! Interested to Learn Circuit Designing? Let's Start Discussing below!
  2. Good Evening dear sir,
    Can i charge 12V 40Ah battery with this circuit or is there any modifications needed…?? please suggest me sir.

    Thanks & Regards ,
    Naveen prabha

    • Good evening Naveen, yes definitely you can charge it with this circuit. Just make sure the input supply current is not more than 5 amps

      • Thank you so much sir, but i wish to charge the battery with solar panel. that solar panel specifications are 12V 75W .. will you please advise me suitable charging circuit for 12V 40Ah battery.

        Thanks & Regards ,
        Naveen prabha.

        • Naveen, your panel must be able to produce around 20V at peak sunshine and 14V during afternoon, otherwise it won’t be able to charge your battery properly.
          As far as current limiting is concerned you can adjust the value of R6 using Ohms law and limit the current to around 5 amps.

          By the way the LM338 is itself restricted to 5amps max internally, so current won’t be a problem. Just make sure to add a good heatsink on the LM338 IC

          • Thank you sir, so what is input current range of IC LM338. is it accepts more than 5 amps as input or less than 5 amps as input. please share the information on this sir,

            Thanks & Regards ,
            Naveen prabha.

            • Naveen, Input current can be anything, it can be 50 amp or 1000 amp, 1 lac amp it won’t matter, but input voltage should be restricted below 35V, that’s important

            • Thank you sir,
              So if i give the input voltege less than 35V and 7 amp to this IC LM338 regulator then it will give the regulated output of 14V ,5amps for charge my battery(as per above circuit). is it correct sir?

              Thanks & Regards ,
              Naveen prabha.

            • Yes that’s correct! In fact you can totally eliminate the opamp transistor stage and directly connect the LM338 output with your battery by adjusting the LM338 output to 14V….since this value is less than full charge 14.3V level your battery will remain safe even without auto cut off

  3. Hi!
    I’ve made this circuit. I have Transformer 18V AC, 7A, after rectification and filter capacitor (2 x 6800, 50V) 24VDC.
    LM338, LM301AN, and R6=0.1/10W.
    Everything fine, circuit is charging 50aH car lead acid battery, starting with 5A, then gradually dropping charging current while increasing battery voltage to 14.4V and… Nothing!!!
    No LED light, no voltage drop from lm338, lm301AN doesn’t goes low, so pnp stays off, and OpAmp pin 6 stays high all the way…
    Please advise, what’s the problem may be?
    The only difference is diode, I’m using 1N4148.

    • Hi, this circuit was taken from the datasheet of the IC, so perhaps it was designed by the LM338 company engineers, still we can try diagnosing the issue and fix it.

      As can be seen, the cut off has been set using fixed calculated resistors, and since an opamp IC specs can slightly vary for different brands, these resistors might also need some tweaking depending on these specs.

      for the opamp ouput to go low, the voltage at its (+) input must be slightly less than the voltage at its (-) input pin.

      You can verify this by checking the the above voltages with a meter when the battery is fully charged at 14.4V.

      If you happen to find the (-) pin not moving above the (+) pin, just try increasing the value of R2 and check the response, at any cost we want the (+) input of the IC to be lower than (-) pin when the battery has reached 14.4V.

  4. 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.

  5. 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.

  6. 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

  7. 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…

  8. 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

  9. 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

  10. 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.

  11. Sir,
    I want to charge 12v, 4.5AH sealed lead acid battery.
    What moicdifations or settings to be done in above ckt?
    Plz help……..

  12. 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.

  13. 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?

  14. 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 ?

    • jamey, i don't think 741 would work in the above circuit because of pin1 and pin8 specs which are used here from the IC 301.

  15. 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

  16. hello Sir……..I want to know Does this circuit work??? If yes then can I use for charging 3-5 Amp ,12 volts battery for charging if my supply(input) is 12 volt D.C.

    • 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

  17. Hi Swagatam,

    Please advise the formula to calculate the value of R6. Alternatively, please advise the value of R6 for the Charging Current (Constant) of 500mA with 24V.

    Thanks for your kind help.

    Rajneesh

  18. how can i modify this to charge both 6v and 12 battery and make a select button(switch) so i can chose wich battery to charge

    • use two cacuated resistors in place of R1, make one of their ends common and connect the joint to the IC while terminate the lower free ends to a selector switch such that the switch selects and connects the resistors to ground for getting the desired 6V or 12V at the output

    • the negative wire should be connected to the common line which connects with pin4 of the IC, the input should be rectified and filtered DC

  19. hello sir! how can i know if the circuit is charging the battery or not? how can i add a charging indicator in this circuit.., please help me!

  20. 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

  21. hi swagatam,
    how can it be possible that Vout=14V? when pnp in off the righ exression is Vout=1.2+1.2(R1/R2+R3) and this results 15.9V right?
    thank you

  22. hi swagatam,
    hoe it can be possible that Vout=14V? for me the right expression when pnp is off is Vout=1.2+1.2(R1/R2+R3)
    and this results 15.9V right?

  23. 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

    • Hi Varuna,

      No modifications would be needed, but the input voltage must not exceed 32V, the only precaution you need to observe, and also the input source must not generate more than 5 amps for the specified battery.

    • Sir,
      Tnx for the repply.

      Actually i hope to use this circuit to charge a 12V-35A battery by using charging input of the Diesel THREE WHEELER that made by Bajaj.
      Bcoz the original rectifier falty and not avialable in the market. I mesured the charging voltage of the output and its avilable about 20V an idel, and up to 60v when accalarate. plese give me a modyfy version of this or any other circuit for this issue.

      Tnx a lot.
      Varuna.

Leave a Comment

Do NOT follow this link or you will be banned from the site!