A simple LiPo charger

Go To Last Post
29 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hello everybody.

First of all, I'm sorry for my poor English. This is my first question, since all my other questions were already answered in other threads.

I'm trying to build a LiPo charger circuit with non-specific parts. I've searched the local market here in Iran, but I was unable to find a LiPo charger IC. So, I've decided to build my own. There are lots of complex circuits to charge LiPo batteries, but I need a simple one.

Charging a LiPo, consists of two steps: Constant Current and Constant Voltage. I have a 150mAh battery, so I need a constant current step of less than 150mA.

So the questions:

1. Since the USB voltage is 5V, if I down it to 4.2V (the maximum voltage of the battery and the voltage of the constant voltage step), then could I omit the constant voltage step circuit? Since the constant current step is until the battery voltage be about 4.2V, and then the charging current will be dropped until it reaches about 0.01C. Because our highest available voltage is 4.2V, the constant current circuit will be unable to increase voltage due to less current consumption. Am I right?!

2. If the first question is right, may I use the simple current sources in WikiPedia (with one transistor and diode) with a less output current and ignore its dis-accuracy?

3. The maximum current a 2N3906 PNP transistor is able to conduct is about 100mA. Then if I place just this transistor between my USB power and the battery, It will decrease the voltage for 0.65V (5 - 0.65 = 4.35V) and also supply a current of 100mA for charging the battery. Will this work?

4. I have an empty 4000mAh LiPo battery. While trying the charging methods, I connected it directly to a 4.5V, 1000mA source and measured the current. It was about 120mA. Why the charging current is this low while I provided it 1000mA?

Again, I'm so sorry for my bad English. If it didn't burn your eyes yet, I will be so thankful if you guide me through this. I'm fighting this for more than 1 month. Thank you very much.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I really recommend you to find a specifically designed IC for this. You want this to be safe, LiPo batteries are dangerous if mistreated and you do not want your house to burn down.

Charging LiPo batteries is a fairly complex matter, that's why the circuits are complex and not simple.

If you want simplicity, buy a special IC for it. Some are only 6 pins or so and need almost no external components.

Maybe you can buy an off-the-shelf LiPo charger.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
I really recommend you to find a specifically designed IC for this. You want this to be safe, LiPo batteries are dangerous if mistreated and you do not want your house to burn down.

I searched EVERY CORNER of the market here! No chance. I made a list consists of more than 10 popular LiPo charger ICs. No one even heard of none of them! So I have no other way than build it myself and also I'm an adventurer!

Quote:
Charging LiPo batteries is a fairly complex matter, that's why the circuits are complex and not simple.

As I researched, it's not so complex. We just need to limit the current and voltage to the battery. I promise, I will be in a safe range to prevent dangers!

Quote:
If you want simplicity, buy a special IC for it. Some are only 6 pins or so and need almost no external components.

I swear to God, NOT FOUND!

Quote:
Maybe you can buy an off-the-shelf LiPo charger.

I have a good one now. But I need to implement it in my circuit.

Thank you for your reply. Any other information (rather more technical) is appreciated.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Try Digikey or one of the many other parts distributors...

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The charging is not so difficult and what you propose would probably work after some experimentation to get the currrent taper and voltage limit.

However if a Lipo is over discharged it can undergo thermal runaway on a subsequent charge cycle. For safety there should be a circuit that permanently disconnects the battery if an overdischarge occurs.

Some of the other lithium chemistries do not require the low voltage disconnect, such as LiFePO4. Suggest you do all your experimentation with one of those.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
Quote:
Maybe you can buy an off-the-shelf LiPo charger

I have a good one now. But I need to implement it in my circuit.

Open it up and see what's inside it, then buy another one and use the IC (or just the whole board) in your own circuit ;)

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

why not read some battery charger application notes on atmel website!

I love Digital
and you who involved in it!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

A constant-current constant-voltage lab-style power supply will charge LiPo's pretty well. Not particularly safely, in the USA lawyer-heavy nanny-state sort of way, but technically mostly OK.

