Load sharing on a TP5400 (Lipo charger + Boost Converter) - Page 1
Forum section: electronics / projects

author: kian0079
author_rank: Contributor
timestamp: October 05, 2022, 09:47:21 am
content: Hi all,I am using a TP5400 which has Lipo charging and boost converter function in a single IC. My application requires 2 different source voltages (3.3V and 5V). The 3.3V is obtained through the Lipo battery connected to a LDO that steps down the voltage to 3.3V, while 5V is obtained from the Lipo battery connected to the TPS5400 which boost the VOUT to 5V.I need to implement an additional load sharing circuit for the lipo battery so that I do not drain the battery while I am charging it. I am using a PMOS + Schottky diode + resistor combination for the load sharing such that my 3.3V load will be connected to USB power when charging. I am attaching a photo of my schematic below.What confuses me now is boost converter because I am not sure if it will drain the battery while charging.In a separate thread (https://www.eevblog.com/forum/projects/tp5400-output-to-low-4v-instead-of-5v!/), one user mentioned that"The TP5400 has two operation modes, it's either a charger OR a DC/DC converter, not both at the same time. As soon as you connect a 5V supply, the TP5400 goes into charger mode. In this mode, Vout will not reach 5V. As soon as you disconnect the 5V supply, the DC/DC converter acts as a boost converter and Vout will stabilize close to 5V."There was also mention about adding a power path from the 5V usb supply to the VOUT pin via a diode. Would that solve the problem of the boost converter draining the Lipo battery while charging?Thanks in advance!

author: Peabody
author_rank: Super Contributor
timestamp: October 05, 2022, 05:49:43 pm
content: Great Scott has a video on the TP5410, which appears to be a near relative of your TP5400. He says that when USB power is plugged in, the 5V output is disconnected from the battery, and that output becomes just a passthrough of the USB input, less what looks like one schottky diode drop. Charging takes place independently, and I have to assume that it is just a linear charger. What's not clear is what happens when the battery has fully charged and charging terminates. Does it continue to pass through the input power, or does it switch over to boosting the battery voltage? If the former, then I don't think you have to do anything more. You have the load sharing circuit feeding your 3.3V LDO, so when USB is plugged in it will power the LDO, and it looks like the TP5400 automatically switches the output to input feedthrough when USB is plugged in. But you just want to be sure that after charging has terminated it stays in feedthrough mode, and only switches to boost mode when USB is disconnected.However, this article suggests that's not right:https://hackaday.com/tag/tp5400/Perhaps the TP5400 doesn't go into feedthrough mode when charging even if the TP5410 does. Or maybe the problem is just the slight drop from 5V in feedthrough mode. You should do some tests to find out exactly how it works. In the worst case, you would need a second load sharing circuit for the TP5400's 5V output.Edit: The Great Scott video also says that when you disconnect USB, the output voltage spikes up above 6V briefly.

author: thinkfat
author_rank: Unknown
timestamp: October 06, 2022, 08:23:31 am
content: Hi,I was the user commenting on the mentioned thread. Neither of the TP5400 or TP5410 have a built-in power path. The Great Scott video is wrong here. The TP5410 datasheet even goes into detail about what external circuitry you need to add.Adding an external power path like in the schematic you showed above (I didn't review it, cannot comment if it's correct) will eliminate the problem with draining the battery, because the system load will be connected directly to the 5V supply and the TP5400 will solely charge the battery. The battery will be disconnected from the system while charging.

author: thinkfat
author_rank: Unknown
timestamp: October 06, 2022, 08:55:10 am
content: Let me add some clarification about how the TP5400 and TR5410 work:The battery charge mode is using a linear charging circuit. The BAT pin in this case is the output of the charger and connects internally to VCC directly (through 1000 parallel MOSFETs). This is why you need a very good thermal connection to a copper plane. LX is not switching (disconnected), the boost converter is off. The voltage seen at VOUT is just the battery voltage passing through the inductor and the diode.In boost mode, BAT is an input to the switching circuit, LX is the switching node, VOUT is a voltage sense pin. Only in this mode, VOUT reaches 5V.I've taken another look at the circuit you propose above. It looks like it's disconnecting the battery from the load when VUSB is connected. So, what will power the load when VUSB is connected and the battery is charging? (EDIT: I just noticed D1, so that's fine)An easier architecture, though not as power efficient, is to supply the 3.3V LDO from the 5V output and add a power path that connects VUSB to VOUT, with a Schottky diode, or preferably with a MOSFET switch. Of course this will tax the LDO more, thermally.PS: I think the circuit as you proposed should work, but you need to add the power path between VOUT and VUSB, definitely, to have 5V output while charging. Also, make sure that the combined reverse leakage current of all nodes connected to VUSB doesn't charge C? above the turn-on voltage threshold of the TP5400, otherwise the boost circuit will start intermittently and interrupt charging.

author: Peabody
author_rank: Super Contributor
timestamp: October 06, 2022, 03:50:24 pm
content: Thanks very much, thinkfat. After watching all of his charger videos, I've come to the conclusion that Great Scott isn't aware of load sharing power path circuits. I've never seen him use one in a design.It seems to me that the load sharing circuit in the original post works well to supply the 3.3V LDO with virtually no voltage drop when the battery is supplying that load, and without the loss of efficiency that would occur if you boost the battery to 5V only to drop it again through the LDO.But I think just adding a schottky diode between VBUS and Vout should work for the 5V load as long as you can run the load at 4.7V instead of 5V, which works most of the time. That gives you a simple two-diode circuit, with the higher voltage supplying all of the load.If the 5V load really has to be 5V, then things get more complicated. Maybe one of those ideal diode parts would be good choice.Can you confirm Great Scott's observation that when you unplug USB, Vout spikes above 6V? I assume this would be the boost circuit firing up. This would be a deal breaker for me, but I guess you could just add a 5.6V zener to Vout to shunt that spike to ground.

author: thinkfat
author_rank: Unknown
timestamp: October 06, 2022, 10:04:50 pm
content: I have never tried to reproduce this finding. But I agree with adding a zener to the 5V rail.

author: kian0079
author_rank: Contributor
timestamp: October 07, 2022, 03:42:38 am
content: Thanks for the reply. Appreciate all the comments and suggestions.The 5V from the TP5400 boost output (VOUT) is used to power up an amplifier IC and also used as the power supply for a string of 60 WS2812 LEDs. There is no strict requirement for having an absolute precise 5V, but the absolute max rating for the WS2812 LEDs is 5.3V. So it will not be good to exceed that!I am clear that the load sharing circuit for the VBATT output works. VBATT is connected to a 3.3V LDO which is supplying to a microcontroller and other ICs all running on 3.3V.As for the 5V VOUT output, can I confirm that the suggestion is to add a schottky diode between VUSB and VOUT, and also a 5.6V zener didoe between VOUT and GND? How do I go about choosing these 2 didoes? What are the specifications?I also want to add that I actually have an ON/OFF switch that cuts the VBATT and VOUT from the load. But I want to make the assumption that a user might forget to turn off the circuit while charging, so load sharing is still important for me.

author: Peabody
author_rank: Super Contributor
timestamp: October 07, 2022, 03:59:13 pm
content: First, I need to take back what I said about Great Scott. In the video he is using the Wemos D1 Mini Battery Shield module, not just the TP5410. And that module does have the schottky diode power path between VUSB and Vout. It's an SS32, which is the same as the boost diode. However, it does not have any pulldown resistor on VBUS to shunt any reverse leakage current through that diode. I wonder if the TP5410 itself wouldn't take care of that without trying to turn on. Thinkfat, have you actually seen a case where the TP5410 turned on without the pulldown resistor being in place?The datasheet for the TP5410 has two power path options. One is in Figure 4, which is just the diode. But the problem is that the voltage drop across the diode increases with current. Do you have any information on how much current the 5V line will draw to power all those LEDs?The second is Figure 2, which uses a mosfet switched by an NPN transistor powered by VBUS. So that works essentially like the 3.3V power path you already have. But I wonder if the mosfet couldn't be switched instead by the wired-OR output of the two indicator LED outputs of the TP5400. It seems if VUSB is connected, one of the two outputs will always be low. If you don't actually need the indicator LEDs, you could just short those two outputs together, and connect them to the gate of the mosfet, which would have a pullup resistor. The datasheet shows the indicator outputs as open drain, so that should work. And the mosfet would pretty much eliminate any material voltage drop, and it might eliminate any concern about reverse leakage (far less than a warmed-up schottky). I think the same mosfet used for the 3.3V line would work fine. However, this alternative might require that the battery be present. It depends on what happens to the indicator outputs if it is not.I have a major reservation as to whether the boost regulator will provide enough current. The Great Scott video shows the maximum output current at low battery voltage is about 300mA. Is that enough? Remember that as the battery dicharges and its voltage drops, the boost regulator has to draw increasing current from the battery to maintain the 5V output. Have you actually tested this in your circuit? What's the maximum current that will be drawn by your amp and LED string?I don't know about the zener diode. I don't know if it's really needed, or what its current rating should be. You would like to measure the current in some way with a scope if possible.I have a question for thinkfat that could affect the 5V power path. When USB is connected, and charging terminates, what does the TP5400 do? Does it switch the boost converter back on? If it does, I think that could mess up the power path. Or does the boost converter stay disabled whenever USB is connected, even if the battery is fully charged?Where exactly are your on/off switches?

author: kian0079
author_rank: Contributor
timestamp: October 08, 2022, 01:21:23 pm
content: Here is an updated schematic showing where the ON/OFF switch is connected. I had my PCB fabricated, so far the outputs are working fine and the 5V is able to drive all the LEDs at full brightness (white).Maybe another question to ask is would you all recommend the TP5400 to be used in production for a real product? I am choosing this part because it available on LCSC and the price is cheap compared to other mainstream manufacturers like AD, TI, Microchip etc. I assume some of the China/Taiwan manufacturer parts carried by LCSC are reliable?Quote from: Peabody on October 07, 2022, 03:59:13 pm

author: Peabody
author_rank: Super Contributor
timestamp: October 08, 2022, 01:34:15 pm
content: I have no history personally with the TP5400, so I can't advise on that. I don't see the revised schematic in your post.So you have a working circuit now? If so, do you see any 6V spike when you disconnect USB (the zener diode question)? Also, what happens at Vout when the battery has been fully charged and charging terminates, but USB is still connected?

author: kian0079
author_rank: Contributor
timestamp: October 09, 2022, 12:58:43 pm
content: Sorry I forgot to attach the schematic. Have already added it to the previous post.I do not have an oscilloscope but let me see if I can measure it with a multimeter. Will update here with the results.Quote from: Peabody on October 08, 2022, 01:34:15 pm

author: Peabody
author_rank: Super Contributor
timestamp: October 09, 2022, 03:10:59 pm
content: I don't see the 5V power path on your schematic. I assume you will want to use the schottky diode as we discussed, but we need to be sure the boost converter does not turn on when charging terminates - it only turns on when USB is disconnected.Your placement of the on/off switches allows the battery to be charged even when the switches are off. I think that is what you want. However, one downside of having the charger and boost converter in one chip is that when USB is disconnected, the boost converter will then switch on even if there is no load. At that point, the battery is powering the TP5400, including the boost converter, all of which will draw some current. I suggest you measure the current flowing out of the battery when USB is disconnected and the switches are turned off. If it's significant, it might affect you choice of battery. It could also mean that you want to leave the device plugged into USB as much as possible even if the switches are turned off.According to the Great Scott video, the TP54x0 does not provide any over-discharge protection. So you will need to use protected batteries.You need to test your circuit when running on the battery as the battery discharges. At some point, the boost converter will not be able to keep up. It might be important to know at what battery voltage that occurs.

author: kian0079
author_rank: Contributor
timestamp: October 10, 2022, 06:21:50 am
content: Just to clarify, I do not have the 5V power path implemented yet in my actual PCB. I have just checked. It seems like the boost converter circuit in the TPS5400 is disabled during charging. When the USB is plugged in, I am measuring 3.7V at the VOUT pin. I presume this is coming from the battery. When the USB is disconnected, there is 5V at the VOUT pin. This doesn't seem good, because the 5V load is draining the battery when it is charging (since there is 3.7V appearing at VOUT?). Like I have mentioned earlier, I need to assume that the user may forget to turn off the device during charging and I need charging to be possible regardless of whether the device is turned on or off. Perhaps implementing the power path will solve this problem.I do not have an oscilloscope so I can't see if there is a 6V spike. At least from the multimeter, I don't see the voltage going up momentarily when the USB is unplugged.The downside of having a charger and boost converter in 1 chip as Peabody mentioned is a valid concern. Thanks for pointing that out! I would need to do the suggested measurements. Ultimately I need a long standby battery life when the device is turned off. If the battery is going to drain off in a few days to a week due to current consumption by the TPS5400 and boost converter, that is a big no for me. If so, this would require me to source for an alternative part.

author: thinkfat
author_rank: Unknown
timestamp: October 10, 2022, 06:50:28 am
content: Quote from: Peabody on October 07, 2022, 03:59:13 pmYes, I've seen that firsthand, in one of my own designs.Quote from: Peabody on October 07, 2022, 03:59:13 pmI wouldn't ever generalize results from a Great Scott video. At times he doesn't really understand what he's doing. The problem he found might just be due to shoddy design of the particular converter module he used. I have not fully characterized my own designs, unfortunately. When I built it, I didn't yet own the required measurement equipment.Quote from: Peabody on October 07, 2022, 03:59:13 pmThat is a very good question. I think it does not switch the boost converter back on, but I have not verified it.

author: thinkfat
author_rank: Unknown
timestamp: October 10, 2022, 07:11:59 am
content: Quote from: kian0079 on October 10, 2022, 06:21:50 amYes, the boost converter is off during charging. I mentioned that in an earlier post, and if you don't implement the alternative path to power the 5V rail, obviously whatever is connected to that rail will drain from the battery.If you're concerned about standby power consumption, the TP5400 is a single-chip power bank controller. For that it works very well. The datasheet says 10µA no-load power consumption, I think that should fit your requirement. The maximum output at 3.3V battery voltage is specified as 1A. If you don't mess up the external part selection, this is what you should be able to draw.

author: Peabody
author_rank: Super Contributor
timestamp: October 10, 2022, 02:46:36 pm
content: QuoteWhen USB is plugged in, charging is enabled, and the boost converter is disabled. But since the battery is connected to Vout through the inductor and diode, Vout will be a diode drop below whatever the battery voltage is. But that will not drain the battery during charging unless there is a load. In any case, the 5V power path will take care of that because USB will be powering any load that may exist, and the battery will be isolated from the load.But my question is what happens when the battery becomes fully charged while USB is connected. Charging will terminate at that point ( the "charging" indicator LED will turn off). But does the boost circuit turn on then? Or does boost stay off so long as USB is connected, even after charging terminates? I strongly suspect the latter is what happens, which is what you want, but you just need to be sure.QuoteThen I don't think you need to bother with the zener diode. But you should check again for the 6V spike after you have added the 5V power path diode.QuoteIf the datasheet is right about only drawing 10uA when idle, then I don't think that will be a problem for your battery. But you should use your meter to measure actual battery current when USB is disconnected, and the load is switched off. I think you should do that just to be sure the 10uA is right. In the end, the alternative would be to use separate charger and boost converter chips, so you could put the on/off switch between the two.

author: Peabody
author_rank: Super Contributor
timestamp: October 10, 2022, 02:55:28 pm
content: QuoteOk, I think this happens when all the load current has been flowing through the power path schottky, and it gets really warm, then USB is disconnected and the reverse leakage current flows like crazy through the hot diode. My understanding is that for a schottky, reverse leakage current is an exponential function of temperature. So I think you're right about adding the pulldown resistor on VBUS.

author: kian0079
author_rank: Contributor
timestamp: October 11, 2022, 03:39:08 am
content: I just checked this. When the battery is fully charged, charging terminates, the LED turns off (USB is still connected with power), I am measuring about 3.9V at VOUT pin which means that the boost converter is still disabled.QuoteI will update here again with measurements on actual battery current when USB is disconnected, and the load is switched off.

author: NiHaoMike
author_rank: Super Contributor
timestamp: October 11, 2022, 04:09:22 am
content: Move the inductor so it connects to the other side of the MOSFET, then its input will automatically be switched as well.

author: kian0079
author_rank: Contributor
timestamp: October 12, 2022, 11:50:28 am
content: Thanks everyone for the feedback. I have made changed to the schematic based on your recommendations. Would appreciate if you can help check if I have implemented these changes correctly. The updated schematic is attached.

author: NiHaoMike
author_rank: Super Contributor
timestamp: October 12, 2022, 12:20:50 pm
content: D3 is not needed, D2 performs that function.

author: thinkfat
author_rank: Unknown
timestamp: October 12, 2022, 02:43:45 pm
content: D3 should connect to the VOUT net, no?

author: Peabody
author_rank: Super Contributor
timestamp: October 12, 2022, 03:08:34 pm
content: D3 should be placed as shown below. But I don't understand moving the inductor. Can someone explain?

author: NiHaoMike
author_rank: Super Contributor
timestamp: October 13, 2022, 12:42:36 am
content: With D3 as shown, it should not be necessary to move the inductor.

author: kian0079
author_rank: Contributor
timestamp: October 13, 2022, 11:27:02 am
content: Thanks everyone! I have the finalized schematic. I hope it works as intended! Attaching the final schematic here. Hope it will help someone who needs to build something similar in the future.

author: Peabody
author_rank: Super Contributor
timestamp: October 13, 2022, 01:41:18 pm
content: You don't need both R0 and R4. And I would think 10K would work ok, but thinkfat is the expert on that.

author: thinkfat
author_rank: Unknown
timestamp: October 15, 2022, 03:04:19 pm
content: Quote from: Peabody on October 13, 2022, 01:41:18 pmYes, just drop R0 and make R4 5k. I've used 5k before, worked for me. You should be able to compute a value based on the leakage current of the diode on the power path.The datasheet of the SS32 gives a reverse current between 10µA and 1mA for a temperature range between 25°C to roughly 100°C. Just dimension the resistor so that at 1mA current, the voltage never rises above the turn-on voltage of the TP5400. I think 5k is a good value, 10k might be too large already.