Simple Power Source Switching that's faster than a mechanical relay... - Page 1
Forum section: electronics / beginners

author: cte7ds
author_rank: Contributor
timestamp: January 06, 2012, 01:37:29 pm
content: I'm trying to implement dual power source for a 12VDC 60W ATX PSU module which normally only has one 12VDC input. I'd like to have a 12VDC input and a battery input for a SLA battery. The PSU can handle voltages from 8 to 15VDC (i hacked it XD) so a straight connection from the battery to the input will work. I tried implementing this with a SPDT relay by tying all the grounds together and having battery VCC in relays N.C and 12VDC adapter in N.O. Turned out the relay is way too slow at switching the load to another power source so the PSU powers down the computer when 12V adapter is removed and battery takes over. I was able to fix it with a massive bank of capacitors, but I don't really like that so maybe there are some better solutions? perhaps making the transfer really fast with mosfets, yet still having the sources isolated somehow?Here's a little schematic what I currently have:

author: Short Circuit
author_rank: Frequent Contributor
timestamp: January 06, 2012, 05:00:16 pm
content: Mosfets give much faster swicthing than relays, like 10~100ns vs 1-10ms. But there always remains a deadtimeTo keep things simple, you can use a couple of or-ing diodes in parallel with the switching elements.This will limit the voltage drop to 0.5-1V below the lowest feed during the switchover.

author: cte7ds
author_rank: Contributor
timestamp: January 06, 2012, 05:28:24 pm
content: how would the circuit look like?

author: onewatt
author_rank: Contributor
timestamp: January 06, 2012, 06:42:09 pm
content: A few years ago I was interested in a similar problem. That was, "How fast does a computer Uninterruptible Power Supply (UPS) have to be when switching over to battery backup, to be considered uninterruptible?"According to ATX Power Supply Spec. 2.2 (section 3.2.11), an ATX power supply must have aVoltage Hold-up Timeof 17ms. That means that if the AC power Fails completely, the ATX power supply must maintain the proper voltage ouputs under full load for at least 17ms. Now, it's not coincidential that one 60Hz AC cycle is 16.6ms, and one 20Hz AC cycle is 20ms. In essence, this specification is saying that the ATX power supply's main filter capacitor must be able to supply operating voltage under full load for one AC cycle, until it's voltage drops so low that the computer will malfunction.I measured the mechanical relay response time during switchover using my oscilloscope and the results are as follows:Switchover from AC to battery backup took my mechanical relay 5 ms.Switching from battery backup back to AC line voltage took my mechanical relay 9ms.So my conclusion is that a mechanical relays are quick enough for Uninterruptible power supplies, given that a filter capacitor can hold a charge for at least 17ms while supply full load voltages. I know this doesn't solve your problem, but I thought I'd mention my experiment nonetheless.

author: chrome
author_rank: Regular Contributor
timestamp: January 06, 2012, 06:43:27 pm
content: Did you take a picture of a device that can take screen shots? why?

author: onewatt
author_rank: Contributor
timestamp: January 06, 2012, 06:55:16 pm
content: My screen shots are grabbed from a video I made on this topic, I was using a Rigol oscilloscope, and I added the text and transparent balloon in my video editor as part of my presentation.

author: Short Circuit
author_rank: Frequent Contributor
timestamp: January 06, 2012, 07:09:24 pm
content: Quote from: cte7ds on January 06, 2012, 05:28:24 pmSorry, I did not look at the schematic at first.When having a lower voltage to override a higher one, things get a bit more complicated.The or-ing with diodes is only usefull to select the higest voltage of the two, and the relay onlybypasses the diode to eliminate the forward voltage drop.In this case you could use two back-to-back P-Mosfets two disable the battery (sources & gates together),but with limited electronic experience, you're probably better of using a capacitor;dV/dt=i/C or C=I*dt/dVdV=4V (12Vtyp-8Vmin), dt=10msec, I=5A, then C=12500uF.Quite large indeed, but not excessive. With a bit of luck, you can get away with 10mF/16V, which are about 25x25mm in size.Btw you might want to change the series diodes to an anti-parallel configuration and a fuse. The diodes eat some 1volt=5watts away, which is a waste and also reduces the headroom voor voltage dips.

