Author Topic: Simple Power Source Switching that's faster than a mechanical relay...  (Read 7398 times)

0 Members and 1 Guest are viewing this topic.

Offline cte7dsTopic starter

  • Contributor
  • Posts: 47
  • Country: fi
  • hello world
    • my github
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:
 

Offline Short Circuit

  • Frequent Contributor
  • **
  • Posts: 439
  • Country: nl
Re: Simple Power Source Switching that's faster than a mechanical relay...
« Reply #1 on: January 06, 2012, 05:00:16 pm »
Mosfets give much faster swicthing than relays, like 10~100ns vs 1-10ms. But there always remains a deadtime

To 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.

 

Offline cte7dsTopic starter

  • Contributor
  • Posts: 47
  • Country: fi
  • hello world
    • my github
Re: Simple Power Source Switching that's faster than a mechanical relay...
« Reply #2 on: January 06, 2012, 05:28:24 pm »
how would the circuit look like?
 

Offline onewatt

  • Contributor
  • Posts: 22
  • Country: us
Re: Simple Power Source Switching that's faster than a mechanical relay...
« Reply #3 on: January 06, 2012, 06:42:09 pm »
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 a Voltage Hold-up Time of 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.
 

Offline chrome

  • Regular Contributor
  • *
  • Posts: 185
  • Country: be
Re: Simple Power Source Switching that's faster than a mechanical relay...
« Reply #4 on: January 06, 2012, 06:43:27 pm »
Did you take a picture of a device that can take screen shots? why?
 

Offline onewatt

  • Contributor
  • Posts: 22
  • Country: us
Re: Simple Power Source Switching that's faster than a mechanical relay...
« Reply #5 on: January 06, 2012, 06:55:16 pm »
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.
 

Offline Short Circuit

  • Frequent Contributor
  • **
  • Posts: 439
  • Country: nl
Re: Simple Power Source Switching that's faster than a mechanical relay...
« Reply #6 on: January 06, 2012, 07:09:24 pm »
how would the circuit look like?
Sorry, 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 only
bypasses 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/dV
dV=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.
 

Offline cte7dsTopic starter

  • Contributor
  • Posts: 47
  • Country: fi
  • hello world
    • my github
Re: Simple Power Source Switching that's faster than a mechanical relay...
« Reply #7 on: January 06, 2012, 08:27:29 pm »
how would the circuit look like?
Sorry, 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 only
bypasses 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;
I 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:

Quote
dV/dt=i/C or C=I*dt/dV
dV=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.
I 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 :p
Quote
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.
The 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?
 

Offline Short Circuit

  • Frequent Contributor
  • **
  • Posts: 439
  • Country: nl
Re: Simple Power Source Switching that's faster than a mechanical relay...
« Reply #8 on: January 06, 2012, 09:55:49 pm »
This is pretty much the same functionality:
(probably same purpose as well...)
 

Offline RJSC

  • Regular Contributor
  • *
  • Posts: 126
  • Country: pt
Re: Simple Power Source Switching that's faster than a mechanical relay...
« Reply #9 on: January 07, 2012, 02:49:16 am »
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.  ;D

                      D1
BAT+ ---------|>|-----+-------------- LOAD+
                                  |
PSU+ ---------|>|-----|
                      D2

BAT- ---+----------------------------- LOAD-
PSU- ---|
« Last Edit: January 07, 2012, 03:02:45 am by RJSC »
 

Offline bfritz

  • Regular Contributor
  • *
  • Posts: 134
  • Country: us
Re: Simple Power Source Switching that's faster than a mechanical relay...
« Reply #10 on: January 07, 2012, 04:13:21 am »
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/LTC1473

They 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.
 

Offline amspire

  • Super Contributor
  • ***
  • Posts: 3802
  • Country: au
Re: Simple Power Source Switching that's faster than a mechanical relay...
« Reply #11 on: January 07, 2012, 05:36:04 am »
If you don't mind losing 0.3V:
2 Schottky diodes in parallel.
This 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.
 

Offline vk6zgo

  • Super Contributor
  • ***
  • Posts: 7590
  • Country: au
Re: Simple Power Source Switching that's faster than a mechanical relay...
« Reply #12 on: January 07, 2012, 06:41:14 am »
If you don't mind losing 0.3V:
2 Schottky diodes in parallel.
This 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.

Yep,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
 

Offline cte7dsTopic starter

  • Contributor
  • Posts: 47
  • Country: fi
  • hello world
    • my github
Re: Simple Power Source Switching that's faster than a mechanical relay...
« Reply #13 on: January 07, 2012, 08:40:20 am »
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/LTC1473

They 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.
Seems 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?
 

alm

  • Guest
Re: Simple Power Source Switching that's faster than a mechanical relay...
« Reply #14 on: January 07, 2012, 05:16:52 pm »
About $7 each at Digikey, 600 in stock.
 

Offline bfritz

  • Regular Contributor
  • *
  • Posts: 134
  • Country: us
Re: Simple Power Source Switching that's faster than a mechanical relay...
« Reply #15 on: January 07, 2012, 10:19:26 pm »
Seems 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?

Part 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.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf