How to control a 12v motor with a momentary switch

Is this what you really meant?

When switch is not pressed, turn motor on.
When switch is pressed, turn motor off.

Solution: use a normally closed switch. No arduino or MOSFET required, but check the switch is rated for the motor current.

Correct, the Arduino is only 5V, and even if the motor was 5V, the current would be too high for Arduino.

But even if you truly need the motor to be on when the switch is open, you still don't need an Arduino.

Just pull the MOSFET gate up to 12V with a 10K resistor and connect the switch between the MOSFET gate and ground.

1 Like