Introduction: DIY Lithium-ion Battery Charger

About: Check out my YouTube channel, for similar projects.

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..