Help with LTC4412 needed - Page 1
Forum section: electronics / projects

author: Lt_Flash
author_rank: Regular Contributor
timestamp: May 27, 2018, 01:42:47 pm
content: Hi guys,I'm building a simple power switcher that can switch between CR2032 battery and main 3.3V power from regulator. I've used LTC4412 for this design and it works fine choosing higher voltage and switching automatically between primary and auxilliary sources. The problem I'm facing is that I wanted to force LTC4412 to prefer 3.3V source whenever it's connected. To do so you can use a CTL pin of LTC4412, when it's high (and that's from 0.6V according to datasheet, but can be up to 0.9V) - LTC4412 keeps auxiliary power source on even if it's voltage below primary power source (CR2032 battery in my case). The problem I'm facing is that when auxiliary power source is selected by connecting CTL pin high via resistor to 3.3V rail - LTC4412 opens auxiliary MOSFET and everything works fine but as soon as I remove power from 3.3V rail - CTL drops to approximately 0.7V and still keeps auxiliary power rail open. I think that happens because MOSFET is conducting and providing voltage from CR2032 battery back to LTC4412 CTL pin and LTC4412 can't switch into stable primary source selection.Can somebody help me to solve this problem please? I'm not sure how to prevent current to flow from CR2032 battery via half-open MOSFET back to CTL pin. Thanks in advance! Please see attached schematic with description.

author: slugrustle
author_rank: Frequent Contributor
timestamp: May 27, 2018, 04:35:13 pm
content: I'm just guessing here, but you may have a case of dueling leakage currents.CTL has a typical input high threshold of 0.635V (0.9V max) and a pulldown current of 1uA to 5.5uA.STAT has up to 1uA leakage, which would force 1.2V gate threshold on your IRF7410. Since the IRF7410 max gate voltage for 250uA drain current is 0.9V (0.4V min), that would certainly turn on CTL.Fortunately for you, CTL only ever sees your 3.3V rail or nothing. I'm assuming you can afford to use a voltage divider that requires at least 250uA or so to raise CTL above the 0.35V minimum input low threshold. I chose 0.35V, because you'll want to drop back below that level when 3.3V is removed. I chose 250uA because this is the drain current used for the gate threshold voltage spec in the IRF7410 datasheet, so you have gate voltage targets associated with it.You will need a lower value source-gate resistor on the IRF7410. STAT has a minimum pulldown current of 6uA. The simplest thing is to set R2 to 3.3V / 6uA = 550k -> 560k (real value). Unfortunately, 1uA of leakage on STAT puts your gate voltage at 0.56V, still enough to leak 250uA into CTL. At 1.8V Vgs, the IRF7410 has a respectable 13mOhm impedance, so try R2 = 1.8V / 6uA = 300k. This is probably better, as 1uA of STAT leakage is below the minimum 0.4V gate threshold for 250uA drain current (at room temp, if you're operating colder, recalculate).Now to build a voltage divider for the CTL pin. We want to have at least 0.9V on CTL with 95% of 3.3V in (guessing on the tolerance). This means the ratio should be 0.9V / (0.95*3.3V) = 0.2871 or higher. We also want at least 250uA through the divider when the CTL pin is at 0.35V. This means the string resistance should be (0.35V / 0.2871) / 250uA = 4.876k or lower. I plugged this into the calculator athttps://slugrustle.github.io/and found a candidate with 1.27k between GND and CTL and 3.09k between CTL and 3V3. This has a worst-case minimum ratio of 0.287173 with 1% resistors. At nominal values, it requires 1.2V and 276uA to bring CTL to 0.35V, it requires 3.09V and 709uA to bring CTL to 0.9V, and it will sink 757uA at 3.3V.

author: Lt_Flash
author_rank: Regular Contributor
timestamp: May 27, 2018, 09:33:36 pm
content: Thanks for your reply, first of all! And yes - I tried different voltage dividers, just forgot to mention that, closest one to your solution was 220kOhm to 100kOhm that should have given 0.28V on CTL pin - but that never happened, voltage stayed at ~0.75V. That's the thing I can't figure out - what's wrong. I tried 10k/10k resistors, 100k/10k and 1.2M/100k and other combinations - no luckAlso, if I just shorten that CTL pin to ground when it's 'stuck' at ~0.7-0.9V - LTC4412 immediately switches to battery as CTL went low.

