MOSFET Switching – Can a MOSFET Switch Between Two Supply Voltages?

bjtbody-diodediodesmicrocontrollermosfet

My goal is to programmatically switch between supply voltages (3.3V and ~2.6V) for a load. The 2.6V level doesn't need to be exact, +/- 0.2V is OK.

I created the following circuit, which uses my MCU's GPIO to control an NPN BJT / P-channel MOSFET pair that drives a load (tens of milliamps). The parallel diode drops the voltage down to ~2.6V by default. When the MOSFET is on, it conducts between source and drain and essentially sets the supply voltage to 3.3V.

Are there any red flags in this circuit or any other minor issues I may have overlooked?

Schematic 1

Additionally, if the first circuit works, could I remove the the parallel diode and use the body diode of the MOSFET instead? This would involve letting current flow from drain to source when the MOSFET is on though so I'm not sure.

Schematic 2

Best Answer

As DKNguyen points out, your second circuit will not work, because you are operating the P-channel MOSFET as a source follower. In this configuration its source potential is always lower than its gate by an amount approximately equal to its gate-source threshold voltage (\$ V_{GS(TH)} \$).

Your original (top) design will work quite well, for low load currents. Your claim that the MOSFET will effectively short-circuit the diode is correct. However, the bipolar junction transistor's base cannot exceed 0.7V, so you must protect it from the GPIO's higher potential, and limit current there with another resistor:

schematic

simulate this circuit – Schematic created using CircuitLab

enter image description here

Be aware that Q1's \$ V_{GS(TH)} \$ is critical here. You must use a MOSFET with \$ V_{GS(TH)} \$ lower than 3.3V. As current through the load increases, so does the gate-source potential difference required to support that current. Also, Q2's saturation \$ V_{CE} \$ could be as high as 0.2V, somewhat limiting the best \$ V_{GS}\$ you can achieve. All things considered, \$ V_{GS(TH)} \$ will have to be significantly lower than 3.3V.

Also, please label the components in your schematics properly, it makes answering the question so much easier.