Go Down

Topic: Proper usage of Lithium charger based on TP4056 (Read 19001 times) previous topic - next topic

Mogaraghu

Aug 25, 2017, 09:02 am Last Edit: Aug 25, 2017, 09:04 am by Mogaraghu
For a application where i need an Arduino + ESP8266 to record a chamber pressure and post to ThingSpeak. I am using the following module which is available on E-Bay for about 1USD.



This combined with a 3.7 to 5V booster completes my power supply. And since its a fixed application, i am powering the module with a 5V wall wart. The Lithium cell backup is required to handle power outages. All well so far. But i have some queries :

1. I notice that module kind off trickle charges the Lithium cell as i can see the Red led on module come on periodically indicating charging. But mostly the Blue led is lit - indicating full charge. Is this OK for the life of the Lithium cell??

2. I thought if i leave the 5V power connected, then the Lithium will not discharge at all - but looks like power is drawn from it primarily and the module senses the drop in voltage from 4.2V and charges it once low.

3. I also plan to use the same set up for a portable instrument ... then in that case which is the best place to put the power switch ? In series with the + lead from the cell [or] in series with the output + lead from the charger module ?? If its the later then the on board LEDS of the module will slowly drain the cell..

Jiggy-Ninja

Use a P-channel MOSFET. Drain to the OUT+ of the charging module, source to the load. Note that this orientation will make the body diode forward biased when current is being drawn from the battery. This is intentional and important. Connect the MOSFET gate to GND with a pulldown resistor. Connect the positive output of your wall wart connector to the input of the charging module, to the MOSFET's gate, and then through a diode (usually Shottky) to the load.

When the wall wart is disconnected, the gate's pulldown resistor brings the gate down to 0V, turning on the MOSFET. The diode prevents the battery voltage from backfeeding onto the gate resistance, which lets the MOSFET stay on. Power will be drawn from the battery with minimal loss.

When the wall wart is connected, the MOSFET's gate gets pulled above the battery voltage, turning it off. Power is supplied to the load through the diode, and the MOSFET prevents that from backfeeding directly into the battery. The charging module is able to charge the battery with the properly controller application of power as required, and the wall wart will supply both the charging current and load current.

This is a slight simplification of the circuit shown in Figure 2 of Microchip's application note AN1149 - Designing A Li-Ion Battery Charger and Load Sharing System With Microchip's Stand-Alone Li-Ion Battery Charge Management Controller. The noteable change is the remove of the dual common-cathode diodes. Those are only necessary because the circuit is designed to take power from 2 external sources, USB and a wall plug, so they each have to be protected from each other.

A diode could be used in place of the P-channel MOSFET, but a turned-on MOSFET has much lower voltage loss than a diode and will waste less power.

Mogaraghu

#2
Aug 26, 2017, 01:30 pm Last Edit: Aug 26, 2017, 01:31 pm by Mogaraghu
OK i got the idea ... instead of constantly using the Lithium cell power, you have a proposed a method to switch it in only when mains power fails ... have drawn a schematic based on what you described. Let me know in case of any corrections. Thanks.


Jiggy-Ninja


rw950431

#4
Oct 31, 2017, 03:07 am Last Edit: Oct 31, 2017, 09:54 am by rw950431 Reason: added circuit diagram
@Jiggy-Ninja : do you know of a design suitable for solar charging?  Unlike the 5V supply in the original design a solar panel has variable voltage so may not turn the MOSFET on and off cleanly.

I had a simplistic design (just the TP4056 module wired up to solar panel, battery and load) which seemed to work OK for a few days but has now mysteriously failed.  The mystery is that the load will power-on when I connect a USB charger but not when its running on solar or battery even though the battery is apparently fully charged.


srnet

Quote
but has now mysteriously failed.
You did measure that the open circuit (i.e. minimal current) voltage of the solar panel and check it did not exceed the maximum input voltage of the TP4056 ?
No PMs please, they dont get answered.

rw950431

I must admit that I did not.  I did note that the module will supposedly tolerate 8V even though the preferred range is 4.5-5.5V.  When connected the input voltage doesnt seem to get above about 5V even in full sun.

I was under the impression that the IN+ and IN- pins are hard-wired to the equivelant USB pins so that any damage done to the input circuit should affect USB and solar inputs equally. Is this not the case?

morrowwm

Late to the conversation, but I am adding my comments to help conclude this discussion. I have a very similar setup, and I killed a TP4056 charger module exactly in this way. When the charger is finished charging, it went high impedance on the input, the no load voltage from my "6 volt" solar panel went up 20 volts or more, which vastly exceed the 10 volt maximum input of the charge module.

