Can someone tell me if this topology for a crude battery charger is sound? Block diagram included

batteriesbattery-chargingcellphonechargerusb

enter image description here

I am making a portable phone charging battery for fun. I have a micro USB input that ties to a 5V – 4.2V buck converter to charge a li-ion battery. The IC is made to charge batteries so I think that part is fine. I then go from the battery to a 5V boost converter that connects to a USB receptacle so you can charge your phone. I use a dedicated charger port IC between the USB data lines to make it charge most devices (correct me if I'm wrong).

Basically I want an explanation on what happens if I have a wall outlet plugged in to charge the battery while I have a phone plugged into the output also charging. Is that okay? How does the battery create the 5V rail (from the 4.2 to 5V boost) if charge is being pumped into it? Wouldn't charge need to leave it to make +5VDC?!

Is there any precautions I need to make to ensure it can charge a device while also being charged?

Best Answer

A 4.2V buck converter isn't good for charging a lithium ion battery unless it can't source too much current. There's three stages that a li-ion battery needs to be charged correctly. Messing any of those up can result in exploding batteries. See charging lithium ion batteries for more info on that.

Your question about the charge entering and leaving a battery isn't really an issue. I think in that regard, your question is a dupe of another on here a month or so ago that asked what happens when you charge and discharge a battery at the same time (I can't find it now...). At any rate, the point of the answer was that any extra current you need from the 4.2V buck will be sourced from it, and any current from the battery that it can source will be sourced.

If the battery is discharged lower than 4.2V, then the buck converter will supply both the battery some current and it will source the boost some current. This assumes that you have connected the battery in parallel to the boost converter.