Author Topic: custom LiFePO4 charging circuit help  (Read 9194 times)

0 Members and 1 Guest are viewing this topic.

Offline z.s.tar.gzTopic starter

  • Supreme Robot
  • *****
  • Posts: 540
  • Helpful? 5
  • Linux Guru
custom LiFePO4 charging circuit help
« on: December 30, 2009, 09:37:31 AM »
I am trying to make my own charging circuit for my robot. It will be powered by 4 solar cells which output ~17V @ 24ma. I have two LiFePO4 cells rated 3.2V @ 1100mah. I'm suspecting I'll have to make my MCU do all the monitoring, as I can't find a suitible charging circuit anywhere.

Could this be adapted to fit my needs?
« Last Edit: December 30, 2009, 09:52:12 AM by z.s.tar.gz »
Save yourself the typing. Just call me Zach.

Offline Soeren

  • Supreme Robot
  • *****
  • Posts: 4,672
  • Helpful? 227
  • Mind Reading: 0.0
Re: custom LiFePO4 charging circuit help
« Reply #1 on: December 30, 2009, 09:43:36 AM »
Hi,

Was that just a statement, or do you have any questions to go with it?
Regards,
Søren

A rather fast and fairly heavy robot with quite large wheels needs what? A lot of power?
Please remember...
Engineering is based on numbers - not adjectives

Offline z.s.tar.gzTopic starter

  • Supreme Robot
  • *****
  • Posts: 540
  • Helpful? 5
  • Linux Guru
Re: custom LiFePO4 charging circuit help
« Reply #2 on: December 30, 2009, 09:50:34 AM »
Yeah that is a bit vague on my part... Let me try again

Also it looks like I'm going to need some kind of PWM  to get the setup described here.

I guess what I'm really wondering is what I need to charge these batteries. I guess I'll need some kind of regulator, a pwm ic, and some monitoring ic's. Is that all I need to get going?
« Last Edit: December 30, 2009, 12:26:41 PM by z.s.tar.gz »
Save yourself the typing. Just call me Zach.

Offline z.s.tar.gzTopic starter

  • Supreme Robot
  • *****
  • Posts: 540
  • Helpful? 5
  • Linux Guru
Re: custom LiFePO4 charging circuit help
« Reply #3 on: December 30, 2009, 02:48:21 PM »
Ok, so I've been doing more research and there's something I just don't understand.
All the lithium charging pages I've seen talk about the "charge current dropping to 3%". What exactly does this mean?
Is it something to look for when monitoring the battery, or is it something that is applied to the battery?
Save yourself the typing. Just call me Zach.

Offline waltr

  • Supreme Robot
  • *****
  • Posts: 1,943
  • Helpful? 98
Re: custom LiFePO4 charging circuit help
« Reply #4 on: December 30, 2009, 07:18:19 PM »
Go back and look at the charging graph in the post you linked to. The solid line is the voltage and the dashed line is the current.
Charging is done in stages.
Stage1: The current supplied to the battery is constant. The voltage is monitored until it the cell voltage limit is reached. Go to stage 2.
Stage 2: The voltage to the battery is held constant and the current is monitored. When the current is less than 3% of the starting current the battery is charged.

Stage 3: is when the battery is left on the charger for an extended time. The charger applies a voltage near the limit for until either the current drops or the voltage gets to the limit. This keeps the battery at peak charge without over charging or over heating.

Offline z.s.tar.gzTopic starter

  • Supreme Robot
  • *****
  • Posts: 540
  • Helpful? 5
  • Linux Guru
Re: custom LiFePO4 charging circuit help
« Reply #5 on: December 30, 2009, 09:03:35 PM »
But what I'm wondering is what voltage to apply in stage one and what current to supply in stage two. Something has to be supplied right?
Save yourself the typing. Just call me Zach.

Offline billhowl

  • Supreme Robot
  • *****
  • Posts: 375
  • Helpful? 32
  • Your success is in your hands.
