Bidirectional logic-level shifter
A single 2N7000 with two pullup resistors is the classic building block for translating signals (such as I2C or a plain digital line) between a 3.3 V device and a 5 V device in both directions.
N-channel enhancement-mode MOSFET in a TO-92 package that switches loads up to 60 V and 200 mA from a logic-level gate signal.

The 2N7000 is a small-signal N-channel enhancement-mode MOSFET in a through-hole TO-92 package. It is a jellybean part used as a low-side switch and signal buffer: it stays off with no gate voltage and turns on once the gate-to-source voltage rises past its threshold (roughly 0.8 to 3 V). With a 60 V drain-source rating and up to 200 mA of continuous drain current, it comfortably drives small loads that a microcontroller pin cannot handle directly.
Because the gate is high-impedance, the device draws essentially no steady-state current from whatever drives it, so a logic output can switch it with negligible load. On-resistance is low (around 1.2 ohms typical, 5 ohms maximum), but that figure is specified at a gate drive of 10 V. At 5 V it still switches light loads well, and at 3.3 V it is only partially on. Total power dissipation is limited to 400 mW in the TO-92 package.
Typical roles are low-side switching of LEDs, small relays, and buzzers, plus logic-level shifting between voltage domains. For any load drawing more than a couple hundred milliamps, a dedicated power MOSFET is the better choice.
| Pin | Function | Type |
|---|---|---|
S Source | Passive | Passive |
G Gate | Analog | Digital input |
D Drain | Passive | Passive |
Verified from the Tinkered component library.
A threshold near 2 V only means the device starts conducting; the low on-resistance is specified at a 10 V gate drive. Driving the gate at 3.3 V leaves the channel partially on, so it drops voltage and heats up. Give the gate as much drive as your supply allows.
The 2N7000 is rated for only 200 mA continuous and 400 mW dissipation. Trying to switch a motor, a long LED strip, or a large relay overheats and destroys it. Use a proper power MOSFET for higher-current loads.
The high-impedance gate picks up stray charge and noise, so without a gate-to-source pulldown resistor the MOSFET can switch erratically or stay latched on when the driving pin is not actively low. Always add a pulldown.
The 2N7000 and the similar-looking BS170 have mirrored TO-92 pinouts (source and drain are swapped). With the flat face toward you and leads down, the 2N7000 is Source, Gate, Drain from left to right. Verify before inserting.
Switching off an inductive load produces a large voltage spike. Without a freewheeling diode across the load, that spike can exceed the 60 V drain-source rating and instantly kill the part.
A single 2N7000 with two pullup resistors is the classic building block for translating signals (such as I2C or a plain digital line) between a 3.3 V device and a 5 V device in both directions.
Drop the 2N7000 MOSFET into a circuit, write firmware, and simulate it in your browser, then deploy to real hardware. All in one editable Tinkered project.