Li-ion Battery Charging

325,662

372

112

Introduction: Li-ion Battery Charging

I love electronics and all about DIY.

Lithium based batteries are a versatile way of storing energy; they have one of the highest energy density and specific energy(360 to 900 kJ/kg) among rechargeable batteries.

The downside is that, unlike capacitors or other kinds of batteries, they can not be charged by a regular power supply. They need to be charged up to a specific voltage and with limited current, otherwise they turn into potential incendiary bombs.

And that's no joke, storing such a high amount of energy in a small and normally tight packaged device can be really dangerous.

But they're really useful in electronics due to their relatively high cell voltage; high energy density; their shape, size and capacity variety, and their charge/discharge efficiency. And that's why they're in almost every consumer electronics product.

As they are the best choice for small and medium sized portable devices, they're very popular among the DIY community. But charging is still a common problem to face when using them if you don't want to buy a specific charger.

Through this instructable you'll learn how to make a proper li-ion battery charger with widely available components and parts. And what's more important, you'll learn how does it work.

If you want to skip the theory, and actually build the charger, jump to step 6.

Step 1: A Bit of Theory

There are a lot of different types of lithium based batteries, but they're only different in the materials used and architecture. Scientists prefer to name batteries by their chemical name and the material used, and unless you are a chemist, these terms might get confusing. The table above offers clarity by listing these batteries by their full name, chemical definition, abbreviations and short form.

Different types of batteries have different characters and limitations, for more detail, i recomend you to visit this page.

The good thing is that most batteries are charged in the same way, at least the common ones you would usually find and/or use for a battery-powered project.

First of all, you need to know what's the "C-rate", because it's the basis of battery usage.

Most batteries are labaled with a nominal capacity, measured in amp-hour (Ah) or in milliamp-hour (mAh). That is basically the discharge current they can supply for an hour before being completely drained.

For example, you have a big battery labeled as 2400mAh or 2.4Ah, that means that it can push 2.4A trough your circuit, and discharge in an hour-long period of time. That would be a 1C discharge rate, discharging your battery at the rated capacity current.

If your battery supplies 1200mA to a circuit, it would be a 0.5C discharge rate, and it should last for two hours.

Some batteries allow higher discharge rates than 1C, and if you could discharge your battery at 4.8A (2C), it would last for 30 minutes. Some batteries used in RC systems allow very high discharge rates, as 10 or 20C, but this batteries are usually designed to fail rather than leave your plane unpowered in mid-flight, so they're not the safest ones.

When charging, it's basically the same, charging a 2400mAh battery at a maximum current of 1200mA would be a 0.5C charge rate. For safety reasons, most batteries should be charged at between 0.5C and 0.7C.

Most lithium-ion batteries are charged to 4.2v per cell, higher voltages could increase capacity, but reduce service life. And lower ones can increase battery charge cycles at the cost of less run time. (See the third graph)

