# 🎛️ BJT and MOSFET Switching Basics

## Learning Objectives

By the end of this lesson you should be able to:

- Name the three operating regions of a BJT and of a MOSFET, and state the terminal-voltage conditions that define each one.
- Apply the saturated-switch design routine: compute load current, size the base resistor, then verify with a consistency check.
- Decide when a MOSFET is fully enhanced and why insufficient gate drive causes overheating.
- Compare BJT and MOSFET switches on drive current, on-state voltage drop, and power loss.

## Quick Review

Last lesson you built a routine you will reuse today: replace the device with a model, test the bias, solve with KVL, and confirm the answer is consistent with the model you assumed. For a forward-biased silicon junction that model is a fixed {{c1::0.7 V}} drop. Keep the routine. Only the device changes.

## Theory

### The BJT as a switch

An NPN transistor has three terminals (base, collector, emitter) and two junctions. The base-emitter junction behaves like a diode: below roughly 0.7 V it does nothing, above it conducts. That single fact drives everything.

Three regions matter:

| Region | Condition | Behaviour |
| --- | --- | --- |
| Cutoff | $V_{BE} < 0.7\ \text{V}$ | No collector current. Switch OFF. |
| Active | $V_{BE} \approx 0.7\ \text{V}$, $V_{CE} > 0.3\ \text{V}$ | $I_C = \beta I_B$. Used for amplifiers. |
| Saturation | $V_{BE} \approx 0.7\ \text{V}$, $V_{CE} \approx 0.2\ \text{V}$ | Fully ON, current set by the load. |

The active-region relation is $I_C = \beta I_B$, and therefore $I_E = (\beta+1) I_B$. In saturation that relation no longer holds: the load sets the current, and the transistor simply looks like a small voltage source of about $V_{CE(sat)} = 0.2\ \text{V}$.

> [!WARNING]
> The word "saturation" is a trap. In switching it means fully ON. In amplifier design it also means the transistor is pinned against the rail and clipped. Always read it from context: today, saturation = switch closed.

To switch a load, put the load in the collector path and drive the base through a resistor. The load current when ON is

$$
I_{C(sat)} = \frac{V_{CC} - V_{CE(sat)}}{R_C}
$$

You need $I_B \geq I_{C(sat)}/\beta$. In practice you supply 3 to 10 times that, called the **overdrive factor**, because $\beta$ varies wildly between parts and with temperature, and because a deeply saturated transistor drops less voltage and runs cooler.

### The MOSFET as a switch

The MOSFET is voltage controlled. The gate is separated from the channel by an oxide, so the gate draws essentially no DC current, only a brief charging current each time it switches.

- **Cutoff**: $V_{GS} < V_{TH}$. OFF.
- **Triode (ohmic)**: $V_{GS} > V_{TH}$ and $V_{DS} < V_{GS} - V_{TH}$. Behaves like a resistor $R_{DS(on)}$. This is the ON state for switching.
- **Saturation**: $V_{GS} > V_{TH}$ and $V_{DS} \geq V_{GS} - V_{TH}$. Current is roughly constant. This is the amplifier region.

For switching you want the triode region, which means driving the gate well above $V_{TH}$, typically 4 to 10 V above. On-state drop is $I_D R_{DS(on)}$, often only tens of millivolts.

### Side-by-side

| Item | BJT (NPN) | N-MOSFET |
| --- | --- | --- |
| Controlled by | Base current $I_B$ | Gate-source voltage $V_{GS}$ |
| ON condition | $V_{BE} \approx 0.7\ \text{V}$, saturated | $V_{GS}$ well above $V_{TH}$ |
| ON-state drop | $V_{CE(sat)} \approx 0.2\ \text{V}$ | $I_D \times R_{DS(on)}$ |
| Drive current | Milliamps, continuous | Nanoamps, plus gate charge spikes |
| OFF condition | $V_{BE} < 0.7\ \text{V}$ | $V_{GS} < V_{TH}$ |

## Worked Examples

### Example 1: Sizing the base resistor for an NPN switch