The model airplane community has developed some DIY charging circuits. Here's one: http://www.shdesigns.org/lionchg...

Make sure you understand how these simplified techniques differ from the official recommended charging guidelines!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
Try Digikey or one of the many other parts distributors...

We live in Iran, then because of international sanctions: 1. We don't have any credit card! 2. No company will send anything to us. They don't even have Iran in their destination countries!

Quote:
However if a Lipo is over discharged it can undergo thermal runaway on a subsequent charge cycle. For safety there should be a circuit that permanently disconnects the battery if an overdischarge occurs.

I saw in the specifications that the battery has over-charge and over-discharge protection circuit. There are two 6-pin ICs on a small PCB over the battery which i couldn't identify. These are the batteries which are used in Bluetooth hands-frees. I don't know if these ICs are actually charging ICs. Maybe I don't need any additional circuit to charge them! (See the 4th question in the first post.)

Quote:
Open it up and see what's inside it, then buy another one and use the IC (or just the whole board) in your own circuit

I've already opened it. It has one 8-pin IC which is not a charger (I don't remember, but it was a normal IC, say a regulator) and consists of a complex circuit built for 220V input.

Quote:
why not read some battery charger application notes on atmel website!

They're so complex circuits. I'm looking for a small and easy yet useful method to charge a small battery with minimum parts.

Quote:
The model airplane community has developed some DIY charging circuits. Here's one: http://www.shdesigns.org/lionchg...

Yes, I saw it and many others. I'll build one if there was no other way. But it's a question in my mind: If we use a 50 ohm serial resistor and provide a 4.2V supply, then the current will be limited to 84mA and the voltage will be limited to 4.2V. Why use a complex circuit, while we can use just a resistor? Keep in mind that we could charge the battery up to 150mA. We used about half of the maximum charging current, so we will be in a safe area.

Quote:
Make sure you understand how these simplified techniques differ from the official recommended charging guidelines!

Yes I know. The charge time is not important but the minimum parts count and small circuit is. So I will be in a safe area to prevent dangers. Anyway, thanks for the warning!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:

We live in Iran, then because of international sanctions: 1. We don't have any credit card! 2. No company will send anything to us. They don't even have Iran in their destination countries!

How about ebay and Paypal? These are in China:

http://www.ebay.co.uk/itm/3Pcs-L...

I doubt the Chinese vendor will mind who they sell to as long as it makes money.

EDIT: Actually that item has a number of destinations excluded but Iran is not on the list.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Fellow freak ali_dehibi is also from Iran and complains too it is difficult to get parts. Maybe he knows some backdoor you can use too ;)

Must really be frustrating.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
How about ebay and Paypal?

They also blocked Iran. We cannot open a PayPal or eBay account with Iranian IP address. We can use proxy or VPN services, but as you know a credit card is needed for PayPal verification and they will block our accounts even if it was verified with a credit card and fake information and ask us to provide additional documents! I have more than 10 blocked verified PayPal account with more than $10000 funds. There is a way and it's aliexpress.com and similar web-sites which are mainly based in China. But they need also a credit card for payment and mine has no funds because of... guess... international sanctions and floating dollar price here in Iran.

Quote:
Fellow freak ali_dehibi is also from Iran and complains too it is difficult to get parts. Maybe he knows some backdoor you can use too

