I would like to switch the output of a buck-boost converter (input) between a powerbank output (output1) and a charging circuit (output2). The buck-boost voltage output is between 5V and 28V. The maximum current is 5A. As I don't want to use a mechanical relay I want to use MOSFETs to switch between the voltages. Because output1 can still have a voltage attached after switching off (the battery pack) a current backflow should be avoided.

I already saw different approaches to do that but not with voltages higher than a typical Vgs voltage of <20V. I already though about the following circuit:


The problem with this circuit is that I can't pull the gates of the MOSFETs to ground because then in worst case the Vgs could be higher than the maximum of 20V recommended. And if I generate an auxiliary voltage that voltage should also be scaled in relation to the buck-boost output...

The application note AN810 from Vishay (AN810) shows a similar approach with a different gate driving circuit: enter image description here (I think the connection shorting the middle MOSFET should be a mistake of them)

I don't fully understand this circuit I have to admit (and the description in the AN is not very detailed).

Is there a circuit (maybe similar to the Vishay AN) where I can switch a power source to two different loads containing a backflow protection?


After some research about SSRs (solid state relais) the following idea got into my mind: I limit the gate-source voltage using a Zener diode. The schematic below shows my approach for the new design using a Zener diode (15V Zener voltage):

enter image description here

When the input voltage from the buck-boost regulator (single line on the very left of the schematic) is below 15V, the IRLML0030 (N channel) can switch the MOSFETs on as normally, but when the input voltage (and therefore the Vgs voltage) is above 15V the Zener diode limits Vgs to ~15V, the rest of the voltage drops at the 1k resistor and the MOSFETs can also be switched as expected without risking a voltage breakdown.

The only remaining problem is that I don't know how the floating source of the right power MOSFETs behaves. Do I need a resistor parallel to S-D to define the S potential properly? Using a simple online simulator (link to circuit) shows that the circuit should work.


As @Jonathan S. suggested I will use a photovoltaic coupler as the diodes as backflow protection would in total burn about 4W in worst case. I could also use an isolated buck converter to power the gate and use the source as GND of the converter. But then I would also need one for each switch, which would make it more espensive and complicated. So, my current circuit I am using is the following:

enter image description here

  • 1
    \$\begingroup\$ Sounds like you want to connect different outputs together. I suggest you check what you've written and make it more clear. \$\endgroup\$
    – Finbarr
    Commented Dec 27, 2022 at 18:07
  • \$\begingroup\$ Try looking up power path controllers. Link: analog.com/en/technical-articles/…. Your bottom circuit is fundamentally wrong by the way. Also look up solid state relays and opto-photo-voltaic isolators. \$\endgroup\$
    – Andy aka
    Commented Dec 27, 2022 at 20:22
  • \$\begingroup\$ (The labels look reversed.) \$\endgroup\$
    – greybeard
    Commented Dec 29, 2022 at 11:43
  • \$\begingroup\$ Have you considered a photovoltaic optocoupler? electronics.stackexchange.com/questions/647725/… \$\endgroup\$ Commented Dec 29, 2022 at 13:58
  • \$\begingroup\$ @JonathanS. yes, but they are quite expensive and I would like to avoid them, is that possible? \$\endgroup\$
    – Florian
    Commented Dec 29, 2022 at 14:38

1 Answer 1


The circuit that you've shown (two back-to-back P-MOSFETs with their drains connected) doesn't provide backflow protection, and it'll also fail as soon as the buck-boost output voltage is greater than 20V.

Failure mode: Let's assume the boost converter outputs 28V and OUT1 is at 0V. The 33k resistor to the left will pull the P-MOSFET gates to 28V and turn them off. However, the source of the right P-MOSFET is connected to OUT1, which is 0V, so now you have 28V between gate and source, which exceeds the maximum ratings and destroys the MOSFET.

Backflow: Let's assume the boost converter outputs 5V and OUT1 is at 20V. The 33k resistor to the left will pull the P-MOSFET gates to 5V. However, the right P-MOSFET's source is connected to 20V, so it now has -15V between gate and source, turning it on. A current can now flow from OUT1 through the right MOSFET (which is turned on) and then through the left MOSFET's body diode back into the boost converter. This is the backflow that you wanted to avoid. The circuit just acts as a diode when it's "off" and permits any backflow; exactly opposite to what you wanted.

If you can tolerate a bit of voltage drop, a P-MOSFET and a diode can do what you want:


simulate this circuit – Schematic created using CircuitLab

The FERD20U50 will drop approximately 300mV at 5A. (Maybe just trim the buck-boost converter's output a bit higher to compensate?)

If you can't tolerate the voltage drop of a series diode, the only feasible way that I can see is to use back-to-back N-MOSFETs together with a photovoltaic optocoupler (i.e. Toshiba TLP3906 for about $1 a piece at the time of writing this answer). Note that you'll have to connect the MOSFETs source-to-source, not drain-to-drain, of course. You'll also need a separate optocoupler for each output.

The circuit by Vishay is not suitable for situations where the input our output voltages (or the difference between input and output) can exceed the maximum gate-source voltage of any of the MOSFETs.

Also, in general, any circuit that contains two MOSFETs connected drain-to-drain and gate-to-gate will fail whenever the voltage between the two source terminals exceeds the maximum gate-to-source voltage, as is the case in your circuit (up to 28V between the sources). That's because when you want to turn them off, you have to pull their Vgs to zero; however, when one of them has a Vgs of zero, the other one will have a negative Vgs equal to the full source-to-source voltage, at which point it'll get destroyed.

  • \$\begingroup\$ Thanks for the detailed answer! I see without reverse polarity protection it would be a more easy task and a diode would also simplify the task... I tried different schematics and approaches but the photovoltaic optocoupler looks like the best solution for this task... Will the photovoltaic optocoupler (e.g. the one you mentioned) provide enough current for a reliable and fast switching of the MOSFET? \$\endgroup\$
    – Florian
    Commented Dec 29, 2022 at 17:52
  • \$\begingroup\$ Reliable, yes. Fast... not so much. The TLP3906 will need about 10ms to turn the MOSFET fully on (30µA drive current). If you need faster switching, things get a bit more complicated. \$\endgroup\$ Commented Dec 29, 2022 at 17:59
  • \$\begingroup\$ Ok, thanks for the info, I already thought that it wouldn't be that fast. But yes, for my application it's fast enough and therefore I will use the solution you suggested! Alternatively I could use an isolated buck converter but I would need one for each switch which would make the whole circuit more expensive and complicated... \$\endgroup\$
    – Florian
    Commented Dec 30, 2022 at 11:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.