A relay coil of $R_C = 120\ \Omega$ sits between $+12\ \text{V}$ and the collector. A 3.3 V logic output drives the base. Given $\beta_{min} = 100$, $V_{BE} = 0.7\ \text{V}$, $V_{CE(sat)} = 0.2\ \text{V}$. Design $R_B$ with an overdrive factor of 5.

```steps
1. Load current when ON: $I_{C(sat)} = (12 - 0.2)/120 = 98.3\ \text{mA}$
2. Minimum base current: $I_B = 98.3/100 = 0.983\ \text{mA}$
3. Apply overdrive: $I_B = 5 \times 0.983 = 4.92\ \text{mA}$
4. Resistor value: $R_B = (3.3 - 0.7)/4.92\ \text{mA} = 528\ \Omega$, pick the standard 470 Ω
5. Verify: $I_B = 2.6/470 = 5.53\ \text{mA}$, and $\beta I_B = 553\ \text{mA}$ which is far above 98.3 mA, so the transistor is firmly saturated
6. Transistor dissipation: $P = 0.2 \times 98.3\ \text{mA} = 19.7\ \text{mW}$
```

### Example 2: A MOSFET that looks fine but is not

An N-MOSFET with $V_{TH} = 2\ \text{V}$ and $R_{DS(on)} = 50\ \text{m}\Omega$ at $V_{GS} = 10\ \text{V}$ drives a 12 V, 2 A load from a 3.3 V logic pin.

$V_{GS} = 3.3\ \text{V}$ clears $V_{TH}$ by only 1.3 V, so the channel is weakly formed. The resistor is not 50 mΩ here, it might be several tenths of an ohm. At a quarter ohm the dissipation is $I^2R = 4 \times 0.25 = 1\ \text{W}$ in a part sized for 0.2 W. Two fixes: choose a **logic-level** MOSFET whose $R_{DS(on)}$ is specified at 3.3 V, or add a gate driver that pulls the gate to 10 V. With proper drive the loss is $4 \times 0.05 = 0.2\ \text{W}$.

## Guided Practice

Work each one on paper before opening the answer.

**Exercise 1: Classify the region.** An NPN transistor with $V_{BE} = 0.68\ \text{V}$ measures (a) $V_{CE} = 0.15\ \text{V}$, (b) $V_{CE} = 6\ \text{V}$, (c) $V_{BE} = 0.4\ \text{V}$.

<details><summary>Click to reveal answer</summary>

(a) Saturation: base-emitter forward biased and collector pinned low. (b) Active: forward biased base-emitter with a large collector-emitter voltage, current set by $\beta I_B$. (c) Cutoff: base-emitter not conducting.

</details>

**Exercise 2: Design $R_B$.** A 5 V logic output drives an NPN switch with a $470\ \Omega$ collector resistor from $+5\ \text{V}$. $\beta_{min} = 50$, $V_{CE(sat)} = 0.2\ \text{V}$, $V_{BE} = 0.7\ \text{V}$. Target an overdrive factor of 10.

<details><summary>Click to reveal answer</summary>

$I_{C(sat)} = (5 - 0.2)/470 = 10.2\ \text{mA}$. Minimum base current is $10.2/50 = 0.204\ \text{mA}$; with overdrive, $2.04\ \text{mA}$. Then $R_B = (5 - 0.7)/2.04\ \text{mA} = 2.1\ \text{k}\Omega$. Sanity check: with 2 kΩ you get 2.15 mA and $\beta I_B = 107\ \text{mA} > 10.2\ \text{mA}$, saturated.

</details>

**Exercise 3: MOSFET regions.** $V_{TH} = 1.5\ \text{V}$. Find the region for (a) $V_{GS} = 0.8\ \text{V}$, $V_{DS} = 5\ \text{V}$; (b) $V_{GS} = 10\ \text{V}$, $V_{DS} = 0.1\ \text{V}$; (c) $V_{GS} = 4\ \text{V}$, $V_{DS} = 6\ \text{V}$.

<details><summary>Click to reveal answer</summary>

