SparkFun Forums 

Where electronics enthusiasts find answers.

Have questions about a SparkFun product or board? This is the place to be.
By kirash4
#152870
I'm looking for a circuit that functions similar to what a laptop would do: when it's plugged in, it charges the battery, and when unplugged it runs off of battery. You can plug/unplug at any given time without having to power down.

All of the LiPo charging circuits I've seen are just that, to charge a battery. How can I expand a circuit to also allow power to be supplied to a device while at the same time also charging the LiPo (if needed) and when power is removed, the LiPo takes over and keeps things running? And when power is re-applied, it recharges the LiPo while also supplying it to the device.

Thanks all!
By kirash4
#152876
That charges a battery and supplies power to the device itself? I thought it only charges ...

As for how much power ... the entire device can at any given point be pulling as much as 2A, so the external power supply is going to be supplying at least that. The LiPo we're thinking of using TWO single cell 6600mA. Wired separately. Reason for this is redundancy, if one fails, the other will continue running and giving us the ability of swapping the dead one out. So, each one will have its own charging/monitoring circuit. If external power is removed, we want both batteries to take over and power the device.
User avatar
By viskr
#152881
PS I was curious to see what Maxim had, and this might be what you are looking for, Ti also plays in this arena

http://datasheets.maximintegrated.com/e ... X8903Y.pdf

You will need to add a load sharing circuit externally, which in the simplest could be some big Schottky diodes, or a couple MOSFETs.
Last edited by viskr on Thu Dec 06, 2012 4:43 pm, edited 1 time in total.
By MichaelN
#152882
You can normally just run it directly from the battery. If the charger is plugged in, it will supply current to the load as well as charging the battery; if it's not plugged in, the battery will supply the power...
By kirash4
#152891
Ok, I'll research those. Next, will there be any problems if I designed two separate circuits for two separate LiPos and have both get fed by the same Vin, and have both circuit's Vouts power the device? Each one will charge/monitor each battery, but when needed, both need to supply the device with power.
User avatar
By viskr
#152892
Independent charge circuits for each battery is the proper way to go, you just have to be careful to make sure you have large enough capacitors on the shared Vin to minimize the voltage variance when the inductors switch in. With up to 2A you are talking about a lot of energy.

Simple load sharing can be done with diodes, which means the more charged battery picks up the load first, and as the internal switches on these chargers/supplies are MOSFETs you don't face thermal run-away like you would with bipolar transistors.
By kirash4
#152894
What do you call "large enough" capacitors?

Do you have an example of load sharing with diodes? I just assumed I can tie Vouts together and call it done.
User avatar
By viskr
#152916
No 2 supplies tied together is not redundancy. If one fails it will drag the other one down. The simplest would be some schottky diodes rated for the load
diodes.gif
diodes.gif (4.88 KiB) Viewed 2097 times
As for the capacitor size, at least double the recommended input filter cap the circuit spec sheet suggests, and probably 4x would be better.
User avatar
By viskr
#152918
Yes you would lose 0.5V, but that is just the simplest circuit.

You could also design one with MOSFETs that would accomplish the same thing, but with voltage drops being quite small.

Never parallel supplies by just hooking them up, they never will have exactly the same output voltage, and they will end up fighting each other.
By kirash4
#152925
Alright, that makes sense. if I use Linear's ICs for their buck/boost capabilities, it'll be a bit of a waste because with the voltage loss from the diodes, I'm back at 4:5V and I need 5V ... hrm. Need to think about this.
By Duane Degn
#152945
kirash4 wrote:it'll be a bit of a waste because with the voltage loss from the diodes, I'm back at 4:5V and I need 5V ... hrm. Need to think about this.
Doesn't the buck/boost happen after the "load" connection? Since the diodes are placed before the regulator and not after, your curcuit should still see whatever voltage the regulator is outputing. Right?
By kirash4
#152946
A LiPo supplies 3.7V only. I need both 3.3V and 5V for the device, so I'll need a buck/boost between the LiPo and the device itself. When the device gets plugged in to 5V, I need to both charge the LiPos and continue to power the device.

Since I'll be using two LiPos, viskr suggests using diodes to tie them together prior to getting to the device. I'll still need to buck/boost that to get the necessary 5V.