Skip to content

Hardware Hookup

In this section, we'll go over how to connect the MOSFET Power Switch to your system.

Upload Code to the Microcontroller

When uploading code to the IoT RedBoard - ESP32, we will connect a USB C cable. When powering the load, we will want to disconnect the USB cable to avoid conflicting voltages.

USB Cable Out of USB Connector

Tip

If necessary, you can disconnect the 3.3V jumper wire connecting the MOSFET Power Switch and Buck Regulator to the IoT RedBoard - ESP32. That way you can power the load with the barrel jack while also debugging code when the USB cable is connected to the IoT RedBoard - ESP32.

Control

Note

The tutorial focuses on using a microcontroller with Arduino. However, if your microcontroller has a digital or PWM, you can also control the N-channel MOSFET controller as well! You can also use this using a micro:bit with MakeCode or Raspberry Pi's RP2040 microcontroller with MicroPython!

For prototyping or connecting to the control side, we recommend using a 3.3V development board with header pins already soldered to the board. In this case, we used the IoT RedBoard - ESP32. Depending on how you are controlling the load, you may need a digital or PWM pin. Don't forget to connect power and ground. In this case, we will use 3.3V from the output of the buck regulator. Of course, you could also connect the microcontroller or additional devices to the VCC pin as an alternative. Just make sure to choose one when powering your microcontroller or any additional peripheral device.

MOSFET Power Switch IoT RedBoard - ESP32
3V3 3.3V
GND GND
CTL D25

Below is a circuit diagram with the MOSFET Power Switch and Buck Regulator Break connecting to the IoT RedBoard - ESP32. Most of the examples will follow this pin connection to control the load. However, there are a few examples that will include additional circuits and a different pin for the control.

Power and Control Pin Connected to RedBoard IoT Development Board

Warning

When powering and programming your Arduino, make sure to disconnect power between the MOSFET Power Switch and Arduino to avoid conflicting voltages. Of course you could use a Schottky diode for protection. The caveat is that you will just have a slight voltage drop.

Load

Connect a high voltage device of your choice (e.g. DC motor, solenoid, 12V LED) to the load side (VCC to + and GND to −). You will need a ball point pen to push down on each poke-home connector's tab. A mini screwdriver (Phillips or flat head) will also work as well. As you are pressing down on the tab, insert a stripped wire or jumper wire pin into the socket. Repeat for the other connection.

Mini Screwdriver Pushing Down on Poke-Home Connector Tab and Wire Being Inserted

Below are a few examples. The squirrel cage blower we just inserted the Poke-Home conenctor since the wires were stripped. For the latching solenoid, we used M/M jumper wires between the 2-pin connector and the Poke-Home connector. We used part of a 12V LED strip rather than a full strip.

DC Motor to MOSFET Power Switch Solenoid to MOSFET Power Switch 12V LED Strip to MOSFET Power Switch

Tip

Worried about the M/M jumper wire's pins when inserting the Poke-Home connector? There are other M/M jumper wires available. These are lower cost and so you do not have to worry about damaging your premium jumper wires. These were used with the latching solenoid's 2-pin connector.

Input Voltage

Grab a compatible wall adapter that is within the recommended voltage range for your project. Make sure that the barrel jack's output is a center-positive. Then insert it into the barrel jack connector.

Wall Adapter Connected to Barrel Jack

Connecting to the PTHs

For users that prefer to use the PTHs, we recommending soldering to the connection. You can choose between a combination of header pins and jumper wires, or stripping wire and soldering the wire directly to the board.

Tip

The PTHs are connected to large polygon pours and traces. You may need a larger soldering iron tip, increase the soldering station's temperature, some flux, or leave the soldering tip a little longer in order for the solder to flow better.