(a) Cutoff, gate below threshold. (b) Triode, since $V_{DS} = 0.1 < V_{GS} - V_{TH} = 8.5\ \text{V}$; this is the switching state. (c) Saturation, since $V_{DS} = 6 \geq 4 - 1.5 = 2.5\ \text{V}$.

</details>

**Exercise 4: Compare losses.** Both switches carry 3 A. The BJT has $V_{CE(sat)} = 0.25\ \text{V}$ and requires 30 mA of base drive. The MOSFET has $R_{DS(on)} = 20\ \text{m}\Omega$. Which runs cooler, and what is the catch?

<details><summary>Click to reveal answer</summary>

BJT: $P = 0.25 \times 3 = 0.75\ \text{W}$. MOSFET: $P = 9 \times 0.02 = 0.18\ \text{W}$. The MOSFET runs cooler, but only if the gate is driven properly; gate charge must be supplied at every switching edge, so high switching frequency needs a real driver.

</details>

## Expert Corner

- Always include the 0.7 V base-emitter drop when computing $R_B$. Forgetting it is the single most common exam error.
- Compute $I_{C(sat)}$ from the load first, never from $\beta I_B$. $\beta$ sets the base requirement, the load sets the collector current.
- Do not leave a MOSFET gate floating. Add a pull-down resistor so the switch is OFF when the driver is unpowered.
- A small series gate resistor (10 to 100 Ω) tames ringing without slowing switching much.
- Switching an inductive load (relay, motor, solenoid) needs a freewheeling diode across the coil, otherwise the turn-off voltage spike destroys the transistor.
- Rule of thumb: under about 1 A and low frequency, a BJT is simple and cheap. Above a few amps or at high frequency, the MOSFET wins on loss.

## Summary and Next Steps

Two devices, one idea: a transistor is a controlled switch, and the exam question is always "which region, and is my assumption consistent?" For the BJT you check $V_{BE}$ against 0.7 V and confirm saturation with $V_{CE} \approx 0.2\ \text{V}$ and an overdrive check on $I_B$. For the MOSFET you check $V_{GS}$ against $V_{TH}$ and confirm the triode region with $V_{DS} < V_{GS} - V_{TH}$, then compute loss as $I^2 R_{DS(on)}$.

Next lesson moves from switching to signal processing: the op-amp golden rules, where the same assumption-and-verify habit reappears as the virtual short.

```flashcard
[
  { "front": "BJT condition for cutoff", "back": "V_BE below about 0.7 V, so no collector current flows." },
  { "front": "BJT condition for saturation", "back": "V_BE about 0.7 V and V_CE pinned near 0.2 V, with I_B above the minimum needed." },
  { "front": "Load current of a saturated NPN switch", "back": "I_C(sat) = (V_CC - V_CE(sat)) / R_C" },
  { "front": "Relation between collector and base current in the active region", "back": "I_C = beta times I_B, and I_E = (beta + 1) times I_B." },
  { "front": "Why use an overdrive factor of 3 to 10", "back": "beta varies widely between parts and with temperature, so extra base current guarantees deep saturation." },
  { "front": "Base resistor formula for a BJT switch", "back": "R_B = (V_drive - V_BE) / I_B, using the overdriven base current." },
  { "front": "MOSFET condition for cutoff", "back": "V_GS below the threshold voltage V_TH." },
  { "front": "MOSFET condition for the triode region", "back": "V_GS above V_TH and V_DS less than V_GS - V_TH; the device acts like R_DS(on)." },
  { "front": "MOSFET condition for the saturation region", "back": "V_GS above V_TH and V_DS at least V_GS - V_TH; drain current is nearly constant." },
  { "front": "DC current drawn by a MOSFET gate", "back": "Essentially none, only gate charge supplied at each switching transition." },
  { "front": "On-state power loss of a MOSFET switch", "back": "P = I_D squared times R_DS(on)." },
  { "front": "Why a logic-level MOSFET matters", "back": "Its R_DS(on) is specified at low gate voltages, so 3.3 V logic fully enhances it." },
  { "front": "Protection needed for an inductive load switch", "back": "A freewheeling diode across the coil to clamp the turn-off voltage spike." }
]
```
