DIY Lithium-ion Battery Charger

228K39579

Intro: DIY Lithium-ion Battery Charger

Batteries play an important role in any battery operated project/products. Rechargeable batteries are expensive, as we need to buy battery charger along with batteries (until now) compared to use and throw batteries, but are great value for money. Rechargeable batteries use several different combinations of electrode materials and electrolytes for example, lead-acid, nickel cadmium (NiCd), nickel metal hydride (NiMH), lithium ion (Li-ion), and lithium ion polymer (Li-ion polymer).

I used Li-ion battery in one of my projects and decided to build charger instead of buying an expensive one so, Lets get started.

STEP 1: Quick Video


Here is a quick video, which will take you through all steps in few minutes.

Click here to watch it on youtube

STEP 2: List of Electronics Components

STEP 3: List of Tools

Here is the list of tools used in this Li-ion battery charger.

Now that all tools and components are in place, let's take a closure look at our TP4056 module, which is an integral part of our battery charger.

STEP 4: TP4056 Based Lithium Ion Battery Charger Module

Lets get into details of this module. There are two version of this TP4056 based Li-ion charger breakout board available in market; with and without battery protection circuitry. We will be using one with battery protection circuitry.

Breakout board that contains battery protection circuitry, provides protection using DW01A (battery protection IC) and FS8205A (Dual N-Channel Enhancement Mode Power MOSFET) ICs. Hence breakout board with battery protection contains 3 ICs (TP4056+DW01A+FS8205A), whereas the one without battery protection contains only 1 IC (TP4056).

TP4056 is a complete constant-current/constant-voltage linear charger module for single cell lithium-ion batteries. Its SOP package and low external component count makes TP4056 ideal for DIY applications. It can work with USB as well as wall adapters. I have attached an image of pin diagram of TP4056 (Image No.2) along with image of a charge cycle (Image No.3) showing constant-current and constant voltage charging. Two LEDs on this breakout board shows various operating status like charging, charge termination etc (Image No.4).

For safe charging of a 3.7 V Lithium-ion batteries they should be charged at constant-current of 0.2 to 0.7 times their capacity, till their terminal voltage reach 4.2 V, later they should be charged in constant-voltage mode till charging current drops to 10% of initial charging rate. We can't terminate charging at 4.2 V because capacity reached at 4.2 V is only about 40-70 % of full capacity. All this is taken care by TP4056. Now one important thing, charging current is determined by resistor connected to PROG pin, modules available in market generally comes with 1.2 KOhm connected to this pin, which corresponds to 1 Ampere charging current(Image No.5). You can play with this resistor to get desired charging current.

Link to datasheet of TP4056

DW01A is a battery protection IC, Image No 6 shows the typical application circuitry. MOSFETS M1 and M2 are connected externally through FS8205A IC.

Link to datasheet of DW01A

Link to datasheet of FS8205A

All these things are assembled on TP4056 Li-ion battery charger breakout board whose link is mentioned in step No-2. We need to do only two things, give a voltage in the range of 4.0 to 8.0 V at input terminals and connect a battery at B+ and B- terminals of TP4056.

Next, we will build our rest of the battery charger circuitry.

STEP 5: Circuit

Now, let's connect electrical components using soldering iron and solder wire, to complete the circuitry. I have attached images of Fritzing schematic and my version of the physical circuitry, have a look at it. Following is description of the same.

  1. '+' terminal of DC jack connects to one terminal of switch and '-' terminal of DC jack connects to GND pin of 7805 regulator.
  2. Other pin of switch is connected to Vin pin of 7805 regulator.
  3. Connect three 100 nF capacitors in parallel between Vin and GND pin of voltage regulator. (Use General purpose circuit board for this purpose)
  4. Connect a 100 nF capacitor between Vout and GND pin of voltage regulator. (Use General purpose circuit board for this purpose)
  5. Connect Vout pin of 7805 voltage regulator with IN+ pin of TP4056 module.
  6. Connect GND pin of 7805 voltage regulator with IN- pin of TP4056 module.
  7. Connect '+' terminal of battery holder to B+ pin and '-' terminal of battery holder to B- pin of TP4056 module.

Done.

Note:- if you are using 5 V wall adapter you can skip 7805 regulator part (including capacitors) and directly connect '+' terminal and '-' terminal of wall adapter to IN+ and IN- pins of TP4056 respectively.

Note:- While using 12V adapter, 7805 will get hot when it carries 1A, Heat sink can come handy.

Next, we will assemble every thing in the casing.

STEP 6: Assembly: Part 1- Modifying the Enclosure