author: Lt_Flash
author_rank: Regular Contributor
timestamp: May 27, 2018, 09:40:28 pm
content: And yes, I think the problem is that first of all - CTL has a current sink on it and it's not very accurate, same as STAT pin, I tested my LTC4412 and it seems that CTL is treated HIGH at about ~0.52V, not 0.635. Same with STAT pin. I think your calculations are quite accurate and we can somehow bring this particular LTC4412 to order, but what happens if I change it with another IC that would again have different parameters?In regards to IRF7410 - so should I be using a MOSFET with lower VGs(on) or higher? I've got several more to experiment with, even DMP1045U has -0.55V Vth, I can give that a go. Just wanted to use IRF7410 because of its low Rds(on) at high currents.

author: slugrustle
author_rank: Frequent Contributor
timestamp: May 28, 2018, 02:19:10 am
content: It sounds like you have a board made. It's your call, but I would try to make it work with the IRF7410. You need low threshold voltage in this circuit anyway, since Vgs maxes out at 3.3V minus the Q3 body diode drop.There is more leakage through Q3's drain to CTL than any of the dividers you mention would have been able to help. Try making R2 300k to start with. Then make R1 3.09k, and add a 1.27k resistor between CTL and GND. The design details for all of this are in my previous post.As for pins being treated high at lower thresholds, they have hysteresis. Example: Let's take typical values and say CTL has a 0.5V low threshold and a 0.635V high threshold. If CTL starts low at 0.2V and then rises, it will be considered low until it exceeds 0.635V. If it stays above 0.635V for a little while and then falls again, it will be considered high until it falls below 0.5V. That's probably how you saw a high signal near 0.52V, and that is why I designed the divider to drop CTL below 0.35V even at worst-case resistor tolerance and 250uA leakage.

author: Lt_Flash
author_rank: Regular Contributor
timestamp: May 28, 2018, 02:34:55 am
content: Yes, I already have a board ready so I can play with all these resistors. Thanks for your help, I'll try to find proper resistor values for CTL pin. But why would R2 matter? I thought that if STAT can sink 1uA of current which gives us about 560kOhm resistor required, then it can certainly work with higher resistance resistor of 1.2Mohm,as current would be even less?

author: slugrustle
author_rank: Frequent Contributor
timestamp: May 28, 2018, 04:07:35 am
content: STAT can have up to 1uA of leakage, which means it sinks 1uA when it shouldn't. With 1.2M for R2, Vgs of Q3 is up to 1.2V when STAT leaks 1uA, and this will turn CTL on when you don't want it. With 300k for R2, Vgs of Q3 is only 0.3V when STAT leaks 1uA, and this is below the minimum 0.4V Vgs threshold for 250uA drain current on Q3. The STAT minimum pulldown is 6uA, so you still get at least 1.8V Vgs on Q3 when STAT is sinking on purpose.Use 300k for R2. The whole problem with this circuit is leakage current on the STAT pin turning on Q3 when you want Q3 to be off.

author: Lt_Flash
author_rank: Regular Contributor
timestamp: May 28, 2018, 04:23:00 am
content: Thanks a lot, now it's much more clear! I'll give it a go and let you know!

author: Lt_Flash
author_rank: Regular Contributor
timestamp: May 28, 2018, 04:38:59 am
content: Also, one more question. You've said 'This has a worst-case minimum ratio of 0.287173 with 1% resistors' - does that mean that 2.49k plus 1.1k resistors would also work? I don't have 3.09k and 1.27k in stock atm. Just double checking. Thanks!

author: Lt_Flash
author_rank: Regular Contributor
timestamp: May 28, 2018, 05:22:12 am
content: Just updated the values and closest one to my available resistors is:Group Upper Lower String Min Ratio Nom Ratio Max Ratio Nom Ratio − Target8 2.74kΩ 1.10kΩ 3.84000kΩ 0.282388 0.286458 0.290564 -6.4167e-4If I change Upper to 2.49k - that would mean we will be higher than 95% of 3.3V? Is that correct?

