12
\$\begingroup\$

In the picture shown, can "Output" be controlled to be 0V or 12V based on "Control"?

Will be Drain and Source the way it is connected be a problem?

P-Channel MOSFET as Switch

\$\endgroup\$
22
\$\begingroup\$

The transistor shown is a P-channel MOSFET acting as a "high-side switch". More commonly, an N-channel MOSFET low-side switch is used, but what you have will work as long once you add something to the drain such as in this image of P-Channel MOSFET switch from http://www.electronics-tutorials.ws/transistor/tran_7.html:

P-Fet Switch

When the control goes "HI" the MOSFET switch is "OFF." When the control goes "LO" the MOSFET acts as a switch, essentially shorting the drain and source. While this is not entirely true, it is a close approximation as long as the transistor is fully saturated. So the schematic you have shown can be used to switch 12V to something, but it will not connect the output to 0V unless a pull down resistor is used as shown in the above image.

The opposite control scenario works for an N-channel MOSFET: LO control turns the switch off, HI control turns the switch ON. However, an N-channel is more suited to be a "LO-side switch" connecting the output to ground instead of VDD as in this image of an N-Channel MOSFET switch:

N-FET switch

IMPORTANT NOTE: The red line from input to ground is simply a depiction of the input being shorted to ground to give a 0V input. This would not be included in any physical circuit construction because it would short the input signal to ground, which is a bad idea.

The actual voltage level that determines if the FET is on or off is known as the gate threshold voltage. So called "logic level gates" work at lower voltages common in digital circuits such as 1.8V, 3.3V, or 5V. Although, crossing this threshold does not entirely turn the switch on or off, it merely allows the FET to start or stop conducting. The FET should be full saturated with the values noted in the datasheet to full turn ON or OFF.

I should also add that it is pretty common practice to include a pull up resistor (10k or so) at the gate of the P-Channel MOSFET to keep it OFF in unknown states. Similarily, a pull down resistor is used at the gate of the N-Channel MOSFET to keep it OFF in unknown states.

\$\endgroup\$
  • \$\begingroup\$ @ Jon Watte, I am really puzzled by what you are saying... My first circuit is a P-FET, the second is an N-FET. The transistor in the OP is a P-FET, that is why I should the P-channel MOSFET first. I will edit my answer to make that more clear. \$\endgroup\$ – Kurt E. Clothier Apr 27 '13 at 1:46
  • \$\begingroup\$ Realizing he's wrong, Jon Watte then submits a nearly identical answer: P channel high side switch. :) \$\endgroup\$ – Kaz Apr 27 '13 at 1:47
  • \$\begingroup\$ @Kaz, yeah, I just noticed that... \$\endgroup\$ – Kurt E. Clothier Apr 27 '13 at 1:48
  • \$\begingroup\$ There is that alternative symbol for the MOSFET where the arrow goes opposite. Confusing. \$\endgroup\$ – Kaz Apr 27 '13 at 1:51
  • 1
    \$\begingroup\$ In your second schematic, Vin creates a short-circuit with Gnd. You should put a pull down resistor there. \$\endgroup\$ – Sparky Aug 21 '16 at 18:00
6
\$\begingroup\$

You are using a P-channel MOSFET as a high side switch. That's fine. The direction you have it wired in is fine.

As long as "Control" is 12V or higher, the switch will be "off." If it drops below 10V or so, the MOSFET will start conducting (exactly how much it needs to drop depends on the Vgs-threshold of the device.)

Typically, to use a logic-level control (0-5V or 0-3.3V) you will use a pull-up resistor from gate to source (say, 1 kOhm or so) and a small-signal N-channel MOSFET between the gate and ground. When the signal goes into the gate of the smaller N-channel MOSFET, it will open, and pull the gate of the P-channel to ground, and thus the P-channel will start conducting in the blocked direction. (It always conducts the other direction, so don't switch the terminals!)

Once the gate of the small-signal N-channel goes to ground again, it will stop conducting; input voltage will pull the gate of the P-channel MOSFET up, and the P-channel will stop conducting.

Somebody asked for a schematic for the circuit for controlling this P-channel MOSFET with logic-level inputs, so I edited to add this:

schematic

simulate this circuit – Schematic created using CircuitLab

I couldn't figure out how to change the names of the components -- you typically want a signal transistor like a BS170 for the bottom N-channel switcher. You can also tune the resistors for your preferred trade-off of current consumption vs fast switching (the current values are fairly aggressive for fast switching; 10 kOhm will often work fine) The ability of the output to be driven to 0V depends on the load. If the load will by itself pull the output down to 0V, then yes, this will be able to switch the output between 0V and 12V. If the load is purely capacitive, then you will need a pull-down resistor between output and ground, like Kurt shows.

An N-channel MOSFET, as Kurt suggests, only works if it's either on the low end, or if you use a bootstrap/charge-pump circuit to boost the voltage into the gate above the 12V source voltage. N-channel as "high side switch" is only used if you make lots of your circuit (so the cost of P-channel matters) or the circuit is very sensitive to losses (so the lower Rdson of N-channels matters.)

\$\endgroup\$
  • \$\begingroup\$ You obviously read my answer wrong, hence your continued edits and removal of comments from my answer. This answer is just a rewording of mine. \$\endgroup\$ – Kurt E. Clothier Apr 27 '13 at 1:48
  • 1
    \$\begingroup\$ I actually read the initial diagram wrong, and when rereading after posting, removed my erroneous comment and updated my answer to be right. Your answer did not talk about charge pumps for the n channel driver. I disagree that n channel high side switches are "more common" on the high side on this context. Your answer also doesn't talk about controlling the high side switch with logic level. \$\endgroup\$ – Jon Watte Apr 27 '13 at 4:27
  • \$\begingroup\$ True. I didn't mean that N-Channels are common on the high side, just that they are more common in general. i will reword it to take care of that. \$\endgroup\$ – Kurt E. Clothier Apr 27 '13 at 4:34
  • \$\begingroup\$ +1 Although a schematic or two might be nice... lots of netlisting going on in the text ;-) \$\endgroup\$ – DrFriedParts Apr 27 '13 at 4:37
1
\$\begingroup\$

In the picture shown, can "Output" be controlled to be 0V or 12V based on "Control"?

Yes, this will produce 12V when the control line is "low" and if you had a resistor to 0V from the drain, the output would be 0V when the control line is high (12V).

The control line needs to have, as a minimum 12V to turn the FET off (thus letting the resistor to ground pull the output to 0V), and somewhere between 11V and 6V (typical values and dependent on the FET) to turn the FET on.

Will be Drain and Source the way it is connected be a problem?

No this won't be a problem

\$\endgroup\$
  • \$\begingroup\$ If I do not have a resistor to ground, Output will be left floating when Control line is 12V right? \$\endgroup\$ – user1406716 Apr 29 '13 at 7:16
  • \$\begingroup\$ @user1406716 Correct \$\endgroup\$ – Andy aka Apr 29 '13 at 9:22

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