TP4056 modules - Page 1
Forum section: electronics / projects

author: mandor
author_rank: Regular Contributor
timestamp: February 03, 2025, 07:25:47 pm
content: Hi.I recently bought TP4056 modules with additional protection thinking It will solve my problems but i fell into a rabbit hole.What I'm doing is a LED lamp that should be battery powered and chargeable. Sure, you can just switch out batteries but where's the fun in that? Also what if you want it on for longer?And I thought I can just use a TP4056 and it claimed an overdischarge protection, which I wanted, because I want to gift it to someone. I want it to be foolproof.So this is What i came up with. 1 is usb power, 2 is battery power, 0 is off. Ok It works.Then I tested it and it ran until battery was 2.6V when I turned it off. So it doesn't work? Well it has a DW01A chip which should trigger at 2.4V overdischarge. I don't think that's good. So I started reading.I came across thishttps://www.best-microcontroller-projects.com/tp4056.htmland a few similar topics and after reading through a lot of stuff I'm not sure what to do.I also noticed the module doesn't work with USB C-to-C chargers because it doesn't have CC lines resistors and no way to add them.So I thought about spinning my own modules from PCB supplier but with some changes.1. Add 2 5k1 resistors on CC lines so it can be used on any USB port.2. replace DW01A with FS312F-G which should trigger overdischarge at 2.9V3. Add a mosfet switch instead of manual switch for usb connectionPlease do comment on all 3 points, but I'd like to know how to implement the switch.Should this work?Is this good enough? The source just mentions schottky diode can be replaced by a mosfet but it would need to be tied into a sensing circuit.It's been a long time since highschool when I learned about this stuff. Wouldn't a mosfet have less dissipation and voltage drop than a schottky? Surely if one can be closed on usb voltage, I can do the opposite on schottky line, close when no voltage on usb line. So I could use a second 2-mosfet IC? P or N channel? How?

author: Peabody
author_rank: Super Contributor
timestamp: February 04, 2025, 12:19:54 am
content: I think it looks pretty good the way you have it. You can think of the output as a two-diode wired OR arrangement, where the source with the higher voltage supplies the load. The two diodes are the schottky in the USB source line, and the mosfet's body diode in the battery line. But when the battery is the higher source, the mosfet turns on and bypasses the body diode, which eliminates the voltage drop across the body diode. You could do the same with the USB supply, but since that's the USB line, the voltage drop has no effect on battery life, so nobody hardly ever goes to the trouble.However, you do need to add a pull-down resistor on the mosfet gate so the mosfet will turn on convincingly when USB isn't connected. 10K is pretty good.Edit: Forgot to say - the 5.1K resistors are right, and the FS312F-G is right for the higher discharge voltage limit. But as I remember, the voltage at which it turns back on again is the same as the DW01 - about 3V. So it may tend to oscillate because when the protection kicks in, and current is shut off, battery voltage will rebound, thus turning the circuit back on again. I know I'm in a minority here, but it seems to me that there are literally millions of lithium-ion charge circuits that use the DW01 without any issues. So it's not clear to me that 2.4V is too low. Of course depending on the rest of your circuit, you might be able to read the battery voltage, and shut down when you think it's too low.

author: mandor
author_rank: Regular Contributor
timestamp: February 04, 2025, 05:23:38 pm
content: I don't know why, but a lot of people say 3.0V means the battery is empty and any lower will damage the battery or sverly shorten the lifespan.I also bought a 1 cell BMS and it has the same DW01A. It's everywhere. Maybe it's the last resort protection for the battery and the load device is meant to cut off the power sooner at higher voltage?Anyway, I've read about the rebound and that is actually ok as the load will be the light and blinking will signal the empty status so fine by me. The rest of the circuit is meant to be just LEDs with resistors.Ok, pulldown on mosfet gate for now.

author: Peabody
author_rank: Super Contributor
timestamp: February 05, 2025, 03:19:07 am
content: Just to be clear, the pulldown is to ground, not to source.