Projects / MOSFET as a switch

MOSFET as a switch

Beginner30 minGuided buildReviewed

Build it step by step

0 of 7 done
  1. IRLZ44

    Plan the pins

    For an IRLZ44N facing you, the pins are gate, drain, source from left to right.

  2. Wire the load

    Fan between +12 V and the drain.

  3. Add the flyback diode

    1N4007 with its stripe to +12 V and the other end on the drain.

  4. Wire the gate

    Button and 220 Ω from +12 V to the gate, and 10 kΩ from gate to ground.

  5. Press the button

    The fan runs. Release and it stops.

  6. Measure the drop

    With the fan on, measure drain to source. It should be tens of millivolts.

  7. IRLZ44

    Check the heat

    Touch the MOSFET after a minute of running. It should be cool.

In short

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
See the electronics first. This build uses MOSFET switch. Try a MOSFET switch in the circuit builder and watch the voltages and currents before you wire it.

Parts list

Tick what you already own. It saves to My Garage, so “Build with what I have” knows.

Wiring

FromToWhy
12 V adapter + (through the screw-terminal adapter)Fan + and the buttonSupply
Fan -MOSFET drainLow-side switch
1N4007Cathode to 12 V +, anode to the drainFlyback diode across the fan
MOSFET sourceGND (adapter -)Common ground
Button, then 220 Ω12 V + to the MOSFET gateGate drive
10 kΩGate to GNDPull-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.

CheckExpected
Button pressedFan runs at full speed
Button releasedFan stops within a second
Voltage drain to source when onBelow 0.1 V
MOSFET temperatureCool 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 →

Ask Lark AI

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.