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:





Questions & Answers
You are welcome.
Amplifiers are complex circuits to deal with, it cannot be explained through a single post, hopefully I may try to include a chapter relating to this subject soon.
yes it can be used with an inverter, the shown IC338 is specified to handle upto 50 AH battery.
For lower amps, current control feature needs to be added in the above design, it can be done as shown in the following link (the addition of the transistor stage):
https://www.homemade-circuits.com/2012/04/how-to-make-solar-battery-charger.html
the above design focuses more on the indication and cut-off features, efficient charging can be even implemented using simpler designs just by optimizing regulation and current inputs.
For higher currents an outboard transistor can be added with the IC in the above circuit.
The 28V must be a DC, it may be from any kind of source.
BC547 transistors.
3v
Hi sir you done a great job your circuit is very nice and i i want to build one i hope to do that in appropriate time, sir in your overload and low battery cut off circuit i build it but it didn't cut off when i overloaded any help sir? and one question can i connect it to the out put from the inverter instead of battery if yes what can i do thank you looking forward to hear from you soon.
Hi sir you done a great job your circuit is very nice and i i want to build one i hope to do that in appropriate time, sir in your overload and low battery cut off circuit i build it but it didn't cut off when i overloaded any help sir? and one question can i connect it to the out put from the inverter instead of battery if yes what can i do thank you looking forward to hear from you soon.
Hi Daniel,
thanks. The circuit will work only with a DC source, that's a battery, so it cannot be configured with the inverter mains.
You will need to calculate the current sensing resistor value correctly for getting the desired tripping point
Please enter a name and comment at the bottom of the page,,if you comment somewhere in the middle of the page it becomes difficult to search it.
Also please do not add external links to your comment, if you want to show me a diagram upload it to an image hosting site and give me the link.
May be due to one of the above reasons I could have ignored your comment.
…also please don't comment on pages which are full of comments because then the additional comments become hidden and you have to press "load more" button to see them
Hello sir, thank u for your post. I am a software professional n know little about electronics. What is actual value of the capacitor(2.2) above the battery?? what does ground mean in this circuit?? As you are showing one input to the circuit(LM338) is one output from transformer(after using ridge rectifier to make DC), should i connect all the grounds to the other terminal of the transformer(bridge rectifier)???
Hello Sourangshu,
ground indicates the common negative supply line, yes it should be connected to the negative point of the bridge rectifier.
Thank you sir 🙂 , I am using 2.2 uf/ 25 v capacitor for that, as the battery is of 12V, I think it may work. What do u say sir?
It will do, it's only for stabilizing the LED illumination, nothing more.
Sir, I've made this circuit, It seems to me it is working, but there is a little confusion in auto cut feature.
[1] "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."
### Ok, As I've used 15V-1ma Transformer, and I am getting 500ma output from circuit and I've adjusted the 10K preset to give output of 13.5V-14V to charge a 12V UPS battery. NOTE: I didn't connect the battery yet as per your instruction. I've disconnected the connection near the "Cut-Off LED" to disconnect the SCR gate from BC557 network.
[2] "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."
### Which LED do you mean? In your circuit, whether it is the LED(Connected to Pin-1 in LM3915) which is at the LEFT MOST, or the RIGHT MOST LED(Connected to Pin-10 in LM3915)? When I adjust the preset, the RIGHT MOST LED is not flickering, it is steadily lit, if i adjust the preset little more, the previous LED(On left) of the RIGHT MOST LED goes on, and RIGHT MOST LED goes off, this way If I keep rotating the preset in same direction, after some time, the LEFT MOST LET flickering. But in this state it becomes very hard to lit it up steadily, as on a little bit adjustment, the LED right of it goes on, n it goes off. But YES, sometime the LEFT MOST LED is flickering. Which LED do you mean by "last LED"??
[3] Restore the the SCR gate connection as per the circuit diagram.
### Now I've connected the "Cut Off LED" to make connection between SCR and BC557 again.
[4] 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.
### NOTE: I've not connected the battery yet. As I've adjusted the preset to give 13V, now each LED correspond to 13/10 = 1.3V, meaning at 13V, 10th LED will be lit. Therefore for a 12V battery the full charge LED pinout would be 13/1.3 = 10, Meaning the 10th LED illuminated would indicate that the connected 12V battery is now fully charged. So, I've connected the base of BC557 to Pin10 (The RIGHT MOST LED is connected to this also) of LM3915. Now I've connected the battery.
I've noticed that when the RIGHT MOST LED (Connected to Pin10 of LM3915)goes on, the Cut Off Led also goes on. But Cut Off LED remains off for all other setting. When will I be sure, that the line is disconnected? when Cut Off Led goes on or Off??
Thank You Sir
LED connected at pin#10 is the last LED. Check the voltage at the preset slider pin, while adjusting the preset as this voltage rises the sequence should shift from pin#1 LED towards pin#10 LEd and vice versa.
The cut off LEd will indicate the disconnection.
More precisely you can add one more LED right across the OUT pin of LM338 IC and ground. As soon as this LED shuts off would indicate battery fully charged and is disconnected.
THANK YOU SIR, YOU ARE GOD. _/_
I'll try this at home at night.
My pleasure….
Hi, this circuit looks awesome. I'm looking to integrate it into an old SEGA Game Gear so that when plugged in, it charges its 6 rechargable AA batteries. I'm a total noob though, so I have a few questions:
1. Does it make any difference charging 6 AAs linked in series rather than a single battery?
2. The input in the diagram states the input should be 28V, the plug on the Game Gear is 10V, will 10V suffice for charging the 6 AAs (9V)? Will the circuit need to change?
3. I'd like it if the power source for the GG could switch, depending on whether or not it's plugged in and/or switched on. e.g. if the plug is connected, and the power switch is off, the batteries charge, if the power switch is on, the GG would run from the plug, and if the plug is disconnected it runs from the batteries. Is it possible to achieve this behaviour with the above circuit?
Any pointers would be helpful, thanks!
Hi, thanks!
1.No it will not make any difference.
2. The IC will work right from 5V to 35V, so 10V is fine and within the specs, however would suit better for a 9V batt.
3. For this you may incorporate the following design:
1.bp.blogspot.com/-I2zlapFq6RM/UML_NxUJy2I/AAAAAAAAB3w/27ZLDjK9C9g/s1600/simple%20modem%20UPS%20circuit.png
Here, the adapter is your 10V supply source.
the shown battery(+)(-) goes to the input of LM338.
D2 anode disconnects from the shown points and connects directly with the batery(+).
The output goes to the GG input supply port.
…2)12v would suit better as the input
it was meant for a different application and suggested to a specific user, the existing diagram is the final and correct one and should be followed as given.
im daniel Ok sir thank you advice now i received your message.How to make a High Current 100 to 200 Amp Automatic Lead Acid Battery Charger Mr,Swagatam i like your good work you been doing so far i do like your project.my firs quotation is this 12v battery charger circuit i build it but when i power the the circuit relay switch correctly but the problem is out put is 11v and if i calibrate 10k preset to left side it switch on the relay and it give 11v out put if i calibrate to right side it switch off the relay and give me 13v out put why sir any help? i will be glad for your assistance, looking foreword to hear from you thank you.
Daniel,
did you make the circuit as it is shown in the diagram, with the start button or did you do any other modifications?
The DC input to the circuit should be 14V DC and the connections to the relay should also be exactly done, and the input current should be rated at 1/10th of the battery
Also did you follow all the instructions mentioned in the article??
It's just about setting up the opamp correctly that's all….the functioning is very starightforward
hi sir i am building this circuit named Making a 3KVA Modified Sine Wave Inverter Circuit please my questions is, in the circuit there is 50nf and 5nf so can i use 104 cap to replace 50nf and 0.01uf to replace 5nf,sir there is something that i don't understand, is that circuit a pure sine wave or modified sine wave cos im confused if you look at the top side its named modified wave and you scroll to the down it named pure sine wave which is which sir? English is not my language so please sorry for my bad English thakn you hop to hear from you soon.
Daniel,
It's better to use 50nF, if you use other values then you may have to select the corresponding pot of a different range which will need to be calculated.
The circuit is a modified sine wave but could be near to a pure sine wave due to the involvement of PWM stages.
ok sir but can you please give me any value that can replace 50nf or very near and one thing the pot i mean the 180k pot it is a standard cos i have search every electronic shops here all get is 100k 2k2 50k 200ohms 500k im talking about this circuit Making a 3KVA Modified Sine Wave Inverter Circuit thank you sir for the respond.
Daniel, the values are not so critical, try tweaking them yourself using your own desired parts until you get around 200Hz at pin#3 of that particular 555 or 50Hz at the bases of the driver transistors.
You can take the help of an online "555 calculator" for getting the exact part values.
can u please help me i need to build a battery charger whi ch can charger 2 batteries in series to give out 24vollt output voltage. am provided with a solar panel of 30v and 8A
you can try the design given in the following post:
https://www.homemade-circuits.com/2012/02/how-to-build-automatic-6-volt-12-volt.html
if i want to use a 9V,1A to power the circuit outside?
So the circuit has two alternatives to power. if the main power is not there then will be diverted to battery power. However, when the main power back then, the battery will be charged and the circuit outside still got a 9v power. That is, outside the circuit could not drop out of power. could it be done?
Thank you 🙂
It can done using a PNP transistors configured as follows:
the base and emitter must be connected to DC, obtained from the mains.
the base connected to ground via a 1k or a suitably calculated resistor
and collector to the output
……base ad emitter to the positive (+) of the DC obtained from the mains.
can i get the program codes for the IC u r using .
LM3915 is not a programmable IC.
What is the 1N4148's cathode connected to?
to one of the IC outputs
Hi my name is Samadi,
I have 6 solar panels each 200W and 38v, and 2 batteries each 12v and 200 ah, now can I use the above circuit in 24v and for up to 50 amps?
Second I made 24 inverter local made from transistors 2N3055, with the mentioned systems the ceiling fans, washing machines and other motors are making noise even I used 50v AC capacitor in output AC side but still the same, could you please help me? My E-mail Address: Ghafoor.samadi@wfp.org
Hi, the above circuit is not designed to handle above 50AH battery, you can try the following circuit instead:
https://www.homemade-circuits.com/2011/12/high-current-10-to-20-amp-automatic.html
check the inverter without any load, if it stays quiet would indicate towards a mismatch or overload issue…if without load also it makes noise then the transformer could be assumed to be defective.
Hi sir This is Fahad.
i have 4 "3.7 v, 2200mah" rechargeable cell which is connected parallel.
i try to charge it with 5v nokia charger. 6v transformer and 9v transformer. but after long time charging it is not fully charge. kindly suggest me how do i charge it. i use these cell as a emergency light.
Hi Muhammad, even a single of these cells cannot be charged using a cell phone charger at normal speed because each of the cells will require an optimal rate of 2 amps, that means together all the 4 would require around 8 amp current.
you can try charging each cell individually using a 4.5V 2 amp transformer or smps adapter.
Hello, I just hit the publish button but get no acknowledgement of what I wrote.
We are looking for a charger, a parts kit, or rapid supply of necessary parts to charge cells (with wire clip connectors) at 1.7 to 3.6 volts and 20 to 40 amps. We need to get something going within a week, in Iowa.
sorry, we don't sell spare parts.
Sir, can you please elaborate about the part mentioned as 120 near IC LM338, what is that actually.
it's a resistor 120 ohm 1/4 watt
once more question ?
Should the input needs to be greater than 24 Volts, or
(what would be the minimum voltage so that i can use this circuit to charge battery's up-to a voltage of 12V) should there be any other major changes that needs to be done to avoid input of 24v
The input can be upto 32V without any change in the circuit, only the LM338 pot needs to be adjusted for setting up the correct charging voltage to the battery.
however for a 12V battery the minimum input can be an 18V supply
Hello sir!
My name is Goran,
and i want to ask, up to what current can handle the charger circuit (for a long time charging)?
Thank you!
Hello Goran, the maximum current output is 5amps, you can upgrade the IC LM338 for more current by following the steps explained in the following article:
https://www.homemade-circuits.com/2015/07/designing-customized-battery-charger_13.html