In this post I have explained a four simple yet a safe way of charging a Li-ion battery using ordinary ICs like LM317 and NE555 which can be easily constructed at home by any new hobbyist.
Although Li-Ion batteries are vulnerable devices, these can be charged through simpler circuits if the charging rate does not cause significant warming of the battery., and if the user does not mind a slight delay in the charging period of the cell.
For users who want rapid charging of the battery, must not use the below explained concepts, instead they can employ one of these professional smart designs.
Basic Facts about Li-Ion Charging
Before learning the construction procedures of a li-Ion Charger, it would be important for us to know the basic parameters concerned with the charging Li-Ion battery.
Unlike, lead acid battery, a Li-Ion battery can be charged at significantly high initial currents which can as high as the Ah rating of the battery itself. This is termed as charging at 1C rate, where C is the Ah value of the battery.
Having said this, it is never advisable to use this extreme rate, as this would mean charging the battery at highly stressful conditions due to increase in its temperature. A 0.5C rate is therefore considered as a standard recommended value.
0.5C signifies a charging current rate that's 50% of the Ah value of the battery. In tropical summer conditions, even this rate can turn into an unfavorable rate for the battery due to the existing high ambient temperature.
Does Charging a Li-Ion Battery Require Complex Considerations?
Absolutely not. It's actually an extremely friendly form of battery, and will get charged with minimal considerations, although these minimal considerations are essential and must be followed without fail.
A few critical but easy to implement considerations are: auto cut-off at the full charge level, constant voltage, and constant current input supply.
The following explanation will help to understand this better.
The following graph suggests the ideal charging procedure of a standard 3.7 V Li-Ion Cell, rated with 4.2 V as the full charge level.
Stage#1: At the initial stage#1 we see that the battery voltage rises from 0.25 V to 4.0 V level in around one hour at 1 amp constant current charging rate. This is indicated by the BLUE line. The 0.25 V is only for indicative purpose, an actual 3.7 V cell should never be discharged below 3 V.
Stage#2: In stage#2, the charging enters the saturation charge state, where the voltage peaks to the full charge level of 4.2 V, and the current consumption begins dropping. This drop in the current rate continues for the next couple of hours. The charging current is indicated by the RED dotted line.
Stage#3: As the current drops, it reaches its lowest level which is lower than 3% of the cell's Ah rating.
Once this happens, the input supply is switched OFF and the cell is allowed to settle down for another 1 hour.
After one hour the cell voltage indicates the real State-Of-Charge or the SoC of the cell. The SoC of a cell or battery is the optimal charge level which it has attained after a course of full charging, and this level shows the actual level which can be used for a given application.
At this state we can say the cell condition is ready to use.
Stage#4: In situations where the cell is not used for long periods, a topping up charging is applied from time to time, wherein the current consumed by the cell is below 3% of its Ah value.
Remember, although the graph shows the cell being charged even after it has reached 4.2 V, that's strictly not recommended during practical charging of a Li-Ion cell. The supply must be automatically cut off as soon as the cell reaches 4.2 V level.
So What does the Graph Basically Suggest?
- Use an input supply which has a fixed current and fixed voltage output, as discussed above. (Typically this can be = Voltage 14% higher than printed value, Current 50% of the Ah value, lower current than this will also work nicely, although charging time will increase proportionately)
- The charger should have an auto-cut off at the recommended full charge level.
- Temperature management or control for the battery may not be required if the input current is restricted to a value which does not cause warming of the battery
If you don't have an auto cut-off, simply restrict the constant voltage input to 4.1 V.
1) Simplest Li-Ion Charger using a single MOSFET
If you are looking for a cheapest and the simplest Li-Ion charger circuit, then there cannot be a better option than this one.
A single MOSFET, a preset or trimmer and a 10k ohm 1/4 watt resistor is all that you would need to make a simple and safe charger circuit.
Before connecting the output to a Li-Ion cell make sure of a couple of things.
1) Since the above design does not incorporate temperature regulation, the input current must be restricted to a level which does not cause significant heating of the cell.
2) Adjust the preset to generate exactly a 4.1V across the charging terminals, where the cell is supposed to be connected. A great way to fix this voltage is to connect a precise zener diode in place of the preset, and replace the 10 k ohm with a 1 k ohm resistor.
For the current, typically a constant current input of around 0.5C would be just right, that is 50% of the mAh value of the cell. So, the input supply should have a fixed 12V DC and a current that is 50% of the Li-Ion cells mAH rating.
Adding a Current Controller
If the input DC supply source is not current controlled, in that case we can quickly upgrade the above circuit with a simple BJT current control stage as shown below:
Advantage of Li-Ion Battery
The main advantage with Li-Ion cells is their ability to accept charge at a quick, and an efficient rate. However Li-Ion cells have the bad reputation of being too sensitive to unfavorable inputs such as high voltage, high current, and most importantly over charging conditions.
When charged under any of the above conditions, the cell may get too warm, and if the conditions persist, may result in leaking of the cell fluid or even an explosion, ultimately damaging the cell permanently.
Under any unfavorable charging conditions the first thing that happens to the cell is rise in its temperature, and in the proposed circuit concept we utilize this characteristic of the device for implementing the required safety operations, where the cell is never allowed to reach high temperatures keeping the parameters well under the required specs of the cell.
2) Using LM317 as the Controller IC
In this blog we have come across many battery charger circuits using the IC LM317 and LM338 which are the most versatile, and the most suitable devices for the discussed operations.
Here too we employ the IC LM317, although this device is used only to generate the required regulated voltage, and current for the connected Li-Ion cell.
The actual sensing function is done by the couple of NPN transistors which are positioned such that they come in physical contact with the cell under charge.
Looking at the given circuit diagram, we get three types of protections simultaneously:
When power is applied to the set up, the IC 317 restricts, and generates an output equal to 3.9V to the connected Li-ion battery.
- The 640 ohm resistor makes sure this voltage never exceeds the full charge limit.
- Two NPN transistors connected in a standard Darlington mode to the ADJ pin of the IC controls the cell temperature.
- These transistors also work like current limiter, preventing an over current situation for the Li-Ion cell.
We know that if the ADJ pin of the IC 317 is grounded, the situation completely shuts off the output voltage from it.
It means if the transistors conduct would cause a short circuit of the ADJ pin to ground causing the output to the battery shut off.
With the above feature in hand, here the Darlingtom pair does a couple of interesting safety functions.
The 0.8 resistor connected across its base and ground restricts the max current to around 500 mA, if the current tends to exceed this limit, the voltage across the 0.8 ohm resistor becomes sufficient to activate the transistors which "chokes" up the output of the IC, and inhibits any further rise in the current. This in turn helps keep the battery from getting undesired amounts of current.
Using Temperature Detection as the Parameter
However, the main safety function that's conducted by the transistors is detecting the rise in temperature of the Li-Ion battery.
Transistors like all semiconductor devices tend to conduct current more proportionately with increase in the ambient or their body temperatures.
As discussed, these transistor must be positioned in close physical contact with the battery.
Now suppose in case the cell temperature begins rising, the transistors would respond to this and start conducting, the conduction would instantly cause the ADJ pin of the IC to be subjected more to the ground potential, resulting in decrease in the output voltage.
With a decrease in the charging voltage the temperature rise of the connected Li-Ion battery would also decrease. The result being a controlled charging of the cell, making sure the cell never goes into a run away situations, and maintains a safe charging profile.
The above circuit works with temperature compensation principle, but it does not incorporate an automatic over charge cut off feature, and therefore the maximum charging voltage is being fixed at 4.1 V.
Without Temperature Compensation
If you want to avoid the temperature controlling hassles, you can simply ignore the Darlington pair of BC547, and use a single BC547 instead.
Now, this will work only as a current/voltage controlled supply for the Li-Ion cell. Here's the required modified design.
Since, here temperature control is not employed, make sure that Rc value is correctly dimensioned for a 0.5 C rate. For this you can use the following formula:
Rc = 0.7 / 50% of Ah value
Suppose the Ah value is printed as 2800 mAh. Then the above formula could be solved as:
Rc = 0.7 / 1400 mA = 0.7 / 1.4 = 0.5 Ohms
Wattage will be 0.7 x 1.4 = 0.98, or simply 1 watt.
Likewise, make sure the 4k7 preset is adjusted to an exact 4.1 V across the output terminals.
Once the above adjustments are made, you can charge the intended Li-Ion battery safely, without worrying about any untoward situation.
Since, at 4.1 V we cannot assume the battery to be fully charged.
To counter the above drawback, an automatic cut off facility becomes more favorable than the above concept.
I have discussed many op amp automatic charger circuits in this blog, any one of them can be applied for the proposed design, but since we are interested to keep the design cheap and easy, an alternative idea which is shown below can be tried.
Employing an SCR for the Cut-Off
If you are interested to have an auto cut off only, without temperature monitoring, you can try the below explained SCR based design. The SCR is used across the ADJ and ground of the IC for a latching operation. The gate is rigged with the output such that when the potential reaches at about 4.2V, the SCR fires and latches ON, cutting of power to the battery permanently.
The threshold may be adjusted in the following manner:
Initially keep the 1K preset adjusted to ground level (extreme right), apply a 4.3V external voltage source at the output terminals.
Now slowly adjust the preset until the SCR just fires (LED illuminated).
This sets the circuit for the auto shut off action.
How to Set-Up the Above Circuit
Initially keep the central slider arm of the preset touching the ground rail of the circuit.
Now, without connecting the battery switch ON power, check the output voltage which would naturally show the full charge level as set by the 700 ohm resistor.
Next, very skilfully and gently adjust the preset until the SCR just fires shutting off the output voltage to zero.
That's it, now you can assume the circuit to be all set.
Connect a discharged battery, switch ON power and check the response, presumably the SCR will not fire until the set threshold is reached, and cut off as soon as the battery reaches the set full charge threshold.
3) Li-Ion Battery Charger Circuit Using IC 555
The second simple design explains a straightforward yet precise automatic Li-Ion battery charger circuit using the ubiquitous IC 555.
Charging Li-ion Battery Can be Critical
A Li-ion battery as we all know needs to be charged under controlled conditions, if it's charged with ordinary means could lead to damage or even explosion of the battery.
Basically Li-ion batteries don't like over charging their cells. Once the cells reach the upper threshold, the charging voltage should be cut off.
The following Li-Ion battery charger circuit very efficiently follows the above conditions such that the connected battery is never allowed to exceed its over charge limit.
When the IC 555 is used as a comparator, its pin#2 and pin#6 become effective sensing inputs for detecting the lower and the upper voltage threshold limits depending upon the setting of the relevant presets.
Pin#2 monitors the low voltage threshold level, and triggers the output to a high logic in case the level drops below the set limit.
Conversely, pin#6 monitors the upper voltage threshold and reverts the output to low on detecting a voltage level higher than the set high detection limit.
Basically the upper cut off and lower switch ON actions must be set with the help of the relevant presets satisfying the standard specs of the IC as well as the connected battery.
The preset concerning pin#2 must be set such that the lower limit corresponds to 1/3rd of the Vcc, and similarly preset associated with pin#6 must be set such that the upper cut off limit corresponds to 2/3rd of Vcc, as per the standard rules of the IC 555.
How it Works
The entire functioning of the proposed Li-Ion charger circuit using IC 555 takes place as explained in the following discussion:
Let's Assume a fully discharged li-ion battery (at around 3.4V) is connected at the output of the below shown circuit.
Assuming the lower threshold to be set somewhere above the 3.4V level, pin#2 immediately senses the low voltage situation and pulls the output high at pin#3.
The high at pin#3 activates the transistor which switches ON the input power to the connected battery.
The battery now gradually begins charging.
As soon as the battery reaches full charge (@4.2V), assuming the upper cut off threshold at pin#6 to be set at around 4.2v, the level is sensed at pin#6 which immediately reverts the output to low.
The low output instantly switches off the transistor which means the charging input is now inhibited or cut off to the battery.
The inclusion of a transistor T1 stage provides the facility of charging higher current Li-Ion cells also.
The power supply must be selected with voltage not exceeding 6V, and current rating 1/2th of battery Ah rating.
Circuit Diagram
If you feel that the above design is much complex you could try the following design which looks much simpler:
How to Set up the Circuit
Connect a fully charged battery across the shown points and adjust the preset such that the relay just deactivates from N/C to N/O position....do this without connecting any charging DC input to the circuit.
Once this is done you can assume the circuit to be set and usable for an automatic battery supply cut off when fully charged.
During actual charging, make sure the charging input current is always lower than the battery AH rating, meaning if suppose the battery AH is 900mAH, the input should not be more than 500mA.
The battery should be removed as soon as the relay switches OFF to prevent self discharging of the battery via the 1K preset.
IC1 = IC555
All resistors are 1/4 watt CFR
IC 555 Pinout
Conclusion
Although the designs presented above are all technically correct and will perform the tasks as per the proposed specifications, they actually appear as an overkill.
A simple yet effective and safe way to charge a Li-Ion Cell is explained in this post, and this circuit may be applicable to all forms of batteries since it perfectly takes care of two crucial parameters: Constant-Current and full charge auto cut-off. A constant voltage is assumed to be available from the charging source.
4) Charging Many Li-Ion Batteries
The article explains a simple circuit which can be used for charging at least 25 nos of Li-Ion cells in parallel together quickly, from a single voltage source such as a 12V battery or a 12V solar panel.
The idea was requested by one the keen followers of this blog, let's hear it :
Charging many Li-ion Battery Together
Can you help me design a circuit to charge 25 li-on cell battery (3.7v- 800mA each) at the same time. My power source is from 12v- 50AH battery. Also let me know how many amps of the 12v battery would be drawn with this setup per hour...thanks in advance.
The Design
When it comes to charging, Li-ion cells require more stringent parameters compared to lead acid batteries.
This becomes especially crucial because Li-ion cells tend to generate considerable amount of heat in the course of the charging process, and if this heat generation goes beyond control may lead serious damage to the cell or even a possible explosion.
However one good thing about Li-ion cells is that they can be charged at full 1C rate initially, contrary to lead acid batteries which doesn't allow more than C/5 charging rate.
The above advantage permits Li-ion cells to get charged at 10 times faster rate than the lead acid counter part.
As discussed above, since heat management becomes the crucial issue, if this parameter is appropriately controlled, the rest of the things become pretty simple.
It means we can charge the Li-ion cells at full 1C rate without being bothered about anything as long as we have something which monitors the heat generation from these cells and initiates the necessary corrective measures.
I have tried to implement this by attaching a separate heat sensing circuit which monitors the heat from the cells and regulates the charging current in case the heat starts deviating from safe levels.
Controlling Temperature at 1C Rate is Crucial
The first circuit diagram below shows a precise temperature sensor circuit using the IC LM324. Three of its opamps have been employed here.
The diode D1 is a 1N4148 which effectively acts as the temperature sensor here. The voltage across this diode drops by 2mV with every degree rise in temperature.
This change in the voltage across D1 prompts A2 to change its output logic, which in turn initiates A3 to gradually increase its output voltage correspondingly.
The output of A3 is connected to an opto coupler LED. As per the setting of P1, A4 output tends to increase in response to the heat from the cell, until eventually the connected LED lights up and the internal transistor of the opto conducts.
When this happens the opto transistor supplies the 12V to the LM338 circuit for initiating the necessary corrective actions.
The second circuit shows a simple regulated power supply using the IC LM338. The 2k2 pot is adjusted to produce exactly 4.5V across the connected Li-ion cells.
The preceding IC741 circuit is an over charge cut off circuit which monitors the charge over the cells and disconnects the supply when it reaches above 4.2V.
The BC547 at the left near the ICLM338 is introduced for applying the appropriate corrective actions when the cells begin getting hot.
In case the cells begin getting too hot, the supply from the temperature sensor opto coupler hits the LM338 transistor (BC547), the transistor conducts, and instantly shuts off the LM338 output until the temperature comes down to normal levels, this process continues until the cells get fully charged when the IC 741 activates and disconnects the cells permanently from the source.
In all 25 cells may be connected to this circuit in parallel, each positive line must incorporate a separate diode and a 5 Ohm 1 watt resistor for equal distribution of charge.
The entire cell package should be fixed over a common aluminum platform so that the heat is dissipated over the aluminum plate uniformly.
D1 should be glued appropriately over this aluminum plate so that the dissipated heat is optimally sensed by the sensor D1.
Automatic Li-Ion Cell Charger and Controller Circuit.
Conclusion
- The basic criteria that needs to be maintained for any battery are: charging under convenient temperatures, and cutting off the supply as soon as it reaches the full charge. That's the basic thing you need to follow regardless of the battery type. You can monitor this manually or make it automatic, under both cases your battery will charge safely and have a longer life.
- The charging/discharging current is responsible for the temperature of the battery, if these are too high compared to the ambient temperature then your battery will suffer heavily in the long run.
- Second important factor is never allowing the battery to discharge heavily. Keep restoring the full charge level or keep topping it up whenever possible. This will ensure that the battery never reaches its lower discharge levels.
- If you find it difficult to monitor this manually then you can go for an automatic circuit as described on this page.
Have further doubts? Please let them come through the comment box below 🙂
hamid says
Hello: In plan number 1 🙁 Simplest Li-Ion Charger using a single MOSFET), the explanation given does not match the diagram shown!Thank you.
Swagatam says
Thank you, please check it now!!
mohd ak says
Hello, for the circuit with the LM317, can you please explain how did you calculate the resistance of each resistor and also why did you choose a 3V zener diode. thank you.
Swagatam says
Hi, you can use the following software to calculate the Lm317 output voltage:
https://www.homemade-circuits.com/lm317-lm338-lm396-calculator-software/
3V zener was selected so that the SCR can never be triggered for any voltage below 3V.
0.8 ohm resistor decides the max charging current for the battery, using Ohms law.
mohd ak says
so with R1 as 240ohms and R2 as 700ohms, the calculator shows an output voltage of 4.9V. How did you come to the conclusion that the battery required this voltage to charge? also what is the charging current in this case?
Swagatam says
The maximum voltage is set at 4.9V, but the cut off must be set at 4.1V using the preset.
Charging current is
I = V/R = 4.1 / 0.8 = 5 amps approx.
5 amp is the max range, you can reduce it by increasing the 0.8 ohm resistor vaalue.
mohd ak says
Thank you for your reply. Now if i want to calculate the exact resistance of the 1k resistor without having to manually adjust it until i the SCR turns on, how can i do the calculation? what is the exact value of the resistance required? Thank you
Swagatam says
The SCR circuit can be difficult to setup and I won’t recommend this circuit, because there are much easier and effective alternatives.
You can try the second circuit instead, with current control.
You can replace the MOSFET with a TIP122 transistor, and set the preset to an exact 4.1V output.
It will charge your 3.7V li-ion battery safely and effectively upto 4.1V, providing an 85% to 90% charging.
mohd ak says
Got it, however i am trying to understand the SCR circuit properly, and i am confused as to why do you have two 1K resistors, why can’t you have just one variable resistor and remove the other 1K, does that work?
Swagatam says
If you have only the variable resistor, and if you accidentally move it to the extreme positive end, then your LED and SCR both can get damaged, that is why the other 1k is positioned, to safeguard against this situation.
mohd ak says
Thank you very much for your replies. very helpful. just one last question. why is the 1K resistor being used as a COM? if this entire circuit is connected to a full bridge rectifier that converts AC to DC for power supply of this circuit, and the full bridge rectifier is already grounded, do i need the COM in the battery charging circuit or should it also be grounded?
Swagatam says
You are welcome!
Can you please specify which 1k you are referring to?
I did not understand what you meant by “1K resistor being used as a COM?”
Please elaborate on this..
There’s no grounding needed in any DC circuit, the negative line from the bridge-rectifier itself refers to the ground line.
mohd ak says
so in the circuit that has the BT169 SCR, at the very bottom there is a 1K resistor, and there is an arrow pointing downwards at it, i assumed this arrow is a COM. Can you explain what is meant by that arrow if it is not a COM?
Swagatam says
The arrow refers to the middle wiper arm of the preset or the trimpot.
mohd ak says
oh okay i got confused by this, thank you for clarifying. so the other 1k resistor that is closer to the LED, is that also a variable resistor or a regular 1k resistor? in short, how many variable resistors does this circuit have?
Swagatam says
There’s only one variable resistor, the other 1k is a regular resistor.
I have simplified the design, you can check it in the following link. I have put the 0.8 ohm resistor on the positive line, which makes more sense:
https://www.homemade-circuits.com/wp-content/uploads/2024/05/li-ion-charger-with-scr.jpg
Pankaj Ramawat says
Good Evening swagatam & Thankyou for Ur circuit diagrams but I have doubt in 4th number can u help me, I want to build CCCV charger for Lithium-ion battery 4S3P So what modification needed in 4th number circuit for it. I want to build online UPS using lithium ion battery of200w so can u help me for this. I hope u reply me & give solution for it, Thanks in advance
Swagatam says
Hi Pankaj,
The 4rth circuit will not be able to implement a balanced charging, since it is not a balance charger. However a balance charger is mostly not needed if the series/parallel batteries are rated with precisely identical specifications.
Also, if you charge the li-ion battery at 0.5C rate the temperature monitor circuit will not be required.
Also, if you keep the full charge level of the charger at 1V lower than the actual full charge level of the battery, then an auto-cut off will not be needed.
So basically, the 4rth circuit is unnecessarily complex, you can actually charge your batteries effectively and safely using any simple CC CV voltage regulator circuit.
Please let me know if you want to try one such regulator circuit for charging your battery
Pankaj Ramawat says
Yes I want to try this circuit for my project can u help me for building CC CV charger I need this type of charger, Thank you in advance ??
Swagatam says
OK, here’s the regulator circuit which you can use to charge your Li-ion battery:
https://www.homemade-circuits.com/wp-content/uploads/2024/02/CC-CV-li-ion-charger-circuit.jpg
For 4S Li-ion battery the optimal safe maximum voltage range should be around 16.2V (4.1 x 4), so before connecting the battery make sure to adjust the VR1 to precisely 16.2V across the output terminals of the circuit. This takes care of the constant voltage adjustment.
Please tell me the mAh rating of the battery so that I can tell you how to calculate the R2 value for implementing the constant current output.
Pankaj Ramawat says
3.7V/ 2000mah or 2600mah lithium ion cell each cell I am using 4Series 3 parallel/4 parallel plz help me to design CC CV charger for my project
Swagatam says
In the previous diagram the value of R2 can be 1.3 / 0.6 = 2 ohms 1 watt. The input supply can be from any 20V DC adapter with a minimum current of 2 amps.
Pankaj Ramawat says
Can this diagram work with CC CV mode? I have some doubts on the above circuit why there 3v Zener diode used?
Swagatam says
It is a CV CC circuit, 3V decides the minimum output voltage, if you don’t want it you can replace it with a short.
Pankaj Ramawat says
Sir I want to design 3.7×4=14.8v nominal voltage lithium ion battery charger & sir how 3V decides minimum output voltage. Plz help regarding this, I am finding solution from 2 months
Swagatam says
3V is the minimum setting, you can use VR1 to set the maximum voltage to 4.1 x 4 = 16.4V or 16.2V, please read the instructions which I provided with the previous link.
Stephen Adams says
Li-Ion Battery Charger Circuit Using IC 555 will not work as the BD139 will never turn on!The earth to the 5v regulator and the 555 IC are both on the collector side of transistor!
The power supply earth is on the emitter of the transistor, so never the two will meet unless the transistor is turned on from the 555 IC which is without power!
Swagatam says
Thank you for pointing out the mistake! I will try to correct the circuit soon using a PNP approach instead of the NPN.
OK, I have replaced the diagram with a new one using PNP transistor.
Nelio Abreu says
Hi Swagatam,
In the circuit using the SCR can I charge 2 3.7V Batteries of 1000mAH each connected in parallel (to achieve 2000mAH)?
Swagatam says
Hi Nelio,
the SCR circuit is not confirmed practically so i cannot suggest much about that circuit.
Frankly speaking you can charge a Li-Ion battery most efficiently using a an LM317 or LM338 circuit, there’s no need of an auto cut off. You simply have to set the maximum output voltage to 4.1V and use a constant current control in it. That’s all is needed.
If you need an auto cut off then I would recommend using an op amp circuit for that.
Nelio Abreu says
Hi Swagatam,
Won’t there be any danger of the batteries be constantly under charge without the auto cut off?
To use a circuit with op amp, will require more space than there is available.
Swagatam says
Hi Nelio,
A Li-Ion battery can overcharge once it reaches the 4.2V mark. But since we are keeping the LM338 output fixed at 4.1V only, it can never reach an overcharging situation. Keeping the max charging voltage 0.1V less will also help to enhance battery life.
At 4.1V the Li-ion battery can remain connected to the charger without any fear of over charging.
Nelio Abreu says
Hi Swagatam, a resistor of 700 Ohm will be dificult, eaven in 1%. Does it has to be that value?
Swagatam says
Hi Nelio, You can adjust the values of the 240 ohm and 700 ohm resistors using the following software, and find the appropriate values which may be available in the market.
https://www.homemade-circuits.com/lm317-lm338-lm396-calculator-software/
Nelio Abreu says
Hi Swagatam, in the circuit with SCR, I assume the LED will light during charging, and after completion will turn off, since there will be no current at the gate of the SCR, correct?
Swagatam says
Hi Nelio,
The LED will remain shut off until the battery voltage reaches the full charge threshold, when the current through the LED will trigger ON the SCR. you are right the LED cannot get current once the SCR is switched ON. That means the LED will remain shut off all the time. It is merely used as a voltage dropper for the SCR gate.
BillP says
I am looking for a discharge, then charge circuit for Lithium-Ion 24-28vdc pack. So, each pack consists of 6 cells. Our float voltage is around 28vdc. Presently we discharge, disconnect and connect to a charging system. We charge at about 1 amp.
Swagatam says
I would recommend you following circuit, just make sure to replace the LM317 with an LM338 IC.
https://www.homemade-circuits.com/wp-content/uploads/2019/07/Li-ion-charger-LM317.jpg
You can set the output voltage to the battery at 27.5 V using the 4k7 pot and current to 1 amp using the RC resistor.
For enhanced safety you can add individual over charge battery protection circuitry to each of the cells
Allan says
(Very interesting artical but not too much help with my problem I am trying to setup a charge system to charge 8 lithium cells in series parallel to give me a 14.4 voltage pack for some drills I have, the batteries fit in the battery case’s with a little adjustment. I have been looking at the Charging Many li-lon batteries and though this could be modified to do the job.
Thankyou in advance Allan Brown
Swagatam says
I guess you have 4 cells in series in the pack (2 of these in parallel). Considering 4.2V as the full charge level of each cell, the total full charge level of the pack should be 4.2 x 4 = 16.8V.
The last concept could be very difficult and lengthy to implement. I would rather recommend using a simple LM338 based power supply, with its output voltage adjusted at slightly lower than the full charge level, maybe at 16.5V. This will allow optimal charging of the pack and also ensure the batteries are never over charged.
Godspower says
Good day mr Swag , thank you very much for the quick responses, here is my questions
1. What is this 0.8E resistor? if am correct is it the same as 800ohms resistor?
2. what other exact value can replace 700E resistor?
3. please i will like to see a sample of this 0.8E resistor if the image can be uploaded here sir
NOTE: My questions are from the above circuit (Employing an SCR for the Cut-Off)
thank you sir
Swagatam says
Good day Godspower,
1) 0.8E = 0.8 Ohms or a 1 Ohm will also work
2) 700 E = 700 ohms, you can replace it with a 1K preset for precise output voltage adjustments.
However, please note that the ScR circuit can be very difficult to adjust and set up, instead an op amp based design looks more preferable.
Godspower says
Noted sir, thank you very much
Godspower says
Good day Mr Swagatam. thanks for the quick response. please the 0.8 ohms or 1 ohms can only give output of 500mA.
which other resistor can you recommend for me that can give me maximum of 1000mA to charge multiple batteries.
thanks you.
Swagatam says
Godspower,
I will recommend you to use the following circuit which is foolproof and hassle free. Just make sure to keep the output voltage slightly lower than the full charge level of the battery. For example if the full charge level of the battery is 4.2V, then adjust the pot to produce a output of 4.1V or 4 V. In doing so, no auto cut off will be required
The formula for RC current limiting resistor is
RC = 0.6 / maximum charging current
https://www.homemade-circuits.com/wp-content/uploads/2019/07/Li-ion-charger-LM317.jpg
You can replace LM317 with LM338 for optimal response at 1 amp
Josip says
Useful post about Li-ion battery chargers. Thank You for it.
Swagatam says
Thanks for your valuable feedback, glad you liked it!
Jorge says
Hi, my friend, Swagatam!
I have two 1.5V 3000mWh li-ion polymer rechargeable batteries and one 3v li-ion 1/2AA (CR1425).
What circuit can you recommend for charging them?
Swagatam says
Hi, Jorge,
According to me the LM317 based charger is the best for any Li-ion battery. The only thing that needs to be done is to keep the charging voltage 0.1V lower than the full charge level of the battery. In this way the battery can never be over charged, and can be charged without an cut off. Make sure to adjust the current to 50% of the battery’s mAh rating
charis says
Hi, Using Temperature Detection as the Parameter circuit, is there a difference if I use one darlington transistor e.g. BC517 instead of two BC547?
also for calculating the output voltage for three cells in serial, will the following equation apply?
Vout= Vbat+Vdiode+Vsense => Vout=(3*4.15)+0.6+0.3=13.35V
Swagatam says
Hi, yes BC517 should also work.
The 0.6V is not required in the formula. The following formula will do:
Vout = Vbat + Vdiode
Prosper says
What is SCR?
Kenia says
Hola si quiero un circuito para cargar una batería de litio de 3.7 a 4.2 V y con una salida de 3A como modificaria el circuito, para una forma segura de su carga y descarga.
Swagatam says
You can use the LM317 circuit, replace the LM317 with LM338. And adjust Rc to get exact 3 amp at the output. Also make sure to adjust the output voltage to exactly 4.1 V
Kenia says
Cuál de los circuitos que presentas, me puedo guiar por favor
Swagatam says
The LM317 IC circuit at the top.
Mike says
Hey swag i have a quick and hopefully simple question, i have a 42v lion battery, 10s2p, 6ah. The current voltage is 26.7v. is there a safe way for me to restore this battery back to it’s full 42v, i have a 36v lion charger @ 2amps available should i use that first then put it in the 42v charger after the 36v charger brings it to 36v? Or do you think it would be too much current? I have plenty of resistors and a few reels of smds on hand, plenty of caps and some 1amp smd skow blow fuses aswell. Thanks in advance any advice in not blowing up my house is greatly appreciated.
Swagatam says
Thanks Mike, for the interesting question. I think your assumption is perfectly correct. Using the 36V charger initially makes sense and you should use it until the charge voltage of the battery is restored to 36V, and then you can connect the 42V charger for charging the battery to the full level. You can use 6 amp current with the 36V source, and reduce it to 3 amps for the 42V charging
Mehmet OVACIKLI says
Dear Swagatam, first of all hello would it be soeun if we used these circuits in lead acid circuits?
Swagatam says
Hello Mehmet, yes definitely you can use the above circuits for charging lead acid battery also.
Dady says
I need a automatic charger that can charge ( 7 li-on battery rated 3.7v 3800mah) the 7 batteries in series to give 26.6v and in parallel to give 38000mah. Thank
Swagatam says
you can try one of the options explained in the following article:
https://www.homemade-circuits.com/usb-automatic-li-ion-battery-charger/
Scott says
Ok now for the fun stuff.
My idea so far is working well now as long as i am mentoring the re-charging.
Now i need to have it shut off when the battery has been charged.
The ideas i have seen for this all have one thing in common and that is a V-ref so it can be monitored and controlled.
However that doesn’t quite work with my idea where i want it to re-charge different types that have different voltages. (selected via a rotary switch by the user)
Now if i have lets say 2 types to re-charge today, one is say a 4.7v cell and the other is a 9.7 pack.
I set the CC and V-out ect. for the type and hit start (simple latching circuit).
The V-ref will also need to change to the selected V-out ?
This is where i know my thinking is not quite right.
My thought is to use a trusty lm431 and make use of another layer on the Voltage select rotary switch.
But why im sure that would work it seems to make this all way more complex than it needs to be.
My other thought is to know if there is a common cut-off voltage when a battery is charged.
Im thinking that comes out to 2.5v above the battery rating and happens to also be the V-ref of lm431.
So if its going to always be about 2.5 above the rating of any given battery then i won’t need to dual track with more complex switching and makes it all much simpler.
As you can tell my thinking at this point is all over the shop and could use some thoughts about the problem.
If i were only charging 4.7v battery’s or 9.7 and that’s it, then no problem but in my case would not meet my specs. (ease of use, can re-charge a wide range of types safely and auto-cut-off/error detection)
Anyway i thought id ask the big brains here for some nudge in the right direction.
Scott
(i will come back to the need for a START button later but is a simple latching circuit that does what it says)
Swagatam says
A reference voltage is used when an automatic cut-off is employed, for example using an op amp. Here’s an op amp based example for charging a li-ion with fixed reference and variable cut-off point:
https://www.homemade-circuits.com/usb-automatic-li-ion-battery-charger/
Another design could be using a linear transistorized power supply such as the following, which has an adjustable current and adjustable voltage output:
https://www.homemade-circuits.com/wp-content/uploads/2021/01/Bench-power-supply-compressed.jpg
The TR1/TR2 could be replaced with a single TIP122
For Li-ion battery, the overcharge limit is approximately 15% of the printed value, and for a lead acid battery this is around 17%, according to my assumptions.
so 15% of 3.7 gives around 4.2V, and 17% of 12V gives around 14V
Scott says
I am trying to make a more universal battery charger using 2 LM-317’s.
The first is set as a Constant Current source with a multi-position switch to select the CC i want.
The last LM-317 is and adjustable voltage reg. that lets me set the voltage for the battery’s i plan to charge.
The idea is so i can re-charge NMH or Li types regardless of there configuration.
This would be a slow type charger and will not exceed the limits of a normal LM-317.
Some of the ideas here will be helpful options so it can all be monitored and turn off on error or when done.
Many thanks for all of the great ideas.
I would be interested in any thoughts about my planned project as i may not have considered all aspects of what i want.
I get man used Li and NMH types that are all still good so i want to make them usable in other projects.
One charger that can cover most types seems logical.
Scott (ICET)
Swagatam says
Thank you for the useful suggestion, yes that’s definitely possible and the idea can be used for charging all types of NiMH and Li-Ion batteries safely. I appreciate your feedback.
Scott says
Thanks
Yah im thinking ill use fixed resisters for the constant current source and rotary switches to select the range, the same for the output voltage regulator value because most common rechargeable battery packs we use have known values and ratings right on them (also simple math).
No pesky control knobs to bump (lol).
Anyway i like simple and LM-317s also have many safeguards in them already.
so ill try something like 200 ma (low setting) 400 ma (med setting) 800ma (high setting).
The output reg. voltage would be common battery pack types 3.7, 4.7 and so on.
I am only using it for small battery’s and not doing fast charging so i think it will be quite safe.
I will not be pumping in much current or voltages any higher than the rated value (your idea to not fully charge them to max is right on in my tests too), Long life, low risk.
Anyway we know most all of the common types used and there ratings.
The other options you and the others have covered quite well (who doesn’t like feature’s).
So at least i can save a few packs from ending up in a landfill and use them to run something interesting with.
Many thanks for sharing your ideas and helping with some of the math.
Scott (ICET)
BTW: In 30+ as a tech i only every saw 1 battery ever explode. it was a FAKE Li cell from the wonhunglo market we all love so much. (be safe out there).
Swagatam says
Sounds good, and this will help you to create a good power supply for the batteries. Hope the readers will also find the concept helpful. Please keep up the good work.
Scott says
Well i started to lay this out then remembered something that matters when using 2 lm317’s like this and that is, Each one needs its own heatsink!
Do not share one common heatsink for both.
If you do then you get a condition called thermal runaway and well it just will not work right.
Others can explain this problem better than i can.
Anyway you will need 2 heatsinks not just one big one.
Ok well back to finding out who stole my resistors 🙂
Have fun making stuff.
Swagatam says
If you want to put two semiconductor devices in parallel then definitely you will want to put them over a common a heatsink so that they can share the dissipation and work uniformly. Putting them on separate heatsinks would cause dissimilar dissipation, ultimately resulting in one of the devices reaching a thermal runaway situation.
However for LM317 thermal runaway may not be possible since these are thermally protected internally, but not putting them on a common would mean one of them shutting down before the other or both not working collectively.
Scott says
Ok well ill start at the experiment i did and how i reached my conclusion.
I breadboarded it up to tweak out the values i needed. i had no heat sinks on the 317s at that time.
At 18v with 500ma load they got no hotter than my cup of coffee was. (thought nothing more of it).
As i was laying out a proto board for that part of of it i decided to add a common heatsink anyway.
It did not seem to really need one but why not.
So i attached both the lm317 (as a C.C.) and the 317 (as a v.reg) with the proper insulator hardware.
At that point i powered it up again to make sure things were working as they had before.
Within a few min the common heatsink got so hot i could not touch it.
Same 18v same 500ma load i had before.
So i took off the heat sink as that was the only change to it and it all went back to working as it had on the breadboard where nether of them got hotter than my coffee.
So i remembered running into this a long time ago when i was a young pup and took my circuit to one of the gray beards at work and he looked it over said said the problem wasn’t my circuit but the cooling, he called the condition thermal runaway.
The solution was exactly the same this time as well.
I had long forgot about it over the years.
Now with each on there own heat sink its all working very well.
So perhaps the term thermal runaway was not exactly the right term for what went wrong but seemed fitting enough.
Anyway im now working on adding in more of the ideas you have posted for monitoring and auto cutoff as im building it out in stages.
I just though i should point out what i ran into and how i fixed it.
Many thanks for the feedback and help. So far its all working as the math said it should :).
Swagatam says
Thanks for the clarification….That could have happened due to some unidentified reasons, you may have to investigate on that, but I am pretty sure adding semiconductors in parallel on a common heatsink help them to work uniformly and more efficiently.
Adding separate heatsink may allow one of the devices to work harder than the other and carry more current than the other, which is not good.
Ray says
I need a simple small circuit board to provide low voltage lithium battery protection in the handle of a 20 volt power tool. Do you have a circuit that would work for this?? Thanks
Swagatam says
What is the voltage specification of the battery!
Ray says
I have two one is a 20 volt 1.5 ah 5 cell lithium battery the other is a 20 volt 3.0 ah. I suspect there rating those at the top end there probably 18 volt
Swagatam says
OK, I think you can try the following concept:
The first diagram can be used for cutting off the load during a low voltage situation. For your application the TIP36 can be replaced with a TIP127, and TIP122 can be replaced with a 2N2222
https://www.homemade-circuits.com/battery-deep-discharge-protection-circuit/
Ray says
Thanks for all your help.
Thomas Croswell says
I don’t see that this question was asked…
I want to be able to keep a Li-ion battery charged while also using it at the same time. There may be moments when the charging circuit is disconnected from its source and the load will be 100% on the battery and there will be other times (this is the normal case) where there is a supply voltage that can be used to charge the battery and provide current to the load. Would this scenario dramatically change your charging circuits? If the supply voltage is a constant 12V DC, is there a preference for the design?
Swagatam says
It may be possible by bifurcating the charging supply into two paths through individual diodes, one to the battery and the other to the load. You can try the concept presented in the second last diagram from the following article:
https://www.homemade-circuits.com/opamp-low-high-battery-charger/
Mitsof says
I tried to use a mobile phone charger to charge my battery but it is depleting it for some reason. I tried other chargers some do the same ,some dont. The same does a 13 volt power supply I used.
Wyatt says
Your method of explaining everything in this paragraph is really nice, every
one be capable of simply understand it, Thanks a lot.
Swagatam says
You are welcome!
Scott says
Very well done.
I am a electronics bench tech with over 30 years under my belt.
I will be trying your last solution as my needs are robotic based and will need the best protection with long life of the power solution.
One thing as an ET (CET) is that when dealing with mains there are many requirements for safety to consider as well as making use of fuses in all of theses designs (things can and will go wrong).
As far as the rest of your designs go they are quite solid and well explained.
I would be a poor tech by not pointing out a few concerns not shown in the schematics.
No matter what way you do them ALWAYS add simple fuses and in my case i am including spike protection as well.
Heed the words of a bench tech ‘Always assume worst case situations of any high current design’.
Many thanks.
Swagatam says
Thank you for your suggestions, I appreciate it.
Actually most of the designs presented in this blog are basic ideas intended for educating the hobbyists regarding the working and the purpose of the circuit, the external aspects have not been included in it.
Moreover, DC circuits being low current devices, fuses are not critically required, since the dangers of a fire hazard is negligible in Dc circuits. Also selecting a fuse for a DC circuit can be problematic, since in a short circuit situation the circuit parts can burn in a split second, even before a fuse can react. Instead of a fuse a current controlled power supply looks more preferable…
Having said that, fuses must be included in AC section of the circuit, for example at the input side of a transformer, or an SMPS.
If you any further regarding the circuits, please let me know.