Using the MOSFET driver with Arduino involves wiring up the MOSFET driver to your Arduino-compatible microcontroller and running the provided example code.
Wiring
Wire as shown for a 5V board like an Uno. If you are using a 3V board, like an Adafruit Feather, wire the board's 3V pin to the MOSFET driver V+.
Here is an Adafruit Metro wired up to the MOSFET driver with a motor using the STEMMA JST PH cable:
- Board 5V to driver V+ (red wire)
- Board GND to driver GND (black wire)
- Board pin 3 to driver In (white wire)
- Motor black wire to driver terminal block -
- Motor red wire to driver terminal block +
Here is an Adafruit Metro wired up using a solderless breadboard:
- Board 5V to driver V+ (red wire)
- Board GND to driver GND (black wire)
- Board pin 3 to driver In (white wire)
- Motor black wire to driver terminal block -
- Motor red wire to driver terminal block +
// SPDX-FileCopyrightText: 2022 Liz Clark for Adafruit Industries // // SPDX-License-Identifier: MIT #define driverPin 3 void setup() { while (!Serial); delay(1000); Serial.begin(115200); Serial.println("Basic MOSFET Driver Test"); pinMode(driverPin, OUTPUT); } void loop() { digitalWrite(driverPin, HIGH); Serial.println("The MOSFET driver is triggered."); delay(1000); digitalWrite(driverPin, LOW); Serial.println("The MOSFET driver is not triggered."); delay(1000); }
Upload the sketch to your board and open up the Serial Monitor (Tools -> Serial Monitor) at 115200 baud. You should see the load triggered on and off while its status is printed to the Serial Monitor.
Page last edited January 20, 2025
Text editor powered by tinymce.