# Making a LiPo battery charger from USB +5V supply

My friend's drone battery charger is dead. I want a charger for battery, only problem is that I don't know how to do it. I tried to make one using voltage divider, but I don't know to to do all the calculations. Here are the specifications that I need:

Input is USB(5v) and at the output I need 4.2V 400mA.

The battery is LiPo 3.9v 390mAh 1.44w.

I don't have any advanced transistors or voltage limiters at my disposal, and the closest electronics shop is pretty far away. I would order one from ebay, but it takes more then a month to get to me. So if any one can help me, I would be very thankful!

Oh, and about that voltage divider, I can get 4.2V at output, but I don't know to to calculate current flow, so I get small current at output, and I'm having heat problems with R1. I think I used 10 Ohm for R1, and 52 Ohm for R2.

• If you are dividing voltage, always use high ohm resistors because it limits the current which flows through the resistors and decreases the heat, so use 10k ohm and more. To regulate the output current you have to either know the input resistance, which is dynamic in your case, so you can't dimension this with resistors. The simple way would be to buy a step down regulator like the LTC3619B and the components for it. – Eggi Aug 2 '16 at 8:41
• Buy a proper LiPo charger. This will extend battery life, extend your life, work better in any conceivable way. There is absolutely, definitely no way you can safely and properly charge a LiPo battery with resistors and a USB bus. – Vladimir Cravero Aug 2 '16 at 8:45
• also i recommend to look into the charger, maybe you can see the defect component and replace it. – Eggi Aug 2 '16 at 8:46
• @G.Kner: "... always use high ohm resistors because it limits the current ... so use 10k ohm and more." 10k on 1 V (the voltage across the resistor) = 0.1 mA. A 390 mAh battery will take at least 3900 h = 23 weeks to charge. This is not good advice and it's not the way we build battery chargers. Your other comment is better. – Transistor Aug 2 '16 at 8:48
• Thanks for the answers. I know that I can't make top class charger with this components, I'm only looking for alternative that will last for about one month. That is, until charger arrives from ebay. The problem in original charger is in IC, but it dosen't have part number on it. – Razzor Aug 2 '16 at 8:49

The charging requirements for a Lipo battery are pretty simple:-

1. Current must be limited to the maximum rate specified for that battery, usually ~1C which is the same as the battery's capacity (390mA in your case).

2. Voltage must be limited to a maximum of 4.2V per cell, by reducing the charging current when the voltage reaches 4.2V.

You don't need a fancy charge controller to do this. Just limit the current with a resistor in series, and monitor the battery voltage during charging. Stop charging when it reaches 4.2V. This will get about 80% charge into the battery - enough to fly the drone. If you limit current to less than 1C then the battery will get more charge by the time it reaches 4.2V, but take longer to do so.

WARNING: you must not let the battery voltage go above 4.2V, or it will explode and set fire to everything around it! This is why a lipo charge controller is mandatory. If you do it manually then you are the charge controller, and it is your fault if the battery explodes.

So what resistor value do you need? During charging the battery voltage will raise from ~3.7V to 4.2V. The resistor must drop the difference between the battery voltage and the power supply voltage. So 5V - 3.7V = 1.3V, / 0.39A = 3.3Ω. As the voltage rises to 4.2V the current will reduce to 5V-4.2V = 0.8V, / 3.3Ω = 0.24A.

But perhaps you only have a 10Ω resistor? In that case the charging current will vary from 130mA to 80mA, and the battery will take about 4 hours to charge. During this time you must regularly check the voltage to make sure it doesn't go above 4.2V - or the battery will explode! Now you see the advantage of using a proper lipo charge controller.

LIon and LiPo Batteries are not charged with a simple voltage applied to them. Typically these batteries have two charge phases, a constant voltage phase and a constant current phase. Most of the energy is stored into the cells during the constant current phase. This means you cannot (and must never) directly connect a Lithium cell directly to a power supply, you need a battery management IC. (ti and liniear make some easy(ish) to use ones) In the case of a battery module for a product such as your drone the only realistically viable option is to buy a replacement charger from the OEM, especailly if you consider the warranty of your battery and drone.