Re: custom LiFePO4 charging circuit help
« Reply #6 on: December 31, 2009, 06:08:05 AM »
What voltage and current to apply will base on the battery type & capacity, you have two LiFePO4 cells rated 3.2V @ 1100mah, is this connected in series or parallel?

If connected in series, then the voltage limits will be 3.9V x 2 = 7.8V and the initial current will be 1100mA or 1.1 Amps. then 3% will be 33mA.

If connected in parallel, then the voltage limits will be 3.9V and the initial current will be 1100mA x 2 = 2200mA or 2.2Amps. then 3% will be 66mA.

Offline z.s.tar.gzTopic starter

  • Supreme Robot
  • *****
  • Posts: 540
  • Helpful? 5
  • Linux Guru
Re: custom LiFePO4 charging circuit help
« Reply #7 on: December 31, 2009, 09:11:11 AM »
The batteries will be in series, so if I just apply 7.8V @ 1.1A all the time, I would just have to monitor it to tell when it's done aka at 3%?
Sorry, it still doesn't make much sense to me.

I think I'm having trouble with the concept of charging current vs regular current and the likes.

Edit: What exactly is the charge current anyways?
« Last Edit: December 31, 2009, 09:53:46 AM by z.s.tar.gz »
Save yourself the typing. Just call me Zach.

Offline waltr

  • Supreme Robot
  • *****
  • Posts: 1,943
  • Helpful? 98
Re: custom LiFePO4 charging circuit help
« Reply #8 on: December 31, 2009, 10:38:40 AM »
Quote
What exactly is the charge current anyways?

In the case of the graph you linked to and billhowl's post the charge current is 1C. This rate comes from the batteries data sheet.

You need to read the data sheets and app notes of the battery manufacturers. Panasonic has some good ones that would apply the other manufacture's batteries.

Quote
The batteries will be in series, so if I just apply 7.8V @ 1.1A all the time, I would just have to monitor it to tell when it's done aka at 3%?
Sorry, it still doesn't make much sense to me.

No, you want to follow the two charge stages as shown in the graph as I explained above.

Offline z.s.tar.gzTopic starter

  • Supreme Robot
  • *****
  • Posts: 540
  • Helpful? 5
  • Linux Guru
Re: custom LiFePO4 charging circuit help
« Reply #9 on: December 31, 2009, 11:29:10 AM »
So the voltage in the graph is the monitored voltage and the current is the applied current?
Save yourself the typing. Just call me Zach.

Offline madsci1016

  • Contest Winner
  • Supreme Robot
  • ****
  • Posts: 1,450
  • Helpful? 43
Re: custom LiFePO4 charging circuit help
« Reply #10 on: December 31, 2009, 02:48:00 PM »
I think you are getting a little mixed up with 'monitored' and 'applied' voltage.

(this is a bit crude but should illustrate my point)
Let's say you have a dead 6V battery in one hand and a charger in the other. If you measure the voltage at the battery, it will be around 3-4 V (because it's dead) and the voltage of the charger will be 6V.

Once you connect the charge, both the battery and the charger are now around 6V. In order for the charger to maintain that voltage (because the battery is going to try to "pull it down" ) it produces a current that flows into the battery.

The moral of this story is when you are charging a battery, there is only one voltage and one current (between the charger and the battery). So the graph shows this, one voltage line and one current line.

Offline z.s.tar.gzTopic starter

  • Supreme Robot
  • *****
  • Posts: 540
  • Helpful? 5
  • Linux Guru
Re: custom LiFePO4 charging circuit help
« Reply #11 on: December 31, 2009, 02:56:13 PM »
Ok, so the voltage applied is always going to be the same, but in the beginning it gets "pulled down". After the voltage reaches maximum, the current required to finish the charging decreases until it get to around 3 percent, at which the battery is fully charged.

Is that correct? If it is, what's the best way to monitor the current?
Save yourself the typing. Just call me Zach.

Offline madsci1016

  • Contest Winner
  • Supreme Robot
  • ****
  • Posts: 1,450
  • Helpful? 43
Re: custom LiFePO4 charging circuit help
« Reply #12 on: December 31, 2009, 03:14:11 PM »
Mostly right. There are going to be two limits to the system.