Follow these steps to modify enclosure in order to fit in the electronics circuitry.

  1. Mark the dimensions of battery holder on the enclosure using a blade knife.(Image No-1)
  2. Use hot-blade to cut through the enclosure as per the marking of battery holder.(Image No-2 and 3)
  3. After making cut using hot-blade enclosure should resemble Image No-4.
  4. Make markings of USB port of TP4056 on enclosure. (Image No-5 and 6)
  5. Use hot-blade to cut through the enclosure as per the marking of USB port. (Image No-7)
  6. Take dimension and make markings of TP4056's LEDs on the enclosure. (Image No-8 and 9)
  7. Use hot-blade to cut through the enclosure as per the marking of LEDs. (Image No-10)
  8. Follow similar steps to make mounting holes for DC jack and switch.(Image No-11 and 12)

After modifying the enclosure, lets fit in the electronics.

STEP 7: Assembly: Part 2- Putting Electronics Inside the Enclosure

Follow these steps to put electronics inside the enclosure.

  1. Insert battery holder such that mounting points are outside the enclosure; use glue gun to make a firm joint.(Image No-1)
  2. Place TP4056 module, such that LEDs and USB port are accessible form outside the enclosure, no need to worry if proper measurements were made in previous step, things will fall in place automatically, finally use glue gun to make firm joint.(Image No-2)
  3. Place 7805 voltage regulator circuit; use glue gun to make a firm joint. (Image No-3)
  4. Place DC jack and Switch at their corresponding locations and again use glue gun to make a firm joint. (Image No-4)
  5. Finally after assembly it should look something like Image No-5 inside the enclosure.
  6. Use some spare screws and screw driver to close the back lid.(Image No-6)
  7. Later I even used some black insulating tape to cover up undesirable projections resulted from cutting through hot blade. (filing is also a good option)

Finished Lithium-ion charger looks as shown in Image No-7. Now let's test the charger.

STEP 8: Trial Run

Insert a discharged lithium-ion battery inside the charger, connect a 12 V DC input or a USB input. Charger should flash RED led indicating charging is in progress.

After a while, once battery gets charged, charger should flash BLUE led.

I have attached images of my charger performing battery charging and terminating the charging process.

So. Finally we are done.

Thanks for your time. Don't forget to check out my other instructables and my youtube channel..

64 Comments

Thanks for the great tutorial. Does anyone have the circuit diagram for the PCB module as supplied? I would like to understand the whole circuit better. Thanks!
Thanks for posting this. Many product purchase links at top of this article are outdated and not working. Please update.
Hello! I'm so glad to give you a message. Because I ask for that, Send me the single charge lithium battery charging circuit. I am waiting for your message,
Hi, for the resistor connected to PROG pin you say to "play with this resistor to get desired charging current." I need it to have a value of 500ma (The original battery charger outputs that much). What do you mean by "play with", do I need to change the resistor? And where can I find the right one.
You could connect a break out board to where the charge resister is and on it have the different values for the different charge rates selectable via switch :)

good workcan i use this charging module to charge 3.7 V Li battery which would not go to 4.2 V ?

can this Module be used to charge more then one battery at a time if I hook up the bats in parallel ?

hi

i didn't understand the role of capacitors

the regulator is feeding vcc of tp4056 but why we use the capacitors?

thank you

Not sure I understand the point. If you have to purchase a "battery charging module", why not just purchase a "battery charger"?

I've bought numerous different types and brands of Li-ion batteries (always buy protected ones, BTW) and usually they come with an inexpensive charger that works with all the other batteries. If not, I think I paid $3 for a package of two bare chargers recently on either eBay or Amazon.

I suppose there are still places where one can't buy from them, but can one buy the "battery charging module" there?

Because a circuit like this can be used in more than just a battery charger. Once you know how, you can build stuff with a rechargeable battery that includes the charger. Toys, flashlights, etc. that you just hook up to a USB port to recharge.

Why buy, when you can make; at similar cost.

why make when you can buy for same price?

BECAUSE this place is for those of us that actual MAKE things. If you'd rather buy, why are you even here? We enjoy making things. If I can get a battery charger for $10, but I can build one for $12, I'll build it every time. Simply because, I can.

Jerry, I get that. My point was, you're not really making it if you're purchasing the biggest part of the device. Not a criticism, just a question. I love to build things, so I get it, for sure. I've built dozens of computers, and am about to finish building a flyable airplane. It just seems like it's only repackaging.
But hey, whatever blows your skirt up, right?
Okay. So you're talking about th TP4056 itself. Now I understand.

Actually Lion chargers are tuned to the capacity of the battery they come with or are designed for, and it's not a good plan to use them for other capacities, unless you replace a few components to adjust the output for the type you want to charge.

Hi

I use 03962a with TP4056 and FS8205A ....

I use 5000mah lipo battery when i connect only battery it s not give a power to OUT+ OUT- ESP8266

When i connect (+/-) micro USB it give a power OUT+ OUT- when i disconnect micro USB its continute to give a power.

Best regards.

Hi!

Quick question, so I ordered some of those TP4056 moduls, but my real question is how can I charge high current 18650 battery? I'm using Sony VTC6.

This is great! but I've got a question, what happens when the battery has a capacity of 8800 mAh? the constant current to charge the battery should be more than 1 A right? How could I achieve this?

More Comments