I fixed this by stringing 10 forward biased power diodes in series across the input. This clamps the input to about 7 volts.  In series with them is a 69 ohm resistor to limit the current from the panel when the charge is on, so that it does not draw the panel voltage down below the ~4.5 volts required for it to operate. I've ordered a 7.5 zener to replace the 10 normal diodes.

This is somewhat crude, but sufficient for my needs. A much more complicated but efficient option would be something like the buck converter circuit designed by http://www.freechargecontroller.com/.

srnet

When the charger is finished charging, it went high impedance on the input, the no load voltage from my "6 volt" solar panel went up 20 volts or more, which vastly exceed the 10 volt maximum input of the charge module.
The TP4056 datasheet says that maximum input volts is 8V.
No PMs please, they dont get answered.

GaryP

OK i got the idea ... instead of constantly using the Lithium cell power, you have a proposed a method to switch it in only when mains power fails ... have drawn a schematic based on what you described. Let me know in case of any corrections. Thanks.


When mains fails, how much voltage you expect to get to your load?

Cheers,
Kari
The only law for me; Ohms Law: U=R*I       P=U*I
Note to self: "Damn! Why don't you just fix it!!!"

vazquezjm

When mains fails, how much voltage you expect to get to your load?

Cheers,
Kari

Looks like a Step Up module is missing. I'm using a MT3608 for that purpose as you can see here (I use 3v3 for signaling):



garabetov

Did the overall circuit worked as proposed with the P-Mosfet? I am designing the same thing, however I will be using a solar panel to charge the li-ion, but I need to be sure that the charge will be terminated when battery is full.

susthesurfer

Use a P-channel MOSFET. Drain to the OUT+ of the charging module, source to the load. Note that this orientation will make the body diode forward biased when current is being drawn from the battery. This is intentional and important. Connect the MOSFET gate to GND with a pulldown resistor. Connect the positive output of your wall wart connector to the input of the charging module, to the MOSFET's gate, and then through a diode (usually Shottky) to the load.

When the wall wart is disconnected, the gate's pulldown resistor brings the gate down to 0V, turning on the MOSFET. The diode prevents the battery voltage from backfeeding onto the gate resistance, which lets the MOSFET stay on. Power will be drawn from the battery with minimal loss.

When the wall wart is connected, the MOSFET's gate gets pulled above the battery voltage, turning it off. Power is supplied to the load through the diode, and the MOSFET prevents that from backfeeding directly into the battery. The charging module is able to charge the battery with the properly controller application of power as required, and the wall wart will supply both the charging current and load current.

This is a slight simplification of the circuit shown in Figure 2 of Microchip's application note AN1149 - Designing A Li-Ion Battery Charger and Load Sharing System With Microchip's Stand-Alone Li-Ion Battery Charge Management Controller. The noteable change is the remove of the dual common-cathode diodes. Those are only necessary because the circuit is designed to take power from 2 external sources, USB and a wall plug, so they each have to be protected from each other.

A diode could be used in place of the P-channel MOSFET, but a turned-on MOSFET has much lower voltage loss than a diode and will waste less power.
You can also use a simple relay to control output from battery while charging. And when the input supply for charging the battery stops the output is made through from battery.


susthesurfer

Use a P-channel MOSFET. Drain to the OUT+ of the charging module, source to the load. Note that this orientation will make the body diode forward biased when current is being drawn from the battery. This is intentional and important. Connect the MOSFET gate to GND with a pulldown resistor. Connect the positive output of your wall wart connector to the input of the charging module, to the MOSFET's gate, and then through a diode (usually Shottky) to the load.

When the wall wart is disconnected, the gate's pulldown resistor brings the gate down to 0V, turning on the MOSFET. The diode prevents the battery voltage from backfeeding onto the gate resistance, which lets the MOSFET stay on. Power will be drawn from the battery with minimal loss.

When the wall wart is connected, the MOSFET's gate gets pulled above the battery voltage, turning it off. Power is supplied to the load through the diode, and the MOSFET prevents that from backfeeding directly into the battery. The charging module is able to charge the battery with the properly controller application of power as required, and the wall wart will supply both the charging current and load current.

This is a slight simplification of the circuit shown in Figure 2 of Microchip's application note AN1149 - Designing A Li-Ion Battery Charger and Load Sharing System With Microchip's Stand-Alone Li-Ion Battery Charge Management Controller. The noteable change is the remove of the dual common-cathode diodes. Those are only necessary because the circuit is designed to take power from 2 external sources, USB and a wall plug, so they each have to be protected from each other.

A diode could be used in place of the P-channel MOSFET, but a turned-on MOSFET has much lower voltage loss than a diode and will waste less power.
You can also use a simple relay to control output from battery while charging. And when the input charging stops the output is made through from battery.




Go Up