Author Topic: TP4056 still charges when current falls?  (Read 1437 times)

0 Members and 1 Guest are viewing this topic.

Offline cdevidalTopic starter

  • Contributor
  • Posts: 32
  • Country: us
TP4056 still charges when current falls?
« on: July 15, 2022, 07:42:28 pm »
I'm aware of changing Rprog to lower the charge current for a TP4056, but what if I don't change Rprog from the 1.2k that comes on my module (charge current 1000mA) and the solar panel's current drops? Will it continue charging at a lower rate or will it pause charging?
https://dlnmh9ip6v2uc.cloudfront.net/datasheets/Prototyping/TP4056.pdf
« Last Edit: July 15, 2022, 07:45:23 pm by cdevidal »
 

Offline Peabody

  • Super Contributor
  • ***
  • Posts: 2141
  • Country: us
Re: TP4056 still charges when current falls?
« Reply #1 on: July 15, 2022, 09:24:17 pm »
I think the TP4056 will draw as much current as it can at the minimum voltage needed to add additional charge to the battery.  Of course that will depend on what the battery voltage is at the moment.  I suspect as you increase illumination from zero, the charging led on the TP4056 will start to light up when the input voltage is about 0.3V above the battery voltage.  The charge current at that point will be much less than 1A.  So I think the charge current resistor sets the maximum charge current, not the minimum.

I'd be interested in seeing a schematic of your circuit.

 
The following users thanked this post: cdevidal

Offline cdevidalTopic starter

  • Contributor
  • Posts: 32
  • Country: us
Re: TP4056 still charges when current falls?
« Reply #2 on: July 15, 2022, 09:46:23 pm »
I don't have a schematic but it's a simple circuit. Solar --> TP4056 --> Load-sharing P-FET (allows charging under load) —> LDO --> ESP32. Hoping to use a small panel, maybe 6V 100mW, and 200mAh li-ion battery.
« Last Edit: July 16, 2022, 11:33:40 am by cdevidal »
 

Online magic

  • Super Contributor
  • ***
  • Posts: 7212
  • Country: pl
Re: TP4056 still charges when current falls?
« Reply #3 on: July 15, 2022, 10:17:59 pm »
I recall a similar thread:
https://www.eevblog.com/forum/projects/solar-panels-powering-a-tp4056-what-about-the-rprog-resistor/

There is a block diagram posted there which I found in one of the datasheets. It's supposed to be a very simple linear IC.

If the upstream supply is current limited, the charger will try to turn its internal MOSFET hard on to get more current going into the battery. This will cause supply voltage to fall down to the level of battery voltage or just above it. I can see a few possibilities what could come next:
- the chip just keeps charging in such state; Vcc = Vbat and maximum available current is fed into the battery
- Vcc is now too low for the chip to function, it turns off and then back on and keeps oscillating
- an equilibrium is reached; the MOSFET is set to a certain resistance which makes Vcc higher than Vbat and high enough for the chip to function normally (4V?)

Peabody's experiment seems to suggest that the 3rd option is the case. But there are many clones of this chip and you never know what you get. They may all behave the same, or maybe not, so the outcome may vary from board to board. If it's a one-off project, just test your charger and see what happens.
 
The following users thanked this post: cdevidal

Offline Peabody

  • Super Contributor
  • ***
  • Posts: 2141
  • Country: us
Re: TP4056 still charges when current falls?
« Reply #4 on: July 16, 2022, 04:44:54 am »
Your charger circuit has a couple potential problems, depending on the load current at your LDO.  The TP4056 terminates charging when the charge current drops below 10% of the full charge current set by Rprog.  If your load current is greater than that, charging will never terminate, which is bad for the battery, and possibly dangerous.  However, if you can periodically put the ESP32 to sleep, and bring the load current below the 10% level, then termination should take place properly.  Even so, if termination does occur properly, you then have the battery powering the load when the solar panel could be doing so - the charger has shut down.

