Charging Lithium cell from buck-converter - Page 1
Forum section: electronics / projects

author: step_s
author_rank: Regular Contributor
timestamp: July 22, 2016, 03:06:12 pm
content: Hi lovely people.I'm currently trying out some stuff with this chiphttp://www.farnell.com/datasheets/608795.pdfand have run in to some strange behaviour.When loading the output down with a resistive load, it works like it should, bucking down the voltage, and output current is around double of input current (Seems a little ineffective tbh, but nvm).When I then try to charge a battery from the output, the output current (Voltage seems to be the problem, since higher voltage gives higher current draw) is very irregular. Jumping all over the place, while input current and voltage are pretty stable.Also I have yet to decipher how the current limitation works, since it doesn't just seem to lower the voltage, but completely turn off the device for a few seconds instead.The setup is pretty much the same as in the datasheet (no optional items added). 12V in, around 4V out depending on battery charge, to stay at around 0.5A draw.Do I need to approach it differently when charging a battery, than when just driving a resistive load?Hope you can help.

author: MosherIV
author_rank: Super Contributor
timestamp: July 22, 2016, 05:27:15 pm
content: Do NOT charge any type of Lithium battery with a psu, they need specialised charging characteristics!

author: KL27x
author_rank: Super Contributor
timestamp: July 22, 2016, 11:43:45 pm
content: Well, yeah. A buck converter doesn't do anything to limit current. If you use it's max output rating, that is not going to do exactly what you want. In fact, unless you built some limiting circuitry, the IC itself has nothing to limit current other than thermal shutdown. And the limits of the external components you use.So you could use the buck to produce X volts, which is a few volts higher than the li ion battery voltage. A current limiting circuit. And a linear regulator. In that order. Which is pretty complicated and wastes a lot of power.Or you could use your buck converter and add active current limiting... you would need a current sense resistor to opamp to comparator to FET, minimally. When voltage across the sense > X, switch off the output. When voltage < X, switch back on. melikes this idea, personally. Maybe you could improve that by using the linear region in a beefy FET.Or you could use the buck to produce a voltage where a dedicated li ion charging IC can take over. But if you are charging multiple cells in series, you have to do a little digging.Or you could stick a power resistor on your buck output to limit max current. But it will take an extra several hours to charge the last 10% of your battery. This is fine in a pinch.Basically, I think you found the thermal shutdown limit on your IC. That's why it takes awhile to turn back on. This doesn't exactly limit the max current to X... it totally depends on heatsinking and ambient temp. And even if it is shutting down at the appropriate current, and even if you could stand the super long time it will add to the charge time, it is not something to rely on, IMO. This is a last resort, save the IC from self-destruct thing. And if repeatedly abused, I expect this to fail, unless proven otherwise.

author: sleemanj
author_rank: Super Contributor
timestamp: July 23, 2016, 12:13:27 am
content: On the current limiting. From what I can gather (or rather infer, since it's not very explicit) from the DS, the over current protection (OCP) probably shuts down output and goes into a 50kHz mode, so I expect that means it looks to see if the over current has gone away at 50kHz, (this is probably enough to heat the chip up if it's severely over-current (short circuit) and go into thermal shutdown for a while, as a poster above notes).As for the strange behaviour you are seeing when I assume that you do not expect the OCP to be happening - that is,Code:(OutSetV-BattV)/(BattESR+ExternalSeriesResistance) < OCPThresholdAmy first thought would be slap a diode on the output in case the feedback sampling is being messed with by the presence of a supply on the output when the output is off.As others have stated, this buck converter, on it's own does not a Lithium-Ion battery charger make. Ideally you want to be feeding a constant current until you get close to the upper voltage, then holding that constant voltage until the current drops off to some pre-determined level.Now, you might have a think about how you could maybe make the application circuit into a constant current buck converter. If you look at the block diagram we can see that the FB pin is compared with the internal reference voltage, that reference voltage doesn't appear to be explicitly specified, but we can look at the application circuit to determine it by extrapolation - the application circuit shows an outout of 5v,with Ra = 6.8k and RB = 1.3k, you can solve the equation written under the circuit for VFB which therefore must be the Reference voltage. So your aim would be to get the voltage at FB the same as the reference voltage when the current you want is being passed. If you get that to work then you could also think about how you could affect the FB voltage if EITHER the max current is being passed or the max voltage is being passed. Then you have something much closer to a Lithium-Ion charger (a current and voltage limited supply).

author: step_s
author_rank: Regular Contributor
timestamp: July 23, 2016, 12:38:58 pm
content: Hi again guys.Thank you for the good feedbackI see now that the problem was the OCP switching on and off, going into low-current mode, and then back up. I don't think that's healthy either.The OCP seems to work, but only after a good amount of time, so using a higher value resistor, will make it turn off at a lower current, but in the first good amount of seconds, the chip will draw full current, exceeding well over 2.5amp if allowed. So the "heat theory" might be quite corret.Sleemanj: I reckon this chip reacts extremely fast in an analog fashion, so would a PIC be too slow to work with it? It could make it ramp up slowly, by setting the FB voltage slightly lower, like 0.01V off target, to make the chip ramp up the voltage, and when the current hits the target, then the pic would switch the FB voltage to be spot on?Hope to hear your thoughts

