An all-in-one automatic voltage battery charger circuit is discussed in the following post; the circuit can be modified in many different ways as per individual requirements and applications.
The following circuit will allow you to charge any battery right from 1.5V to 24V simply by setting up a given preset.
How it Works using LM3915 IC
The circuit functioning may be understood with the following points: The IC LM3915 which is a Dot/Bar voltage display chip forms the main section of the circuit.
The IC has ten linearly incrementing output which sequence one after the other in response to a rising potential fed at its pin#5. Thus the output sequence corresponds to the instantaneous voltage level at the "signal input" pin out of the IC.
The 10K preset associated with the above IC is set as per the battery voltage which needs to be charged. After this the LEds connected at the output linearly indicate the charge level of the battery by illuminating in sequence, and finally when the last LED is lit which happens when the battery gets fully charged, the SCR is triggered shutting off the charging process permanently until the power is reset.
The stage comprising the IC LM338 is a standard voltage regulator IC, the preset associated with IC is set as per the required full charge limit of the connected battery. The transistor BC547 provides a fixed 3V for the connected LEDs for controlling the IC dissipation.
The transistor BC557 remains switched OFF as long as the last LED in the array which may be selected for the full charge indication is not illuminated. As soon as the last "full charge" LED switches ON, the BC557 is also switched ON triggering the SCR.
The SCR instantly grounds ADJ pin of the LM338 completely disabling the IC and the output to the battery. The battery now stops receiving any voltage and thus it is inhibited from getting over charged.
How to Set Up this Circuit
The circuit can be used for charging 1.5V, 3V, 6V, 9V, 12V, 15V, 18V, 21V and 24V batteries, in fact any voltage that may lie between 1 and 24V. Suppose you want to charge a 6V battery, the full charge level for this battery would be 7V.
The setting of the circuit may be done in the following manner:
- Do not connect the battery initially and also keep the SCR gate disconnected from the BC557 network. Apply a relatively higher DC potential at the input of the IC LM338, may be a 9V or a 12V input.
- Adjust the 10K preset under the LM338 such that the battery terminal points receive a 7V output.
- Now adjust the 10K preset under the IC LM3915 such that the last LED just flickers ON at this voltage, meaning at the applied 7V.
- Restore the the SCR gate connection as per the circuit diagram. That's it the circuit is all set now.
- During the charging process each LED will correspond to 7/10 = 0.7 volts, meaning say at 5V the 7th LEd will be illuminated and with a rise of 0.7V the subsequent LED will be lit and the sequence will proceed from 7t to 8th to 9th and then finally to the 10th LEd shutting off the circuit and the charging of the battery.
Alternatively if you you are interested in making the circuit respond with all batteries from 3V to 12V then you may adjust the LM3915 preset such that the last LED barely illuminates at 14.4V.
Now each pinout of the IC corresponding to the relevant LED would sequence at the rate of 14.4/10 = 1.4V, therefore for a 6V battery the full charge LED pinout would be 7/1.4 = 5, meaning the 5th LED illuminated would indicate that the connected 6V battery is now fully charge.
For enabling automatic cut off for the above situation you just have make sure the base of the BC557 is connected to the 5th pinout of the IC LM3915 from left to right.
For a 9V battery it would 9/1.4 = 6.4th LEd, meaning when the 6th LED is fully glowing and the 7th LED is barely flickering, the 7th LEd may be selected and joined with BC557 base for acquiring the required automatic cut off.
Circuit Diagram
Using Transistor Latch instead of SCR
If the above circuit fails to respond with an SCR, the following circuit using a transistor latch can be employed:
For an Automatic ON/OFF Function
If you want the above multipurpose battery charger circuit to cut off the charger while the battery reaches the full change limit, and then quickly switch ON the charging when the battery starts dropping below the full charge limit, and continue flip flopping at this threshold level, in that case you can try modifying the design in the following manner:
V.sambath kumar says
Hi Sir,
I agree to your logic but it will take long time , without removing any cap I got a suggestion if we connect an npn transistor base to the base of bc557through a resistor when ever the positive voltage appear fr the ic the transistor will trigger and the ce of tr will get shorted, if we open the cathode connection of scr to ground and connect the c to cathode of scr and the emitter to ground the problem is solved .We can also use this transistor to switch on a small relay and use its contacts in between the scr cathode and ground.
Regards V.Sambath Kumar.
Swagatam says
Thank you Sambath,
what you are saying is possible, but it requires extra parts and effort.
Using an unfiltered DC at the input solves this problem in an easier way, and can in fact promote desulphation of the battery and enhance battery life.
Sambath kumar says
Hi Sir,
In the scr version we get a positive voltage through theCE of bc557 to trigger scr to stop the charging , scr once triggred the anode to cathode remains permanently shorted until either cathode or anode is dis connected from the circuit so how do you switch on the charger when the battery voltage come low again.
Regards V.Sambath kumar.
Swagatam says
Hi Sambath,
Yes, that’s right, the SCR will get permanently latched and won’t respond when the battery voltage drops to lower level.
To eliminate this issue, you can remove any filter capacitor associated with the input DC, so that the DC after the bridge rectifier comes with a 100 Hz ripple.
Just make sure to connect a 10u/25V across the base/emitter of the BC557 transistor.
Micah mwadimka says
Student I want to learn
Benson Celestine says
Using the IC LM338 I needed an indicator at the output that will indicate the battery ???? is fully charged..
Where can I do that on the circuit.?
Swagatam says
You can simply connect the following circuit across your battery terminals for showing the full charge:
https://www.homemade-circuits.com/battery-full-charge-indicator-circuit/
Micah mwadimka says
OK can I get the full PDF form of this work??
Swagatam says
You can easily convert it pdf using any online “URL to pdf converter”
Ed Kishbaugh says
Hello Mr. Swagatan, I need some help with the first lithium-ion battery charger. I’m a hobbyist who enjoys building projects from schematics. I put together the charger on a breadboard but somehow I’m not able to figure out how the potentiometer near the LM338 Var. Regulator is to be wired in. I don’t get the right variable voltages at the battery terminals and I get feed back lighting up the LED’s. After many attempts at retracing my steps I still am unable to make this work. Nothing gets warm and it hasn’t blown any fuses. I need this for charging 9v batteries. Thank you, Ed
Swagatam says
Hello Ed,
You must use two terminals of the potentiometers for the connections, the center terminal and any one of the output terminals.
An example image of the pot connections can be seen below:
https://www.homemade-circuits.com/wp-content/uploads/2015/09/use2Bpots.png
Please see the “2-pin 1 way mode”, you can use any one of those methods.
Make sure not to connect a battery while adjusting the LM338 output voltage. Adjust the voltage by connecting a meter across the points where the battery is supposed to be connected.
Connect the battery only once the pot adjustment is completed and the voltage is correctly set.
Also, make sure that the collector link of the BC557 transistor remains disconnected while the voltage adjustments is being done. Restore the connections once the voltage adjustment has been completed.
Boniface says
Nice circuit diagram
sunil says
24v battry chager transformer calqultion data
Joakín says
Hi, Greetings dear Swagatan, how are you? The circuit is very interesting, but the LM3915 is difficult for me to find. Could you suggest a circuit with similar functions: to charge 3V, 4,5V, 6V, 9V, 12V batteries, but using IC LM 7805 or any of the LM78xx series? A Yotta of thanks, Joakin
Swagatam says
Hi Joakin, There’s no replacement for LM3915. Instead you can build a variable power supply unit using transistors or an IC LM338 which can be adjusted to suit any battery voltage.
https://www.homemade-circuits.com/how-to-make-current-controlled-12-volt/
Joakín says
Hi, thank so much for your answer,
Dear Swagatan the LM3915, can not be replaced by LM3914?.
In my letter I do not ask to replace the ic lm3915, but to make a circuit that does the same function, but uses LM78xx. Tell me a way to send you the circuit, cause this way i dont see how to do that. Thank you. Joakín
Swagatam says
Hello Joakin, yes LM3915 and LM3914 are two versions of the same IC and are interchangeable.
It can replicated by using 10 separate op amps, as found inside the LM3915 IC:
https://www.homemade-circuits.com/wp-content/uploads/2019/03/LM3915-Internal-Layout-1.jpg
You can upload your circuit to your Google drive and send me the link here, I will check out the circuit.
make sure to remove the https from the link.
Marius says
Good morning Swagatam, hope you are well,
In the charging circuit with automatic ON/Off function there are 3 capacitors, 1 = 100mF, 50V, 1 = 33mF and 1 just above the battery of 2,2mF. (dwg which I downloaded not very clear) What the voltages be on the last 2 caps?
Another issue is all of electronic suppliers locally tells me – No stock of the LM3915 IC, what now? What other IC can I use?
Best regards,
Marius
Swagatam says
Good Morning Marius,
the rule of thumb is that the capacitor voltage must be 1.5 times or 2 times the supply voltage. So if the supply voltage is 12V then the capacitor minimum voltage can be 20 V or 25V, or any higher value.
LM3915 is a pretty standard IC, so it is strange if it’s not available in your area, nevertheless you can always order them through any online electronic stores or through Amazon and eBay.
Unfortunately there’s no replacement for this IC, unless external op amps are configured to implement the same job….
Bernhard Marius Sauerman says
Thank you very much for your valuable reply, will have to go your recommended route
God bless
Swagatam says
I am glad to help!
richard ebai says
Hello Swagatam,
Pls can this your circuit charge lithium batteries or they are for lead acid batteries?
Thanks for your response.
Regards
Ebai
Swagatam says
Hello Richard, you can use the concept for Li-ion battery also, just make sure to use an input current that’s 50% of the mAH rating of the battery.
Praveen Thathsara says
Dear Sir,
I want to charge 4 mobile phones using a 12v motorcycle battery.What should I do?
What is the circuit diagram?
Please help me.
Thank You
Swagatam says
Hello Praveen, you can try the 5) LM338 based design from the following article:
https://www.homemade-circuits.com/how-to-make-simple-dc-to-dc-cell-phone/
Praveen Thathsara says
Since motorcycle battery gives a DC current, How should I changed the above circuit??
Swagatam says
You can eliminate the transformer and the bridge, and modify the circuit in the following manner:
Soesanto Salim says
Dear mr Swagatam,
Possible to make automatic battery charger 12v 24v 200ah diagram using pulse/ferrit (EE35/PQ3230) transformer for saving cost to made it
GBU
Thanks and regards
St
Swagatam says
Dear Salim, I do not have a 20 amp SMPS design, and it would be a pretty complex design for sure, better to get one readymade
Soesanto Salim says
Dear Mr. Swagatam, No need rewinding coil SMPS, just make from SMPS ready to use (EE35/PQ3230), most of them many and easy to find in the online marketplace ☺️
Swagatam says
OK, thanks for the feedback!
JEMITHIAS HURUVA says
DEAR MR SWAGATAN DO YOU HAVE A SIMPLE TRANSISTOR CIRCUIT 12V 50A- 80AMP CHARGER THAT HAS AN AUTO CUT OFF WHEN BATTERY IS FULL
Swagatam says
Hello Jemithias, You can refer to the following articles. You may find them useful:
https://www.homemade-circuits.com/simplest-smf-automotive-battery-charger/
https://www.homemade-circuits.com/self-regulating-lead-acid-battery/
T.Andersson says
Hi Mr. Swagatam, I found this circuit of great interest. My need for charging is: During long driving hours, during holiday periods, in my vehicle my wheelchair can be fully charged. In my vehicle I have provided 12 volt 30 amp cable (8mm2), to place the wheelchair is located. The wheelchair has AGM 12 volt 70A X2, series connected to 24 volts.
I have found a Step up converter, max 15A in / 440 watts, where I have to convert 12 volt voltage in the vehicle up to approximately 27 volts which is applied over the LM338K input (TO3 ver.) I would use technical form 3, For an automatic ON / OFF function
1. LM338 can deliver 5A max, how can I connect 2pcs LM338 in parallel that can provide up to 10A charging current and drastically reduce the charging time? I have read that the adj. line LM338 connected in parallel must be checked to be exactly the same / identical, for example with the use of an op.amp ic which controls the voltage on the output line. I found such a connection, but it may indicate it would be difficult to fit into diagram # 3. https://1drv.ms/u/s!AizwNFNuGCzdtIxNDWUJJql4ORm_nw?e=nhn7wJ Do you have another better idea/solution to gain up charge current?
You have a nice calculation technique for the LM3915, as follows: “Alternatively, if you are interested in getting the circuit to respond with all batteries from 3V to 12V, you can adjust the LM3915 preset so that the last LED light barely lights up at 14.4 V.
Now each pinout of IC corresponding to the current LED sequence at a speed of 14.4 / 10 = 1.4V, therefore for a 6V battery the LED pinout with full charge would be 7 / 1.4 = 5, which means that the fifth LED will indicate that the connected 6V battery is now fully charged. ”
But how does this work out for 2pcs 12 volt AGM batteries in series (24 volts)? Here I should connect BASE to BC557 / PNP to LED furthest to the RIGHT, when output voltage is regulated under LM338 to around 27.5 volts?
Thank you for your incredible and extremely good electronics guide pages.
Swagatam says
Thank you Mr.T.Andersson, I appreciate your interest and curiosity regarding the concepts explained above.
To get 10 amp output you can connect two LM338 pins in parallel with a common regulator circuit, and also make sure to mount the two ICs over a common heatsink so that they can share the dissipation uniformly.
Yes, for a 12 V battery the 5th LED will correspond to 7V and so forth.
For a 24V battery the 5th LED will correspond to 14 V, but the indication range will keep getting squeezed more and more as the battery source voltage increases. Yes you will have to depend on the furthest LED (10th) for the full charge cut off(28V), and for the BC557 base integration.
Edgar R says
Mr. Swagatam and I’ve seen those tutorials from different sources and battery chargers and I’m very interested in those topics because I work with electronics, maybe not very advanced but I understand a little of the basics but I don’t know if my question is related to what in this This page is commented but I have always wanted to make a my good battery charger but also annelo to make a My little welding machine I think that maybe that is another issue but I wish if you were so kind to guide me in this regard, notice that I have 2 toroidal transformers, it is 20 centimeters diameter by 7 high I do not know if you could guide me if I can join the 2 primaries and remove the secondary of the two and make a single one for the output and if possible, what gauge of wire would be used or any guidance that will give me I am grateful in advance for yourattention I hope you can read my writing I will be waiting for any suggestion a thousand thanks in advance
Swagatam says
Hello Edgar, designing or amending transformers require critical calculations, and cannot be judged through assumptions. So I am sorry it won’t be possible for me to suggest regarding the transformer winding that you have asked.
T. Andersson says
Hi again, Swagatam , and thank for you feeback, a support joy you show me, I will share with you.
I now made a new diagram for this 3v, 4.5v, 6v, 9v, 12v, 24v, automatic charger. Since I now wanted a doubling of the charging current, 5 amps up to 10 A, some change of the schematic diagram was necessary. I now removed the cut of transistor in the adjust inputs of my two LM338, and replaced this control performed by an Op amp. UA741. The emitter output in the attached diagram (Q4) now controls the regulator for the LM338 voltage level. Two 0.3ohm / 10W resistors are mounted in the outputs of the LM338. Note LED1, marked with a red circle, cut off voltage at measured charging voltage, 27.5 volts in my project, is this connected to the correct side, inverted / not inverted side of Op amp.?
Thank you so much for the response, a support that makes it a pleasure to spend my free time with electronic building projects!
Se my new diagram (with a fan speed controller (LM358) to a fan mounted at LM338 cool radiator ribs)):
https://drive.google.com/file/d/1BcWFbQ4H9nvMQs__i-Ixc0oCYdoVJD96/view?usp=sharing
Swagatam says
Thank you Anderson, I appreciate your interest and efforts, however it seems the link you have sent was not set to the shared mode, and therefore it isn’t opening at my end. After referring to the diagram I should be able to provide you with my opinion.
Chandrasekhar says
Hi Swagtam, i want to charge my 3 lion battery connected in series with a 12 volt 2 amp charger. I dont want to display the full led indicator for battery capacity. Only i want to automatic charge and cutoff when fully charge without a relay. Pls give me solution. Also i want to charge a 3.7 volt single cell lion battery also. Pls give solution.
Swagatam says
Hi chandrashekhar, you can use the second last concept from this article:
https://www.homemade-circuits.com/usb-automatic-li-ion-battery-charger/
use 12V as the input instead of the shown 5V, and set the preset for the desired level cut off
noble says
Hello Mr. Swagatam.
I have been following you for a long time. I need your help. I have a 14.8v, 2.1Ah, 31.1Wh lithium-Ion battery. To charge this battery, I have to design a circuit with automatic charge cut and charge status indicator(with led). Which is the most suitable circuit for me in this regard. Can you help me? Thank you for your interest. See you.
Respects.
Swagatam says
Thanks Noble, you can try the last circuit from this article:
https://www.homemade-circuits.com/usb-automatic-li-ion-battery-charger/
Replace the relay with a 12V relay.
Replace the transistor base resistor with 10K
Use a 16V input with 1 amp current.
SET the preset to get a precise 14.8V cut.
noble says
Hello, Mr. Sw.
Thank you very much for your interest. I do not want to use the relay
in the circuit. Can you suggest another circuit that I can use instead?
Swagatam says
Noble, Then you can try the other circuit which is without relay in the same article…second last one may be
Prashant says
Hi Swagatam,
i like your posts. i am having littlebit knowledge of electronics.
i have 24V 2A smps power supply.
1) can i use this power supply as a battery charger to charge 12volt 100ah battery
2) what circuit is required additinally.
t&R
Prashant
Swagatam says
Thanks Prashant, you can use a buck conveter to convert 24V 2 amp to 14V/ 3.5 amps, but this current can be too low to charge a 100 Ah battery, as it will need minimum 8 to 10 amps for optimal charging within 12 hours
Prashant says
hi,
thanks for your reply,
it is possible with this ps obtain higher current? or required new transformer with rating 24-0-24v 10amp
Swagatam says
Transformer rating will need to be increased. The ideal transformer would be a 12V 10 amps which will become 16V 10 amp after rectification
tijuana mooney says
i think this is a pretty cool website im glad i stumbled opon it , ok my question ,wich i will have many more on other projects later on , but for now i was wondering ,i am disabled and dont have much money but i do have a pile of electronic equip of variouse brands and type ,is there cirtain items that may have the same parts you listed that i could break into and reuse i am very resourcefull and i love to make tools and such from old electronic equip.
Swagatam says
Glad you are enjoying the posts. Yes you can salvage most of the passive parts except the ICs
Abhishek says
sir can i use this circuit for 12v 50watt solar panel to charge 12v 35ah lead acid battery ? and is it auto cut-off? & auto charging?
Swagatam says
Abhishek, yes you can but a 12V panel will not charge a 12V battery. The panel must be rated at least at 18V
Vasilis Mavrogenis says
Hi,
I am a novice in electronics, so here is the question?
Using this circuit I would like to charge 3V NiMH batteries of various currents
@ 3V charge voltage what would be the charging output current of this design?
I am trying to charge 3V batteries with automatic cutoff but trying to do it reasonably fast
Thanks
Vas
Swagatam says
Hi, you can replace 1N4007 diode in series with the battery positive with an emitter follower stage. Use a 2N2222 transistor, connect collector to the output LM338 or LM317, connect emitter to the battery positive. Connect the base with collector via a 1K resistor, connect the base to ground via a 10K preset. Adjust the LM338 out to 6V, adjust the base preset to get 3V at the emitter of the 2N2222
Vasilis Mavrogenis says
Thank you Sir
I think I get it will try to adjust the circuit and see how I get on
Will come back if stuck
Much appreciate the support
Vas
Swagatam says
Thank you Vasilis, Actually all these are not required because the LM317 or LM338 output itself can be reduced to 3V easily, I just forgot about it…
Vasilis Mavrogenis says
Thank you
Any idea what would be the power/current output @ 3V for this circuit?
Swagatam says
The power consumption will depend on the battery specs, and will need to be set accordingly through a series resistor or simply by using an appropriately rated power supply.
Aditya Krishnan says
Sir I have designed the circuit and am facing a few problems…please may I get your contact details
Swagatam says
Aditya, you can feel free to discuss your problem here through comments, I’ll try to solve it for you!
Aditya says
Sir I’m from the Indian naval academy and its difficult for me to access the internet..i request you to please share your contact details
Swagatam says
I am really sorry Aditya, personal contact may not be possible, I can solve your queries only through this platform!
Aditya says
Sir the powe supply from external source and the battery positive both are at pin 5..in such a case the display circuit should not function as expected
Swagatam says
Aditya, yes that’s right, the external voltage should drop to the discharge level of the battery and this data must reach pin5 of the IC through the potential divider network…make sure the source current is significantly lower than the battery Ah value.
Mihai says
For what kind of accumulators is intended the charger presented? It will be appropriate for Ni-Mh accumulators, which charge at constant current?
Swagatam says
It can be used for all types of batteries but with appropriate current control setting.
If you want to charge a single battery with fixed voltage then I wouldn’t recommend this complicated circuit, there are much easier circuit present in this website
Mihai says
Hello, Mr. Swagatam, i would like to use the charger to charge a 8.4 V Ni-Mh accumulator, 280mAh. Should i use that charger or other? How could i set the current to battery to 1/10 of capacity (28mA) ? Thank you!
Swagatam says
Hello Mihai,
I think you should use the following circuit for your battery:
https://www.homemade-circuits.com/usb-automatic-li-ion-battery-charger/
you can use 50% current rate for the charging, meaning at 150 mAh if you want a fast charging, but lower than this will be safer, so probabaly 100 mA will be OK.
Set Rx to = 0.6 / 0.1 = 6 ohm, 1/4 watt
Mihai says
Mr. Swagatam, i forgot to mention i’m a begginer in electronics, so i need more specifications. One of my question is that will be all right for the charging input to be 11.2 V, the appropriate voltage for completely charging 8.4v accumulators? This voltage won’t destroy any of the components in the circuitry? And what should be the preset voltage for that type of accumulator (10.2 will be suitable, but won’t charge it completely?)
Another question is about the method of detecting the charge state of the accumulator. I read on the internet that for a Ni-Mh accumulator, the voltage across it is not a precise indicator of it’s state of charge, or the circut doesn’t works by this method?
And another question, i found on the internet the next schematic:
https://www.shdesigns.org/pdf/lionchg2.pdf
I built it and charged the accumulator at the preset voltage of 11.2 V, but i stopped the charging process manually when the voltage across it reached 10.1 V. I would like the charging to stop automaticly, but what would be the preset voltage? The two schematics are based on the same principle? I don’t really know if the schematic you recomanded me is better, and if so, please explain me why.
Thank you.
Swagatam says
Hello Mihai, I think your battery full charge level is 8.4V, and the printed value is 7.4V (3.7 + 3.7 = 7.4)….So make sure your battery does not charge over 8.4V, otherwise it can get damaged. The schematic that you have shown will not cut off at the full charge which can be dangerous for the battery, so I won’t recommend it. The circuit given by me will cut off automatically at the preset level which should be 8.4V.
The schematic given in the article is more correct, so you can build as per this diagram
Swagatam says
Sorry, I just forgot your battery is Ni-Cd, I mistakenly imagined it to be a Li-Ion…so it can be 8.4V. The full charge cut off level should be 10.1 V as mentioned by you.
Mihai says
And the charging imput for this type of accumulator? Which should be it’s value?
Swagatam says
Charging voltage should read 10.1V across the IC supply lines. The polarity protection diode may drop 0.7V, so adjust the input according to this drop.
Mihai says
I want to thank you, Mr. (or Sir, i don’t speak english very good) Swagatam, for your amability to patientely answer my questions in such a short time. I’m from Romania and i’m glad to have had the privillege to benefit from your experience of electronic engineer and to meet you, even in this manner, by comunicating through the internet. Also, i wish you all the best, personaly and proffesionaly. I will manufacture the circuit, and hopely it will work.
Best regards,
Mihai
Swagatam says
Thank you Mihai, I am glad I could help you! The circuit surely work, let me know if you have any problems while testing it.