The solution to these problems is a load sharing circuit, which lets the panel directly power the load whenever it's illuminated, and charge the battery independently if needed.  But load sharing for a solar-powered TP4056 is complicated because the solar panel voltage is variable.

But if your battery is 200mAH, you'll have to change Rprog anyway so the max charge current is 200mA, or perhaps 100mA.  But note that the bigger the battery, and thus the greater the charging current, the easier it is to get load current below the 10% level.

« Last Edit: July 16, 2022, 04:47:54 am by Peabody »
 

Offline cdevidalTopic starter

  • Contributor
  • Posts: 32
  • Country: us
Re: TP4056 still charges when current falls?
« Reply #5 on: July 16, 2022, 11:28:12 am »
Forgot to mention I’m using the load-sharing circuit as well. And the ESP deep sleeps most of the time at about 150uA so that’s less than 10% of charge current. You say I have to change the resistor anyway; help me please understand why, if you think it will still charge on a lower current?
« Last Edit: July 16, 2022, 11:38:56 am by cdevidal »
 

Online tooki

  • Super Contributor
  • ***
  • Posts: 12599
  • Country: ch
Re: TP4056 still charges when current falls?
« Reply #6 on: July 16, 2022, 11:35:30 am »
I'm aware of changing Rprog to lower the charge current for a TP4056, but what if I don't change Rprog from the 1.2k that comes on my module (charge current 1000mA) and the solar panel's current drops? Will it continue charging at a lower rate or will it pause charging?
https://dlnmh9ip6v2uc.cloudfront.net/datasheets/Prototyping/TP4056.pdf
The 4056 is a very standard, basic charger.

For solar, where the maximum output power varies considerably and is only achieved by matching the load carefully, there are charger chips with a feature called MPPT: maximum power point tracking. It will constantly adapt the charger’s input current so that the maximum power can be harvested. Given that MPPT chargers are cheap and plentiful, there’s no reason not to choose one for a solar application. (They’re often marketed expressly for solar.)
 
The following users thanked this post: cdevidal

Offline cdevidalTopic starter

  • Contributor
  • Posts: 32
  • Country: us
Re: TP4056 still charges when current falls?
« Reply #7 on: July 16, 2022, 11:38:04 am »
I need to be able to pass emissions testing so I’m more interested in linear charge controllers than a potentially noisy MPPT module. Extracting maximum efficiency from the panel is not needed here so linear is sufficient, and the price is right. I’m just trying to avoid swapping out hundreds of resistors by hand.
 

Online tooki

  • Super Contributor
  • ***
  • Posts: 12599
  • Country: ch
Re: TP4056 still charges when current falls?
« Reply #8 on: July 16, 2022, 12:50:26 pm »
You know there are linear chargers with MPPT, right? And they don’t cost any more than non-MPPT models. E.g. TI BQ24210.
 
The following users thanked this post: cdevidal

Online magic

  • Super Contributor
  • ***
  • Posts: 7212
  • Country: pl
Re: TP4056 still charges when current falls?
« Reply #9 on: July 16, 2022, 12:54:04 pm »
That makes no sense.

The only thing a linear charger can do is make the voltage seen by the panel greater than that of the battery itself, which may or may not increase panel output power, but it will surely decrease charging current.
 

Offline cdevidalTopic starter

  • Contributor
  • Posts: 32
  • Country: us
Re: TP4056 still charges when current falls?
« Reply #10 on: July 16, 2022, 01:56:14 pm »
You know there are linear chargers with MPPT, right? And they don’t cost any more than non-MPPT models. E.g. TI BQ24210.

I didn’t know that, but they’re not cheaper and I’d have to build and test the circuit, for no real gain in actual use. I don’t expect to need to extract every milliwatt.

https://www.trustedparts.com/en/search/BQ24210
« Last Edit: July 16, 2022, 05:54:28 pm by cdevidal »
 

Offline Peabody

  • Super Contributor
  • ***
  • Posts: 2141
  • Country: us
