Build it step by step
0 of 7 donePlan the pins
For an IRLZ44N facing you, the pins are gate, drain, source from left to right.
Wire the load
Fan between +12 V and the drain.
Add the flyback diode
1N4007 with its stripe to +12 V and the other end on the drain.
Wire the gate
Button and 220 Ω from +12 V to the gate, and 10 kΩ from gate to ground.
Press the button
The fan runs. Release and it stops.
Measure the drop
With the fan on, measure drain to source. It should be tens of millivolts.
Check the heat
Touch the MOSFET after a minute of running. It should be cool.
How do you build an MOSFET as a switch?
Switch a 12 V fan with a logic-level MOSFET, and measure how cool it stays. You need MOSFET IRLZ44N, Resistor 10 kΩ, Resistor 220 Ω, 12 V DC fan 80 mm, Rectifier Diode 1N4007, 12 V 2 A DC adapter, DC barrel to screw terminal adapter (female), Tactile push button 6 mm, Breadboard 830 Tie Points, Jumper wires male to male (40 pcs, 20 cm) and Digital multimeter. It takes 7 steps and about 30 minutes.
- Level
- Beginner
- Time
- About 30 min
- Parts
- 11
Parts list
- SemiconductorsBuyMOSFET IRLZ44N × 1
- PassivesBuyResistor 10 kΩ × 1
- PassivesBuyResistor 220 Ω × 1
- Motors & ActuatorsBuy
- SemiconductorsBuy
- PowerBuy
- PowerBuy
- SwitchesBuy
- PrototypingBuy
- PrototypingBuy
- Tools & InstrumentsBuy
Tick what you already own. It saves to My Garage, so “Build with what I have” knows.
Wiring
| From | To | Why |
|---|---|---|
| 12 V adapter + (through the screw-terminal adapter) | Fan + and the button | Supply |
| Fan - | MOSFET drain | Low-side switch |
| 1N4007 | Cathode to 12 V +, anode to the drain | Flyback diode across the fan |
| MOSFET source | GND (adapter -) | Common ground |
| Button, then 220 Ω | 12 V + to the MOSFET gate | Gate drive |
| 10 kΩ | Gate to GND | Pull-down so it turns off when the button is released |
No code needed
No code. The IRLZ44N is a logic-level MOSFET, so it is fully on with 5 V on its gate, and 12 V is also within its 16 V limit. The fan's own coil is why the flyback diode is needed. A MOSFET that is fully on has a very small resistance, so it stays cool.
Test checklist
What you should see at each check. If a reading is far off, stop and use the troubleshooting list.
| Check | Expected |
|---|---|
| Button pressed | Fan runs at full speed |
| Button released | Fan stops within a second |
| Voltage drain to source when on | Below 0.1 V |
| MOSFET temperature | Cool to the touch |
If it does not work
Fan does not run
Check the pins and that the source is on ground.
Fan runs weakly
The gate is not fully driven. Check the button and 220 Ω and the supply.
Fan keeps running after release
The pull-down is missing so the gate floats.
MOSFET hot
It is not fully on, or the fan draws too much current. Check the load rating.
Still stuck? Find the fault step by step with your multimeter →
Common questions
What parts do I need for the MOSFET as a switch?
MOSFET IRLZ44N, Resistor 10 kΩ, Resistor 220 Ω, 12 V DC fan 80 mm, Rectifier Diode 1N4007, 12 V 2 A DC adapter, DC barrel to screw terminal adapter (female), Tactile push button 6 mm, Breadboard 830 Tie Points, Jumper wires male to male (40 pcs, 20 cm) and Digital multimeter.
How long does the MOSFET as a switch take to build?
About 30 minutes for a beginner maker, in 7 steps.
How do I know the MOSFET as a switch works?
Button pressed: Fan runs at full speed. Button released: Fan stops within a second. Voltage drain to source when on: Below 0.1 V.
Fan does not run: what should I check?
Check the pins and that the source is on ground.
Fan runs weakly: what should I check?
The gate is not fully driven. Check the button and 220 Ω and the supply.
Fan keeps running after release: what should I check?
The pull-down is missing so the gate floats.
MOSFET hot: what should I check?
It is not fully on, or the fan draws too much current. Check the load rating.
