Both leds lit on TP4056 - Page 1
Forum section: electronics / beginners

author: jawa_master
author_rank: Contributor
timestamp: August 30, 2023, 10:01:31 am
content: Hello. I am currently trying to make a watch that shows the tide, with a simple atmega328 and bluetooth solution to get tidal information. I am almost ready to order PCB's, as I have gotten everything working EXCEPT for the lithium charging circuit.I am planning to use the bog standard TP4056 + DW01 + mosfet solution. Problem is that I have attempted using this combo in 3 other projects, and never gotten it to work from some reason. BOTH leds are turned on, which the datasheet doesn't say anything about, and there is no current going to the battery.Possible reasons:I am using all AliExpress knockoff IC'sI am hand soldering, so the pad at the bottom might not be connected properly (but that's just a heatsink, right?)I might be using the wrong Rprog on pin 2 (but i have tried a couple different ones, according to the table in the datasheet)Attached are some images from my previous project

author: Peabody
author_rank: Super Contributor
timestamp: August 30, 2023, 02:23:45 pm
content: I have a dim memory that both LEDs lit means no battery is present.Your schematic shows the drains of the mosfets are not connected. They should be connected together.To isolate where the problem is, you might try shorting the battery's negative terminal to the system ground. That bypasses the entire protection circuit, and if the battery charges properly, it means the protection circuit was the problem.However, it appears that your LiPo battery already has a protection circuit built in.

author: magic
author_rank: Super Contributor
timestamp: August 30, 2023, 02:29:05 pm
content: Per the internal schematic (if there is any truth to it):STDBY means that PROG pin voltage is very low; normally this means that output current is less than 10% of programmed value (possibly zero).CHRG means that more than 10% of programmed charging current is being delivered, or BAT pin voltage is less than 2.9V.Both LEDs would light up if there is zero or low charging current and zero or low battery voltage.This may happen if the battery is overdischarged (the chip enters special reduced current mode)or not connected at all.Maybe a problem with the DW01 cutting off the battery?editI'm not sure of that. If the battery is not connected, the chip will see low BAT voltage and try to charge it, quickly pulling the open circuit BAT pin up to 4.2V and terminating the charge.Maybe the cell is overdischarged or there is something on your board between BAT and ground which "looks" like an overdischarged battery to the chip.

author: Peabody
author_rank: Super Contributor
timestamp: August 30, 2023, 02:49:29 pm
content: I dug out a protected TP4056 module from my junque box, which should be the same circuit as yours, and when powered from 5V with no battery connected, the blue LED is lit solid, and the red LED is flashing at about 2Hz.

author: magic
author_rank: Super Contributor
timestamp: August 30, 2023, 03:06:05 pm
content: I remember observing something similar (weird flashing LEDs) on an AliExpress TP4056+DW01 board.I think it was caused by the chip repeatedly charging a small capacitor near DW01 which was then slowly discharged by something.

author: jawa_master
author_rank: Contributor
timestamp: August 30, 2023, 04:26:47 pm
content: Thank you. Shorting the battery (switched to one without own protection) worked, and it started charging, with the LEDs indicating so.However, I would of course like to have the protection circuit in place, and shorting the drains (pin 1 and 8 ) together does not seem to work, so I'm not sure.Is it the case that MOSFETs are sensitive to heat, and that i may have melted it when soldering ? I did reflow the solder with my iron a couple of times to get rid of bridgesI have some breakout board modules with this set of chips. maybe I should lift them to see if they work for me?

author: jawa_master
author_rank: Contributor
timestamp: August 30, 2023, 06:51:17 pm
content: NEVER MIND.after CAREFULLY inspecting my gerber, i see that my 100R resistor from DW01 was not actually connected to B+ (it must have been too close to the pad that i did not see the ratsnest line, and forgot to run the DRC).The drains, however stemmed from me not understanding the schematic, so i actually learned something there. Thank you all

author: Peabody
author_rank: Super Contributor
timestamp: August 30, 2023, 09:26:23 pm
content: Great! For the benefit of future readers, you did end up connecting the mosfet drains together, right?

author: jawa_master
author_rank: Contributor
timestamp: August 31, 2023, 09:52:54 am
content: Yes, connecting the drains on pin 1 and 8 was essential. I didn't understand this from the schematics on the internet

author: MustSeeMelons
author_rank: Newbie
timestamp: November 26, 2023, 11:20:02 am
content: Hi. I'm also having trouble with making my own TP4056 circuit. This might sound silly, but where do I attach the load? Is it Vcc/Bat-? Or is it Vcc/Gnd?

author: jawa_master
author_rank: Contributor
timestamp: November 26, 2023, 11:22:28 am
content: Bat+ and ground. The bat- is connected to ground via the mosfet, so unless it is undercharged, it will effectively connect your load to bat+ and bat-

author: MustSeeMelons
author_rank: Newbie
timestamp: December 04, 2023, 06:53:33 pm
content: I don't want to hijack the thread, but I'm slowly losing my mind with this. I have both LEDs on and I don't understand why. I have bridged 1 & 8 on the MOSFET. Have triple-checked everything and it should work. The schematic of this type of board is very confusing for a noob.

author: jawa_master
author_rank: Contributor
timestamp: December 04, 2023, 07:11:16 pm
content: Only difference i see from mine is the resistor R3 on 4056’s pin 4. You could try shorting it. Could you also send a picture with the ground plane rendered in ? Sometimes a part of the plane isn’t actually connected to ground. I usually, after i am done with the design, completely perforate the ground plane with vias, so that top and bottom plate is connected, and any non-connected islands are avoided

author: MustSeeMelons
author_rank: Newbie
timestamp: December 04, 2023, 09:26:00 pm
content: R3 should be ~0.4 Ohm from the datasheet. I currently don't have such a value on hand so I have already shorted it. The good news is the output works now.

author: MustSeeMelons
author_rank: Newbie
timestamp: December 06, 2023, 02:49:09 pm
content: I finally found it! The schematic & PCB are fine. My Achilles heel was not checking if I soldered the legs properly on the pads. I only checked for shorts between the legs.After looking at the PCB under a magnifying glass noticed my TP was slightly tipped towards one side. Looking even closelier noticed that one leg was ever so slightly above the pad and not making contact.Thanks for mentioning checking dead islands, I had forgotten about them, but thankfully this was not the issue