How to switch between two redundant power supplies

Discussion in 'General Electronics Chat' started by jabss, Jan 14, 2015.

  1. jabss

    Thread Starter New Member

    Jan 12, 2015
    11
    0
    Hello,

    I'm trying to design a circuit with two power supplies for redundancy. Each one should supply both 12V and 5V.

    I've decided that only one power supply should be ative at each moment, and that is controlled by a microcontroler.
    Something like this:

    teste.jpg

    I initially considered that a pair of relays for each power supply in order to activate/deactivate each side, but that would need some transistors/mosfets to activate the relays so I thought it would be better to use a logical level mosfet (FQP30N06) at the first place.

    However, it seems that with this kind of mosfet as a switch, what is switched is the path to ground rather than the 12v/5v lines.

    Any suggestion on how to do it, maybe with a different device?

    Thanks in advance,
    Jabss
     
  2. MagicMatt

    Member

    Sep 30, 2013
    117
    14
    I'm no expert, but having used some badly designed systems with computer setups I can tell you that setup is a really bad one. The spikes etc. caused by the switch over when one fails would easily cause a computer system to crash. The good systems incorporate the equivalent of a battery backup (or super-capacitor) that kicks in and keeps the system running while the power supply is changed over, or run both supplies at once.
     
  3. ErnieM

    AAC Fanatic!

    Apr 24, 2011
    7,386
    1,605
    What are the power supplies internally? It is oft the case you can just tie the outputs together; the supply with the slightly higher output does all (or most of) the work until it drops out.

    The switchover can be dirty as the lower voltage supply will normally be shut down and needs to recover, but is certainly faster then a relay.
     
  4. AnalogKid

    Distinguished Member

    Aug 1, 2013
    4,531
    1,248
    There are several ways to do this. First off, you can use P-channel FETs to control the voltage rails and leave all of the grounds hard connected. Or, use a charge pump or gate driver circuit to generate the extra voltage needed to drive N-channel FETs in the outputs. Or connect the two supplies to the loads through high current diodes. If one set of supplies is adjusted 0.1V higher than the other set, the diodes will do the switching with no oversight and very clean transitions. Or, back to the FETs, use any of the "active Or-ing diode" controller chips from Linear Technology. The most complex way is to create a 3rd-wire current share bus with external current sense resistors and chips from TI (formerly Unitrode parts).

    The problem with the transition isn't transients so much as dropouts. For any of these methods, extra bulk decoupling capacitance at the load will hold up the load during the milliseconds of relay transition or microseconds of FET transitions.

    ak
     
  5. profbuxton

    Member

    Feb 21, 2014
    233
    68
    Firstly, Iwould use diode "auctioneering" to achieve a bumpless transfer between supplies. If relay switchover or electronic transfer(fets,etc) I would control this by a signal from the mains of each supply detecting mains failure. This should detect within a cycle or two and cause a changeover. Detecting on the DC side would be too slow as the DC would have a "decay" time(depending on load).
    I have seem this done on Main frame computers using "missing cycle" detection and changeover was rapid enough so the operator didn't even notice it. Of course the two PC kept each other updated and program data was stored on nonvolatile memory so they just kept running seamlessly.
     
  6. WBahn

    Moderator

    Mar 31, 2012
    17,736
    4,789
    Is it really important that whichever supply is providing the 5VDC also supply the 12VDC? Or would it be fine if one supplied one and the other supplied the other? If that's acceptable, then just tied the two supplies together via a pair of diodes and whichever supply is putting out the higher voltage will be the one to supply the circuit. If the normal voltage drop across a diode is too much, then you can use low voltage diodes or even MOSFETs that are specifically designed for low voltage drop power rectification applications.
     
    cmartinez likes this.
  7. jabss

    Thread Starter New Member

    Jan 12, 2015
    11
    0
    Hello,

    Thank you for your answers.
    I didnt want to have both power supplies on at the same because I read somewhere that it wasnt energy efficient (something like one power supply being absorving energy from the other). But if you guys tell me that the overall efficiency is about the same, I guess Ill be OK with that (although this will be a system to be on 24h/24h, so efficiency is something to be aware).
    Alternatively, with you good inputs I improved the design for my power supply redundancy, now with some diodes (power supplies with 0.7v higher to compensate the diodes drop), a pair of capacitors (with a high capacitance), and p-channel mosfet (by the way, what mosfet reference would you suggest? Any model that could be activated by 5v from the microcontroller?)

    So, what do you think about the new design?
    2015-01-15 19.58.00.jpg
    Thanks for your help!
    Jabss
     
  8. WBahn

    Moderator

    Mar 31, 2012
    17,736
    4,789
    What is the purpose of the FETs? With just the diodes you get your redundancy and you can switch off one of the supplies and even remove it without causing any problems (unless your circuit is really sensitive, in which case you have other problems. Is the added complexity of the MCU and FET switches really solving a problem?
     
  9. profbuxton

    Member

    Feb 21, 2014
    233
    68
    I agree with WBahn, overly complex. Just use the diodes. No need for any other circuits. BUT, if you want to use fets, your MY CIRCUIT should sense the mains feeding each supply. Currently, with the capacitors you have added MY CIRCUIT would take even longer to detect a supply failure.
     
  10. jabss

    Thread Starter New Member

    Jan 12, 2015
    11
    0
    Hello,

    I have progressed my setup even further. Now I'm planning to have a system that is "geo-redundant" between different divisions in my house. It basically consists in two boards with a RasperryPi each, located in different rooms and connected with a cat5E cable.
    In this cable, I pass I2C and 1-W protocols as well as 5V, 12V and GND. According to the specs, the max current in a cat5E conductor is 500mA, and I'm considering that. The distance of the cable is not so great, about 30m (~100ft).

    Each board will have its own power supply (12V and 5V wich are called 12V_local and 5V_local respectively) and will feed some local components (some IC's and the local Raspberry PI itself). Additionally, each board should be capable of supplying 5V and 12V (called 5V_bus and 12V_bus) to some other components on its own and in the other board. For this I used this "shared BUS" concept: basically some components (IC's, sensors, etc.) that share the same "power bus over cat5e cable".

    The ideia behind is that if a power supply goes down, the other, from the other room is capable of handling the common components (connected to the 12V_bus and 5V_bus), assuming that the the "local" components of the side that have lost power (including the RaspberryPI) are unpowered.

    For this, I guess I can have both power supplies feeding the "bus" at the same time, but I also want to have the possibility to be able to choose just one (and which one). The I2C/TTL device in the picture is also connected to the "power BUS" and it can be controled remotely via I2C. In other words, if the active RaspberryPI is in room 1 and I want to stop feeding the 12V_bus and 5V_bus of room 2, I should be able to do so. The objective is to be as energy efficient as possible and to avoid damaging the power supplies at long term (not sure why, but I have the idea that feeding the same circuit with different power supplies is not healthy for them)...

    So, what comments, suggestions would you experts have on this?

    Thanks!
    Jabss

    Capture.PNG
     
  11. studiot

    AAC Fanatic!

    Nov 9, 2007
    5,005
    513
    It's not clear why you want to do this.
    Is this like some DC version of a UPS?

    That means the resilience of the circuit being powered to dropout during switching, as already said.

    If I was not worried about the internal power supply reservoir (capacitor) of the supplied circuit I would simply use a switch.

    If I was worried about that then I would provide an external reservoir (rechargeable battery cacpacitor) and feed the load from that and switch the supplies to feed the battery.
     
  12. AnalogKid

    Distinguished Member

    Aug 1, 2013
    4,531
    1,248
    For each of the 4 MOSFETs, the gate pullup resistor wants to be tied directly to the source, not to the diode anodes, to assure firm turn-off. Note that there will be some leakage current through the off FETs, as specified on the datasheet.

    Since all loads are powered through diodes, the output of the two supplies can be adjusted up to compensate.

    Add 2 more GND connections in the CAT cable, or voltage drop in the GND will mess up the I2C and 1-wire data reliability.

    ak
     
  13. jabss

    Thread Starter New Member

    Jan 12, 2015
    11
    0
    Normal operation:

    Side 1 is running with a
     
  14. jabss

    Thread Starter New Member

    Jan 12, 2015
    11
    0
    Well, let me try to explain what I'm trying to accomplish:

    Normal operation:
    Side 1 is running with a RaspberryPI and the power supply is feeding the "Busses".
    Side 2 is running with another RaspperryPI and the power supply is only feeding the local devices (including the local RaspberryPI).
    So, in other words, side 1 is the "master". This raspberry PI will also be the "master" of I2C and 1-W busses.

    Suddently, the power goes down on side 1:
    The power on the BUS goes down and that raspberryPI goes down as well (I cannot feed it through the cat5e cable - too much current).
    The RaspbperryPI on side 2 will notice that side 1 is off (see note below) and will become master: It will turn on the power on the "power Busses" and will become master of I2C and 1-W busses. Normal situation is restored. There was some downtime on the devices attached to the "power busses", but that is acceptable (and maybe even desirable because the I2C/1-W master have changed).
    In order to avoid spikes with the current is back on side 1, the RaspberryPI on side 2 will tell the I2C/TTL device to turn off the power bus feeding on side 1.

    The objective is that this behaves like a switch, but controlled remotely (and with some automation, altough its not needed to have fast switching. Up to one minute downtime is acceptable).

    I'll add some capacitors between 12V_bus/5V_bus and ground in order to achieve stable switching.

    Yes, I'm considering 3 lines of ground in the Cat5E cable.

    Additionaly, each board will have an ADC measuring all the voltages: its own local ones and also the one in the "power busses". This information will be gathered by the active RaspberryPI (which will know the values from both sides).

    OK, I will move the diodes so that the FETs are connected directly to the power source.

    I hope this explains what I'm trying to accomplish, I guess its not related with any UPS or so...

    Thanks,
    Jabss
     
    Last edited: May 21, 2015
  15. jabss

    Thread Starter New Member

    Jan 12, 2015
    11
    0
    Just to add one more point:

    This setup also allows me to reset the devices hanged on the "power busses" without powering down the RaspberryPI's. Sometimes some IC's get hanged and "need a kick". With both power supplies connected constantly this reset would not be possible.

    Thanks,
    Jabss
     
  16. alfacliff

    Well-Known Member

    Dec 13, 2013
    2,449
    428
    the simplest would be 4 schotkey diodes. regular diodes will drop a fair amount of the 5 volt side. schotkey diodes drop less voltage. also, making it more complicted makes for less reliability.
     
  17. jabss

    Thread Starter New Member

    Jan 12, 2015
    11
    0
    Yes, I can use Schotkey diodes, or in alternative to tune up the power supply 0,7v above. My power supplies allow that tunning.

    Thanks,
    Jabss
     
  18. ian field

    Distinguished Member

    Oct 27, 2012
    4,415
    783
    With the series diodes, the MOSFETs are superfluous.

    But you have to take into account the diode Vf drop. Some top of the range PSUs have a multi-turn preset so you can adjust to compensate. But don't forget to prominently label any PSU tweaked for higher voltage!

    Shottky-barrier diodes have lower Vf than regular silicon ones.
     
  19. AnalogKid

    Distinguished Member

    Aug 1, 2013
    4,531
    1,248
    See post #15. The MOSFETs give him reboot control.

    ak
     
  20. alfacliff

    Well-Known Member

    Dec 13, 2013
    2,449
    428
    using diodes does not require reboot.
     
Loading...