2N7000 Logic-Level MOSFET LED Switch
Switch a load from a 3.3 V microcontroller pin with the tiny TO-92 2N7000 N-channel MOSFET — the same gate-controlled switching trick as a big IRLZ44N, scaled for hobby currents and dead simple to wire.
Difficulty: Breadboard. Estimated build time: about 18 minutes. Estimated parts cost: about US$2.40. 5-line bill of materials. Compare supplier offers when available. A high-side or low-side LED switch driven by an MCU GPIO using the 2N7000 — a tiny TO-92 N-channel logic-level MOSFET.
Pin out the MOSFET
With the flat face of the 2N7000 facing you and the legs pointing down, the pin order from left to right is Source, Gate, Drain. (Heads up: this is the opposite order of a 2N2222 BJT — the most common breadboard mistake with this part.) Push it into the breadboard with the flat side facing you so you don't have to keep flipping the datasheet.
Wire the switch
Connect Source to GND. Connect Drain through a 330 Ohm resistor to the cathode of an LED whose anode is on +5 V (low-side switch — the MOSFET 'pulls down' the LED). Between Gate and the MCU pin, put a 100 Ohm resistor in series. Add a 100 kOhm pull-down resistor from Gate to GND so the MOSFET stays safely off when nothing is driving the gate.
Test the gate threshold
Power up. Drive the MCU pin LOW — the LED is off, no current flows. Drive it HIGH — the LED snaps on cleanly. If you have a bench supply, sweep the gate voltage manually: at 0 V the LED is off, somewhere around 2.0-2.5 V it just starts to glow (that's V_GS(th)), and by 4 V it's at full brightness. That's the MOSFET's transfer curve in action. Try PWMing the gate from the MCU at 1 kHz with a duty-cycle ramp — the LED dims smoothly because the MOSFET switches cleanly between fully on and fully off, dissipating almost no power either way.