skill
MOSFET switching
A switch turned on by voltage alone, so the thing controlling it spends no current.
first shows up at Level 5 · Control
A bipolar transistor (the 2N2222) is a current-controlled switch: to pass 11 mA through the collector you must push a fraction of a milliamp into the base, and whatever drives the base has to supply it. A MOSFET is a voltage-controlled switch. Its control leg, the gate, is insulated from the rest of the part by a layer of oxide a few nanometres thick, so no current flows into it. You switch it by raising the gate's voltage, nothing more.
The three legs
- Gate (G) — the control. Voltage here opens or closes the channel.
- Drain (D) — where the load current comes in.
- Source (S) — where it leaves, on its way to −.
Same positions as an NPN's base, collector and emitter, and the same job.
The rule
Below a threshold voltage between gate and source (about 2 V for a 2N7000) the channel is closed. Above it the channel opens, and the more voltage, the wider:
I_drain ≈ ½ × K × (V_gate − V_threshold)² (K ≈ 0.1 A/V² for the 2N7000)
At 4 V on the gate that is over 200 mA available, far more than an LED lane wants, so the MOSFET is fully on and acts like a resistor of a few ohms: about 0.05 V lost across it at 11 mA.
Never let the gate float
Because nothing flows into the gate, nothing drains it either. A gate left unconnected keeps whatever charge it last picked up and the MOSFET sits half on, flickering. Every gate needs a resistor to − (a pull-down) or to + (a pull-up) so it has a definite voltage when nothing is driving it. 100 kΩ is plenty: it only has to beat a few picoamps of leakage.
Why it matters
Anything that can make a voltage can drive a MOSFET: a 100 kΩ divider, a logic chip's weak output, a touch sensor. That is why MOSFETs switch the motors, heaters and lamps in almost everything with a microcontroller. The Switch That Uses No Current builds the first one.