Parts
2N7000 MOSFET: pinout, ratings, a 5 V relay switch, BS170 and 2N7002
By Bulan Sarkar
The 2N7000 is S-G-D: with the flat face toward you and the leads down, source, gate and drain run left to right. It is a 60 V, 200 mA N-channel MOSFET in a TO-92, and its data sheet gives an on-resistance at 4.5 V on the gate, which the BS170's does not. That makes it a sound choice for a relay, a buzzer or an LED string driven from a 5 V pin. The BS170 looks the same and does the same job, but its pins run the other way, D-G-S.
This page reads Vishay's data sheet for the 2N7000, 2N7002 and BS170 (document 70226), Diotec's 2N7000 and Diodes Incorporated's 2N7002. It works through a 12 V relay switched from a 5 V pin, with the worst-case numbers, and says why a 3.3 V pin is a gamble.
Datasheet: Vishay Siliconix 2N7000/2N7002, VQ1000J/P, BS170 N-Channel 60-V (D-S) MOSFET, document 70226 (PDF)Ask Datasheet Guru about the 2N7000
Pinout by package
Flat face toward you, leads pointing down: source, gate, drain from left to right.
Source: Vishay Siliconix 2N7000/2N7002, VQ1000J/P, BS170 N-Channel 60-V (D-S) MOSFET, document 70226, p. 1 (TO-226AA (TO-92) top view, 2N7000: 1 S, 2 G, 3 D); Diotec Semiconductor 2N7000 N-Channel Enhancement Mode FET, p. 1 (TO-92 10D3 drawing with the leads labelled S, G, D)
Pin 1 drain, pin 2 gate, pin 3 source: the reverse of the 2N7000.
Vishay ships its BS170 with the leads bent to a TO-18 triangle; other makers use the straight TO-92 row. The pin numbers are the same.
Source: Vishay Siliconix 2N7000/2N7002, VQ1000J/P, BS170 N-Channel 60-V (D-S) MOSFET, document 70226, p. 1 (TO-92-18RM (TO-18 lead form) top view, BS170: 1 D, 2 G, 3 S)
Top view, pin 3 alone on one side: pin 1 gate and pin 2 source on the other side.
Source: Vishay Siliconix 2N7000/2N7002, VQ1000J/P, BS170 N-Channel 60-V (D-S) MOSFET, document 70226, p. 1 (TO-236 (SOT-23) top view: 1 G, 2 S, 3 D; marking code 72); Diodes Incorporated 2N7002 N-Channel Enhancement Mode MOSFET, DS11303, p. 1 (SOT23 top view with D alone, G and S opposite; marking K72)
Which one do you have?
Read the print on the flat face. 2N7000 is the JEDEC number, made by Vishay, Diotec and others. The BS170 is a different registration in the same TO-92 body with the same 60 V and threshold range, but more current and the drain and source swapped. The 2N7002 is the SOT-23 surface-mount part, marked 72 by Vishay and K72 by Diodes Incorporated, not 2N7002.
The two 2N7000 makers differ on one number. Vishay guarantees the 2N7000 at 5.3 Ω or less at 4.5 V on the gate, Diotec at 6 Ω or less. A part from an unknown maker should be designed to the higher figure, so the example below uses 6 Ω.
BS170: same job, pins reversed
The BS170 is D-G-S: drain on pin 1, source on pin 3. Put one into a 2N7000 footprint and the drain and source trade places. The gate stays in the middle, so it still switches, but backwards: the body diode then conducts whenever the load supply is on, and the load never turns off. Vishay rates its BS170 at 500 mA and 830 mW, more than the 2N7000, but gives its on-resistance only at 10 V on the gate (5 Ω max), with no limit at 4.5 or 5 V.
2N7002: the SOT-23 version
The 2N7002 has pin 1 gate, pin 2 source and pin 3 drain, with pin 3 alone on one side. It shares the 60 V rating but carries less current: 115 mA in Vishay's sheet, 170 mA on minimum pads and 210 mA on a square inch of copper in Diodes Incorporated's. Its threshold window is tighter, 1.0 to 2.5 V, and its on-resistance is given at 5 V on the gate (7.5 Ω max at 50 mA) rather than 4.5 V.
Absolute maximum ratings
All three are 60 V parts with ±20 V on the gate. The current and power ratings depend on the package and, for the 2N7002, on how much copper sits under it. The 2N7000's power rating is 400 mW from Vishay and 350 mW from Diotec, whose figure assumes the leads are held at room temperature 2 mm from the body. Design to the lower one.
| Parameter | 2N7000TO-92 | BS170TO-92 | 2N7002SOT-23 |
|---|---|---|---|
| Drain-source voltage VDS | 60 V | 60 V | 60 V |
| Gate-source voltage, continuous VGS | ±20 V | ±20 V | ±20 V |
| Gate-source voltage, pulses VGSMVishay: tp ≤ 50 µs | ±40 V | ±25 V | ±40 V |
| Continuous drain current IDambient 25 °C | 200 mA | 500 mA | 115 mA (Vishay), 170 mA (Diodes, min pads) |
| Continuous drain current IDambient 100 °C (Vishay) | 130 mA | 175 mA | 73 mA |
| Pulsed drain current IDM | 500 mA | not given | 800 mA |
| Power dissipation PDambient 25 °C | 400 mW (Vishay), 350 mW (Diotec) | 830 mW | 200 mW (Vishay), 370 mW (Diodes, min pads) |
| Junction to air RthJA | 312.5 °C/W (Vishay), below 357 K/W (Diotec) | 156 °C/W | 625 °C/W (Vishay), 348 °C/W (Diodes, min pads) |
| Junction temperature TJ | −55 to 150 °C | −55 to 150 °C | −55 to 150 °C |
Characteristics: the 4.5 V row is the reason to pick it
| Parameter | 2N7000TO-92 | BS170TO-92 | 2N7002SOT-23 |
|---|---|---|---|
| Gate threshold voltage VGS(th)VDS = VGS; ID 1 mA (2N7000, BS170), 0.25 mA (2N7002) | 0.8 to 3.0 V | 0.8 to 3.0 V | 1.0 to 2.5 V |
| On-resistance, max RDS(on)VGS = 4.5 V, ID = 75 mA | 5.3 Ω (Vishay), 6 Ω (Diotec) | not given | not given |
| On-resistance, max RDS(on)VGS = 5 V, ID = 50 mA | not given | not given | 7.5 Ω |
| On-resistance, max RDS(on)VGS = 10 V; ID 500 mA (200 mA BS170) | 5 Ω | 5 Ω | 7.5 Ω (Vishay), 5 Ω (Diodes) |
| On-state drain current, min ID(on)2N7000: VGS 4.5 V, VDS 10 V; 2N7002: VGS 10 V, VDS 7.5 V | 75 mA | not given | 0.5 A |
| Input capacitance CissVDS = 25 V, 1 MHz; typical 22 pF | 60 pF max | 60 pF max | 50 pF max |
| Turn-on / turn-off time, max ton / toffVishay test circuits, 10 V gate drive | 10 / 10 ns | 10 / 10 ns | 20 / 20 ns |
The threshold, 0.8 to 3 V, is the gate voltage at which the 2N7000 passes just 1 mA. What a design needs is the next row: at 4.5 V on the gate the sheet promises at least 75 mA of drain current and at most 5.3 Ω (Vishay) or 6 Ω (Diotec) at 75 mA. A 5 V pin clears that. Nothing in either sheet covers 3.3 V, and a part with a 3.0 V threshold is only just starting to conduct there.
What it is good for
- Small relays, buzzers, opto LEDs and short LED strings, up to about 100 mA, from a 5 V logic pin.
- Loads on a higher rail than the logic: a 12 V or 24 V relay coil, with the source at 0 V.
- Open-drain outputs and simple level shifting, where its low gate capacitance (22 pF typical) keeps edges fast.
- Pulling a line low under logic control: a reset, an enable pin, a status LED.
It is the wrong part above about 150 mA, for motors and solenoids that draw amps, or where only a 3.3 V pin is available. For those, see our guide to choosing a MOSFET for Arduino and ESP32.
Worked example: a 12 V relay from a 5 V pin
A 12 V relay with a 400 Ω coil draws 12 V ÷ 400 Ω = 30 mA with an ideal switch. The 2N7000 switches its low side: source to 0 V, coil between +12 V and the drain, a diode across the coil. The pin drives the gate through 100 Ω, with 100 kΩ to 0 V on the pin side so the relay stays off while the pin floats at reset.
1. Is 5 V enough? The sheet guarantees at least 75 mA at 4.5 V on the gate. The coil needs about 30 mA, so even a worst-case part has 2.5 times the current it needs, and a 5 V pin gives half a volt more than the test condition.
2. Current and voltage drop, worst case. Use the 6 Ω maximum: 12 V ÷ (400 + 6) Ω = 29.6 mA. Across the MOSFET that is 29.6 mA × 6 Ω = 0.177 V, so the coil sees almost all of the 12 V.
3. Heat. 29.6 mA × 0.177 V = 5.2 mW. At Diotec's 357 K/W that is 1.9 °C above the room. The part will not feel warm.
4. The same part at its limit. At the full 200 mA with 10 V on the gate (5 Ω max) it dissipates 200 mW, under the 400 mW rating, and runs 71 °C above the room: about 111 °C in a 40 °C room, inside the 150 °C limit. From a 5 V pin, where only 75 mA is guaranteed, keep the load under about 75 mA.
The diode across the coil, cathode to +12 V, is not optional; see the flyback diode and driving a relay.
Worked example in numbers
- Coil current, worst case
- 29.6 mA
- Drop across the 2N7000
- 0.177 V
- Heat in the part
- 5.2 mW
- Guaranteed at 4.5 V
- 75 mA
Tips and checks
- Check the print before fitting: a BS170 in a 2N7000 footprint is reversed and the load stays on.
- Keep the 100 kΩ pull-down. With the gate floating, the part can sit half on, and a stray touch can switch it.
- Measure drain to source with the load on. Around 0.1 to 0.2 V at 30 mA is right; a volt or more means the gate voltage is too low or the part is damaged.
- Handle it as static-sensitive. The gate oxide is rated ±20 V, and a charged finger is far above that.
- From a 3.3 V board, use a part rated at 2.5 V on the gate, or a 2N7002 only after checking that the maker gives a figure at your drive voltage.
Substitutes
The BS170 carries more current but fits only turned round, and it has no rating below 10 V on the gate. The 2N7002 is the SMD equivalent, with less current.
| Part | Pins | Verdict |
|---|---|---|
| BS170 | D-G-S | Same 60 V and the same 0.8 to 3.0 V threshold, more current (500 mA). Not a drop-in: the pins are reversed, so it goes in turned round. Its on-resistance is given only at 10 V (5 Ω), not at 4.5 or 5 V.Vishay Siliconix 2N7000/2N7002, VQ1000J/P, BS170 N-Channel 60-V (D-S) MOSFET, document 70226, p. 1; Vishay Siliconix 2N7000/2N7002, VQ1000J/P, BS170 N-Channel 60-V (D-S) MOSFET, document 70226, p. 2; Vishay Siliconix 2N7000/2N7002, VQ1000J/P, BS170 N-Channel 60-V (D-S) MOSFET, document 70226, p. 3 |
| 2N7002 | G-S-D (SOT-23) | The surface-mount version: same 60 V, a tighter 1.0 to 2.5 V threshold, but less current (115 to 170 mA depending on maker and copper) and 7.5 Ω max at a 5 V gate.Vishay Siliconix 2N7000/2N7002, VQ1000J/P, BS170 N-Channel 60-V (D-S) MOSFET, document 70226, p. 2; Diodes Incorporated 2N7002 N-Channel Enhancement Mode MOSFET, DS11303, p. 2 |
Checking one with a multimeter
- Short all three leads for a moment to empty the gate. Set the meter to diode test.
- Red probe on the source, black on the drain: the body diode reads like a silicon diode. Reversed, it reads open.
- Touch red to the gate with black on the source to charge it. Now red on the drain, black on the source: a good part conducts. Short gate to source and it opens again.
- A meter's diode-test voltage can sit near the 3 V threshold limit, so a good part may only partly turn on in step 3.
The transistor testing lesson and reading datasheets go further.
What we'd do
Use the 2N7000 for loads up to about 75 mA from a 5 V pin, with a 100 Ω gate resistor, a 100 kΩ pull-down and a diode across any coil. Design to the 6 Ω worst case. Keep a few BS170s only if you remember to turn them round, and from a 3.3 V board choose a part whose data sheet gives an on-resistance at 2.5 V.
Questions people ask
What is the 2N7000 pinout?
Source, gate, drain from left to right, with the flat face toward you and the leads down. The BS170 is the reverse: drain, gate, source.
Can an Arduino drive a 2N7000 directly?
Yes, from a 5 V pin. The sheet guarantees at least 75 mA at 4.5 V on the gate, with 6 Ω or less at that current.
Will a 2N7000 work from an ESP32 or a 3.3 V pin?
Often, but not by design. The threshold can be as high as 3 V and neither maker gives an on-resistance at 3.3 V. Some parts will switch a few milliamps; some will barely turn on.
What is the difference between the 2N7000 and the 2N7002?
The 2N7002 is the SOT-23 version: same 60 V, a 1.0 to 2.5 V threshold, 115 to 210 mA depending on maker and copper, and 7.5 Ω max at 5 V on the gate.
How much current can a 2N7000 switch?
200 mA continuous at 25 °C, with 10 V on the gate. From a 5 V pin the guaranteed figure is 75 mA, so keep loads below that.
Buying the 2N7000 in India
The 2N7000 and BS170 are stocked by most Indian electronics shops and online sellers. Check the print on each one, since the two look alike, and meter a part before it goes on a board. Our guide to buying electronic components in India compares ten online sellers and covers how to spot fakes.
One email a month from the bench
New circuits, lessons, part guides and calculators, on the first Sunday of each month.
Used in these lessons
Lessons that go deeper
Datasheets this page was checked against
- Vishay Siliconix, 2N7000/2N7002, VQ1000J/P, BS170 N-Channel 60-V (D-S) MOSFET, document 70226 (S-04279, Rev. F, 16-Jul-01)
- Diotec Semiconductor, 2N7000 N-Channel Enhancement Mode FET (Version 2026-03-30)
- Diodes Incorporated, 2N7002 N-Channel Enhancement Mode MOSFET, DS11303 (Rev. 33 - 2, July 2013)
Makers revise datasheets. If the copy you download has a newer revision and a number here disagrees with it, the datasheet wins, and we would like to hear about it.