What is a MOSFET? An electronic switch controlled by voltage rather than current
Atlasbot · 20/8/2026 · 10 min read
Transistor BJT (previous article) needs a constant current at the Base pin to maintain a conducting state — with large current loads, the required Base current also increases, causing waste and heating of control components. MOSFET solves this problem by controlling with voltage instead of continuous current — this is why MOSFETs have almost completely replaced BJTs in modern motor driver circuits.
Three pins of MOSFET
- Gate (G) — control pin, receives voltage (not continuous current) to turn MOSFET on/off.
- Drain (D) — usually connected to the load side.
- Source (S) — usually connected to GND (with N-channel type, most common in control circuits from MCU).
Like BJT with NPN/PNP, MOSFET has N-channel (conducts when Gate voltage is higher than Source) and P-channel (vice versa) — N-channel is much more common in low-side switching control circuits.
Core difference compared to BJT: voltage control
The Gate pin of the MOSFET is essentially insulated from the main current conductor (Drain-Source) by a very thin oxide layer — so it is in a static state (stable turned on or off), almost No current flows into the Gate, unlike BJT which always needs a continuous Base current to maintain conduction state. The MOSFET only needs a small instantaneous current pulse to charge/discharge the gate's parasitic capacitance each time status change (on ↔ off).
In summary: BJT needs continuous Base current to maintain conduction; MOSFETs only need a high enough Gate voltage, consuming almost no current in the quiescent state — much more efficient for high-current applications such as motor drivers.
Logic-level MOSFET — the most overlooked detail
Many common power MOSFETs require a fairly high Gate-Source voltage (Vgs) (usually around 10V) to fully conduct (conducting resistance Rds(on) reaches the lowest level) — but the microcontroller's GPIO can only output 3.3V or 5V. Using a regular MOSFET with a direct GPIO causes the MOSFET to only conduct partly, causing a much higher conduction resistance than designed, generating unusually much heat even though the circuit "seems to work".
Logic-level MOSFET is a type specifically designed to conduct well even at low Gate voltage (2.5V-4.5V) — this is the type must choose when controlling directly from 3.3V/5V GPIO without going through an intermediate Gate amplifier circuit.
Technical details
Formulas
When the MOSFET is fully conductive (saturated), it no longer acts as an ideal switch (resistance 0Ω) but still has a small conduction resistance Rds(on) — the power dissipated (turned into heat) on the MOSFET is calculated according to:
P = I² × Rds(on)
For example: MOSFET has Rds(on) = 10mΩ (0.01Ω), load current through it is 5A
P = 5² × 0.01 = 0.25W
0.25W is quite a small heat dissipation (compared to a BJT at the same load current) — this is why MOSFETs are significantly more efficient than BJTs when driving large currents, and why the lower the Rds(on) the better when choosing a MOSFET for a high-power motor driver.
Parameters
Gate voltage threshold required for the MOSFET to conduct (Vgs threshold) and typical conduction resistance:
| MOSFET type | Vgs(th) is needed for good conductivity | Typical Rds(on). |
|---|---|---|
| Regular MOSFET | ~10V | Several tens - hundreds of mΩ |
| Logic-level MOSFET | 2.5 – 4.5V | A few – a few tens of mΩ |
Practical applications
MOSFET (logic-level type) is the core component inside most modern DC motor drivers used for 2-wheel/4-wheel robots (Diff Robot, Mecanum Robot) - MCU outputs PWM signals directly into the Gate to both turn on/off and adjust motor speed through the duty cycle, taking advantage of the advantage of "almost no control current in static state" mentioned above. This is also the reason why commercial motor driver modules (eg, IC-based like DRV8871) all use MOSFETs instead of BJTs at the final power stage.
Practical example: N-channel MOSFET circuit controlling DC motor
GPIO ──[ Gate resistor, eg 100-220Ω ]── Gate (MOSFET N-channel, logic-level)
VCC (motor source) ── DC motor ── Drain
Source ── GND
+ Pull-down resistor (eg 10kΩ) between Gate and GND
+ Protection diode in parallel with the motor (see Diode article)
digitalWrite(MOSFET_GATE_PIN, HIGH); // Gate has enough voltage → MOSFET conducts → motor runs
digitalWrite(MOSFET_GATE_PIN, LOW); // Gate reaches 0V → MOSFET turns off → motor stops
The pull-down resistor between Gate and GND ensures that the MOSFET turns off firmly when the GPIO pin is in an unknown state (eg when the MCU has just started, before the code can set the pin) — without this resistor, the "floating" Gate can cause the MOSFET to turn on randomly due to noise, an error that is difficult to detect and dangerous when the load is a motor.
Common mistakes
- Use regular MOSFET (not logic-level) with 3.3V/5V GPIO — MOSFET does not conduct completely, radiates unusually much heat even though the circuit "works" — always check the Vgs(th) parameter and Rds(on) curve according to Vgs in the datasheet before choosing a MOSFET for direct control from the MCU.
- Forget the pull-down resistor at the Gate — A floating gate can cause the MOSFET to turn on randomly, especially dangerous when the load is a motor (running suddenly and unexpectedly).
- Forget the protection diode when controlling a coil load — exactly like the note mentioned in the Diode and Transistor article, the motor/relay creates a reverse voltage pulse when the current is interrupted which can destroy the MOSFET if there is no protection diode.
- Mistaken Drain and Source when soldering a circuit — although electrically it can work similarly in some simple cases, connecting the Drain/Source in the wrong direction can cause the parasitic diode inside the MOSFET (body diode) to conduct in the wrong direction, causing unstable operation or component damage.
Conclusion
MOSFETs are a more efficient choice than BJTs for most high-current load control applications such as motors, thanks to voltage control instead of needing continuous current — but the correct logic-level type is required when driving directly from the 3.3V/5V GPIO. The next article in the category is about Relay — a mechanical switching solution, sometimes simpler and safer than MOSFET/transistor for high voltage or AC loads.
Get new articles and lessons by email
When a new technical article or course module is published, Atlas Robotics sends you a short email. No spam.
Unsubscribe any time with the link in each email. See our Privacy policy.