The only electronic website that replies to every comment, and addresses all circuit related issues.

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.

Please Share this Post:
•  Facebook
•  Twitter
•  Google+
•  Stumble

• 120 comments:

1. how many amp battery can dis be use 4?

2. if we want to charge 200AH

3. You can build the following circuit:

http://homemadecircuitsandschematics.blogspot.in/2011/12/high-current-10-to-20-amp-automatic.html

1. What was the wattage of the resistors used in the circuit....?

2. All are 1/4 watt except R6 which may be around 1 watt.

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

4. how can i make a 12 volt DC output 7 to 10 amp current, out of 20 volts to 110 volts voltage input? can you help me plz.. tnx!

1. You will have to incorporate an SMPS circuit for inputs that's more than 50 volts....

2. pls help how to make power supply charger, i'm using traspormer and 2 diode in5406 the problem is i forgot the diagram for this. pls help me.

3. Please refer the following article:

http://homemadecircuitsandschematics.blogspot.in/2012/03/how-to-design-power-supply-simplest-to.html

4. This would work as a solar regulator/charger with the addition of a blocking diode to prevent losing charge at night, correct?

5. Yes, you are correct.

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

1. Hi, The above circuit won't be suitable because it cannot tolerate more than 32V at its input, the following circuit looks good, you can try it:

http://homemadecircuitsandschematics.blogspot.in/2012/08/simplest-dc-cell-phone-charger-circuit.html

The input can be from 24 to 80V DC.

6. hi swagatam , can i use 741 instead of lm301
if yes then can u tell me the connections

1. yes, will do....

2. if we are using 741 instead of lm301
where is the compensation pin(8-pin)
is there any draw backs if neglect that pin connection
thank you

3. yes due to the presence of the "start switch" a 741 will be difficult to replace the 301.

but there are other options through which a 741 can be used for getting the same results as above.

7. Hello sir,
Can u please help me on the capacity of the battery should be selected to store a power of 55W(1320Wh).

1. Helo Rizmy,

you may divide 1320 by the voltage to get the rating of the battery.

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

1. use LM196 circuit for charging your battery. Refer to the LM196 datasheet you will get the circuit there.

9. thnk you sir.

Can I charge a 12V 60Ah battery using this circuit?... If not what are the modifications needed?. could you please help me on this sir..

1. Rizmy, The above circuit will not charge a 60 ah battery..... refer to my previous comment.

10. sorry for the inconvenience sir. I have typed the same message twice mistakenly.

thanks a lot for your guidance sir. I'll look for it.
thank you!

11. Sir,
Cant I use your above circuit with LM196?.

1. yes it can be replaced but R6 will need to be modified appropriately.

12. Thank you sir,
Then please help me on calculating R6 according to my requirement sir.
How did you arrive in 0.2ohm for the above circuit?.

1. Hi Rizmy,

What is your battery AH, is it above 100 AH? If it's below 100AH, R6 won't be required.

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

1. then you can use it without R6.....but the input current should not be more than 1/7th of the battery AH.

you may refer to the following article to know more regarding the IC specs.

http://homemadecircuitsandschematics.blogspot.in/2013/04/15v-10-amp-adjustable-voltage-regulator.html

14. thank you sir!

what about the input voltage then?. Is that should be more or equal 18V to charge the battery as you mentioned above?

1. any voltage above 15V, and below 24V can be used.

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

1. the above circuit will not boost voltage

16. Thank you sir!
To use this as a solar charger, a diode at the output is sufficient or any other modifications needed?

1. According to me that would be enough, but it must be rated appropriately...

17. without R6 means sir is it short circuited or open circuited?.
then how the comparator work to swith off the charging?
can you please explain me sir.

regards!

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

1. It means, the R6 points should be replaced with a wire link.

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

1. check the article now....is it OK now?

R6 is only for setting the charge current.

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

21. I dont see any changes in the article sir. Could you please help?

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

22. Swagatam thanks. can i charge 12 volt 30 ampere battery with this circuit charager ?? help plz

1. Hi Shani, yes you can do it.

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

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

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