A Charge cycle involves two main stages; constant current or CC and voltage source or CV, but some chargers skip or add more stages. (See graphs 1&2)

  • Most batteries are considered overdischarged or dead when their cell voltage is under 2.8-3v, but even in this situation, cells can be charged again and be reused. To save them, an "aconditioning" stage is done before charging, in this stage, the battery is charged with a 0.1C current limit until it reaches 3v

  • CC stage. This is the stage all the chargers use, and the only for most fast chargers. During the constant current stage, the battery is basically connected to a current-limited power supply, usually limited to 0.5-0.7 times the nominal battery capacity (that's from 0.5 to 0.7C) it lasts until the cell voltage reaches 4.2v. At the end of this stage, the battery charge is around 70-80%.

  • CV stage or saturation charge. When the battery reaches 4.2v per cell, the charger acts as a voltage limited power supply, The battery voltage remains at 4.2v while the charge current drops gradually. When the charge current is between 3 and 10% of the labeled capacity, the battery is considered fully charged.

  • Topping charge. Depending on the charger and the self-discharge of the battery, a topping charge may be implemented once every 500 hours or 20 days. Typically, the charge kicks in when the open terminal voltage drops to 4.05V/cell and turns off when it reaches 4.20V/cell again.

Usually, only stages 2 and 3 are used, and a full charge can take from 2 to 4 hours depending on the charge rate.

Li-ion does not need to be fully charged, as is the case with lead acid, nor is it desirable to do so. In fact, it is better not to fully charge, because high voltages stresses the battery. Choosing a lower voltage threshold, or eliminating the saturation charge altogether, prolongs battery life but this reduces the runtime. Since the consumer market promotes maximum runtime, these chargers go for maximum capacity rather than extended service life.

For more information you can visit this page.

Step 2: Designing the Charger Circuit

Around a year ago i began to work with operational amplifiers, and i decided to design a proper li-ion battery charger to learn to use them. I've learnt a lot about op-amps along the way designing this circuit and i wanted to share it, so people can make their own chargers instead of buying them.

The circuit uses the popular LM324 op-amp to create a current and voltage limited power supply. In this case, the current is adjustable with a potentiometer from about 160 to 1600mA, making it able to charge batteries with a wide range of capacities. The voltaje limit is 4.2v, so you don't damage your batteries.

It has a charge indicator LED that will lit up while the battery is charging and shut off when done.

I designed this circuit so it uses widely available and cheap through-hole components so anyone can build it.

Almost any general purpose op-amp can be used, no rail to rail operation needed, no high frequency or precision.

The tip122 transistors can be replaced with any pin-compatible transistor with a minimum DC current gain (Hfe) over 100 and a maximum collector current (Ic) over 2A.

The circuit is designed so anyone with basic soldering skills can easily build it.

Step 3: The Power Supply

The whole battery charger is powered by a 12v 2A charger, but since the LM324 is not a rail to rail op-amp, i need a second voltage rail to allow the op-amp sense voltages near GND (little voltages for little currents) and output low enough voltages to not turn on the darlington transistors when they shouldn't be.

If you look at the general schematic in the previous step, you can see that the transistor that controls the current flow and voltage across the battery is connected to a voltage rail and not to ground. That's because the LM324 output voltage cannot reach It's negative supply voltage, it can only go around 1.5-2v over it. At that voltage, the darlington transistor wouldn't be able to switch off and wouldn't limit voltage and current properly.

That's why i used one of the four op-amps (IC1a) and a transistor to create a virtual 2.5v rail over GND that sinks the current that flows through the charger part of the circuit.

R2 and R3 are a voltage divider with an output voltage of around 2.5v depending in the resistor tolerances, the op-amp drives the transistor in such a way that independently of the current flow, 2.5v will always drop across it.

The four op-amps and the LED indicators are powered directly from the 12v power supply, but the rest of the circuit is powered with 9.5v; between the 12v and the 2.5v rails.

If you use this design, but you want to make it more efficient, you can use rail to rail op-amps and a lower voltage power supply so you don't need to create an extra rail wasting power in an extra transistor.

The power LED indicates when the charger is on, and C2 smooths out the voltage from the charger.

Step 4: The Actual Charger

This is the important part of the charger, this is what takes care of limiting the current and voltage across the battery. In this case, the charge current can be selected with the 10k potentiometer, but the limit voltage will be a fixed 4.2v reference, regardless of the power supply voltage variations.

(You can see that in the general schematic, the potentiometer and R8 and R9 values are an order of magnitude higher, that's because the only pot i had was a 100K one, but the recommended value is 10K and for R8&9 the ones in the schematic above)

The op-amp in the left (IC1c) takes care of limiting the current to a maximum set with the potentiometer.Since the sense resistor is 1 ohm, the voltage across it will be the same as the current flowing through it.

The potentiometer ison top of a 1k resistor, across the resistor there's a 160mV drop, so the minimum output voltage of the potentiometer is 0.16v, in that case, the circuit would limit a maximum current of 160mA, ideal for charging a 300mAh battery.

The voltage drop across the potentiometer is around 1.6v So the maximum current limit will be slightly above 1.6A. Adjusting the potentiometer you can get any voltage output between 0.16 to 1.6v, meaning a maximum current limit anywhere between 160 and 1600mA.

The op-amp will drive the transistor in such a way that the voltage across the sense resistor is the same as the potentiometer output. And thanks to the 2.5v rail , the op-amp will be able to output a voltage low enough to almost switch off the transistor and set a low current limit.

At the end of the constant current stage, the battery voltage gets near a 4.2v limit, beyond which the battery would be damaged, at that moment, the voltage limitter part of the circuit kicks in and the constant voltage stage begins.

The 4.7v zener diode along with R10&11 voltage divider creates a 4.2v reference below VCC (~12v). When the voltage across the battery reaches 4.2v, the second op-amp (IC1d) starts to pump voltage into the inverting input of the first op-amp, this makes it to lower the output voltage to the transistor so current flowing trough the battery starts to drop to keep 4.2v across it.

As the battery gets charged and it's internal resistance increases, less current is needed to keep 4.2v across it, so current will drop slowly. When the current flowing through the battery gets below 3-10% of the nominal capacity, the battery is considered 100% charged.

Step 5: The Charge Indicator

Fully charging a battery can take from 2 to 4 hours depending of the charge rate (which i recommend to keep between 0.5 and 0.7C). When the current flowing into the battery is less than 3-10% of the nominal capacity, the battery is 100% charged, and the circuit above is what will tell us when this happens.

The fourth op-amp (IC1b) is used as a comparator; at the non-inverting input, it takes the voltage across the sense resistor (over the 2.5v rail) which will drop during the constant voltage or saturation charge stage and compares it to a fraction of the voltage set by the potentiometer.

R15&16 voltage divider outputs a 9% of the set voltage and feeds the reference into the inverting imput of the op-amp.

when the voltage across the sense resistor (which is the same as the current flowing through the battery) drops below the reference set by the divider, the voltage at in- is greater than the one at in+, so the op-amp output drops to GND and switches off the LED.

With this configuration, the LED is on while charging, and off when the battery is fully charged. If you want it to turn on when charge is finished, just swap the op-amp input pins.

Step 6: Build the Charger

Now we're done with theory, let's actually build the charger!

First of all, you need the PCB, you can order it online or DIY. When you have your PCB ready with all the holes and the tinned pads, it's time to start populating the board.

With the design i made, all the components are through-hole, so anyone can make it, but if you prefer a smaller version of the board, you can download the .brd file and edit all the components to SMD.

Most of the resistors i used are 1% tolerance, that's because i had them on hand, you can use the common 5% ones.

Solder the resistors and the wire jumpers, then the capacitors and the diodes, be careful with the polarity!

If you haven't got a potentiometer with the same package as mine, you could solder a external one with some wires, or just edit the footprint.

The sense resistor i used is a 4W 1ohm resistor, you can use a different one, but not under 3W.

The transistors are two TIP122 darlington pairs, it's not necessary to use darlington ones, any BJT with a gain over 100 and with 2A current capability should work, but check the base resistors to match your transistors!

Also, you can use almost any other quad op-amp, be sure to choose a pin-compatible one.

I made the board with two outputs, one with a screw terminal and other with a DSI battery connector, they're connected in parallel, but you should charge just one battery at a time. Remember that this charger is designed to charge a single cell battery, not two in parallel nor two in series.

When you've finished soldering, screw a heat sink to your transistors, they're going to dissipate a fair amount of power! The one i'm using is rather small, maybe a bigger one should be used, but i think that it doesnt get over 70ÂșC so that's fine for now.

Now add a little stanoffs to your board and it's ready to work.

Step 7: Test #1

As a first test, i'm goung to charge a 600mAh battery, i'm goung to charge it at 0.5C to be safe.

First of all, connect your multimeter to the output and set the dial to current in the 10A range. Plug the charger and turn the potentiometer until the output current is half the nominal capacity of the battery, in my case, 0.3A.

Then, connect the battery to the charger, and be careful with the polarity, in my circuit design, the positive pin is on the right of the connectors.

I tested the 4.2v reference below VCC, and as you can se in the pictures, it's a perfect 4.2v reference.

When i began to charge the battery, it had an open circuit voltage of 3.1v, so pretty empty. About an hour and a half later, the battery had a voltage of 4.09v, it was about to enter in the constant voltage stage.

An hour and a half later, i saw the LED was dimming out, so i checked the current via the voltage drop across the sense resistor, the current was about 24mA, which is less than 9% of the initial 300mA. At that point the battery was completely charged.

This charger works great, i've tested it with that 600mAh battery, a 840mAh DSI battery, a little 200mAh watch battery and a 4000mAh tablet battery. They all took around 3 hours to fully charge, the 4Ah one took a bit longer, but just because the charger is limited to 1.6A, and that's a 0.4C charge rate.

I hope this instructable is useful for all the makers out there beginning to use li-ion batteries, good luch with all your projects!

If you didn't understand something or you need more detailed information, feel free to ask me, i will answer everything i can.

If you find this instructable useful, please vote it for the Epilog Challenge, Green Design and Battery-Powered contests.

Share

Recommendations

  • Water Contest

    Water Contest
  • Creative Misuse Contest

    Creative Misuse Contest
  • Fix It! Contest

    Fix It! Contest

112 Discussions

Great Article. The circuit design is beautiful. Thanks a lot!

Great 'ible with good info! Working on building a new charging system/battery packs for an ancient electric car, and very new to batteries in general, so I was glad to find this!

Can we use this circuit for 12v battery

how much time does it take to charge a 12v 1.3 AH/20Hr Li Ion battery which is at 11.32V?

Hello dear,

How much current is required to charge a li-ion rechargeable battery 3300mAh 7.4 volt ? I need to charge a Tronsmart Mega speaker which is not used for one month and think the battery is already discharged.

30657259_1823028667762042_8945594790762774528_n.jpg

My lithium ion batteries which i got from my old laptop, is working fine. the main problem is whenever i connect it with 12 volt , 1 amp solar charger, it is charging with 500mA even if solar panel producing 1 Amps.
Battery already passed 100 charge-discharge cycle.
basically, lithium-ion battery is not able to charge with 1 amps. what could be the problem?

Good information. I have a question about a smaller system. I have a 5volt input board going to a 5v relay going to a 5v to 12v booster. How would I connect the lithium batteries in the charger system? Connect (4) 1.5v batteries in series ? Will a 6volt solar panel charge this ?

I need a charger to charge 3 in series.

hey I want to make lithium ion charger for two 3.7 volt battery connected in series so what are the necessary changes I need to do in your design ?

1 reply

I would also like to see a parts list for this circuit. Also, I have tried to locate, without success, the schematic symbols labeled X1 and B-1,B-2 and J1,J2 and J3. This is an excellent tutorial, if a little above my current abilities. I am building a solar charging circuit to charge a 3.7V 10000mAh Lithium Ion battery. Any comments would be appreciated.

Thanks so much

Is there a specs for minimum charging current for a rechargeable Li-ion battery?

i.e: if i use a 3.6Ah Li-ion rechargeable battery and wish to charge it with only 5mA, will the battery charge( neglecting the time duration for charging the battery).

If Yes, how much lesser can the charging current be?

If No, how can one know how much is the minimum charging current for any Li-ion battery.

I am building a lightsaber based on the teensy 3.6 board and I am researching the feasibility of putting the charging circuitry inside the lightsaber hilt so I can use a power supply instead of an external li-ion charger. The issue I have is that I am using a 2s2p 18650 or 4 cell pack. 8.4v max 12A(6sx2) max current 3400Mah batteries. I currently have a PCB protection circuit on it That is rated as 7.4v 11A https://www.amazon.com/gp/product/B00N48RCS8/ref=o...
I am a noob and learning as I go. With all that said I have a couple questions.
What kind of modifications would I need to make to change your design to work with 2s2pconfiguration?
Would the charger be too hot to have in next to the batteries?
Is it possible to combine the PCB protection and balance circuit together with the charging circuit? Would that be a good idea?
Can I use a commercial power supply brick like a 9v or a 12v or do I need to use a special designed one like the one you have?
Thoughts?, comments? questions? Any help is appreciated above and beyond your instructable here that is more educational than any other article I have seen so far on the topic.
Thanks

Hi,

Can you help me design a charge circuit for Li- ion batteries using the cigarette lighter USB port supplying 5V?? Really need it. Please HELP!!!!!!

This is an amazing instructable!

Could I use a 5W 1 ohm resistor? Also, could I use two npn BJTs instead of the TIP122?

Awesome! Can I ask a unrelated Question?

The Op-amp circuit you used in your charger, does it waste the unused current as heat like most other cheap limiters?
the reason I'm asking this is because I need a current limited Constant voltage circuit (Charging a phone from a super capacitor) what can I do?

I'm very surprised this instructable did not get featured or win the competitions :( Anyway, I want to charge a 6v motorcycle li battery from a 9v solar panel so I'm guessing I change some of the resistors and maybe the zenor diode? I should be able to work it out but some quick guidance would be very helpful - Thanks!

Thanks for your quick response. The 12-14 volts is coming from a vehicle so I do not need a cheap power supply. Let me clarify the application:
I have an alarm circuit in my utility trailer that draws about 10-30 mAh. connected to a 3.7 volt (6.6 Ah) lithium battery. That alarm protects the trailer for about 3 weeks and then dies. When I connect the trailer to my 12-14 volt vehicle, I want a charging circuit to automatically charge or top off the 3.7 volt battery whenever the trailer is connected to my truck. So that when I disconnect the trailer, the alarm is protecting the stand-alone trailer until the next time I need it. Sometimes I use the trailer once a week, sometimes everyday. The alarm circuit should run 24/7. There is no room for a larger 3.7 v battery because the plastic enclosure is limited in size. Even if I am able to find room to double up on the battery to 12 Ah, I would still want to automatically charge the battery whenever I hook up to the truck, without thinking about it. Please help...JR

2 replies

Yeah, that's what i was talking about, you have a 12-14v power supply (the vehicle) and the battery in the trailer. You just need a charger circuit for the 6.6Ah in the trailer that connects to the 12vfrom the vehicle every time you use the trailer.
That can be done with the output of the charger/regulated power supply permanentlyconnected to the 6.6Ah li-ion battery and the input of the charger/regulated power supply connected temporarily to your vehicle to automatically charge your trailer system each time you use them together.

A power supply limited to a maximum of 4.2v and 4A should do. I've bougt on ebay before switching power supplies with current limit and voltage limit adjustmen, You could use something like that, permanently attached to your trailer's battery and with a connector at the input for your vehicle.

If you're interested in that idea, i could recomend you the item that better suit your needs, they are pretty cheap and do the job just fine.

Your recommendation would be most welcomed. It must be real small because I have a very small space inside the plastic housing where the alarm circuit, the battery and the charging circuit would have to be.
Another concern is the battery life. I want to be sure it is safe from fires and works a long time. If the battery is full and I plug in the trailer to the truck, the charger only starts charging if need be. Since these new lithiums are very touchy, that is my concern. I don't want to be pulling a fire hazard around town. You say the 4A should do for charging rate, I don't mind if it is slower to keep the physical size and costs down. What happens if later on I decide to install a second or larger size battery like a 12 Ah. Would there have to be re-adjustments on the circuit or it would be great if no re-adjustments would be needed. Totally automatic is best... A smart safe charging circuit. In the future I even want to ad a small 4x4 inch mini solar panel as an option and plug it right in so the system can charge those times when no trailer is connected to any truck. Just mentioning this like letting the cat out of the bag so to speak...great to be communicating with someone that cares....JR