The MOSFET and MOSFET Breakout Board Guide
What is a MOSFET?
The Literal Answer!
A MOSFET is a: Metal Oxide Semiconductor Field-Effect Transistor
Don't worry, you don't need to know what that all means in order to understand what they do! The above just describes something about the material make-up (Metal Oxide Semiconductor) and the principle they use to operate (Field-Effect Transistor).
An Actually Helpful Answer!
MOSFETs are transistors. Transistors are semiconductor devices that are used to switch or amplify electrical signals. They allow us to use voltages or currents to control other voltages or currents and are the core building block of modern computers!
A MOSFET is a kind of Field-Effect Transistor. MOSFETs use an electric field to control the flow of current between 2 pins. This means we can use MOSFETs to control large currents or voltages (say a 12V LED strip or a DC motor) with something that can only handle or supply lower currents or voltages, like an Arduino!
Note: For the purposes of this guide we will only talk about N-channel MOSFETs, P-channel MOSFETs work slightly differently and are a topic for another day!
MOSFETs have 3 pins:
- Gate: we connect a control voltage to this pin in order to open or close the flow of current between the other 2 pins
- Drain: a load is connected to this pin
- Source: ground is connected to this pin
Generally, the pinout is as shown in the image above, but this is not always the case! Remember to check the datasheet before hooking up!
How to use MOSFETs in a Circuit
We connect some load to a voltage source, for example a 12V motor connected to a 12V supply. Instead of connecting the other terminal of the load to ground, we connect it to Drain. We then connect the Source pin to ground instead. Basically what we have done it inserted the D and S pins of the MOSFET between the load's negative terminal and ground. With nothing connected to the Gate pin, there is no path between Drain and Source; this means that no current flows across the load and the motor doesn't move. But, when we apply 5V (for example, this will be different depending on the model of the MOSFET) to the Gate pin, a path will open between Drain and Source. When this happens there is route from the positive voltage of the 12V supply, across the load to ground and so the motor turns on!
Check out this CircuitJS sketch to see it in action! MOSFET circuit simulation
Using Breakout Boards
At CCI we have handy breakout boards that you can just connect to your load (like a motor) and your microcontroller. There are a couple of different ones, take a look at the image below:
The red breakout board is an older version. These ones use a MOSFET that doesn't fully open at 5V and doesn't include a flyback diode. This means that it should ideally be driven via another transistor from your Arduino. They will still work without this, but they can get quite hot.
The black breakout boards are designed in house by us! They use a MOSFET that can fully open even at 3.3V so are suitable for any microcontroller. They also feature flyback diodes for extra stability. There are 2 variants: ones with a DC jack and ones with screw terminals. Functionally they are the same, the DC jack variant just lets you plug your power supply straight in instead of wires for extra convenience in some cases.
Hookup Guide for Breakout Boards
The MOSFET breakout boards have 2 inputs and one output:
- Power input: this is for the power supply required to drive your load
- It has a + and - terminal. Positive voltage goes to + and ground goes to -
- Signal input: this is where you attach your MCU which will control whether power is delivered to the load
- Load output: this is where you connect the load you are powering
Checkout the diagram below for how to wire up a breakout to control a 12V LED strip!
Make Your Own
Breakout boards are nice, but when making bigger or more permanent circuits their shortcomings become obvious:
- They have a large footprint. The image below shows a (half-finished) 16 channel MOSFET dimmer circuit packed onto an 75x120mm protoboard! The equivalent circuit built in breakout boards would take about 4X the space, not including wiring!!!

- Wiring gets messy. Cabling many breakout boards together can create a big tangle of wires which makes circuit management and troubleshooting a nightmare.
- Generic circuits might not work great in all situations. Breakout boards are general tools, designed to work in as many situations as possible. This usually means they may not work as well as they could in all situations.
Let's take a look at the schematic for the CCI breakout board:
Looking at the schematic you may be able to see that it can be divided into roughly 3 sections: a logic level section, a high power section and a section for indicators. See the annotated schematic below:
Logic-level section
This is where you connect your control voltage. This could be an Arduino pin, some other motor controller pin, a function generator, basically anything that can create a varying voltage! The logic-level signal goes to the GATE pin of the MOSFET.
Note: this particular MOSFET only requires about 3V to fully open the path from DRAIN to SOURCE so we don't need any extra components. Other MOSFETs may be different and require a 'gate driver' circuit to bump a logic-level signal up to something that can fully open the GATE!
High power section
This is where you connect the higher voltage or current source and the load (a motor or LED strip for example) that you want to drive with it. VIN+ connects to the positive terminal of the load and the negative terminal of our load goes to DRAIN.
You'll notice there is another component here as well: the diode labelled D2. This is very important if we use the MOSFET to drive an inductive load like a motor. Inductors store energy and always want to maintain a steady amount of current and when that is suddenly interrupted they will throw a tantrum and try to induce a current by discharging its stored energy. This is know as inductive kickback or back-EMF (electromotive force) and can damage/destroy the MOSFET or cause interferance that causes the GATE to switch erratically. A diode in this configuration is know as a flyback diode and works as a safety valve, allowing the indcutor to release that energy safely.
Indicators
These are completely optional, but nice to have! There's one on the GATE pin so we can see what our control signal is doing and one on VIN+ so we know that our high power source is actually on. Never underestimate the power of indicator LEDs, they save a lot of head-scratching!
MOSFET based LED dimmer
For an example DIY MOSFET breakout I am going to make a circuit that can be used as a dimmer for an LED strip. I will tweak the schematic above accordingly:
- Get rid of the flyback diode. LEDs are not inductive so this part isn't needed!
- Include only a LED indicator for power. The LED strip will act as my signal indicator!
- Adjust value of current limiting resistor. The current limiting resistors for the LEDs are sized so that the LEDs will survive multiple different voltage levels. I know my voltage level so I will size it more exactly: 12V - LED forward voltage of roughly 2V = 10V. We want a current of about 0.025A (25mA) through our LED so usiing Ohm's law: 10V/0.025A = 400 Ohms. So I'll pick the standard value of 470 Ohms, that'll be fine.
- Switch the MOSFET for a similar through-hole part. We have IRL540Ns in the workshop which also play nicely with 5V logic levels, so I'll use that.
- Use a JST socket for our LED connection. This will make it easier to connect the LED strip correctly!
- Add header pins to power our Arduino from the 12V supply. the barrel jack or VIN pin on Arduinos can be connected to 7-12V sources to power the Arduino, this way we have a standalone set up!
With all these changes our schematic now looks like this:
Right, time to hit the workshop and put this thing together!
Check out this video of me making a MOSFET dimmer on a strip board and hooking it up to a 12V LED strip and Arduino running a PWM routine --->





