Using TP4056 for both battery charging control and load control

I have a TP4056 Lithium ion charging breakout board. I am just trying to use a single 3.7v 18650 battery which would power a small stepper motor and Arduino.

I have one of the TP4056 boards that has additional circuitry for (what I believe to be) load control, so in addition to +/- in and +/- battery on the board, there is +/- out. You can see a picture of the board here: http://www.coldtears-electronics.com/images/TP4056-4.jpg. There is also a helpful video at https://www.youtube.com/watch?v=Qw4psECqpwI that reviews this board.

I can get the board to charge the battery fine, when it is just the power input, the TP4056 board, and the battery. I can also get the battery to power the load (stepper + Uno board) fine, when it is just the battery + load, and also with the TP4056 in between the battery and load (although haven’t run it down to test the undervoltage protection yet).

What I am struggling with is the relationship of the charging side with the load side.

With the load connected it seems to prevent the charging from shutting off: the charging seems to go on forever, even when the load draw is very low. My anticipation was that eventually the charging would stop. I also don’t want to overcharge the battery, and was wondering if the load is interfering with the detection of when the battery has reached max. This issue is also raised in the video link above.

I did a search for TP4056 on the forum, but I was unable to find anything that discusses this.

Any suggestions? The load needs to be constantly connected to the power, as the Arduino runs continuously with a sketch to determine when the stepper will run. I contemplated putting in a switch, but disconnecting the load during charging would defeat the purpose of the project.

The power source is also various. Right now, I power it by periodically plugging into a 5V power supply, but may add in a solar input in the future (with an input in the 4v- 8v input range of the TP4056). However, if I can’t get this chip to charge properly when a load is attached, no point in getting the power supply working!

I suspect the load is preventing it from thinking the battery is charged. I'll bet the load out is connected directly to the wires to/from the battery, so if there's a load on it, it will think the battery is still charging; typically these look at the voltage and current to determine when the battery is charged.

I would be surprised if you couldn't get the power usage down low enough to fool the sensor, assuming you weren't using an Uno/etc with all it's power-wasting auxiliary electronics on the board with the MCU

Based on my estimates of power consumption, once I put this on an arduino mini I will have ~10-15 mA on a continuous basis (a bluetooth module + mini in power down + voltage regulators), punctuated by periodic 150-250 mA consumption for 30 seconds or so at a time.

Not so concerned about the 150-250 mA times (they will be infrequent), but more about the 10-15mA draw leading to overcharging, particuarily if I add a solar input to make this autonomous that is greater than 10mA @5v. Do you think that 20mA would be low enough to fool the

Should I put in a MOSFET (or other type of transistor) between the power input and TP4056, and just cut it off (leaving the connection from TP4056 to the Ardunio connected all the time) when it is above say 4.1V? This way, it will never overcharge. I could just use an analog in pin the arduino to track voltage coming in, and another pin to turn the transistor on/off.

I am okay with losing a bit of battery capacity to do this, but just want to be able to not blow up the battery.

Any suggestions?

What is the exact number of the DW01... I expect it's cutoff voltage is above the 4.2volt of the charging IC. So the IC's don't fight each other.

Didn't read the TP4056 datasheet well enough, but doesn't the charging cycle stop when current falls below 10% of the set current?

So if the normal charging current is set at 1A, the IC should stop charging at 100mA. Well above the current consumption of the Arduino.

So even if you add solar, the IC would stop charging if the voltage is 4.2v and the current is >100mA. Leo..

Hi Makerself

Did you have any success with your charging with load?

I have a similar project so am faced with the same problem, I too am using a solar panel as my energy source.

Very interested in hearing how you resolved it.

Regards

John

ingram010/John,

Sorry, no I didn't. I tested it a bunch of times, but wasn't able to get it to run successfully.

Did you have any results?

This is my very first post in this community, so, forgive my mistakes. If I understood correctly, having a load which draws about 10mA from the battery whenever the 5V supply is connected to the module results in overcharging of the battery. I therefore want to suggest a solution. (I've not tried this myself but hope it should work). From all indications, this problem is not experienced whenever a load that takes up somewhere around 50mA doesn't or shouldn't cause the aforementioned problem to occur. Try adding a load whose sole aim in life is to be connected by the Arduino to the load terminals of the module only when it detects that a 5V USB charger is connected. (probably irrelevant load like say a group of LEDs in parallel to increase the load current to around 50-60mA or whichever current that doesn't cause this issue). This load should remain connected whenever the 5V is connected to the TP4056 module. How to check the presence of the 5V should be up to you. Like I said, I haven't tried this before but it should work. Try it out if you may and give us feedback.

I'm jumping on the band wagon a little late with this one but I also have the same problem. I'd be really interested to hear any updates on this situation. I also intend on using solar energy as the power source for TP4056.

Jack

If you have the battery connected to the TP4056, and the load connected to the battery, then if the load is turned on while charging the battery, the TP4056 may not detect that the battery has fully charged. It detects that when charging current drops below 10% of the full charging current (as determined by the program resistor - see datasheet). But if the load current by itself is greater than that 10% level, charging will never terminate. That's dangerous. You can't continue to apply 4.2V to a fully charged lithium battery.

The simplest solution is to never operate the device while charging the battery. But if the whole idea is to have a UPS type device, that won't work. I think one option that might work is called a "load sharing" circuit, which allows the input power supply to directly power the load while it's plugged in, and also independently power the TP4056 to charge the battery to termination. Such a circuit is made up of a Schottky diode, a P-channel mosfet and a resistor. Such circuits are typically used with input power that is either on or off, not with solar input that may vary all over the place. So I don't know if it works with solar, but others here may have tried that. Here's an app note on a load sharing circuit using a different charger, but the same idea:

http://ww1.microchip.com/downloads/en/AppNotes/01149c.pdf

Now you're going to ask why the module makers of the Far East don't make a module with a TP4056, protection, load sharing, and a boost converter. That's a very good question. As far as I can tell, they don't.

Hello, I too had the same problems and questions about the tp4056 module....charging the battery while it is connected to the load. During my research, I found a good explanation for the 'load sharing' circuit. Click on the link given below, and go all the way down to 'TP4056 Power Sharing Problem'. https://www.best-microcontroller-projects.com/tp4056.html