USB Li-ion Battery Charger




About: I'm Chandra Sekhar, and I live in India. I am interested in electronics, and building small one-off circuits around tiny chips (the electronic kind).

This is a charger for lithium ion batteries which takes its power from the USB port of a computer.

It uses the MCP73861 or MCP73863 Li-ion battery charger chip manufactured by Microchip.

Teacher Notes

Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.

Step 1: The USB Power Connector

A piece of edge connector hacked off an ancient ethernet board serves as the power connector. To make it, cut off a piece that includes four edge fingers, and then file to make it fit inside the USB connector on the PC.

Step 2: The Circuit Board

The circuit board is a piece of single sided copper clad board. A hole is cut inside it so that it will accommodate the integrated circuit.

The MCP73861 or MCP73863 (they are similiar, with only slight differences which do not affect the circuit connections) is available in a small leadless package.

The difficulty? There are no leads to solder to. The advantage? There are no leads to break!

The ic is placed so that its connection side (the side with solder pads) lines up with the copper side of the board and it is then fixed in position with epoxy or some such glue.

Step 3: Soldering the Integrated Circuit

The area around the ic is tinned and the solder pads joined to the board with bits of wire.

I find it helpful to flatten the wire with pliers before soldering, so that it stays in position without any tendency to roll about. Some of the leads go to the same node and these are conveniently placed together.

After the leads have all been soldered, the space in between the leads are cut out to form islands and the other components are soldered to these islands of copper.

Step 4: Soldering the Components

The various components, as detailed in the data sheet for the ic (available from the web site of Microchip Technology) was then soldered in position. The two LEDs are new. All the other components have been rescued from old hard disks.

The red led is supposed to light up to inform us about error conditions. The other green LED (the clear one in the picture) lights up to indicate that charging is taking place. At the end of charging, it will blink or go out, depending upon the last digit of the ic part number.

The board is complete, all that remains is for it to be connected to the battery and the charging source.

If the source voltage is much above 5V a heat sink might have to be soldered to the thermal pad of the chip for charging to take place without interruptions due to the chip overheating.

It has integral thermal overload protection. If needed, a thermistor in contact with the battery may be used to protect the battery as well. The battery overheat protection feature has not been included in my version of the circuit.

Step 5: The USB Connection

It is attached to the USB plug so that it can be plugged as a unit into the USB port of a computer, and the battery connected with wires. With a supply voltage of 5V and a maximum current of 500mA, overheating of the chip is not likely to be a problem.

Step 6: The Charger at Work

The charger is shown attempting to charge a mobile phone battery.

Li-ion batteries come in various flavours - single cell, double cell, coke anode, graphite anode etc. Each has to be charged to a specific voltage. Too low voltage leads to undercharging, with the result that the full capacity of the battery is not utilised.

Over charging the battery, even by as little as 0.1V, can lead to "spontaneous disassembly" of the battery, according to one manufacturer. That means it can explode, and catch fire, and potentially cause personal injury.

Use this circuit at your own risk.

The datasheets of the chip give information on configuring the chip to cope with different types of battery, and is an essential document in using the chip.