I am the CEO of a company which our job is to provide international money services for Iranians (https://karsha.biz). We provide credit cards, money exchange, etc. But, the financial situation is so damn hard for even us to help our customers or order anything for them.

Quote:
Must really be frustrating.

No doubt!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
EDIT: Actually that item has a number of destinations excluded but Iran is not on the list.

Try to find Iran in the "change country" drop-down list next to the excluded countries list! They totally ignored the existence of us, because eBay doesn't accept Iranian customers.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

So to charge lithium we need

-very low charge rate at first if battery is very dead. (cc)
-then full current CC for the bulk of charge.
-then CV. If you skip this part, maybe only 70-80% charge will be obtained.
-also should monitor temperature.

I'd think this should be easy to do with lm358 or lm324 and transistors. Or several LM317, etc. Presumably someone has already done this.

Maybe I'm missing something, though.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

That must be really annoying.

If you don't know my whole story, keep your mouth shut.

If you know my whole story, you're an accomplice. Keep your mouth shut. 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Ali_dehbidi wrote:
why not read some battery charger application notes on atmel website!
Good idea! Those use either a tinyAVR or USB AVR, a DC-DC buck converter, and PWM from the AVR (and such). If add a PFET then can do low battery disconnect (for safety).
Ref.
AVR146: Lithium-Ion Battery Charging via USB with ATmega16/32U4
AVR458: Charging Lithium-Ion Batteries with ATAVRBC100
AVR450: Battery Charger for SLA, NiCd, NiMH and Li-Ion Batteries

"Dare to be naïve." - Buckminster Fuller

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

One method is to use a current-limited shunt charger:
Shunt charger systems harvest power and protect battery packs by Steve Knoth (Linear Technology).
For CC and CV control, there are ICs that contain 2 op amps and a voltage reference; or, an op amp, a reference, and a comparator.
But Li-ion charging is more than CC and CV control (temperature, battery safing).
A low pin count MCU for charging and protection may be best if willing to have a NRE cost.

"Dare to be naïve." - Buckminster Fuller

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

khashmeshab wrote:
They're so complex circuits. I'm looking for a small and easy yet useful method to charge a small battery with minimum parts.
Voltage-controlled current source (VCCS), load switch, tinyAVR, voltage regulator for AVR, ideally a thermistor in the cell's package.
VCCS would be an op amp with a PNP (or NPN if low-side) controlled by PWM from AVR.
Assumes the DC voltage to the VCCS is low enough; else, will need a DC-DC or AC-DC buck converter.

"Dare to be naïve." - Buckminster Fuller

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
because of international sanctions: 1. We don't have any credit card!

I thought the "no credit card" was also a Muslim thing (actually: a prohibition against borrowing money. Something that makes it particularly difficult for devout Muslims to live in the USA.)

Quote:
Yes, I saw [ http://www.shdesigns.org/lionchg... and many others. I'll build one if there was no other way. But it's a question in my mind: If we use a 50 ohm serial resistor and provide a 4.2V supply, then the current will be limited to 84mA and the voltage will be limited to 4.2V. Why use a complex circuit, while we can use just a resistor?

The shdesigns charger circuit adds about 2 resistors and one cheap transistor to the "4.2 regulated supply + current limiter" design, so I don't think it qualifies as 'complex.'
The problem with the simpler design is the lack of "constant current" during the charge phase. An "uncharged" LiPo has about 3V, so your initial charge current is going to be (4.2 - 3) / 50, or only 24 mA, rather than the 84mA you were expecting, and it will gradually decrease as you approach the voltage-limited phase. A normal charger will still be putting close to full charging current through the battery when it gets to 4.2V; yours will be putting close to zero. Will it work? I don't know. It'll probably be very slow. Will it have other bad effects on the battery (reduced lifetime, charge cycles, etc)? I don't know that either.

I've actually often wondered whether you could use much simpler charging schemes for LiIon batteries in general, if you were willing to put up with less than "full capacity" in the charged cell...

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

westfw wrote:
... (actually: a prohibition against borrowing money...)
Debt is allowed but controlled and with no interest. The lender sustains more risk than in the West.
The West is also big on insurance whereas Islam excludes it; IIRC all US states require automobile insurance but there appears to be a way to accommodate this (I don't know the specifics).
Ref. https://en.wikipedia.org/wiki/Islamic_economical_jurisprudence#Interest

"Dare to be naïve." - Buckminster Fuller

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

WOW! I'm so sorry. It seems that I didn't check the "e-mail notification" box while sending the last reply so I didn't know that these replies has been posted here. I also didn't expect these many helpful hands. Thanks a lot.

There is something you should know. I'm a computer engineer. I started electronics in kindergarten, but I didn't study electronics anywhere. Everything I know is from books and the Internet. So, if I say a dumb thing or ask funny questions, please excuse me.

Quote:
So to charge lithium we need

-very low charge rate at first if battery is very dead. (cc)
-then full current CC for the bulk of charge.
-then CV. If you skip this part, maybe only 70-80% charge will be obtained.
-also should monitor temperature.

I'd think this should be easy to do with lm358 or lm324 and transistors. Or several LM317, etc. Presumably someone has already done this.

Maybe I'm missing something, though.


I don't want to skip the CV part. The constant current source decreases the voltage (to decrease the consuming current) if the consuming current exceeds the maximum current allowed. So, when the consuming current was less than the maximum allowed current, the current source won't decrease the voltage. So, if we have the maximum available voltage of 4.2V, then when the CC step passed, it automatically turns into a CV.
Since the battery has the over-charge and over-discharge protection circuits, then we don't need a low charge rate first. Because the battery won't ever be in a very dead state.
I have bunchs of LM358 and LM324 in SMD packages. I will be very thankful if you propose a circuit to use these for charging batteries.

Quote:
That must be really annoying.

Sure it is!

Quote:
Ali_dehbidi wrote:
why not read some battery charger application notes on atmel website!
Good idea! Those use either a tinyAVR or USB AVR, a DC-DC buck converter, and PWM from the AVR (and such). If add a PFET then can do low battery disconnect (for safety).
Ref.
AVR146: Lithium-Ion Battery Charging via USB with ATmega16/32U4
AVR458: Charging Lithium-Ion Batteries with ATAVRBC100
AVR450: Battery Charger for SLA, NiCd, NiMH and Li-Ion Batteries

The question is: do we really need these circuits? Since we're using the USB power, we have a good and accurate voltage source. So we can base our calculations and circuits on the accuracy of the USB voltage and skip the voltage/current regulation parts.

Quote:
One method is to use a current-limited shunt charger:

Why don't we use a simple transistor to limit the current to the battery?

Quote:
VCCS would be an op amp with a PNP (or NPN if low-side) controlled by PWM from AVR.

Won't a transistor (alone) provide a constant current?

Quote:
I thought the "no credit card" was also a Muslim thing (actually: a prohibition against borrowing money. Something that makes it particularly difficult for devout Muslims to live in the USA.)

Here in Iran, we have our local debit and (less-used) credit cards, loans, etc just like other countries. The banks and cards are all connected together through Shetab, Sahab, etc networks. We have POS, ATM. But the problem is that they aren't connected to international cards like MasterCard or VISA. The cards issued by banks and they're taking care of them. Sending money from Iran to a foreign country also has a very high chance of being rejected by the destination bank/country. We also have no Western Union and no foreign banks.

Quote:
An "uncharged" LiPo has about 3V, so your initial charge current is going to be (4.2 - 3) / 50, or only 24 mA, rather than the 84mA you were expecting, and it will gradually decrease as you approach the voltage-limited phase.

Yes, you're right. I'd forgotten that the voltage difference of our source and the battery is the base of the calculations. But a transistor won't have this problem. We provide 1mA to a transistor with hFE=100. It would provide us 100mA at its collector, whatever our voltage difference was. Am I right?

Quote:
Debt is allowed but controlled and with no interest. The lender sustains more risk than in the West.

Actually, at least here in Iran, a Muslim country, they just legalized these under a law named Islamic Banking. The ask us for high interests (50% annually) for loans. We also have insuarance for everything, but for highest prices! They excluded foreign banks, to let themselves get more and more interest from their clients. Beleive me, taking even a high-interest loan is the dream of everyone here! They need us to provide 2-5 government-staff persons to qualify the return of the loan! Nobody has any credit here! Until you give your house documents as the mortgage, so you will be able to request a loan or credit card! But if a (I think you don't have a name in your language for these persons, since you didn't know such people exist!) son-of-a-son-of-a-...-mulla (!) asks for any amount of loan, they give him with very very low interests and it'll take no more than 1 hour! We're dreaming about the loans you get to buy house, low-interest, high-term, without the need of a huge depository or asking 5 people to qualify you.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
Since we're using the USB power, we have a good and accurate voltage source.

Most definitely not true! It can be anywhere between 4.6V and 5.2V or so.

IIRC one challenge is that the transition from CC to CV must occur when the battery voltage is 4.200V (note the decimals...) So you need a good reference voltage.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

jayjay1974 wrote:
IIRC one challenge is that the transition from CC to CV must occur when the battery voltage is 4.200V (note the decimals...) So you need a good reference voltage.

Actually it's wrong! The transition from CC to CV occurs when the charging voltage is 4.200V. Charging voltage is always a little more than the battery voltage to make the current flow to the battery.

The battery voltage usually is between 3.7V (fully discharged) to 4.2V (fully charged). The CV step starts when the charging voltage is 4.2V. In this step the charging current decreases slowly. The charging will be completed when the battery voltage reaches 4.200V or the charging current is less than 0.01C.

As I said if we have a reliable voltage source of 4.200V, we can use just the CC-related circuit. So, when the charging voltage reaches 4.200V, then it won't increase anymore to provide same current as before. Then, the charging current will be decreased automatically as the battery voltage reaches 4.200V. So, we'll have both CC and CV steps. Please keep in mind that this charging method will never end. Even if the battery was fully charged and it consumes less than 1uA. Many other complex charging circuits do the same.

After all, I think we can rely on USB voltage like many other sensitive USB devices. Also, these batteries have protection circuits and are used in Bluetooth hands-frees which I think use a very simple (if have any!) charging circuit.

I opened my 2 hands-frees and looked for the charging IC or circuit. I wasn't able to identify them. Maybe they're built into the other ICs or maybe these batteries have the charging circuit built into them since there is 2 6-pin ICs in the battery.

Or maybe we can rely on the over-charge protection circuit built into the battery and plug it directly to 5V!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
Bluetooth hands-frees which I think use a very simple (if have any!) charging circuit.

Probably one of those 5 or 6 pin SOT23 thingies that only need one or two caps or so.

Relying on the protection circuit is plain stupid. IIRC some circuit will permanently disconnect the battery.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

jayjay1974 wrote:

Probably one of those 5 or 6 pin SOT23 thingies that only need one or two caps or so.

Relying on the protection circuit is plain stupid. IIRC some circuit will permanently disconnect the battery.


Those are built into the battery, not the hands-free's board.
You're right, I was just joking. But nobody here answered my question yet about using a single transistor to supply the required current to the battery!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Fig. showes how to build simple current source - R1,R2,Led and transistor.

Attachment(s): 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Lets describe my idea by these schematics. These are three circuits which I think will produce constant current. We assume that VCC is a reliable constant voltage source of 4.2V. Please review these and let me know which is wrong and why. Thank you very much.

Attachment(s): 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Why the answers are stopped?! Did I say anything so stupid that everybody just preferred to be silent?
Please help me. This is a serious problem. Thank you very much.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

khashmeshab wrote:
Why the answers are stopped?! Did I say anything so stupid that everybody just preferred to be silent?
Please help me. This is a serious problem. Thank you very much.

Sorry to say so, but none of the 3 circuits will give you a reliable constant current.

1. an ideal zener would act as a shortcut, and not limit current at all. A real world zener is more likely to smoke. The resistor adds some near constant current due to the near constant zener voltage. The zener adds a lot of current, and probably commits suicide in the process.

2. resistor RE are in series with the base/emitter diode in Q. You have effectively just a resistor in series with a diode, seen from the battery. Ohms law apply on R2. Some current will flow to ground through collector, at no avail, just wasted.

3. hFE are NOT constant, it varies with selection of transistor (even for same serial number), varies with collector current and varies with temperature. This circuit may die with thermal runaway, that is: hFE increases with temperature, more collector current increases heat which again increases hFE...

You may find a lot of "constant current" whith google.com.

Peter