author: bitslice
author_rank: Frequent Contributor
timestamp: July 23, 2016, 01:22:01 pm
content: There are single chip lithium charger IC's that do all this for you?

author: step_s
author_rank: Regular Contributor
timestamp: July 23, 2016, 01:49:58 pm
content: Have been looking for small, cheap IC's like that, but they tend to be quite expensive.In most cases, it's a linear charging solution.Also, I like the fun of the project

author: bitslice
author_rank: Frequent Contributor
timestamp: July 23, 2016, 02:19:13 pm
content: Quote from: step_s on July 23, 2016, 01:49:58 pm?eBay"Lithium Battery Charger Module protection"£1I personally wouldn't dick with rolling my own lithium charging circuit, I like my house as it is, not as a charred ruin.

author: step_s
author_rank: Regular Contributor
timestamp: July 23, 2016, 03:06:34 pm
content: They are all linear chargers using the 4056?What I'm trying to do, is making it more efficient, and charge a single cell from 12V.

author: station240
author_rank: Unknown
timestamp: July 23, 2016, 03:25:20 pm
content: Problems you have with that circuit are:a) There is no current sense resistor/feedback network.b) You also need to sense the battery voltage, and completely disable the DC-DC converter if the battery voltage is too high. Usually this is 4.2V for lithium, but 4.15V is more conservative and will increase the life of the cell (and no doubt the risk of fire).Oh and put a fuse between the cell and the load/charger, so the fuse blows instead of the electronics/lithium.

author: sprok
author_rank: Contributor
timestamp: July 23, 2016, 03:34:16 pm
content: .

author: KL27x
author_rank: Super Contributor
timestamp: July 23, 2016, 09:12:10 pm
content: QuoteMy two cents, PIC will be plenty fast enough. As you have seen, even a few good seconds at overcurrent isn't end of the world boom.What are you thinking on the control, though?Sense resistor > opamp > ADC pin on PIC?PIC PWM output to an LC network controlling the gate of a signal transistor which is on the top leg of the FB pins resistor ladder, in parallel with a static resistance to make it 4.2V (per cell)? Increasing saturation of the transistor can only decrease it from there?Whatever you do, please keep us posted. I want to know how it turns out, but too lazy to do this myself.

author: zlymex
author_rank: Frequent Contributor
timestamp: July 24, 2016, 04:02:53 am
content: You need a CC-CV(constant Current and Constan Voltage) power supply.There are many DC-DCs with this sort of output characterize by two pots of adjustment for voltage and current.However, I bought many such DC-DCs but about 80% of them do not have a good constant characterizes.

author: step_s
author_rank: Regular Contributor
timestamp: July 24, 2016, 02:44:24 pm
content: Hi again.I appreciate all the answers, and all the concern about lithium ion batteries, but this is not what I lack knowledge off.@zlymex, my initial thoughts were to put a senseing resistor on the output, before the battery negative side, and have the pic measure the difference in voltage from PIC 0V to battery 0V, which would give a current measurement from the internal 1.024V reference point, using the ADC.Then, from that, I would make the PIC slightly decrease the voltage in the FB pin going to the buck IC using the DAC (if the current is too low), making it try to up the voltage, until the current hits the desired mark, and then the PIC would set the FB voltage spot on. And ofc the opposite if the current is getting too high.This would make a kind of "top of the hill" setup, making the PIC control the buck IC.Any thoughts on this approach?@blueskull, cheers on the beautiful schematic you drew xDBut wouldn't this require me to be able to control the switching directly?I have already tried a little with a PWM of the PIC directly driving the switches, but this requires mosfetdrivers, and suddenly, the price skyrockets.This is why I'm currently doing it this way

author: zlymex
author_rank: Frequent Contributor
timestamp: July 25, 2016, 07:16:35 am
content: Quote from: step_s on July 24, 2016, 02:44:24 pmTheoretically this will work, this is the digital control for close loop. In practice it has a slight chance of oscillation.

author: step_s
author_rank: Regular Contributor
timestamp: July 25, 2016, 08:39:54 am
content: Theoretically this will work, this is the digital control for close loop. In practice it has a slight chance of oscillation.Ye, I guess it's always a risk when its an analog chip, with the delay of the PIC. . .I've come up with another idea, and is going to test it out, to fix the issue of potential delay, causing oscillation.It is as follows:Instead of the PIC controlling the FB voltage directly, it will be connected to the 0V side of the normal voltage divider used to set voltage of the ouput, in order to create an offset. The voltage divider will be set to deliver the maximum voltage the battery can handle (4.35V in my case, using 3.8V lithium cells, and not 3.7V), when the PIC is directly 0V. Then if the PIC senses the current being too high (which it will if the battery is only at 3V empty, and the buck converter is aiming at 4.35V), and will make the 0V side of the voltage divider go up a little. This will slightly increase the voltage at the FB pin, and force the IC to go for a lower voltage = lower current draw.This can be done alot slower, and as soon as the CC stage is over, and the CV starts, the PIC will put out 0V, and the buck converter is just running by itself.Any quick thoughts before I blow myself up? xD

author: KL27x
author_rank: Super Contributor
timestamp: July 25, 2016, 06:58:59 pm
content: Edit: delete.