How much current the charger can source, and what voltage the battery needs to be charged too.

The first stage, the charger trying to bring up the battery to 6V, but will stop at some voltage when it hits it's current limit (this is known as constant-current mode). As the battery charges, it will be not 'pulling down' as hard, until the voltage between the two comes up to the what should be the battery voltage, and then the charger will hold at that voltage.

As a result, the battery continues to charge and not 'pull' as hard, the current will decrease. This is constant voltage mode.

You would need a circuit that monitors current and voltage. If you wanna use a MCU to handle this, something lie this would work.
http://www.sparkfun.com/commerce/product_info.php?products_id=9028

This is what i used in my SAGAR robot. My smart motor controller reports voltage and current to my main MCU and it will override speed commands if the current is over a critical limit.

Offline madsci1016

  • Contest Winner
  • Supreme Robot
  • ****
  • Posts: 1,450
  • Helpful? 43
Re: custom LiFePO4 charging circuit help
« Reply #13 on: December 31, 2009, 03:24:06 PM »
The biggest obstacle i see to to what you want to do is the high voltage (17V) coming from your solar cells, and the fact that the sun does not remain constant. While i have never done something like this before, i imagine this is one way to do it:

Solar Cell ======controllable switching regulator=======Voltage and current sensor=======battery
                                              ||                                                  ||
                                               =======MCU==============

you might also need voltage monitoring between the solar cell and the voltage regulator. The MCU would have to adjust the voltage regulator to a lower voltage if the charging current got too high.

I also don't know if you can damage solar cells by trying to pull too much current, or if it's voltage would just drop. That is another thing to worry about.

Offline z.s.tar.gzTopic starter

  • Supreme Robot
  • *****
  • Posts: 540
  • Helpful? 5
  • Linux Guru
Re: custom LiFePO4 charging circuit help
« Reply #14 on: December 31, 2009, 03:53:11 PM »
I was actually run the solar panels through a capacitive dc-dc converter to bring up the available amperage, as I really don't need 17V, and I don't think 24ma is enough to charge the batteries.

And as for the consistancy of the power coming from them, it's pretty stable, as they still put out 14V with cloud cover. I think I'll run them through a switching regulator regarless.

Save yourself the typing. Just call me Zach.

Offline Soeren

  • Supreme Robot
  • *****
  • Posts: 4,672
  • Helpful? 227
  • Mind Reading: 0.0
Re: custom LiFePO4 charging circuit help
« Reply #15 on: December 31, 2009, 06:53:52 PM »
Hi,

Take a look at this circuit
It will do the CC/CV (a better name for that would be max. current and max. voltage) you need.

You could modify it for a switch mode regulator - the resistor values need changing anyway.
Regards,
Søren

A rather fast and fairly heavy robot with quite large wheels needs what? A lot of power?
Please remember...
Engineering is based on numbers - not adjectives

Offline madsci1016

  • Contest Winner
  • Supreme Robot
  • ****
  • Posts: 1,450
  • Helpful? 43
Re: custom LiFePO4 charging circuit help
« Reply #16 on: December 31, 2009, 07:42:43 PM »
Hi,

Take a look at this circuit
It will do the CC/CV (a better name for that would be max. current and max. voltage) you need.

You could modify it for a switch mode regulator - the resistor values need changing anyway.



You won't need the 4 diodes on the left side of the circuit, that is only for AC input. And using a R]resistive regulator is a waste of energy.

Soeren, I'm assuming you know of switch mode regulators the accept an input reference for voltage output. Care to link? I have only ever found Pot adjusted ones, like then ones from dimension engineering.

Offline Soeren

  • Supreme Robot
  • *****
  • Posts: 4,672
  • Helpful? 227
  • Mind Reading: 0.0
Re: custom LiFePO4 charging circuit help
« Reply #17 on: January 01, 2010, 12:37:26 AM »
Hi,

You won't need the 4 diodes on the left side of the circuit, that is only for AC input. And using a R]resistive regulator is a waste of energy.
Resistive regulator??

