I've built a small clock using 7-segment LEDs. Nothing special, but it runs from a 18650 cell with a step-up (buck) converter bumping output to 5V.
The cell lasts about 3 days before dying. Now I'm thinking about adding in a TP4056 Li-on charger so that I can charge it on the go. Can I just connect the charger's outputs to the battery terminals, effectively putting it in parallel with the step-up converter's input pins?
Ideally I don't want to turn off the LEDs during charging, so I'd like to avoid any sort of switch between charging and output, if that's possible.
I'd recommend against this approach. The reason is that the TP4056 controls the current and voltage level to the battery on the assumption that the battery is the only load. Parallel loads, particularly time varying loads (like a time multiplexed LED clock display) will confuse the TP4056.
It may be that this will simply cause the charging to shutdown early, which would not be ideal, but not a terrible outcome. However, without looking at this in depth, I'm concerned that there is a risk of overcharging, which can lead to catastrophic failure of the batteries.
I've been running a 3G module + arduino off an 18650 all connected to the output of the TP4056 (with a solar panel as the input) and have had no noticeable problems in the past 6+ months. So I'd say give it a go, but only time and testing will tell.
Grrrmachine:
Thanks guys. Your input is much appreciated, and that AN1149 looks a much better chip than the old 4056 I have laying around.
AN1149 is the name of the application note, not the name of the chip they used. And you can adapt that circuit to a TP4056 circuit fairly easily. Some of the complexity (like the dual diodes) comes from the chip in the app note being able to have separate USB and DC wall wart inputs, which the TP4056 doesn't have.
If your circuit draws more than C/10 (50mA @ 500mA), it will never terminate charging and slowly trickle/overcharge your cell (and reduce it's lifespan)
If you have the variant with the DW01 protection IC, it will eventually go into over voltage protection.
Thus why you'll want to implement load sharing as described in AN1149, which is an automated disconnection of the load off the battery when external power is applied, so that the TP4056 and your 18650 are isolated.
Based on my recordings over the past weeks, it takes between 60 and 74 hours to drop the 18650 cell low enough to cause issues with the display. For a 2150mah battery, that suggests a drain of around 30mA, give or take (sometimes the battery died in the middle of the night).
With that in mind and knowing the TP4056 was set to C/10, I tried charging the cell while connected to the clock. Eventually the charger showed a blue LED (charging complete), and the clock is currently running while I assess how long the battery lasts. If it survives close to three days, I will assume the charger was able to provide a complete charge.