author: cte7ds
author_rank: Contributor
timestamp: January 06, 2012, 08:27:29 pm
content: Quote from: Short Circuit on January 06, 2012, 07:09:24 pmI intend to implement similar system on other machines too so doing it right the first time with mosfets would be preferred so I didn't have to get expensive quality capacitors and relays which take a lot of space. I tried googling about power source switching, power muxing and power source selecting and found a lot of different complicated and exotic power management chips, but barely anything about implementing such thing with discrete widely available parts. This is the best one I could find and I'm not sure if it would work for me:QuoteI soldered a handful of random motherboard capacitors in parallel giving me 18000uF, it works but it looks ridiculous because there are 12 capacitors in a long string. Closest thing to a 10mF I could think of :pQuoteThe series diodes D2 and D3 I added because without them the relay was really slow to act when 12V adapter was removed. I'm guessing it's because the capacitors of the ATX board were keeping the coil charged up. I'd imagine this would be the case also with anti-parallel diodes?

author: Short Circuit
author_rank: Frequent Contributor
timestamp: January 06, 2012, 09:55:49 pm
content: This is pretty much the same functionality:(probably same purpose as well...)

author: RJSC
author_rank: Regular Contributor
timestamp: January 07, 2012, 02:49:16 am
content: If you don't mind losing 0.3V:2 Schottky diodes in parallel.You can use a double Schottky diode with common anode in a TO220 package for a very compact (and simple) solution, as you can see in the "fine" (cough...) ASCII art schematic following.D1BAT+ ---------|>|-----+-------------- LOAD+|PSU+ ---------|>|-----|D2BAT- ---+----------------------------- LOAD-PSU- ---|

author: bfritz
author_rank: Regular Contributor
timestamp: January 07, 2012, 04:13:21 am
content: You can build a switchover circuit using some discrete FET's, some Op-Amps to sense the voltages to determine when to switch, and some logic in the form of gates or transistors, but the circuit can get complicated pretty quickly. For example, N-FET's are cheaper for a given Rds_on than P, but with N-FET's you will need a voltage higher than the supply voltages you are switching between.There are a couple different manufacturers that offer devices that manage the power path. I have used the LTC devices before with good luck.I think this will work for your application, but may be a bit of overkill in terms of current.http://www.linear.com/product/LTC1473They do offer others, so you should be able to find something there that meets your needs. Another thing is that they offer demo boards for most of their IC's, which can save you some time and effort.

author: amspire
author_rank: Super Contributor
timestamp: January 07, 2012, 05:36:04 am
content: Quote from: RJSC on January 07, 2012, 02:49:16 amThis is the usual solution. The power supply is set to just above the maximum battery voltage. Other then the small losses in the diodes, it is fast and reliable. MOSFET switches have lower losses, but it is only worth it if you cannot afford to loose 2% of the power in the diodes.Richard.

author: vk6zgo
author_rank: Super Contributor
timestamp: January 07, 2012, 06:41:14 am
content: Quote from: amspire on January 07, 2012, 05:36:04 amYep,that's how the 24 volt supply changeover was done at the TV Transmitting Stations I worked at years ago.The supply was normally just above the Station Battery voltage. If the mains dropped off,the battery took over.VK6ZGO

author: cte7ds
author_rank: Contributor
timestamp: January 07, 2012, 08:40:20 am
content: Quote from: bfritz on January 07, 2012, 04:13:21 amSeems like a really nice solution, but the chances of getting the chip or the demo board in low quantity with a sane price are probably slim?

author: Unknown
author_rank: Unknown
timestamp: January 07, 2012, 05:16:52 pm
content: About $7 each at Digikey, 600 in stock.

author: bfritz
author_rank: Regular Contributor
timestamp: January 07, 2012, 10:19:26 pm
content: Quote from: cte7ds on January 07, 2012, 08:40:20 amPart is available at LTC's website for less than $5. The Demo board is available for $100. I've found that more often than not, making friends with a local distributor, they can often get me Demo boards / Evaluation Kits for free. Never hurts to ask, and usually produces better results than accepting defeat before trying.