Well, it was meant for inspiration, it's an old design for a simple mains driven NiMH charger, in case anyone didn't get that.


Soeren, I'm assuming you know of switch mode regulators the accept an input reference for voltage output.
Not quite sure what you mean?
Regards,
Søren

A rather fast and fairly heavy robot with quite large wheels needs what? A lot of power?
Please remember...
Engineering is based on numbers - not adjectives

Offline madsci1016

  • Contest Winner
  • Supreme Robot
  • ****
  • Posts: 1,450
  • Helpful? 43
Re: custom LiFePO4 charging circuit help
« Reply #18 on: January 01, 2010, 01:49:22 AM »

Resistive regulator??


The LM317 is that circuit is a resistive regulator. It drops voltage down by burning it off in a resistor, just like the 7805 (etc) voltage regulator.


Not quite sure what you mean?


The LM317 is an adjustable regulator. The circuit you provided work as a CC source because the the LM317 is electronically adjusted to maintain the correct voltage based on current. If he were to adapt this circuit to a switching regulator, he would need one that had a input pin that controlled it's output voltage like the LM317 does. I guess the solution to this is two build a switching regulator circuit, as opposed to a pre built regulator.

Offline z.s.tar.gzTopic starter

  • Supreme Robot
  • *****
  • Posts: 540
  • Helpful? 5
  • Linux Guru
Re: custom LiFePO4 charging circuit help
« Reply #19 on: January 01, 2010, 08:49:12 AM »
So here's what I've got so far:
Solar Panels <> DC/DC converter and regulator <> Voltage and Current Monitor <> Batteries
Save yourself the typing. Just call me Zach.

Offline billhowl

  • Supreme Robot
  • *****
  • Posts: 375
  • Helpful? 32
  • Your success is in your hands.
Re: custom LiFePO4 charging circuit help
« Reply #20 on: January 01, 2010, 11:02:32 AM »
Here is the switching regulator, constant-current, constant-voltage two-cell Li-Ion battery charging circuit.
The regulation voltage (VREG) of the LM3420 can be externally trimmed by adding a single resistor from the COMP pin
to the +IN pin or from the COMP pin to the GND pin, depending on the desired trim direction. Trim adjustments up
to ±10% of VREG can be realized, with only a small increase in the temperature coefficient.
http://www.national.com/mpf/LM/LM3420.html

Offline z.s.tar.gzTopic starter

  • Supreme Robot
  • *****
  • Posts: 540
  • Helpful? 5
  • Linux Guru
Re: custom LiFePO4 charging circuit help
« Reply #21 on: January 01, 2010, 11:11:18 AM »
Two questions:

In that schematic, what are the op-amps for? Do I really need them?

If I set it up like in my last post, will I be able to simultaneously charge the batteries and run a load? Ideally I would like the batteries to be a sort of reservoir between the solar panels and the electronics.

Edit: From looking at the datasheets for the parts I posted, it seems that the schematic you provided is just a completed circuit.
« Last Edit: January 01, 2010, 11:17:00 AM by z.s.tar.gz »
Save yourself the typing. Just call me Zach.

Offline billhowl

  • Supreme Robot
  • *****
  • Posts: 375
  • Helpful? 32
  • Your success is in your hands.
Re: custom LiFePO4 charging circuit help
« Reply #22 on: January 01, 2010, 11:29:02 AM »
The op-amp on the top of the schematic is configure as voltage follower for voltage sensing.
The op-amp on the bottom of the schematic is for current sensing, all this are part of the circuit.
Please read the PDF file for more detail. 

Offline z.s.tar.gzTopic starter

  • Supreme Robot
  • *****
  • Posts: 540
  • Helpful? 5
  • Linux Guru
Re: custom LiFePO4 charging circuit help
« Reply #23 on: January 01, 2010, 11:44:08 AM »
I see...
For the sake of free day from sparkfun I'm going to go with the parts I linked to earlier, but if that doesn't work out I'm going to use that one you posted.
« Last Edit: January 01, 2010, 11:46:27 AM by z.s.tar.gz »
Save yourself the typing. Just call me Zach.

