Building an OR-ing power switch - Page 1
Forum section: electronics / projects

author: Electr0nicus
author_rank: Regular Contributor
timestamp: July 07, 2012, 08:46:39 pm
content: HiFor a current project of mine, i have to switch between two voltage sources (wall power supply or battery pack). I have searched the internet and found some chips which implement a complete ORing power Switch solution. F.e. the LTC4370, which would have been my favourite, but it's very hard to source here in Austria and also very expensive.There are various other devices from different suppliers too, but they are all too low voltage and current.For my design, the power switch has to handle up to 12A and voltages up to 15V.Because the wall adapter or battery is powering a stepup regulator,so if the input voltage decreases the input current increases. It's a 60W design, so at the lowest acceptable input voltage of 5V, there will be a current of 12A flowing, instead at 12V the current decreases to 5A. See attached file.Using any kind of schottky diodes makes no sense, because of the high currents combined with the forward voltage drop. Even the most expensive high current schottky diode had a Vf of 0.4V, which will create 4.8W of heat, that's a huge waste of energy and battery life. Then also cooling measures have to be in place.So the only way out is to use power MOSFETs. The only problem are the bulk diodes, which are present in every MOSFET. It would have been easy, if the input voltages are fixed but they aren't. There can be one case, where the wall adapter voltage is 5V and the battery voltage is 12V, but also vice versa. So in one of both cases, the body diode of one of the two MOSFETs will conduct, overheat and destroy the MOSFET.After this insight, I searched the web for alternative solutions and found one on the EDN website.http://www.edn.com/design/analog/4368307/Use-op-amps-to-make-automatic-ORing-power-selectorThey haven't solved the problem with the conducting bulk diode, they actually used it for the purpose. A OPAMP measures the voltage drop across the MOSFET. If there is a very small current flowing this current will actually flow across the body diode into the load. If the current increases, the voltage drop across the MOSFET also increases, and if it exceeds a predefined value, the OPAMP will switch on the MOSFET, so that the current stops flowing through the body diode and instead flows through the lower impedance channel of the MOSFET.So far so good. It seems to work just fine.But what happens when the OPAMP fails doing it's job? Then the same problem as before, the body diode will conduct the full current, overheat and destroy the MOSFET.So my question is: Are there any other "safer" designs out there, or is there a solution which makes the EDN schematic almost "bullet proof"Cheers Gregor

author: Simon
author_rank: Unknown
timestamp: July 07, 2012, 08:55:54 pm
content: The solution may be more obvious than you think. Have a look at your jack schematic again, the jack has an inbuilt switch you can use to switch off the battery of use to tell "something" that the mains has been plugged in so it needs to switch off the battery.

author: chrome
author_rank: Regular Contributor
timestamp: July 07, 2012, 09:09:46 pm
content: What Simon said, also why not always use the battery as the power source and just charge the battery from the jack when that is available.

author: Electr0nicus
author_rank: Regular Contributor
timestamp: July 07, 2012, 09:13:18 pm
content: Quote from: Simon on July 07, 2012, 08:55:54 pmYes I'm aware of that. But I doubt, that this would be a good solution in my case. In a worst case scenario I have to switch 12A with that flimsy switch. I don't think it will last long. Also it only switches GND. I don't know how the switching regulator will react if it looses it's ground connection.

author: Simon
author_rank: Unknown
timestamp: July 07, 2012, 09:16:29 pm
content: Quote from: Electr0nicus on July 07, 2012, 09:13:18 pmYou don't use the switch to control the main power, you use it to send a signal to an electronic switch (circuit plus power mosfet) to tell it to switch.

author: TerminalJack505
author_rank: Super Contributor
timestamp: July 07, 2012, 09:43:05 pm
content: QuoteYes, this is one of the reasons you will see these OR-ing controllers use P-channel MOSFETs 'backwards'. So that the higher of the two voltage sources isn't pumping current into the other voltage source. There is another reason they do it, as you see in the EDN schematic--to power-up the OR-ing controller.The IC/ICs that actually do the switching wouldn't be able to start up, otherwise. The controller should quickly turn on one of the MOSFETs upon power-up.QuoteIf you're not going to use a commercial IC to do this then that will be the risk you have to be willing to take. Do a lot of testing, obviously, and that should help you sleep better at night.I've used the LTC4412 before without any problem. (Basically like the schematic in figure 2 of the datasheet.) I wasn't using it for high power switching, though.