author: Lt_Flash
author_rank: Regular Contributor
timestamp: May 28, 2018, 05:30:46 am
content: Well, just tried with 300k resistor and 220k/100k divider. I know, I should have tried with 2.49k/1.1k, but just decided to give it a go. You were right - now system is not getting stuck at ~0.7V, it switches over to battery and back to 3.3V just fine! The issue is now only with CTL pin, I think your solution may not work if voltage would be different to 3.3, say 3.7V or 4.2V (LiPo battery), or 3.0 or 2.7V - LTC4412 should still prefer 3V3 bus (even though it's not 3.3V anymore) over battery rail, that was the whole idea. Otherwise - there's no point in putting CTL pin high at all as LTC4412 automatically selects Aux rail in case if it's voltage higher than Primary rail. That's what I can see now having 220k/100k divider on CTL pin - as soon as my 3V3 rail voltage drops below Battery voltage - system switches over to battery. But maybe I'm wrong, I'll find my 2.49k/1.1k resistors and give it a go! Thanks again for your help!

author: slugrustle
author_rank: Frequent Contributor
timestamp: May 28, 2018, 02:50:35 pm
content: I just looked at the datasheet again, and we can make the CTL circuit a lot simpler. CTL can handle up to 36V regardless of Vin, so a voltage divider is not needed. Just put a single resistor between CTL and GND, and connect CTL directly to 3V3. Put 10k between CTL and GND. This will allow up to 0.35V / 10k = 35uA of leakage from Q3 without affecting the circuit. If you see leakage problems in the future, just make R2 a lower value. Q3 will turn on at lower Vgs (less leakage from STAT) at higher temperatures, so maybe put a halogen lamp on the board and test, or test it outside on a sunny day.This circuit avoids calculation of voltage dividers, and it works with any 3V3 rail above 0.9V.I switched to 10k between CTL and GND (works with up to 35uA leakage on CTL) from 1.4k (works with up to 250uA) because I didn't know the 3V3 rail would also come from a battery! It's less current draw to make R2 a lower value if leakage is a problem (100k, etc.) than to make the resistor between CTL and ground such a low value. 10k is more reasonable.Edit: Ahhh! I am an idiot sometimes. You can't really lower R2 below 300k, because you want 1.8V Vgs on Q3, and STAT min pulldown current is 6uA. 1.8V / 6uA = 300k. So try 10k between CTL and GND but test at higher temperature and output current and decrease that resistor value below 10k if you have leakage problems.

author: slugrustle
author_rank: Frequent Contributor
timestamp: May 28, 2018, 03:36:22 pm
content: How much current do you plan to output with this thing?Edit: The DMP2305U-7 looks like a good choice for Q3. It has lower leakage, a minimum Vgs of 0.5V to source 250uA (vs. 0.4V for IRF7410), and 113mOhm max Rds on at 1.8V Vgs. I'd be very comfortable using this for an application putting 1A or less through Q3.I'd also use something like DMP2004K for Q4, as it's a little lower powered. However, if your 3V3 rail comes from a battery, it's probably better not to use the LED due to the current draw. I know you marked that part as optional.

author: Lt_Flash
author_rank: Regular Contributor
timestamp: May 28, 2018, 06:01:52 pm
content: Current via 3V3 rails should not be more than ~2A and usually would be much smaller, so yes, probably DMP1045U should be better, but at 2A its Rds(on) is higher than IRF7410 and I was trying to minimize these voltage drops as much as possible to have a closer to 3V3 value. Same with battery rail here - even without any load I have a voltage drop of about 0.015V when battery is active, under load that would be more due to MOSFETs resistance.I will give it a go wtih 10k to ground, but I think I was already trying to do that and the problem might be not with leakage current but because of the fact that when I disconnect 3V3 rail LTC4412 starts to open battery rail MOSFETs and current starts to flow via them and then via still open IFR7410 back into CTL pin, keeping it above 0.6V and the whole system stucks in this state. LTC4412 is working as following (as per datasheet):GATE (Pin 5): Primary P-Channel MOSFET Power SwitchGate Drive Pin. This pin is directed by the power controllerto maintain a forward regulation voltage (VFR) of 20mVbetween the VIN and SENSE pins when an auxiliary powersource is not present. When an auxiliary power sourceis connected, the GATE pin will pull up to the SENSE pinvoltage, turning off the primary P-channel power switch.So that's why I'm not sure how to bring CTL down enough to force switchover back to battery. But I'll try putting 10k resistor between CTL and GND and let you know how it goes. Thanks again for your help, its much appreciated!

author: Lt_Flash
author_rank: Regular Contributor
timestamp: May 28, 2018, 06:22:51 pm
content: Just tested with CTL directly connected to 3V3 and pull-down resistor from 3V3 to GND - nope, CTL and 3V3 are both sitting at 0.7V! Tried 10k, 4.7k and 2.2k resistors - nothing changes. I connect CR2032 battery first, voltage VMcu goes to 3V as it should, then I connect 3V3 rail - VMcu switches to 3V3, then I just unplug and physically disconnect 3V3 power source - voltage on VMcu and 3V3 goes down to ~0.7V and sits there.

author: Lt_Flash
author_rank: Regular Contributor
timestamp: May 28, 2018, 06:26:41 pm
content: Strangely enough, if I connect JUST the battery and with CTL tied directly to 3V3 bus - system sits at 0.7V on VMcu and 3V3 rails. I'm not sure how this 0.7V can appear on 3V3 when nothing is connected on 3V3 at all...

author: Lt_Flash
author_rank: Regular Contributor
timestamp: May 28, 2018, 06:37:49 pm
content: Well...I think it might be initial state issue. On initial power up when I plug battery in - Q3 has zero on it's gate and most probably would open as soon as voltage on it's source starts to rise. If I connect it's pullup resistor to VBatt rail - it would allow LTC4412 to switch over to VBatt, just tested that. But I'm not sure if that's a correct connection or not and how to avoid this issue...

author: Lt_Flash
author_rank: Regular Contributor
timestamp: May 28, 2018, 06:56:36 pm
content: Well, I was wrong, it's not starting even with pullup connected directly to VBatt. I dunno, probably I should just leave it in auto mode and allow it to switch between VBatt and 3V3 by itself. It's choosing higher voltage and that's probably ok for my design as the output is to power MCU. I just don't understand why all this is happening and how this LTC4412 actually works.

author: slugrustle
author_rank: Frequent Contributor
timestamp: May 28, 2018, 09:38:16 pm
content: Sorry, I should have read your initial post more carefully. I was just looking at the leakage problems not the operation mode you wanted to achieve.Take a look at the datasheet section "Ideal Diode Control with a Microcontroller" on page 11 that refers to Figure 4. I think this is closest to what you want to do. The datasheet explains the interaction between CTL, Vin, and Vload in this mode.It may be that the gate capacitance on Q3 (~8.7nF) keeps it on for too long when switching back to the battery. Indeed, one time constant is 8.7nF * 300k = 2.61ms. Your idea that Q3 is keeping CTL high sounds like a good one.It's simulation time! See the attached files. There's some definite weirdness when switching back from 3V3 to the battery. LTspice is a free download and can run the .asc file.

author: Lt_Flash
author_rank: Regular Contributor
timestamp: May 28, 2018, 09:54:35 pm
content: No worries at all, I really do appreciate your help! Yes, I've seen that picture, but the problem is that it's controlled remotely by MCU and yes, that's quite easy to achieve with MCU, while my idea was to have a sort of automatic switchover, but with a lock to 3V3 rail, as long as it provides enough voltage, just to keep the battery enabled only in the worst case when 3V3 rail falls down below say 2.5-2.7V. Basically this circuit is intended to be used as a battery backup for an MCU, it also has a STAT pin connected to MCU so in case when power for some reason is lost on 3V3 rail - MCU should notice that and immediately switch to backup (or other powersave) mode.Actually, quite a good idea about LTSpice, I'm not using LTC devices too often and got used to TI ICs mostly, that's why I didn't even think about possibility to simulate this one in LTSpice!!! I'll have a look at it this evening, thanks again!

author: Lt_Flash
author_rank: Regular Contributor
timestamp: May 28, 2018, 09:59:31 pm
content: One more thought here...I've got a capacitor on VMcu rail and that's quite a beefy one, 10uF. So I think that one can be adding a time constant and delay for a voltage to rise on VMcu rail that's causing Q3 to be sort of 'half open' on initial power-up and that causes it to leak current to CTL pin. Dunno yet, just checking all possibilities.