In this article we study a simple 3.7V li-ion battery charger circuit with auto-cut off, which can be charged from your computer USB port or any other 5 V regulated source.
How it Works
The circuit can be understood with the help of the following description:
The IC LM358 is configured as a comparator. The IC LM741 is not used since it is not specified to work with voltages lower than 4.5V.
Pin#2 which is the inverting input of the IC is used as the sensing pin and is attached with a preset for the required adjustments and setting.
Pin#3 which is the non-inverting input of the opamps is reference at 3V by clamping it with a 3V zener diode.
A couple of LEDs can be seen wired across the output pin of the opamp, for detecting and indicating the charging condition of the circuit. Green LED indicates the battery is being charged while the red illuminates as soon as the battery is fully charged, and supply is cut off to the battery.
How to Charge using USB Port
Please remember that the charging process can be quite slow and may take many hours, because the current from USB of a computer is normally very low and may range between 200 mA to 500 mA depending on which number port is used for the purpose.
Once the circuit is assembled and set up, the below shown design can be used for charging any spare Li-Ion Battery through the USB port.
First connect the battery across the indicated points, and then plug in the USB connector with your computer's USB socket. The green LED should instant become ON indicating the battery is being charged.
You can attach a voltmeter across the battery to monitor its charging, and check whether the circuit cuts off the supply correctly or not at the specified limit.
Since the current from a computer USB can be quite less, the current control stage can be ignored and the above design can be much simplified as shown below:
Video Clip showing the automatic cut off action, when the Li-Ion cell is charged upto 4.11V:
Please note that the circuit will not initiate charging unless a battery is connected prior to power switch ON, therefore please connect the battery first before connecting it to a 5 V supply source.
An LM358 has two opamps which means one opamp is wasted here and remains unused, therefore LM321 may be tried instead to avoid the presence of an idle unused opamp.
How to Set up the above 3.7 V Li-ion Charger Circuit:
That's extremely easy to implement.
- First, make sure the preset is moved at the ground side fully. Meaning, the pin#2 should be at ground level through the preset initially.
- Next, without any battery connected, apply an exact 4.2 V across the +/- supply lines of the circuit, through an accurate adjustable power supply.
- You will see the green LED coming ON instantly.
- Now, slowly rotate the preset, until the green LED just shuts OFF, and the RED LED switches ON.
- That's all! The circuit is now all set to cut off at 4.2 V when the actual Li-Ion cell reaches this level.
- For the final testing, connect a discharged battery to the shown position, plug-in the input power through a 5 V source, and have fun watching the cell getting charged and cut-off at the stipulated 4.2 V threshold.
Constant Current CC Feature Added
As can be seen , a constant current feature has been added by integrating the BC547 stage with base of the main BJT.
Here the Rx resistor determines the current sensing resistor, and in case the maximum current limit is reached, the potential drop developed across this resistor quickly triggers the BC547, which grounds the base of the driver BJT, shutting down its conduction and charging of the battery.
Now, this action keeps oscillating at the current limit threshold, enabling the required constant current, CC controlled charging for the connected Li-ion battery.
Current Limiting not Required for USB Power
Although a current limiting facility is shown, this may not be required when the circuit is used with an USB since the USB already is quite low with current and adding a limiter may be useless.
The current limiter should be used only when the source current is substantially high, such as from a solar anel or from another battery
Improving the Circuit Further
After some testing it appeared that the Darlington transistor was unable to switch sufficient current to a Li-Ion cells, especially which were deeply discharged. This resulted in a difference in voltage levels across the cell, and across the supply rails of the circuit.
To combat this issue, I tried to improve the design further, by replacing the single Darlington BJT with a pair of NPN/PNP network, as given below:
This design improved the current delivery significantly, and resulted in a reduction in the margin of difference between the battery terminal voltage level and the actual supply voltage level, and therefore false cut-off switching.
The following video, shows the test result using the above circuit:
Adding Current Control to the above Design
Using a 5V Relay
The above designs can be also built using a 5V, which will ensure the best possible current delivery to the cell and faster charging. The circuit diagram can be seen below:
Please Note:
This article was substantially changed recently and therefore the older comment discussions may not match with the circuit diagram shown in this present updated design and explanation.
Another Ideal 3.7 V Battery Charger Circuit with Auto Cut-off
Here's a 3.7 V Battery charger circuit which looks perfect in for the automatic cut-off and a self-monitoring of the 3.7 V battery.
In the relay based circuit previous to the above design, there seems to a serious drawback.
In the previous design the battery needs to be connected first, before applying the input power. This is crucial, otherwise the relay can start chattering, if the power is switched ON first without a battery connected.
But in the above new design where the battery can be seen connected on the left side, the chattering of relay problem is completely eliminated.
Moreover, this design has an added advantage. The circuit will be able to continuously monitor the battery level and self-regulate the circuit to ensure that the battery is automatically disconnected when it reaches full charge level, and automatically connected to the supply when it is discharged to some lower level.
The input supply can can be from any 5V regulated source. However make sure the current spec of the supply is restricted to 0.5 C. Meaning the current of the 5V source must not be 50% of the battery mAh value.
How to Adjust the Preset
The auto cut off preset setting up is easy.
Initially, do not connect any battery or the input supply, and rotate the preset wiper to the ground level.
Next, take a variable DC power supply. Adjust its output to precisely 4.1 V, which is the optimum full charge level of a standard 3.7 V battery.
Connect this supply to the circuit from the left side, across the points where the battery is supposed to be connected.
You will see the GREEN LED illuminating. At this stage the relay must switch ON, however it won't since there's no 5V supply from the right side of the circuit. No worries, we can still setup the circuit by looking at the LEDs.
After this, slowly adjust the preset until the GREEN LED just switches off and the RED LED just switches ON.
That's all, the auto cut off set up is complete for the circuit.
Now, to test the circuit LIVE, you can connect a discharged 3.7V cell across the indicated points, and a 5 V supply from the relay side and see the actually cut-off happening, as soon as the battery is fully charged at 4.1 V.
Nigel Wallbridge says
Hi does anybody have a circuit to charge an 18v LI ion drill battery. The Bosch battery has 5 pins, the purpose of which I don’t know. I can see the +ve and -ve output but don’t know what the other three do.
Swagatam says
Hi, you can any one of the circuits explained above, and replace the 5 V with an 18V input.
Or you can also simply use an LM338 circuit, set the output voltage to precisely 18V and start charging your battery.
However, for both the options you will have to make sure you are using the right amount of current for the input supply.
NÉLIO ABREU says
Hi Swag,
In the relay version, I supose that the number of cells connected in parallel is related to the current of the relay, correct?
I’m planning to connect 6 Batteries of 3.7V by 4800mA/H in parallel in order to obtain 28800mA/H
Best Regards.
Nélio
Swagatam says
That’s right Nelio, the contact rating must be capable of handling the specified charging current. For 28 amps, the relay size might be substantial, with very low coil resistance, and that will call for an equally well rated driver transistor….
Nelio Abreu says
Hi Swag,
In the last circuit, using a power supply of 9V 1A, I have to replace the relay for a 9V one. And what about the zener diode? Should I replace it?
This is considering that I’m going to charge a 7.4V battery
Swagatam says
Hi Nelio, except the relay and the supply input there’s nothing else that needs to be changed in the last circuit design. Rest can be as is.
Nelio Abreu says
Ok.
Thanks.
Be Safe, Be good.
Best Regards.
And Merry Christmas.
Nélio.
Swagatam says
Glad to help Nelio, Merry Christmas to you too!
Nelio says
Hi Swag,
You said once that I can charge any type of battery with this circuit.
Also NiMH and NiCD?
Best Regards.
Nelio
Swagatam says
Hi Nelio, yes that’s correct, you can use any battery including NiCd/NiMH, just make sure to limit the current to 10% of their mAh value.
RAJESH KUMAR says
Thank you sir swag for very past answer. Sir can I also used this circuit to charge 2 to 4 pcs 18650 in parallel battery connection without modification?
Hi Ravi, you can use the last design for charging
4 cells in parallel,
you can also use the second last design
by replacing
the 2N2907 with TIP127
???????? HELLO SIR
PLEASE GUIDE ME, I HAVE A POWERRCHARGING INDICATOR BANK PCB USING 8 PIN IC AND 3 NO’S USB OUT BUT 8 PIN IC BRUST, CAN YOU MAKE THE DESIGN FOR THAT, 4 LED USE FOR
CHARGING INDICATOR. THANKS
Swagatam says
Thank you Rajesh,
for a 4 LED monitor you can apply the concept explained in the following article:
https://www.homemade-circuits.com/4-led-temperature-indicator-circuit/
You just have to replace the thermistor with a 4.7V zener diode
Daiyang Gilbert says
Dear swagatam,
I am a 63 year old man. I studied architectural tech.but for 35 years make electronics my hobby. Please I appreciate you a lot as you enlighten so many freely. I am happy with you. Keep up with the good work. I wish others could share their knowledge.
Thanks very much. May God help you the more. Thanks once again.
Mr Daiyang Gilbert.
From Nigeria.
Swagatam says
Thank you dear Daiyang, I appreciate your interest and devotion towards electronics. Thanks for your valuable feedback!
Shelton says
Dear Sir Swagatam
I already have have learned many circuits from your site. First, thank you very much. I need to learn how to charge 2×3. 7v lion battery charging with auto cut off circuit. Please help me.
Thank you
Swagatam says
Thank you dear Shelton, I have explained the process elaborately in the following two articles, which you can refer to:
4 Simple Li-Ion Battery Charger Circuits – Using LM317, NE555, LM324
3 Smart Li-Ion Battery Chargers using TP4056, IC LP2951, IC LM3622
Ranveer says
Hello Sir, I have one kinetic energy harvester Which producing 8-10v dc pulsating with 100 Amp( Not Constant). I want to store this direct energy in the battery 7.4 v, 5000 mAmp Li-ion battery ( 2s2p – 3.7 v, 2500 mAmp per cell ( four cells)). I want to charge it with all protection. . is it possible to store energy? Can you suggest any Ic or ckt for that?
(Note- if charging time take longer (in days or months-as I have very low current ) then fine for me also but somehow I want to store energy in the battery )
Thank you in advance for your suggestion.
Swagatam says
Hello Ranveer, your input current from the harvester is 100 amp or 100 mA? Under any case you can simply use a LM317 based voltage regulator set at precisely 8.2 V output. That’s all, your battery will be charged without any issues, but time may depend on the input current.
Asad says
In last diagram i want to use a 12v Relay at the place of 5V. What Changes will i make?
Swagatam says
You can replace 5V relay with 12V relay, battery with a 12 V battery, and supply input with 15V
Chandrasekhar says
Sir i want to do a 12volt lithium battery charging Circuit which has over charge and over discharge protection without a relay coz relay is bulky. Pls make a circuit..
Swagatam says
Chndrashekhar, you can try the following circuit:
Chandrasekhar says
Hi swagtam, thanx for early reply. Can i put my 12v lion battery with it? Also pls let me know if i want only charging and discharging feature, can i remove A2 and A3 comparator from the circuit? What the use of bc547 connected with lm317? Is lm 317 necessary.. pls explain the circuit before making the project.
Thank you for your kind cooperation and time sharing..
Learned a lot from you and will continue as a student from you..
I beat no other site giv such a huge variety of circuit and explaining them individual queries…
Swagatam says
Thanks Chandrashkhar, I am glad you are learning from this site!
You can remove A1, A3, and use A2, A4 as given., the BC547 and 1 ohm is used for controlling current at a fixed rate.
If your source supply is voltage controlled and current controlled then you can remove the LM317 circuit, and use the supply directly with the op amp transistor circuit
You can use 12v li-ion for charging with this circuit, just make sure to use a charging current that’s around 1/3rd of the battery Ah rating, and set the A4 preset to cut off at the full charge level, and A2 at the full discharge level.
Nélio says
Hi Swag,
I need to charge Li-Ion batteries of 1.5V 3000W.
Can I use this circuit for it, and if so, how to I adjust it?
Thanks.
Best Regards.
Nélio
Swagatam says
Hi Neilio, which circuit do you wish to use, the last one?
Nelio says
Hi Swag,
I can use the last circuit.
To charge 1 or 2 1.5V 3000W Li-Ion Batteries.
Best Regards
Nelio
Swagatam says
Hi Nelio, 3000 watts means 3000/1.5 = 2000Ah?? Are you sure about this?
Nélio says
Hi Swag,
Yes. I have 4 batteries of those but no charger.
And they both are Li-Ion, 1.5V and 3000W
Can I use the last circuit? Or do you other that can be suitable, preferebly with auto-power off or that the battery can be left in the charger after finish
A charger that can charge 1 or 2.
Best Regards.
Nélio
Swagatam says
Hi Nelio, for a 2000 Ah Li-Ion batt, the charging current has to be 1000 amps, I don’t know regarding any relay or transistor that will handle 1000 amps. Do you have any idea?
Nélio says
Hi Swag.
Sorry, there was a misswriting in the text…. it’s not 3000W but 3000mW…. one single letter makes a diference…
Swagatam says
Hi Nelio, you can try the following design
Initially keep the preset to ground level, now without any battery connected switch ON the input supplies. Green LED will switch ON ….Adjust the preset slowly until the green LED switches OFF an RED LED switches ON…you circuit is set now, and ready for use.
Nélio says
Thanks for the circuit update.
Best Regards.
Swagatam says
You are welcome Nelio!!
Rav Denver says
Good day sir swag, can I used this circuit to charge 18650 battery. Thank you
Swagatam says
Hi Rav, yes you can!
Ravi denver says
Thank you sir swag for very past answer. Sir can I also used this circuit to charge 2 to 4 pcs 18650 in parallel battery connection without modification? Thank you again sir
Swagatam says
Hi Ravi, you can use the last design for charging 4 cells in parallel, you can also use the second last design by replacing the 2N2907 with TIP127
Rav Denver says
Thank you so much sir for answering my query. By the way this project is intened for backup power of my kitchen and shower room motion sensor and also for dark activated switch in the front of my house. Instead of using lead acid battery. Thank you again sir.
Swagatam says
That sounds great Rav, thanks for the feedback!
Ebi says
Hello
Can we use this charger for Samsung 3.85 li-ion battery?(Full charge voltage is 4.4v)
Swagatam says
yes you can use it for all types of batteries. Just make sure the input current is not above 50% of the battery Ah rating, and if you find the battery getting warm you can reduce the current further down
byTTech Innovative says
Hi. dear friend. thank you so much for sharing.
i modified your design and want to share here.
first of all, i used LM7805 voltage regulator for, Stable operation op-amp and relay. because even if i change the input voltage, the cut-off point changes in your design. Also, can not set clearly cut-off voltage because of battery voltage not stable as LM7805 output. So the 358 op-amp couldn’t work reliable.
Here is upgraded design. i separated voltage source of the op-amp and voltage reference of it. See my design is more stable and more reliable. thanks to you all. best regards.
https://i.postimg.cc/Zqc18v6t/Ekran-Al-nt-s.jpg
Swagatam says
Hi, thank you for your interest, appreciate it. However the above explained design was written for USB operation which has a constant 5V already. Second, as explained in the article the preset adjustment is supposed to be done by supplying a stable 4.2V from a variable power supply, NOT by connecting a battery….
Please read the explanation carefully…
byTTech Innovative says
Hi, i updated the again. Ofcorse i added a few extra components. but now:
* Cut-off voltage setup more reliable.
* Auto Selects the working voltage, so dual mode auto switches to 5v input mode or 5.6v to 24v input mode. The 5.6v zener and relay auto switching to LM7805 voltage regulator to supply op-amp and charging relay even the input voltage over 5.6v to 24v.
* So we can charge 12v or 18v batteries with this design.
* Also we can charge car batteries because i used 6A diode on supply line.
# Hope if i can improve the project and helps everyone.
Best regards. Thanks.
https://i.postimg.cc/0Q5CgkDf/lion-charge.png
Swagatam says
OK thank you very much for your efforts, appreciate it very much!
Harpreet Singh says
Hi Sir,
I tried the last circuit, encountered an issue, It’s charging the battery rated 3.7 li-ion. but, the green led keeps glowing, I’m not able to set cutoff voltage, with the method you mentioned. Can you please help here. I’m using 5v 1Ah mobile charger as input.
Swagatam says
Hi Harpreet. did you follow the instructions mentioned in the article, without the battery connected. You will have to feed a 4.2V to the battery and then adjust the preset until green LED shuts off.
If you are unable to do this then the op amp or your circuit may be having some problems.
Harpreet Singh says
Sir, I do the same thing you suggested,
I feed a fully charged battery (4.2 V) to the battery terminal without connecting to the power supply and set the preset to red LED glow. After that when I connected a discharged battery(3.9) to the circuit and connect the power supply of 5.1V 1Ah, the red LED glows which means its charged. What I’m doing wrong, please suggest.
Swagatam says
Harpreet,
A fully charged battery will not give 4.2V, it may give 4V or even 3.9V, so this idea may not work…you will have to do it through a LM317 adjustable voltage regulator circuit…op amps are very accurate even 0.2V difference will give wrong results.
Also, after the setting up is done you must keep the battery connected and then switch ON the 5V input. And make sure you have a 1uF connected between pin2 and ground.
The green LED will glow momentarily when power is applied, which means the transistor will be allowed to switch ON and connect the battery with the supply and the green LED will lock until full charge is reached. But if the battery is fully charged the green LED will switch OFF and red will come ON.
Make sure the transistor are connected correctly….alternatively you may remove the green LED from the shown position and connect it in series with the 2N2907 base…this will give a clear idea whether the 2N2907 is switching ON or not when power is applied
Harpreet Singh says
Thanks for your valuable response, I’ll try this.
One more question what is the difference between 2N2907 and KN2907. As my transistor is marked as KN2907. What should be the alternative to 2N2907 if not available.
Thanks a lot, You are doing great! if possible please share your contact details @ arpit.randhawa2612@gmail.com need to discuss few things of your interest.
Harpreet Singh says
Hi Sir,
I’m referring the 2nd last circuit, Where I’m able to set the cut-off voltage to 4.2V, but after connecting a battery no matter fully charged or discharged, the red led is on. I’m using KN2907A in place of 2N2907. Please suggest what to do.
Swagatam says
Hi Harpreet, I’ll explain the simple working, then you can troubleshoot yourself.
The RED led will shut off and green will switch ON only if the input supply drops below the set 4.2V due to the battery discharge level.
When power is switched ON, regardless of the battery, the RED led must switch OFF for 1 second due to the 1uF capacitor which grounds the pin2 momentarily.
This ensures that the output of the opamp always starts with a logic HIGH, and turns ON the transistor so that the battery can get connected with the supply.
As soon as the battery gets connected it pulls down the supply below 4.2V, and this causes the opamp to lock to a HIGh output, with red led OFF and green ON.
This continues as long as the battery is charging, and reverts as soon as the battery reaches the 4.2V.
Now please check why your circuit is not responding to this function.
Connect an LED in series with the 2907 base to check whether it is switchin ON or not when power is applied
Harpreet Singh says
Sir,
Thanks for the help. The circuit is running fine at a supply input of 4.2V after diode( where ). But when I connect the supply of 5.1V before the diode changes happen.
1 case:- supply voltage = 5.1V, Voltage across Diode = 4.3-4.5 V, (which is already higher than the cutoff voltages)
2. after connecting battery and power supply:- supply voltage = 5V, Voltage across Diode = 4.3-4.5 V, means it does not pull down the supply below 4.2V.
The transistor 2907 is working correctly at input supply of 4.2V
Swagatam says
Harpreet, it means the battery is not accepting the current and dropping the voltage. Connect the battery directly to the supply line after the diode and check the voltage, this will prove whether the battery is pulling down the voltage or not. If it does, then the transistor is not working for sure.
Harpreet Singh says
You are right Sir, after connecting the battery directly it is merging voltage. As per you, transistor is not working properly. Please help to resolve this.
As if the circuit is working at 4.2V its should work on 5.1V 1A input. If the transistor needs to be replaced, what should be the correct one?
Swagatam says
Harpreet, in that case you can try a new transistor like a 2N2907, TIP127 or 8550 etc. The best option according to me is using a 5V relay as shown in the last diagram. The relay contacts will allow full transfer of power to the battery and a perfect response.
Naveen Rajpurohit says
Hlo sir., in your circuit you have used 1uf 25v capacitor is it ceramic or electrolytic vif electrolytic what are its terminals ??
Also i have to ask that you video shows 4.5v charged battery after the cutout its dangerous for the battery what should be done?? Plss reply
Swagatam says
Hello Naveen, the 1uF capacitor can be an electrolytic type.
The 4.5V is confusing for me also. It seems like some kind parasitic leakage and it is definitely not the Li-Ion voltage because the cut off is set at 4V so how can the Li-ion charge at 4.5V.
You can use a 5V relay instead as shown at the bottom of the post for ensuring a fail-proof result
Naveen Rajpurohit says
Sir one resister is unnamed in the figure pls check and notify me…..
Swagatam says
The LED resistor is also 1K
Ani Samuel says
Sorry, can you give us the type of power source we should be use that will give us exact 4.2v while setting the cut off? Can I use 4.2v cellphone charger to set that? That is connecting 4.2v cellphone charger at the wall socket and the circuit?
Swagatam says
You can use a LM317 adjustable regulator with 6V Dc input or you can use the following
The 10K pot can be adjusted to get 4.2V at the output whch can be used for setting up the op amp preset
Engr bashir says
Great!! Idea. But can you help us with one that we charge more li-ion battery like 12v 80ah
Swagatam says
Glad you liked it, it can be implemented by upgrading the transistor rating, as shown at the bottom of this post:
https://www.homemade-circuits.com/charging-li-ion-battery-12v-car/
Marcelo Wainstock says
Good night illuminated Swag.
I set up your circuit with the lm358 and it is working very well. I only removed the current controls because it fits my purpose better.
Thank you for your teachings.
I hope to be able soon to be able to develop your most elaborate projects
Swagatam says
Thank you Macelo,
I am glad it’s working, keep up the good work.
Mihai says
I want to give you another detail about the way the circuit i made works: I calibrated it at 10.1 V and it seems to charge normally (with a current flow of 28mA, green led on, red led off) only for the charging input 7.8 V or below (but the current flow decreases in the last case). What should be done?
Swagatam says
Yes the current will decrease as the battery gets charged to the full level, that’s normal. But 28mA is too low. How much current did you use in the input supply??
You can remove Rx and the BC547 if the input current is below 1 amp
Mihai says
I’m sorry if you already received this comment, but i can’t see it above. I used more power supplies, one of 100mA, and other of 6.7A. I observed that the green led glows and the battery is charging for an charging input of aprox. 8.8 V (7.8 V); if this value increases even a bit, the red led glows. Maybe i didn’t set up correctly the charger (i applied an 10.1 V across the battery connections, whitout a charging input beeing applied; i also tried this with a charging input beeing applied). What is the relation between the charging input value and the output voltage of the circuit (on battery conections)?
Swagatam says
Yes you may not have adjusted preset accurately, that’s why it may be not cutting off at the right 10.1V…you can try using a multiturn preset for more accuracy.
When you switch ON the supply, the battery immediately connects with the supply through the MOSFET. Since the supply current is relatively lower it instantly sinks and becomes equal to the battery level, and then gradually rises as the battery gets charged until the supply level and the battery level become equal. Meaning suppose your battery discharge level is 3.5 V, and the supply input is 4.2 V, the 4.2 V will immediately drop to 3.5 V, and will begin rising slowly as the battery charges up to the full level.
Mihai says
For charging a 8.4 V/280mA accumulator, in the diagram indicated in the link would be necesarry a current control facility? After setting up the charger to cut of at 10.1 V, could i use a power supply of 12V? How many mA should have this power supply? Thank you verry much for your help.
Mihai says
…and the accumulator type is Ni-Mh.
Swagatam says
Ni-Mh will also allow high current initial charging but will become quite warm…which is not good for the battery. Current control is not required as long as the battery is not warming up and stays at normal temperature below 35 degrees Celsius. You can use a supply lower than 50% of the mAh value of the battery, then current control won’t be required in my opinion.
I have done some more refinements in the design, and have checked it practically, also I’ll upload a video soon.
Here’s the correct diagram
https://www.homemade-circuits.com/wp-content/uploads/2019/07/USB-Li-Ion-Charger-automatic-1.jpg
Mihai says
Wouldn’t be better to propose, please, if possible, a charger with current control facility? (I would like to use the charger for 8.4V, Ni-Mh accumulators, 280mA or higher, and i’d like to use a standard power supply for all of them).
Swagatam says
Please see the last diagram in the following article, I have the post same diagram with a current control feature:
https://www.homemade-circuits.com/charging-li-ion-battery-12v-car/
Mihai says
…and the 2n2907 couldn’t be substituted with other transistor, i don’t have one available?
Swagatam says
you can use TIP32, or 8550 or any other with above 1 amp current rating.
Mihai says
I tested more the charger, but it doesn’t work like described in the article. Idon’t think the problem is the preset, i used a potentiometer and when aplling the 10.1 V on the charging input, the red led goes on and the voltage on the battery connections goes to 0 V(battery not conectet). Then, with this set up i connected the battery, then the power supply (the same 10.1 V), but the battery doesn’t charge, the red led is on. As i told you before, the red led goes off if i decrease the charging input voltage with some volts, but this voltage is not enought for fully charging the 8.4 V accumulator (there should be applied at the battery leads a voltage of 11.2 V). I mention that i used a BZX 3V0 zener diode, and the drop voltage on it is 2.11 V. How could i make my charger functional?
Swagatam says
The circuit a basic comparator circuit and there’s nothing complex in it, and it’s fully functional.
A pot will not work here, because a pot can be very sensitive to movements.
Use only a preset.
I have updated the setting up procedure with new and easier explanation, please follow it and apply it exactly as explained. You can remove the current control stage (BC547 and RX) completely, to avoid confusions.
Mihai says
I’m sorry i boughter you again, Mr. Swagatam. I substituted the potentiometer with a trimmer, as i saw you used in the video (a don’t have a multiturn available), but the problem persists. As power suplly, i used more of them (even a nokia charger, 350 mA). The current control stage is so critical for the problem it occured? (i use a 12 Ohm Rx, enabling a 50mA current.) Another question is: according to the set up procedure, when the circuit is set up to 4.2 V, the charging process will stop when the battery reaches this voltage, no matter the voltage applied to the input of the circuit, is that right or not? If this sentence is correct, then my circuit doesn’t work like this, the input voltage is critical for the limit at the charging proces stops. I don’t really know what else to do, other component of the circuit could be damaged? (i.e. the power transistor.) Thank you again.
Swagatam says
In the video you can clearly see how the system cuts off at the set 4.1 V, and it’s a very straightforward procedure. You can remove the current control stage just to check if it’s causing the issue. By the way 50 mA is a very low for any Li-Ion battery, which battery are you using?
The input actually does not matter if the current is low, because the input will drop to the battery discharged level until the cut-off threshold is reached.
Did you set the preset exactly as explained in the article? Because all op amp will sincerely follow the settings done across its input pins.
Mihai says
I use a Li-ion battery of 2000mA. I completely removed the control current stage, but the problem is still there: when i connect the battery, then aplly the 5V, the red led indicates the battery is full, and does not charge. And by the way, at 5V the green led bairly glows (it ca’t be seen, it glows a bit at 10.1V). Can you give another sugestion? I also thank you again.
Swagatam says
You can remove the green LED from the base and put it across pin1 of the IC and ground through a 1K series resistor, and see the results.
For 10V battery 5V will never work, if you use 5V then ue a 3.7V cell. or use 10.1V for the 10.1V battery.
for 2000mAh battery, you can try 500mA current
Mihai says
I removed the green led from the base of the power transistor, i put it across pin1 of the IC and ground through a 1K series resistor, and it glows, but still fade. And the general problem get bigger: now, the battery is charging no matter the red led is on or off (the cut current does’t works anymore).
Swagatam says
When you switch ON power does the supply drop to the battery level? Meaning if 10.1 V is the input does it drop to 8.4V?
Mihai says
First, why did you modified the tipe of the transistor in the schematic above? (initially, when i started adding comments, in the schematic was a TIP 142, and now there is a TIP 122!)
Swagatam says
You can use any Darlington transistor, it is not important, and will make no difference in the performance! I modified it because TIP142 was unnecessarily big and costly. You can even make a manual Darlington using BC547 and 2N2222 or any other similar combination.
Mihai says
I wiil answer your question with a question: In the circuit above, there is the charging input and the output on battery leads. When apllying a voltage on the charging input, battery connected, where the voltage should drop to the actual voltage of the baterry, on the charging input or on the battery leads? In my circuit, the voltage drops to the battery level on the battery leads, not on the charging input.
Swagatam says
The transistor will short the battery negative with the ground, that’s how it will start charging, and when this happens the battery terminals get connected with the supply input…. now the supply input and the battery voltage merge together to become one, and their voltages level become one…in the video you can clearly this.
If you are having different voltage on battery terminals and supply input, then it means your transistor is not conducting, and the battery is not connecting with the ground line.
Mihai says
And how could i be sure my transistor conducts? (is in a good state).
Swagatam says
Add a flashlight bulb in place of the battery and check its illumination, if the brightness is equal to when it is connected directly to supply, then it will mean your transistor is conducting fully.
If your existing transistor is giving problems you can make a Darlington pair using two 2N2222 together.
Or you can even try a MOSFET since your supply is at 9V, MoSFET will conduct a lot better than a BJT
Swagatam says
…I’ll do some more experiments and let you know tomorrow, to make the transistor section more accurate.
Mihai says
I tried the experiment with the bulb, when connected to the battery leads (whithout battery connected), it glowed more fade than connected to the power supply. But it seems something occured in the functioning of my circuit, because i tried to charge the 8.4 V/170mA battery with the folowing results:
– i setted up the circuit with a voltage of 10.1V;
– initialy, the power suplly voltage applied on charging input was 12.35 V;
-when battery connected, the voltage on it’s leads was 7.4 V;
-when i measured the voltage accros the power suplly, surprise! it decreased to 8.9 V, and the battery was charging with a current of aprox. 48mA (without current control);
– now is charging, but i don’t know if it will cut off correctly at the 10.1V.
Is this all right? Is the charger function correct?
Swagatam says
Technically this is not correct, but if the op amp cuts off at 10.1V then it may be fine.
Apparently, this may be happening due to transistor collector/emitter resistance.
Keep a voltmeter connected and check whether it cuts off at 10.1 V or not. At 10.1V the pin2 voltage must get higher than pin3, which will make pin1 voltage zero, and cut off the transistor.
In this set up you can again try putting an LED in series with the transistor base to get a clear indication about the transistor conduction
Swagatam says
Please modify as per this diagram, this one will show almost identical drop across the battery and the across the supply input
https://www.homemade-circuits.com/wp-content/uploads/2019/07/USB-Li-Ion-Charger-automatic.jpg
Mihai says
I have a new question: i observed that the circuit presented in the video uses a 2n2222 transistor, and the schematic above has two transistors: a BC 457 and a TIP 142. What is the correct schematic? (i want to use it for charging a 8,4 V accumulator Ni-Mh, 280mAh, as i mentioned in another post).
Swagatam says
The schematic presented in the article is more accurate.
Ahsan says
Hi!
This is amazing. I just want to confirm;
For 1200mAH battery;
Rx = 0.6/1.2 = 5 ohm
For 2400mAH battery;
Rx = 0.6/2.4 = 0.25 ohm
If both the calculations are correct, please share the resistor color code to be used. If otherwise, please guide.
Swagatam says
Hi Thanks, glad you liked it.
use 4.7 ohm instead of 5 Ohms: yellow, violet, black
For 0.25 ohms better to go for a wire wound resistor
Swagatam says
It’s not 5 ohms, it should be 0.5 ohms
use wire-wound resistors for both
Ahsan says
And what will be the wattage of the resistor? Is there a bottom limit or any wattage can be used?
Swagatam says
Multiply 0.6 with the current limit value, that will give you the wattage.
remmy says
pls
can
u send me a circuit diagram for liion battery 3000mah using lm324n
Swagatam says
Why do you need LM324?
remmy says
that is the only available one I can get
Swagatam says
You can try the last circuit from this article:
https://www.homemade-circuits.com/simplest-safest-li-ion-battery-charger/
Nai k es says
I tried the second circuit with exact part and its not working.!
Swagatam says
there’s only 1 circuit on this page, which second circuit are you referring t?
electro says
is there one like this that uses 555 timer?
Swagatam says
IC 555 will not work below 4.5V
Nélio Abreu says
Hi Swag,
Nice circuit…. Can I use it for charging a 7.4V Li-Ion battery? If so, what changes do I need to do?
Best Regards.
Nélio
Swagatam says
Thanks Neilio, you can use the very same circuit with no modifications, except the preset threshold setting.
Nélio Abreu says
Hi Swag,
Só I need to replace the Zener and ajust the 10K?
Best Regards,
Nélio Abreu
Swagatam says
Hi Nelio, No, the zener will not change. I meant to say that only the cut off threshold adjustment using the preset will need to be done as per the battery full charge specifications. I think it should be 8.4V for your case!
Nélio Abreu says
Hi Swag,
Can I leave the battery connected to the charger circuit after full?
Best Regards,
Nélio Abreu
Swagatam says
Hi Nelio, yes no problems, you can do it!
Nélio Abreu says
Hi Swag,
One last Question….
Can I charge Li-Po batteries with it, or is it only for Li-Ion?
Best Regards
NA
Swagatam says
Hi Nelio, you can charge any battery with this circuit. You can charge Li-ion, Lipo, lead acid, all will charge safely with this circuit. Just make sure to select Rx appropriately.
Ani Samuel says
Hello sir,
I must thank you for all your patience and kindness, my question is, will I use 6watts 6v solar panel on this circuit? Again what exactly should i use to power the circuit while adjusting the preset to get that 4.2v since you said we should remove battery ? Am very sorry if my question is out of point, am just a newbie.
Thanks.
Swagatam says
Hello Ani, the process will be the same, you will have to apply an external 4.2V across the supply line, and adjust the perset such that the RED LEd just switches ON and green LED switches OFF
Ani Samuel says
Thanks for the quick response, but the second question is, should I use 6watts 6v solar panel on the circuit? Can it work?
Swagatam says
Yes you can use 6V 6 watt panel for the mentioned battery.
Tolu says
Please how can I have a design of 5v solar panel, lithium battery (3.7v or any you recommend), and to charge Smart phone.
Swagatam says
The circuit mentioned above is the best circuit that you can get for charging a li-ion cell, you can apply it without any concerns.
Tolu says
Please, what’s the wattage of LED light bulb in phones and likely lumens. Thanks
Swagatam says
sorry, I do not have any idea about it.
Ziad Fawzi says
Thanks a lot.
miguel says
The transistor 2N2222 is a NPN …the correct transistor is a PNP like BC557…
With a NPN, as showed, the current max is 10mA with a PNP up to 100mA …
The schematic is wrong
Swagatam says
You seriously need to learn electronics…I can help you understand if you want.
nitin chaudhari says
Sir, can I use above circuit to charge a spare li-ion mobile battery using mobile charger with 5v and 2A output (as written on charger, another charger noted as 5v and 1 A)???
Also I don’t have device to set the value of preset ?
Can u suggest some fixed value of resistor??
Swagatam says
Nitin, preset is the easiest device to set, calculating fixed resistor practically can be very tedious, so you will have to use a preset here for the adjustments.
yes any 5V input source will work. as long as the current is not higher than the Ah level of the battery
nitin chaudhari says
Sir, I have li-ion mobile battery 3.7v . Can I directly connect it to 5v mobile chargers’ terminal to charge it or it requires to connect a diode??
Swagatam says
Nitin, If you are not using an automatic cut off circuit then you may have to include two 1N4007 diodes in series, so that the 5V drops to a safe 3.9V level.
A single diode will also work, but in that case you will have to monitor the charging voltage and switch it off as soon as 4.1V is reached.
Michael says
I’ve got a question that Google and YouTube hasn’t been able to answer. Is there a way of wiring 3, 18650 cells to get two simultaneous voltages. I’m trying to get 3.7 volts and 11.1 volts from the same three cell bank. Something like a series and parallel, probably with some diodes, type of setup maybe? Or would it be better to just go with series and run a step down converter for the 3.7 volt side of my project?
Thanks in advance,
Maintenance Mike
Swagatam says
nothing complex about it..you will have to connect them in series, the end terminals will allow you to get 11.1V, while the 3.7V can be extracted from the bottom most battery which has its negative acting as the ground…I hope you go it.
Michael says
Awesome, why didn’t I think of that. And also, thanks for the quick response. I see a portable stereo headphone amp / usb power bank in my near future. Woo whooo!
Swagatam says
Glad you liked my suggestion, wish you all the best…
Siso says
Sir,
First appreciate for your efforts for this compact simple charger. Sir can I use 18650 battery for safe charging by this circuit? The module available from China little expensive.
Swagatam says
Thank you Siso, yes you can use 18650 battery with this charger. Connect the battery first and then switch ON the input supply.
Solomon says
Hello sir, am requesting a circuit from you: a 12 to 5v 2A or 2.5A usb Charger circuit with for charging phone from 12v source
Swagatam says
Hi Solomon, you can try the following concept and slightly modify the coil and the R8/R9 values as per your required specifications
https://www.homemade-circuits.com/5v-pwm-solar-battery-charger-circuit/
jindro says
Sir good afternoon! can I charge 2 li ion batts. in parallel? is it better to use lm 321?
Swagatam says
Hi Jindro, you can use two Li-ion in parallel with this charger. LM321 is good, but 741 will also work equally well…
Morteza says
No sir I didnt connect zener diod but without it I recieve 2 volt output and cellphone dont charges,please help me ,I really need this circuit.I want to build a circuit that connects between mobile charger and mmobile and cuts off charging when it fully charges.
Swagatam says
connect the zener diode as I advised in my previous comment and check again….at any instant only one LEd should be ON, two cannot be ON, because the 741 output will be either “high” or “low” at any instant, never both..
morteza says
If I do this it will work correctly? because I measured output volyage andit was 2 volts.
Swagatam says
2V where? are you getting it after the zener connection?
after connecting the zener diode only one LED will be ON.
morteza says
I made this circuit but both LEDs are illuminate
Swagatam says
connect a zener diode in series with the pin#6 of the IC, between the LED junction and pin#6, see example here
https://www.homemade-circuits.com/make-6v-4ah-automatic-battery-charger/
sudhanshu says
i have 3.7 volt battery.. can i input 3.7 volt in this circuit.
Swagatam says
yes you can!
NoName says
is this only limited to 5V output?
Swagatam says
upto 18V
Firkan Hartanto says
Sir, can i charge 18650 with this circuit ? Tks
Swagatam says
Yes you can
Firkan Hartanto says
Should i change ic 741 with LM358 or not sir ? Tks a lot
Sherwin Baculi says
Hi there. I want to make my 18650battery into 11.1v . Do you have a balance circuit on it?
Swagatam says
what is your exact requirement? a 3.3V to 11V converter or 11v to 3.3V charger?….please clarify
putera irsyad says
Hello sir. Can u help me. Can I set a current to get 1ampere using the circuit u give and what component should I change to get 5volt 1ampere.
Then, I have a generator which can generate 20-50volt 400mA.if I apply the supply as a input for the circuit.can it work? Please help me sir.This for my assignment. Can u email the answer at irsyadkanashii@gmail.com.
Swagatam says
Hello Putera, for converting 20 to 50V 400mA into 5V 1amp you may have to employ a buck converter, and then the output from this buck converter could be applied to the above mentioned circuit.
Feathers says
Hello, sir. We are having difficulties in making this circuit work. We do not know if we are having trouble with the variable resistor. Also, can we use the digital voltmeter to the "To Cell Phone" instead of a discharged battery to know if a "battery" would charge since the voltage reading, if we are right, will increase in the DVM.
Swagatam says
Hello feathers, the circuit above is very simple and does not require any complex setting up procedures…please mention the problem specifically i'll try to help.
sorry I could not correctly understand your second question regarding usunf DVM with cell phone, how can that be possible?? please clarify
Shubham Wani says
Hello Sir,
I am trying to make the circuit for mobile to mobile charging, How can I modify this circuit to charge another mobile or which circuit I should use sir. Mobile A as a charger and Mobile B as a client. Both are having micro-usb connector at their ends. I tried using OTG (On to Go) connector but it is not working in all the device and current rate is also very low.
Hope for your positive and quick reply sir..
Thank you..
Swagatam says
Hello Shubham, the above circuit won't be required for mobile to mobile charging application….a boost converter circuit could be tried for the purpose, and to implement it successfully the charger mobile battery must be rated higher in terms of its AH rating.
the supply from the charger mobile will go to the boost converter and the output from the boost converter to the client mobile….that's all would be needed.
Faruqi Mohani says
Good day sir, I want to make a circuit with automatic cutoff when battery reached fully charge and need the output with 5v and 1A. I use samsung li-ion battery with 3.7v and 1000mAh. For the input i use samsung adapter with 5v and 2A.
Is it ok for me to use this circuit?
Is need to me to add regulator IC7805/LM368 in this circuit? Or no need because of the input 5v?
And lasty, i am not understand how to setting preset by connecting into the battery.
I hope you reply this comment. I really need your help sir.
Thank you sir.
Swagatam says
Faruqi, you can use the mentioned adapter for charging your battery.
7805 will not be required if the adapter is rated at 5V
use a 1 ohm 1 watt resistor for the current limiting resistor.
the setting up procedure is already explained in the article, please read it carefully. you will need a power supply adjusted at 4.2V for the setting up and this must supply must be fed from the battery side.
nguyenthe toan says
Hello sir,
I am an electric and electronics final year student. My final year thesis is portable smart solar battery charger for Li-ion battery(3.7V/1200mAh) from solar panel 5V/1000mAh which have LEDs indicator, overvoltage and overcurrent protection, etc. I was hoping sir can help me on how to make a solar charger smart. I mean both theory and PCB circuit.
That is what I have thought about developing so far sir. But i am not sure about the complexity of it therefore i am open to any new suggestion to improve this design.
Thank you for your quick feedback and I truly appreciate your assistance sir. Have a great day sir.
Swagatam says
nguyenthe toan, you can try the following design and see how it performs:
https://www.homemade-circuits.com/2015/10/smart-emergency-lamp-circuit-with.html
Debanjan Mitra says
Thank you sir i will try both circuits, Good night
Arun Kumar says
Who many battery 3.7v battery 1000ma to ? This circuit supportable upto battery amps
Debanjan Mitra says
Sir, i want to made a powerbank for my smartphon where i will used 6V 5.5Ah lead acid battery as a source and output should be 500mA please help me, Is any modification needed in this circuit?
Swagatam says
Debanjan, the current is not important, it's the voltage that should be compatible with the phone's charging voltage spec. You can use a 7805 IC circuit with your battery for implementing it as explained here:
https://www.homemade-circuits.com/2012/03/how-to-make-simple-dc-to-dc-cell-phone.html
Debanjan Mitra says
i already done this by 7805 and 7806 voltage regulator but there was some problem charge become very slow and the below 500mAh batteries are not charged, phon just on and off automatically. one more qus, Is pulse is needed to good recharge the Li-ion battery?
Swagatam says
try reducing the series limiting resistor value to 2 ohm or to 1ohm and see the response, and make sure the 7805 is mounted on a large heatsink.
you can also try a PWM in conjunction with a 7805 and see how it works. You can use the following circuit for feeding the PWMs to the 7805 input:
https://www.homemade-circuits.com/2012/01/how-to-build-simple-pwm-controlled-dc.html
Arun Kumar says
Who many input voltage and amps charging battery 3.7v 1000ma to 3000ma? What Mobile Phone charger used this circuit? How adjustable preset voltage? please answer this question
Swagatam says
you can use 1amp to 3 amp charging current for the mentioned batts respectively….use the mobile charger which are used normally for smart phones, the circuit explanation is already given in the article above.
romeo gasilan says
This is nice circuit but is the charging current is fixed at 200ma? How can i increase that to 500MA or 1A?? Im planning to put this as a charger of powerbank rated 3.7V
Swagatam says
thanks, you can upgrade the circuit to any desired current level by changing the 3 ohm resistor through the following formula
Resistor = 0.7/max charging current
Irfan Ahmad says
Thanks sir… i m waiting for that…!!!
And sir give me favor to inform me on this email id…
Irfan45@msn.com
Swagatam says
Irfan, I have published it here:
https://www.homemade-circuits.com/2015/11/make-this-power-bank-circuit-using-37v.html
Irfan Ahmad says
Dear sir i want to make a power bank using 3.7v rechargable cells. Can u help me to make a circuit for power bank. I want the output 5v 2amp… thanks in advance
Swagatam says
Dear Irfan, I'll to include the article soon in my blog…