Introduction: Arduino/Microcontroller MOSFET

The IRF540N is a great MOSFET to start turning bigger loads on and off. With three components you can turn on and off just about any DC load you have.

Turn loads on and off with your Arduino! Use 5V to control up to 100V. Add a motor, solenoid, or get creative!

Super Simple Arduino Load Driver V2.0 will be live on Kickstarter.com 7/13/2015. This is a breakout board for comonly used MOSFETs. The board is ready to use with screw terminals.

Step 1: Components You Will Need

The IRF540N is a great MOSFET to start turning bigger loads on and off. With three components you can turn on and off just about any DC load you have.

Components needed

1 N-Channel MOSFET is a IRF540N

1 Diode 1n4004

1 1K ohm Resister

Step 2: Wire Up the MOSFET

The MOSFET should be wired as shown in the picture.

Step 3: Code

Use the Arduino blink sketch to get started. This will turn the motor on for 1 second and then off for 1 second.

void setup() {
// initialize digital pin 13 as an output.
pinMode(13, OUTPUT);
}
// the loop function runs over and over again forever
void loop() {
digitalWrite(13, HIGH); // turn the LED on (HIGH is the voltage level)
delay(1000); // wait for a second
digitalWrite(13, LOW); // turn the LED off by making the voltage LOW
delay(1000); // wait for a second
}