Switching between two voltage sources.

Discussion in 'Power Electronics' started by vijithamca, Oct 8, 2012.

  1. vijithamca

    Thread Starter New Member

    Oct 7, 2012
    3
    0
    Hello All,

    I would like to switch between two voltage sources, namely +24v and +5v. I have been trying to do with MOSFET. IRF530 and IRF5305, but i always fail. I have been using the following circuit that i found. http://www.electronics-tutorials.ws/transistor/tran_7.html . I will be doing the switching using MICROCONTROLLER.Please advise on this.

    Or, Is there any other better way to do this ?

    Thanks
     
  2. crutschow

    Expert

    Mar 14, 2008
    12,961
    3,216
    What is the load you are trying to switch between two voltage sources?
     
  3. colinb

    Active Member

    Jun 15, 2011
    351
    35
    You'll probably have to use a p channel FET like IRF5305 instead of n-channel but you'll also need a way to let the p-channel FET gate go all the way up to the input voltage while protecting the MCU I/O pin from the high voltage. I would use an NPN transistor to pull the FET gate low and a 100k resistor to pull the FET gate up to the source terminal voltage when the NPN is off. If you need a schematic to clarify, let me know.
     
  4. crutschow

    Expert

    Mar 14, 2008
    12,961
    3,216
    For the 5V switch you will require a "logic-level" type P-MOSFET. Also requires some means to prevent the 24V from feeding backward through the MOSFET's parasitic source-drain diode to the 5V source. That could be either a diode in series with the MOSFET output (giving one diode-drop voltage loss) or two back-to-back MOSFETs (small voltage drop).
     
  5. colinb

    Active Member

    Jun 15, 2011
    351
    35
    Good point about the MOSFET diode path, crutschow.

    Another option, if your current requirements are under about 1 amp, would be to use a PNP transistor for the high side switch instead of a MOSFET. For instance, BC327 PNP (0.8 A max for this one). These don't have the body diode you'd find in a MOSFET.
     
  6. crutschow

    Expert

    Mar 14, 2008
    12,961
    3,216
    The problem is that for reverse (positive) voltage applied to the collector, which forward biases the collector-base junction, the voltage is limited to the breakdown voltage of the base-emitter junction. This is typically is about 5V so it would not block the 24V from that supply.
     
  7. colinb

    Active Member

    Jun 15, 2011
    351
    35
    But if the base of the PNP is floating, would the collector-base voltage be high?

    Consider the following circuit, this is what I have in mind.

    Besides possible blocking voltage limitations, I the BJT solution may have another possible disadvantage compared to a MOSFET, when low-power operation and wide variability in current draw is needed, in that the PNP base current must be set to something fixed regardless of load current, and this is wasted energy, especially if load current is low at times. The MOSFET has a significant advantage in that case.
     
  8. colinb

    Active Member

    Jun 15, 2011
    351
    35
    Here's the BJT circuit I envision.
     
  9. colinb

    Active Member

    Jun 15, 2011
    351
    35
    Can you be more specific about the back-to-back MOSFET configuration? So you would have each supply rail switch consist of two p-channel MOSFETs? I assume the first is connected with source to the 24 V or 5 V supply, and then another FET is connected to that with its drain to the first FET's drain? Both gates connected together?
     
  10. crutschow

    Expert

    Mar 14, 2008
    12,961
    3,216
    Yes. The forward biased base-collection junction would apply about 23.4V to the base when the base is floating. That would put a reverse bias of about 18.3V across the base-emitter junction if the emitter was at 5V. Think of the base-collector junction as a diode with the collector being the anode (for PNP transistor).

    ............................

    You would only need two MOSFETs for the 5V switch since the 24V switch is never reverse biased.

    You have the connection mostly right. The two logic-level P-MOSFETs are connected back-to-back (drain-to-drain or source-to-source). You connect the two gates together with a ≈10kΩ resistor from the gates to the +24V supply. Grounding the gates turns on the 5V and opening the gate (pulled up to +24V) shuts the switch off to current in either direction. This works because MOSFETs can conduct equally well in either direction when ON.
     
  11. Stuntman

    Active Member

    Mar 28, 2011
    181
    47
    Depending on the nature of what you are switching, you may just consider a pair of electromechanical relays and a couple n-fets to turn them on and off with the 24V or 5V rail with your mcu.

    Better yet, depending on your application needs, a single SPDT relay might be just the ticket.
     
  12. colinb

    Active Member

    Jun 15, 2011
    351
    35
    @Stuntman
    True, relays are sometimes a good choice. But only if the current on the switched rail is many amps. Otherwise I can't see relays being cost effective compared to a couple of 12 cent MOSFETs. But as you say, if the poster had given more details about the system, power supply and the load, we could give more appropriate advice.
     
  13. vijithamca

    Thread Starter New Member

    Oct 7, 2012
    3
    0

    Thanks for your reply. Can you please provide me with a circuit on this please. Can IRF5303 be used ? I dont want to use relays at this point. I cannot use transistors as the load will be more than 1 A. Thanks again for your time.

    Thanks
     
  14. crutschow

    Expert

    Mar 14, 2008
    12,961
    3,216
    Below is the circuit.

    The IRF5303 requires 10V to fully turn on so it can be used for the 24V switch but you need a logic-level MOSFET for the 5V switch (Google logic-level MOSFET or go to a supplier such as Digikey and select one with the appropriate current and voltage rating).

    A MOSFET is a transistor (Metal–Oxide–Semiconductor Field-Effect Transistor). BJTs are also available that can carry many amps (the old 2N3055 can carry 15A max. for example).

    MOSFET Dual Switch.gif
     
  15. vijithamca

    Thread Starter New Member

    Oct 7, 2012
    3
    0
    Thanks a lot again. I have one more question, I use a bulky load resistor in my circuit of about 47E 10 watt. Is there a way to replace this resistor by using mosfet. Is yes, please advise. I have heard that mosfet when operated in linear bias region will work as a resistor. Sorry if i am wrong. Thanks
     
  16. crutschow

    Expert

    Mar 14, 2008
    12,961
    3,216
    You can use a MOSFET as a load, but it would need to be on a bulky heat sink to dissipate the power, so you likely won't gain much there. The main reason to use a MOSFET would be if you wanted to vary the load.
     
  17. nadeenman

    New Member

    Feb 25, 2013
    7
    0
    hi...
    if the sources is 12vdc from solar panel and 12vdc from recharger, is there a big changes on mr. crutschow circuit
    [​IMG]
    is there change in resistors value or transistors types?????
    thanks....
     
  18. crutschow

    Expert

    Mar 14, 2008
    12,961
    3,216
    Will the 12Vdc from the recharger always be there?
     
  19. nadeenman

    New Member

    Feb 25, 2013
    7
    0
    mr. crutschow, thank for ur reply...
    I want let 12vdc from solar panel is the main source to provide the load even if the charger is on.
    in the night the solar panel will be off so the load will provide 12vdc from recharger.
    thanks mr.crutschow
     
  20. ScottWang

    Moderator

    Aug 23, 2012
    4,848
    767
    What will happen when two switches are ON?
     
Loading...