Offline madsci1016

  • Contest Winner
  • Supreme Robot
  • ****
  • Posts: 1,450
  • Helpful? 43
Re: custom LiFePO4 charging circuit help
« Reply #24 on: January 01, 2010, 12:28:50 PM »
I see...
For the sake of free day from sparkfun I'm going to go with the parts I linked to earlier, but if that doesn't work out I'm going to use that one you posted.

idk, I kinda like BillHowl's circuit better.

Offline z.s.tar.gzTopic starter

  • Supreme Robot
  • *****
  • Posts: 540
  • Helpful? 5
  • Linux Guru
Re: custom LiFePO4 charging circuit help
« Reply #25 on: January 01, 2010, 02:56:59 PM »
I do too, but how can I get that for free?

Edit: The answer is that I can't, because I can't find the LM3420 anywhere.
« Last Edit: January 01, 2010, 03:39:40 PM by z.s.tar.gz »
Save yourself the typing. Just call me Zach.

Offline waltr

  • Supreme Robot
  • *****
  • Posts: 1,943
  • Helpful? 98

Offline Soeren

  • Supreme Robot
  • *****
  • Posts: 4,672
  • Helpful? 227
  • Mind Reading: 0.0
Re: custom LiFePO4 charging circuit help
« Reply #27 on: January 01, 2010, 10:55:39 PM »
Hi,

The LM317 is that circuit is a resistive regulator. It drops voltage down by burning it off in a resistor, just like the 7805 (etc) voltage regulator.
No, it's called a linear regulator and it dissipates the dropped power in a semiconductor (just like the 78xx and any other linear regulators).


The LM317 is an adjustable regulator. The circuit you provided work as a CC source because the the LM317 is electronically adjusted to maintain the correct voltage based on current. If he were to adapt this circuit to a switching regulator, he would need one that had a input pin that controlled it's output voltage like the LM317 does. I guess the solution to this is two build a switching regulator circuit, as opposed to a pre built regulator.
To answer the last thing first, I never said anything about pre-built or not.
That said (or not ;D), it doesn't have to be adjustable, as long as there is some means to sink the output voltage - whether it's an enable pin on a pre-built chip, a transistor quenching the oscillator on a pre-built (or not), or any other way of cutting the output for any number of cycles needed.
Regards,
Søren

A rather fast and fairly heavy robot with quite large wheels needs what? A lot of power?
Please remember...
Engineering is based on numbers - not adjectives

Offline z.s.tar.gzTopic starter

  • Supreme Robot
  • *****
  • Posts: 540
  • Helpful? 5
  • Linux Guru
Re: custom LiFePO4 charging circuit help
« Reply #28 on: January 02, 2010, 10:07:08 AM »
Well, digikey does have the lm3420, but what I didn't know is that it's surface mount. At the moment I have neither the means to work with surface mount nor the money to buy the tools to do so.
Save yourself the typing. Just call me Zach.

Offline madsci1016

  • Contest Winner
  • Supreme Robot
  • ****
  • Posts: 1,450
  • Helpful? 43
Re: custom LiFePO4 charging circuit help
« Reply #29 on: January 02, 2010, 08:08:13 PM »
No, it's called a linear regulator and it dissipates the dropped power in a semiconductor (just like the 78xx and any other linear regulators).

While 'linear' regulator is a more commonly used name for it, it can still be called a resistive regulator. The university from which I graduated houses the North American Center for Advanced Power Systems, and thus most of the classes are taught from a power perspective. When modeling the steady state analysis of a circuit with a 78xx device, it can be replaced with a resistor of a variable value, because (quote from Wikipedia) "the transistor is acting like a resistor, it will waste electrical energy by converting it to heat." Which is why it is acceptable to refer to it as a 'resistive regulator' (much like my professors did) as well as a linear regulator. One way describes it's electrical characteristics while one way describes the state the semi-conductor is in.

And i meant to say like a resistor, not in a resistor.

 


Get Your Ad Here