3. OK, then you can try the following circuit:

http://homemadecircuitsandschematics.blogspot.in/2013/08/simple-zero-drop-solar-charger-circuit.html

but it's not a tested design, according to me it should work.

24. Sir,
Thx for the repply.
I already made following circuit, and think to use my above mention application

http://homemadecircuitsandschematics.blogspot.com/2012/05/make-this-voltage-stabilizer-circuit.html#uds-search-results

Is there any wrong with this?
what is

1. The above link circuit will not tolerate more than 35V, so again it won't suit your application.

25. Sir Swagatam,
I could'nt find 1N457 Diode. What can use else instead of it ??? is there any substitution ?? Plz help!

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

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

1. Vout = Vref(1 + R2+R3/R1) + Current ADJxR1

Alex, please solve the above formula which the correct one.

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

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

29. my last question is how can I find output current?

thank you so much!!

1. the output current will depend on the load, connect an ammeter in series with he load for finding the output current.

30. can use lm317 for this circuit? i only want to charge 12v 4amps battery.

1. yes you can use it.

31. 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!

1. hello eric, the led will light up once the battery is charged.

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

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

2. sir plz help me where I have to connect second wire of input and input is ac or DC ??

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

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

1. Hi Rajneesh,

R6 = V/I = Voltage/Chrg. current

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

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

35. hi sir
can i charge 12 volt 3 amp battery using this circuit , if no then what i have to change this circuit ?

1. hi sk,
yes you can do it.

36. hello sir,
can i zinc carbon batteries using this circuit??

1. yes but they are not chargeable.

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

1. 1 ohm will do,
the input amp should be rated at around 1/10th of battery AH, only then it would work correctly

38. Sir can i charge rechargable batteries of digital camera using this circuit,it has 2.5AH,will it go???

1. yes you can do it.

39. Sir can I use 741 instead of 301? i don't have a 301 with me now, but i have 741

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

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

1. Dear Jayanth,

the above circuit is not so advanced, please make the last circuit given in the following article:

http://homemadecircuitsandschematics.blogspot.in/2012/07/making-simple-smart-automatic-battery.html

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

1. Dear Partha,

you can begin with the following circuit, it's fairy simple so would suit you:

http://homemadecircuitsandschematics.blogspot.in/2012/02/how-to-make-simple-infra-red-remote.html

Regarding parts, you will need to inquire with your local electronic spare parts dealer, he'll know better

42. Hi Swagatam, Can op amp LM301A be replaced by uA741? I have a number of these lying with me.

1. Hi aquarius, in the above design it can't be used, because of pin1 which is not compatible with IC 741

43. Hi, What should br the wattage of 500E resistor ?

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

45. very difficult to get LM301.
LM301 with what code can be replaced.

1. 301 cannot be replaced with 741 in the above design,

you can try the following circuit:

http://homemadecircuitsandschematics.blogspot.in/2012/02/how-to-build-automatic-6-volt-12-volt.html

LM317 can be used in place of LM338 and 741 instead of LM324

46. Hi Swagatam Majumdar.
I want to ask. what is the function of the R6?

tanks

1. Hi Muhamad, R6 is actually not required, it's basically introduced to limit over current in case a wrong battery is connected with the circuit

2. but when R6 used the better?
when the network is secure installation error on battery terminals.

3. it may be required if the power supply amp is more than 1/10th of the battery AH rating.

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

1. Rajesh, use LM317 instead of LM338, no other modification would be required.

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

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

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

1. Dear Krishantha, if a cooling fan is present then I think 5 watt would be quite OK, no issues...

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

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

2. ....the correct and recommended charging rate for any lead acid battery should be 1/10th of its AH rating

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

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

2. ....if its lower then the battery will NOT accept current properly

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

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

53. Dear sir,
Thanks a lot for all of your civilities.
Krishantha

1. you are welcome Krishantha

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

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

55. Thank you very much sir.

1. you are welcome!

Please Note: If you find any DEAD link starting with http//:homemadecircuitsandschematics.blogspot.com, please replace it with http://www.homemade-circuits.com/ for making it visible and alive again.