# Using the TP4056 to charge a LiPo battery and supply power to my circuit

My goal is to power a 5V circuit using a rechargeable battery with an optional USB power source. I have a TP4056 battery charger (with battery protection circuit) to charge my 3.7V 900mAh LiPo battery such as this one here:

1. The default value of the current RPROG resistor on the TP4056 board is 1.2K. Do I have to change the resistor for my 3.7V 900mAh battery or is this fine?

2. The circuit I'm going to power, however requires 5V supply. So I'm using a DC-DC step up converter (B6286, similar to MT3608), like the one shown below, to step up the 3.7V from LiPo to 5V output. The question here is, will this 5V output be regulated?

3. Or do I need an additional 7805 regulator for this? For using the 7805, I understand that the input voltage for the 7805 IC now has to be stepped up from 3.7V to at least 7v. My load just consists of a XBee Module which draws around 40mA and a Joystick Module which works at 5V.

4. The DC-DC step up board also comes with a USB port, so I have the option of using both USB power source as well as battery as the source. So, is the a good method to supply power or is there an alternate better method? The goal is to keep the components and battery as small as possible.

This is several questions and should probably be broken apart, but nevertheless

1. According to this TP4056 datasheet, a 1.2 kΩ RPROG will give a charging current between 950 and 1050 mA. This is a bit much for a lithium-ion battery, which typically prefers a charging current no more than 1 C (e.g. 900 mA for a 900 mAh battery). If you have a datasheet for your battery, it should say the recommended maximum charging current. You might want to go to 0.5 C (450 mA) to reduce battery aging. A 1.43 kΩ resistor would give a current below 900 mA, and a 3 kΩ resistor would give one below 450 mA.

2. The output of a switching regulator like that is typically fairly well-regulated (hence the name “regulator”). There are some graphs of the line and load regulation on this MT3608 datasheet.

3. You almost certainly do not need or want a linear regulator on the output of the boost regulator, as it would reduce the efficiency and therefore battery life a lot. The only common reason to add a linear regulator to the output of a boost regulator is to reduce the output noise, but the only really noise-sensitive component you mentioned is the XBee, and it will need a little 3.3 V regulator anyway (and feel free to use a linear regulator for that).

4. It looks like that USB port is directly connected to the Vin hole, so you can't connect USB power while a battery is connected, or you stand a good chance of exploding the battery. USB is already 5 V nominal, though, so you don't need to connect it to the input of the boost regulator—you can just disconnect the boost regulator and hook USB power up directly to your circuit.

• Thanks for the reply! This is the datasheet for the battery. The standard charge current specified here is 0.2CA. What exactly does this C stand for? I'm guessing its the capacity, which is 900mAh in my case. So the charge current should be 0.2*0.900 = 180mA. But how do you calculate the RPROG value now? Feb 3, 2017 at 17:35
• Looking at the table in the datasheet, I think a standard 6.8K resistor should do the job right? Feb 3, 2017 at 17:53
• @user87877 The value of C for a battery is its capacity divided by 1 hour, which is the current that would theoretically charge or discharge it in that time. For some reason, that datasheet writes it as C5A, but it seems that they're just referring to the C-rating. A 6.8 kΩ resistor would be very safe, but of course would take several hours to charge. The datasheet allows up to 1 C, so I'd be tempted to charge at 0.5 C or so to save time. Feb 3, 2017 at 18:27

One issue with your circuit is: It has no protection against over-discharging the battery. A LiPo should not be discharged below 3.0 Volts (ref: https://rogershobbycenter.com/lipoguide/). Your step-up converter (MT3608) will 'drop-out' at ~ 2.0 Volts: way below this voltage.

There are charger boards that do protect against such over-discharge (search: Battery Charging Board Charger Module+Protection Dual Functions).. They have a charger circuit, plus a voltage monitor with MOSFET that will disconnect the battery from the output / step-up converter when battery undervoltage looms.

On-the-side, and no fun at all: these days the fastest way to get this job done would probably be to get a 'power-bank' and use it as-is... 'The circuit' you are contemplating is what you'll find inside, with one or more LiIon cells :-)