Re: TP4056 still charges when current falls?
« Reply #11 on: July 16, 2022, 03:18:19 pm »
Forgot to mention I’m using the load-sharing circuit as well. And the ESP deep sleeps most of the time at about 150uA so that’s less than 10% of charge current. You say I have to change the resistor anyway; help me please understand why, if you think it will still charge on a lower current?

Ok, I need to reword that.  If your battery is 200mAH, then either the panel or the charger has to limit the charge current to no more than 200mA.  If your panel simply can't produce more than that, then you don't need to change the resistor.  If it can, then the current has to be limited in the charger.

The typical load sharing circuit (mosfet, diode and resistor) doesn't work with solar power.  Andreas Spiess did a video of that circuit with the TP4056, and it seemed to work, but actually doesn't.  Whenever the panel is contributing any current to the load, the mosfet will be turned off.  That means current contributed by the battery is flowing through the mosfet's body diode, with a 0.7V voltage drop, which is not what you want.  I did pretty extensive testing of his circuit, and ended up with an alternate circuit that does actually work, but it needs an opamp to control the mosfet.  It's all in a Github repo:

https://github.com/gbhug5a/Solar-Power-Load-Sharing

With the low sleep current you won't have a charge termination problem, and I think I would probably eliminate the load sharing circuit entirely, and just live with the battery cycling between 4.2V and 4.1V as the charger cycles on and off.

 
The following users thanked this post: tooki, cdevidal

Online tooki

  • Super Contributor
  • ***
  • Posts: 12599
  • Country: ch
Re: TP4056 still charges when current falls?
« Reply #12 on: July 16, 2022, 05:52:43 pm »
That makes no sense.

The only thing a linear charger can do is make the voltage seen by the panel greater than that of the battery itself, which may or may not increase panel output power, but it will surely decrease charging current.
Take that up with TI, since it’s their parametric search that spit it out when selecting “MPPT” and “linear”, whose datasheet says it’s linear, and whose description of the thing says “solar”: https://www.ti.com/product/BQ24210
 

Offline cdevidalTopic starter

  • Contributor
  • Posts: 32
  • Country: us
Re: TP4056 still charges when current falls?
« Reply #13 on: July 16, 2022, 05:58:28 pm »
Ok, I need to reword that.  If your battery is 200mAH, then either the panel or the charger has to limit the charge current to no more than 200mA.  If your panel simply can't produce more than that, then you don't need to change the resistor.  If it can, then the current has to be limited in the charger.

Ah yes that makes sense. If I use a 200mAh battery, I can't let the panel charge it at 1,000mA or I'll get magic smoke. But if the panel maxes out at 200mA (1C charge rate) then it's safe. And then there is the charge cut-off current. And then there are panel efficiencies to consider. Size of panel and enclosure. Total cost. It's quite a dance.

The typical load sharing circuit (mosfet, diode and resistor) doesn't work with solar power.  Andreas Spiess did a video of that circuit with the TP4056, and it seemed to work, but actually doesn't.  Whenever the panel is contributing any current to the load, the mosfet will be turned off.  That means current contributed by the battery is flowing through the mosfet's body diode, with a 0.7V voltage drop, which is not what you want.  I did pretty extensive testing of his circuit, and ended up with an alternate circuit that does actually work, but it needs an opamp to control the mosfet.  It's all in a Github repo:

https://github.com/gbhug5a/Solar-Power-Load-Sharing

With the low sleep current you won't have a charge termination problem, and I think I would probably eliminate the load sharing circuit entirely, and just live with the battery cycling between 4.2V and 4.1V as the charger cycles on and off.

Oh okay that's good to know. Thanks for pointing that out.

I might just ignore it then. It is a sensor and won't need continuous runtime. Twice daily checkins at sunrise and sunset--not while solar is powering it--over Wi-Fi then deep sleep.
« Last Edit: July 16, 2022, 06:09:16 pm by cdevidal »
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf