Question: I have build this UPS battery supply to power a Raspberry Pi using 18650 batteries,using the TP4056 battery charge controller. The circuit as follows:

[![enter image description here](https://i.stack.imgur.com/MUA1q.png)](https://i.stack.imgur.com/MUA1q.png)

This is working fine at the moment, but I'm worried: Is the charging and discharging of the battery occurring at the same time? Will this effect the batteries and its life?

And also there is only One battery protection IC for three single batteries,Will this is a suggestible way for protecting multiple batteries,And i'm thinking of replacing the USB/DC charge adapter with Solar panel 6V,14W, will this be able to accomplish the task?

Answer: 
First obvious question, why do you have **three** TP4056?
They are not designed to be connected in parallel, their outputs will affect feedback and therefore distort proper charging profile.

Second, it does not look like TP4056 is designed to be used with system load connected. You need more advanced BMS to have this functionality. The functionality is called "Power Path".

[MCP73871](http://ww1.microchip.com/downloads/en/DeviceDoc/20002090C.pdf) is an example of charge controller that can do what you need.

And here is [AN1149](http://ww1.microchip.com/downloads/en/AppNotes/01149c.pdf) application note that can answer all your questions. Note that application note uses different controller (MCP73837). The MCP73871 already has most of those external components inside. This is just for the reference, to better understand the potential problems and see how they are resolved.

UPDATE

Using solar panel as external source presents several problems.

First, 7V is absolute maximum for MCP73871, meaning it will survive but not for long. So, you'd need 6V external voltage limiter (e.g. zener-based) for the times when solar panel output is too high.

Second, very often the panel output will be less than 4.5V required for charging, meaning your battery will only be charged in bright light.

Third, peak available power means very little for CC/CV charging profile of the LiPo battery. You either using very little of it, or you can use much more than 2A, depending on the current stage of charging.

The only way I see to solve all these problems is to use MPPT like [SM72441](http://www.ti.com/lit/ds/symlink/sm72441.pdf) between the panel and BMS.

* The MPPT can be programmed for fixed 6V output. It will boost the voltage in low light and limit it in bright light with about 99% efficiency.
* It will keep solar panel at maximum power point. You won't be using "peak available power", you will be using maximum available power at all times.

You can buy ready-made MPPT modules for just a few bucks (no guarantee of quality though) or design [your own](http://www.ti.com/lit/an/snosb84c/snosb84c.pdf).
Is the charging and discharging of the battery occurring at the same time? Will this effect the batteries and its life?

When a load is connected while charging, the charger is effectively supply the load and the charge rate is reduced.

You have a setup with Ibat = 1000mA from each Rprog=1.2k thus a curent source of 3A that switches to CV at 4.2V

The uncertainty of performance is that the strongest battery (lowest ESR) will share more than 1/3 of the 3A load , so the ESR's ought to be fairly well matched if you are pushing the charge rate to the recommended limit.

If so, I think it may accelerate aging of the strongest cell, and tend to equalize the ESR to the weakest cell. 

other
-----

So as the mismatch in ESR increases , be more conservative on the charge rate. Charge rate, achieving lifetime charge cycles and %DoD are always user choice tradeoffs. Test the voltage drop with repeated 1A load pulses to estimate ESR.

**You will need a large heatsink. > 10W.**