A MOSFET (Metal-Oxide-Semiconductor Field-Effect Transistor) is a voltage-controlled semiconductor switch or amplifier in which a gate voltage modulates current flow between drain and source through a channel beneath a thin oxide layer. In embedded systems, MOSFETs are most commonly used as power switches to drive loads such as motors, solenoids, LEDs, and DC-DC converter stages.
In practice
In embedded designs, an N-channel MOSFET is the most common choice for low-side switching: the source is tied to ground, the load sits between the drain and supply, and the MCU drives the gate high to turn the device on. P-channel MOSFETs are used for high-side switching when circuit simplicity is a priority, though the choice also depends on current, voltage, available gate swing, and thermal limits. They turn on with a gate voltage below the source, which is naturally available from the supply rail without a boost circuit. The blog post "Which MOSFET topology?" covers the trade-offs between these and other configurations in more detail.
A key parameter from the datasheet is R_DS(on), the drain-to-source on-resistance, which determines conduction losses (P = I² × R_DS(on)). Gate threshold voltage (V_GS(th)) is equally important: many logic-level MOSFETs are specified to be fully enhanced at V_GS = 4.5 V or 10 V, so a 3.3 V MCU GPIO may not drive a standard MOSFET into full enhancement without a dedicated gate driver or a MOSFET rated for 3.3 V drive. "How to Read a Power MOSFET Datasheet" goes into the relevant parameters in depth.
Switching losses depend on gate charge (Q_g) and transition times, not just R_DS(on). At high switching frequencies (for example, in a PWM motor driver or SMPS), a gate driver IC is often needed to source and sink the gate charge quickly enough to minimize the time the MOSFET spends in the linear region; the specific frequency threshold depends on gate charge, supply voltage, and acceptable switching losses. Parasitic inductance in the source pin or PCB layout can cause gate ringing and shoot-through; the blog post "Turn It On Again: Modeling Power MOSFET Turn-On Dependence on Source Inductance" addresses this effect specifically.
Body diode behavior matters in applications such as synchronous rectification or H-bridge motor drives. Every MOSFET contains an intrinsic body diode formed by its structure; in an N-channel device, this diode conducts in the drain-to-source direction (anode at source, cathode at drain) when V_DS goes negative, such as during dead-time intervals when inductive current must continue to flow. This diode is often slower and lossier than a Schottky, though the degree varies by device, so dead-time should be tuned carefully in H-bridge designs to avoid excessive dissipation.
Discussed on EmbeddedRelated
Frequently asked
Can I drive a MOSFET gate directly from an MCU GPIO pin?
Sometimes. A 5 V
GPIO can often drive a logic-level N-channel MOSFET (specified at V_GS = 4.5 V) for low-frequency, low-current loads. A 3.3 V GPIO is marginal even for logic-level parts, since V_GS(th) minimums often reach 1-2 V but full enhancement is only guaranteed at 4.5 V or 10 V. For any switching frequency above a few kilohertz, or for loads over a few amps, a dedicated gate driver is strongly recommended to charge and discharge gate capacitance quickly and avoid excessive switching losses.
What is the difference between a logic-level MOSFET and a standard MOSFET?
A logic-level MOSFET is characterized and guaranteed to reach its rated R_DS(on) at a lower V_GS, typically 4.5 V, rather than the 10 V used for standard devices. Some parts are specified at both. This makes them more compatible with 5 V logic. At 3.3 V, even logic-level MOSFETs are often only partially enhanced; always check the R_DS(on) vs. V_GS curve in the datasheet rather than relying solely on the headline R_DS(on) figure.
Why does my MOSFET get hot even though R_DS(on) is very low?
Two common causes: switching losses and inadequate gate drive. Every time the MOSFET transitions between on and off, it passes through the linear region and dissipates energy proportional to switching frequency, drain voltage, drain current, and transition time. If gate charge is not delivered quickly, transition times lengthen and switching losses dominate. Also verify that V_GS during conduction is well above threshold so R_DS(on) is at its datasheet minimum.
What is the body diode and when does it matter in embedded designs?
The body
diode is an intrinsic p-n junction formed by the MOSFET structure; in an N-channel device it conducts from drain to source (anode at source, cathode at drain) when V_DS goes negative. It becomes relevant in H-bridge motor drivers during dead-time (when both switches are briefly off and inductive current must continue to flow), and in synchronous buck converters. The body diode is typically slow (reverse recovery time t_rr can be hundreds of nanoseconds) and lossier than a
Schottky, though this varies by device, so dead-time should be minimized, and external Schottky diodes are sometimes added in parallel.
How do I choose between an N-channel and P-channel MOSFET for a high-side switch?
N-channel devices generally have lower R_DS(on) for a given die size and are preferred for efficiency, but driving an N-channel MOSFET on the high side requires V_GS referenced above the source (which floats at the load supply voltage), so a bootstrap circuit, charge pump, or isolated gate driver is needed. P-channel MOSFETs on the high side are simpler to drive since the gate just needs to be pulled below the source (supply rail), but they have higher R_DS(on) for equivalent die size and cost. For low switching frequencies and modest currents, the P-channel simplicity often wins; for high-frequency or high-efficiency designs, the N-channel with a gate driver is the typical choice. The blog post 'Byte and Switch (Part 1)' covers practical high-side and low-side switching considerations.
Differentiators vs similar concepts
MOSFETs are often compared to BJTs (Bipolar Junction Transistors). The key practical difference is that a MOSFET is voltage-controlled at its gate (drawing only displacement current during switching, not sustained base current), while a
BJT is current-controlled at its base and requires continuous base current to stay saturated. This makes MOSFETs easier to drive from
MCU logic in most switching applications. However, BJTs can be cheaper in very small signal or low-voltage contexts, and IGBTs (Insulated Gate Bipolar Transistors) are preferred over MOSFETs at high voltages (typically above 400-600 V) and high currents where the MOSFET's on-resistance grows steeply with voltage rating.