Solar panels powering a TP4056 - what about the Rprog resistor? - Page 1
Forum section: electronics / projects

author: Peabody
author_rank: Super Contributor
timestamp: June 26, 2021, 03:20:53 pm
content: A recent video presented a solar-powered TP4056 lithium charger for hobby projects. The Rprog resistor on popular TP4056 modules from the Far East is typically 1.2K, which sets the charging current to about 1A. In the video Rprog was replaced by a pot that allowed setting the charging current to a much lower value - about 130mA - which was thought to roughly equal the MPP in full sun for the panel being used.Assuming that 1A would be an appropriate charging current for the battery, such as an 18650, I wonder if it's necessary to change Rprog. The TP4056 won't charge at all unless the input voltage is at least 4V, and is also 30mV above the present battery voltage. So if the charging current set by Rprog is higher than the Isc of the panel, it seems the TP4056 would just draw as much current as it can until the input voltage is just barely above the higher of the two limits, and that would produce the maximum charging current.If I'm wrong about that, then setting the charging current to something below the panel's Isc, such as its MPP, would actually produce more current and would charge the battery faster. I would test that by installing the pot as in the video, setting it to 1.2K, and measuring the actual charging current as I increase the pot resistance, which reduces the target charging current. If I'm right, the actual charging current will stay flat until the increasing pot resistance begins to reduce the target charging current. If I'm wrong, actual charging current will increase as I increase the pot resistance, and will reach a maximum at a level which is roughly equal to the MPP of the panel.Is that a valid test? What outcome would you predict? It seems to me that extracting the maximum power from the panel should not be the objective, but rather maximizing the actual charge current. And leaving Rprog set for 1A charging current would also reduce dissipation in the TP4056 since the voltage drop would be minimized.

author: Siwastaja
author_rank: Super Contributor
timestamp: June 26, 2021, 04:01:47 pm
content: Quote from: Peabody on June 26, 2021, 03:20:53 pmHave you actually tested this? This feature is called "input current limiting" or "input power limiting" and is a real feature and marketing advantage, I'd surprised if it behave like this and they didn't advertise it on the datasheet; it's clearly designed to work from a regulated 5V supply.My guess is, it tries to draw the current, panel voltage sags, it shuts down by UVLO, panel voltage rises again, and we got an oscillation. But I could be wrong.Try it.

author: Peabody
author_rank: Super Contributor
timestamp: June 26, 2021, 04:43:42 pm
content: I haven't tried it in full sun, and the next four days will be completely overcast, so I don't know when I could do the test. But I certainly will do so when I get the chance. The panel I have is 5.85V Voc, and about 550mA Isc. So I think it would be a good test with an 18650.However, thinking about it, last week I tested my circuit, which includes load sharing, with the charging current set at 150mA, and just shading and unshading the panel doesn't seem to produce any oscillations. If the battery is at 4V, as I unshade the panel the charging current ramps up smoothly from zero, and the red "charging" LED gradually brightens. So I guess that's pretty much equivalent to the test I was proposing - the Isc of the shaded panel was at the moment well below the charge current setting. That suggests it would work the same with everything shifted up.And I guess I could just do the test indoors with a bright light, and see how changing Rprog affects the actual charging current. At lower illumination, I would just be on a different I/V curve, but the idea would be the same as doing it in full sun.I agree that the TP4056 was designed for a fixed supply, but so far it has been remarkably forgiving with solar input. The same cannot be said however for the traditional load sharing (aka power path) circuit used with fixed supplies. That was what I've been mainly working on.

author: Peabody
author_rank: Super Contributor
timestamp: June 27, 2021, 10:11:26 pm
content: I was able to catch a brief period of sunshine today, and confirmed that lowering the target charging current from 1A does nothing but lower the actual charging current when the solar panel can't produce the full target current. So there's no MPP point that gives a higher charging current. The panel provides as much as it can until there is almost no voltage differential. This appears to be a good thing for a linear part like the TP4056. So as far as I can tell, leaving the target at 1A is actually better than lowering it. Of course if the solar panel can exceed the 1C current of the particular battery in use, then you would have to do something. But otherwise there seems to be no need to mess with Rprog.

author: magic
author_rank: Super Contributor
timestamp: June 28, 2021, 05:43:43 am
content: Note that there are many implementations of this IC, probably mostly equivalent but who knowsSo far I have datasheets for:TP4056 by NanJing Top Power ASIC CorpTC4056A by Advanced Monolithic Systems (apparently same guys as behind the ubiquitous AMS1117 LDO)TC4056A by Shenzen Fuman ElectronicsTC4056 by Shenzen Fuman Electronics (lacks LED outputs)There may be others and auction site module vendors choose them quite randomly.The Fuman datasheet contains the following block diagram, which doesn't suggest any UVLO. In fact, I don't even see charge termination at all - as drawn, it just turns off the LEDeditThere is charge termination: a MOSFET disconnects battery voltage divider from ground, tricking VA to turn off the main MOSFET.