Be the First to Share


    • Assistive Tech Contest

      Assistive Tech Contest
    • Reuse Contest

      Reuse Contest
    • Made with Math Contest

      Made with Math Contest

    41 Discussions


    8 years ago on Introduction

    hi dudes!

    just googled "5v 3.7v charger +diy" and was redirected here

    I was wondering whether a single resistor in series with a diode would do the trick as follow:

    when the batery is completely discharged the resistor will limit the current through the batery, and when the batery is full the current will drop to cero and the voltage in the batery terminals will be about 5V - 0.7V = 4.3V

    would it burn/deteriorate the batery?


    2 replies

    Reply 8 years ago on Introduction

    i suggest you google and read about proper chraging of li-ion cells. obviously no one would buy an IC to do what a resistor + diode "can" .
    there is little room for error. unless you have a bomb in mind :)


    Reply 8 years ago on Introduction

    Hello Ancient1, thanks, I think at last have got it up and running... Regards!

    Fozzy Vis

    8 years ago on Introduction

    Just a question about the temperature sensing.
    The datasheet states that "Applying a voltage equal to VTHREF/3 to the THERM
    input disables temperature monitoring."

    Am I correct that the resistor values used here are 1.03 and 4.72 (ohm? kOhm?)?
    Then how does this work? If I am correct, this would give an Therm on pin 7 of 2.05V, given the reference voltage of 2.5V from ThRef on pin 6.

    I just can't figure out what I should use, and what the best values/setup would be if I would want to use the internal thermistor that's inside most battery packs.

    Any advice?


    8 years ago on Introduction

    Is it possible to just use a Lithium ion battery of 3.6V, directly connecting it with two wires out from the battery and solder with the circuit?


    9 years ago on Step 3

    nice tip! flatten the bare connecting wires.. never thought of it this way.. =) I will try this method on my next upcoming TQFN proto projects... Thanks!


    9 years ago on Step 6

    when the battery is full charged.will it automatically stop charging?

    1 reply

    9 years ago on Introduction

    Some commenters say this is not a real instructable, and that this design is just taken straight from the datasheet. That may indeed be the case. One might argue that you have not submitted the actual circuit(for the one shown includes a thermistor).

    But I have to say - your method of soldering QFN ICs is awesome. Thank you.


    12 years ago on Introduction

    GOOD GOD! That's a LiPolimer battery! Never EVER charge a LiPo like this. Always check the temperature and adjust charging acordingly.

    10 replies

    Reply 9 years ago on Introduction

    IT'S A  li-ion batery , beside the controler , its specialized for this
    more details you can  get watching the controller specs in a (www.)datasheetcatalog(.com)
    i actualy  buy few  for charging li-ion - li-pol  bateries because of small dimesions and good power capability , i recomand this charger
    and from my side  can get a thanks for posting it


    Reply 9 years ago on Introduction

    • Linear Charge Management Controllers
    - Integrated Pass Transistor
    - Integrated Current Sense
    - Reverse-Blocking Protection
    • High-Accuracy Preset Voltage Regulation: + 0.5%
    • Four Selectable Voltage Regulation Options:
    - 4.1V, 4.2V – MCP73861
    - 8.2V, 8.4V – MCP73862
    • Programmable Charge Current: 1.2A Maximum
    • Programmable Safety Charge Timers
    • Preconditioning of Deeply Depleted Cells
    • Automatic End-of-Charge Control
    • Optional Continuous Cell Temperature Monitoring
    • Charge Status Output for Direct LED Drive
    • Fault Output for Direct LED Drive
    • Automatic Power-Down
    • Thermal Regulation
    • Temperature Range: -40°C to 85°C
    • Packaging: 16-Pin, 4 x 4 QFN
    16-Pin SOIC (MCP73861 only)
    • Lithium-Ion/Lithium-Polymer Battery Chargers
    • Personal Data Assistants (PDAs)
    • Cellular Telephones
    • Hand-Held Instruments
    • Cradle Chargers
    • Digital Cameras
    • MP3 Players


    Reply 12 years ago on Introduction

    Please feel free to explain to us what the differences are between classical "lithium ion" batteries and "lithium polymer", particularly from a charging standpoint.


    Reply 12 years ago on Introduction

    neelandan nailed it. Here's how spontaneous disassembly looks like:
    People have lost entire workshops like this.

    They're very sensitive to voltage change, overcharging, overdischarging and last but not least temperature. If the LiPo starts to heat up it's bad news. First it'll start to swell and then it'll burst violently. The burst might not even happen on the same charge cycle as the initial swelling so if you find your battery swolen disconnect it and dispose of it.
    They're much more sensitive than Li-Ion batteries too. Don't know exactly why (I'm not a chemist)


    Reply 12 years ago on Introduction

    It was a trick question. From an electrical charging standpoint, there is practically no difference between the two types.

    I don't know what you mean by the fuzzy reference to "more sensitive"; they are mechanically more sensitive to abuse, but that's not the fault of the charger, is it?

    The real problem with lipoly's, particularly in the RC world, is the fact that those hobbyists would rather throw money at a problem, buying an expensive charger that offers them no protection (because someone else recommended it), than sit down and understand what's going on. Combine that with routine battery pack abuse, and general technical inability (read: blinking 12:00), and you wind up with horror stories and old wives tales that are more of a function of the user than the equipment. These accidents are about as "spontaneous" as getting run over by a slow moving steamroller.

    The video you linked was a very staged scenario -- you should read the backstory on it.


    Reply 12 years ago on Introduction

    It was a trick question. From an electrical charging standpoint, there is practically no difference between the two types.

    In fact there is!

    The lithium Ion has a nominal cell voltage of 3.6V
    and the lithium polymer has a nominal cell voltage of 3.7V

    I have a Multiplex LN-5014 battery charger and it clearly tells me to choose between Ion and Polymer.

    Even if that is 0.1Volt, I don't want to mess with them. Check the video!



    Reply 12 years ago on Introduction

    You are a perfect example of what I'm talking about.

    For starters, it's not the nominal voltage you care about, it's the max charging voltage. Your charger doesn't stop charging at 3.6V or 3.7V "per cell", it stops at 4.1V or 4.2V "per cell".

    Second, 3.6V is LESS than 3.7V. The original comment was "never charge a lipo this way". Hrm. Li-Ion is *sometimes* spec'd at 3.6V. Lipoly is 3.7V. 3.6V < 3.7V.

    Third, even most lithium ion cells are 4.2V max nowadays. For instance:

    Or how about one of these:

    Lastly, I had to put "per cell" in quotes because while I'm sure you feel safe because you have a little magical "switch", the fact is your charger does NOT have a thermal probe. What's worse is that your charger says it will do more than 1 cell in series, but DOES NOT EVEN HAVE INDIVIDUAL CELL MONITORING. So not only are you the perfect example of what I was talking about, so is your charger.

    Are you engaging in scare tactics as a way to justify the price you paid for your charger? Why do you keep referencing a basically anonymous video that has NO information in it WHATSOEVER. They give NO indication of:

    1. What their power supply settings were, or what kind of battery it was
    2. How long it took to make it blow up -- no time information whatsoever. It's clear that there was a time lapse if you watch, but they don't specify how long

    Instead of telling people to check a video, why don't you check the facts?

    If you want a real example, then go here:

    For those of you who are reading impaired, let me try to summarize:

    It took nearly one HOUR of charging at TWICE the max voltage to get the battery to catch fire. Does that sound "spontaneous" to you?

    Please stop engaging in FUD.


    Reply 10 years ago on Introduction

    wow you know your stuff.

    Can you help me with making a charger for two NiMH AA batteries? I want to charge them of a USB power supply.
    The Instructable above outlines a solar charger for one AA battery as, '+' to '+' (with a diode inbetween) and '-' to '-'. is this advisable? and are there any side effects to not cutting off the power when it reaches a full charge?


    Reply 11 years ago on Introduction

    He's right about one thing. After building a DIY charger circuit, a temperature sensor is a must, at least for the first couple of times you use it. Your hand works very well for this, and it would have detected a problem way before any of the batteries in any of those videos exploded. If it gets warm, disconnect it. If it explodes, it is gonna be too hot to even touch. There's one exception - if charged too fast, a cell might get lithium deposited unevenly on one of it's layers.. and this can create a sharp point which can potentially rupture a layer and cause an internal short. The temperature increase could be extremely fast and the cell could potentially rupture "without warning." But to get these uneven deposits, you would have to charge it improperly to the point where it was warming up while charging... That's why you should stop if it gets warm, even though that it may still be several abusive recharge cycles away from even the possibility of spontaneously exploding.