author: Electr0nicus
author_rank: Regular Contributor
timestamp: July 07, 2012, 10:19:02 pm
content: Quote from: TerminalJack505 on July 07, 2012, 09:43:05 pmThat's exactly the problem, which I encountered, when I first tried a "only MOSFET solution". If your design has one constant supply voltage, you can arrange the MOSFETs in a way, that there is no possibility, that current can flow from the higher voltage supply to the lower one. But if both of your supply voltages can change independently, then there are conditions, where this can happen. I want to have a relatively wide input voltage range for the wall adapter, from 5- 12V. The batteries, which can be 2 or 3 Lion or LiPO Cells, can range from 5V to a little bit over 12V (3 cells). So a simple solution, as suggested by Simon wouldn't be a option.Quote from: TerminalJack505 on July 07, 2012, 09:43:05 pmI don't want to take any risks, because my project will maybe sold as a kit in the distant future. I don't want it to blow up on anyones desk. In this case, blowing up would actually be the right word, because lithium batteries are involved. I don't think they like it when they get shorted outI had a quick look at the datasheet of the LTC4412.To my surprise it's available at farnell. Maybe I've searched the wrong thing before.It's a bit on the pricey side, costing 3.4€, but i think the EDN solution would have been as or even more expensive than that chip. I also like the fact that it uses a external MOSFET, which means i can adapt it to my 12A requirement. A little downside is the schottky diode for the wall adapter. But I think some power loss is rather acceptable on the wall adapter input, than on the battery input.Cheers Gregor

author: madires
author_rank: Super Contributor
timestamp: July 07, 2012, 10:22:48 pm
content: Hi!If the switching time doesn't need to be super fast you could use a simple relay.Cheersmadires

author: Electr0nicus
author_rank: Regular Contributor
timestamp: July 07, 2012, 10:47:06 pm
content: Quote from: madires on July 07, 2012, 10:22:48 pmI don't think that will work. The powered circuit is a embedded Linux System. So the power should be switched over seamless. I'm afraid a relay is to slow. Using a relay creates new problems like magnetic fields from the coil and EMI when the relay switches, because it doesn't close the contact directly, but toggles back and forth for some ms. This creates a electric arc between the relay contacts, which generats EMI. A relay also wears out.BTW in the LTC4412 pdf on page 10: With the solution of back to back P-Channel MOSFETs I came up earlier, but then dropped that idea, because I thought it's ugly and too complex. And what I see in this datasheet: They did it too

author: Psi
author_rank: Super Contributor
timestamp: July 08, 2012, 12:36:23 am
content: If it's for computer power you should do what someone recommended above and have the external power only charge the battery.That way it doesn't matter, you can plug/unplug the external power as much as you want and it doesn't cause any issues.You just have to design it so it's able to supply enough current to both charge and power the device at the same time.

author: Electr0nicus
author_rank: Regular Contributor
timestamp: July 08, 2012, 01:11:14 am
content: Quote from: Psi on July 08, 2012, 12:36:23 amThat would be the simplest solution, because then I would need no switch at all. The only requirement is, that the supply voltage has to be larger than the battery pack voltage. This has the disadvantage that the wall adapter has to deliver more than 12V (if charging a 3 cell battery). So you would've to take a standard laptop power supply, witch has 19V or 20V. So the efficiency of the switching regulator will drop. But the use of a standard Laptop PSU has also the advantage, that most people already have one at home.So I think I've made my decision. I will omit the whole ORing stuff and make it the easy way (see attached image).Thank you all for your quick help.Cheers Gregor

author: Simon
author_rank: Unknown
timestamp: July 08, 2012, 06:22:10 am
content: I thinkj you are trying to get too much in before you know where to start. Why the option on 1-3 batteries ? make sure your not over complicating it particularly if it is to be sold.

author: Electr0nicus
author_rank: Regular Contributor
timestamp: July 08, 2012, 09:51:24 am
content: Quote from: Simon on July 08, 2012, 06:22:10 amYeah maybe.But I never said I'll use only one battery cell. That wouldn't be possible at all. As the power consumption of the embedded Linux system is minimum 35W in normal working mode , I have to think about a suitable battery pack that can deliver this power for at least one hour. Of course in power down mode or energy saving mode the battery will last 2 to 3 hours or even longer, but my target is a runtime in normal mode of 1 hour. So the ideal configuration would be a 3S1P 3- 4Ah battery pack. As the LiPO battery measures 12.6V when full, this voltage rapidly drops to approximately 11V and then descends pretty linear down to the end-of-discarge voltage, which is at about 9V.http://gallery.mikrokopter.de/main.php?g2_view=core.DownloadItem&g2_itemId=38981&g2_serialNumber=1So to simplify matters, I say the battery delivers constant 10V for the whole discharge time. So at 10V the current at 35W is 3.5A. So a 3SP1 4Ah battery will last my required 1 hour.I don't think that my new EEVblog- forum inspired version is that complicated at all. In this version there are only parts existent, which are absolutely necessary, like the LTC3859 and the charge controller for the batteries. I don't know how I can make it simpler, without discarding the battery option.So maybe if I can reduce the power consumption of the system a bit I could use only 2SP1 battery packs.

author: Simon
author_rank: Unknown
timestamp: July 08, 2012, 11:30:07 am
content: you were saying before that you would have 1-3 batteries and was having problems with the battery being more or less higher than the charge voltage.