Since the supply voltage is only 12V, I suggest using a MOSFET. For example, the IRLZ34 is rated 60V, with 50 milliohm Rds at 5V gate-to-source. A 100 ohm resistor in series with the gate should calm the the switching and 10k from gate to source makes sure it's off when not powered. Problem 1 - With N Mosfet, this layout won't work because there is a big drop in the mosfet, and the load gets something like 2.8V. Simulate this circuit – Schematic created using CircuitLab. If I give it instead 12V, there is no longer a big drop, and it works like I intended.
BSC320N20NS3 G N-Channel Power MOSFET 12V - 300V; BSZ097N10NS5 N-Channel Power MOSFET 12V - 300V; BTS5090-1EJA PROFET™ +12V Automotive Smart High-Side Switch.
Let’s talk about the basics of MOSFET and how to use them. This tutorial is written primarily for non-academic hobbyists, so I will try to simplify the concept and focus more on the practical side of things.
However if you are into how MOSFET work, I will share some useful academic articles and resources at the end of this post. MOSFET has some advantage and disadvantage over BJT, so choose carefully base on your application.
You can buy MOSFET’s for Arduino Projects on Amazon: http://amzn.to/2Gk6ruW
MOSFET stands for metal-oxide semiconductor field-effect transistor. It is a special type of field-effect transistor (FET).
Unlike BJT which is ‘current controlled’, the MOSFET is a voltage controlled device. The MOSFET has “gate“, “Drain” and “Source” terminals instead of a “base”, “collector”, and “emitter” terminals in a bipolar transistor. By applying voltage at the gate, it generates an electrical field to control the current flow through the channel between drain and source, and there is no current flow from the gate into the MOSFET.
Mosfet 12v Arduino
A MOSFET may be thought of as a variable resistor, where the Gate-Source voltage difference can control the Drain-Source Resistance. When there is no applying voltage between the Gate-Source , the Drain-Source resistance is very high, which is almost like a open circuit, so no current may flow through the Drain-Source. When Gate-Source potential difference is applied, the Drain-Source resistance is reduced, and there will be current flowing through Drain-Source, which is now a closed circuit.
In a nutshell, a FET is controlled by the Gate-Source voltage applied (which regulates the electrical field across a channel), like pinching or opening a straw and stopping or allowing current flowing. Because of this property, FETs are great for large current flow, and the MOSFET is commonly used as a switch.
Okay, let me summarize the differences between BJT and MOSFET.
- Unlike bipolar transistors, MOSFET is voltage controlled. While BJT is current controlled, the base resistor needs to be carefully calculated according to the amount of current being switched. Not so with a MOSFET. Just apply enough voltage to the gate and the switch operates.
- Because they are voltage controlled, MOSFET have a very high input impedance, so just about anything can drive them.
- MOSFET has high input impedence.
To use a MOSFET as a switch, you have to have its gate voltage (Vgs) higher than the source. If you connect the gate to the source (Vgs=0) it is turned off.
For example we have a IRFZ44N which is a “standard” MOSFET and only turns on when Vgs=10V – 20V. But usually we try not to push it too hard so 10V-15V is common for Vgs for this type of MOSFET.
Mosfet Arduino 12v Fan Control
However if you want to drive this from an Arduino which is running at 5V, you will need a “logic-level” MOSFET that can be turned on at 5V (Vgs = 5V). For example, the ST STP55NF06L. You should also have a resistor in series with the Arduino output to limit the current, since the gate is highly capacitive and can draw a big instantaneous current when you try to turn it on. Around 220 ohms is a good value.
This page shows some detail explanation how a MOSFET works as a switch. This page shows some advanced usage of MOSFET.
MOSFETs come in four different types. There are three main categories we need to know.
- N-Channel (NMOS) or P-Channel (PMOS)
- Enhancement or Depletion mode
- Logic-Level or Normal MOSFET
N-Channel – For an N-Channel MOSFET, the source is connected to ground. To turn the MOSFET on, we need to raise the voltage on the gate. To turn it off we need to connect the gate to ground.
P-Channel – The source is connected to the power rail (Vcc). In order to allow current to flow the Gate needs to be pulled to ground. To turn it off the gate needs to be pulled to Vcc.
Depletion Mode – It requires the Gate-Source voltage ( Vgs ) applied to switch the device “OFF”.
Enhancement Mode – The transistor requires a Gate-Source voltage ( Vgs ) applied to switch the device “ON”.
Despite the variety, the most commonly used type is N-channel enhancement mode.
There are also Logic-Level and Normal MOSFET, but the only difference is the Gate-Source potential level required to drive the MOSFET.
I will try to explain it in the simplest way I can, for more detail or if you are in doubt, check the references and links I provide at the bottom of the post.
MOSFET is a voltage controlled field effect transistor that differs from a JFET. The Gate electrode is electrically insulated from the main semiconductor by a thin layer of insulating material (glass, seriously!). This insulated metal gate is like a plate of a capacitor which has an extremely high input resistance (as high as almost infinite!). Because of the isolation of the Gate there is no current flow into the MOSFET from Gate.
When voltage is applied at the gate, it changes the width of the Drain-Source channel along which charge carriers flow (electron or hole). The wider the channel, the better the device conducts.
The MOSFET are used differently compared to the conventional junction FET.
- The infinite high input impedance makes MOSFETs useful for power amplifiers. The devices are also well suited to high-speed switching applications. Some integrated circuits contain tiny MOSFETs and are used in computers.
- Because the oxide layer is so thin, the MOSFET can be damaged by built up electrostatic charges. In weak-signal radio-frequency work, MOSFET devices do not generally perform as well as other types of FET.
Where to put the load to a MOSFET? Source or Drain?
Because load has resistance, which is basically a resitor. For N-channel MOSFET the reason we usually put the load at the Drain side is because of the Source is usually connected to GND.
If load is connected at the source side, the Vgs will needs to be higher in order to switch the MOSFET, or there will be insufficient current flow between source and drain than expected.
Heat Sink connected to the Drain?
Typically the heat sink on the back of a MOSFET is connected to the Drain! If you mount multiple MOSFETs on a heat sink, they must be electrically isolated from the heat sink! It’s good practice to isolate regardless in case the heat sink is bolted to a grounding frame.
What is the Body Diode For?
MOSFETs also have an internal diode which may allow current to flow unintentionally. The body diode will also limit switching speed. You don’t have to worry about it if you are operating under 1Mhz.
- Theory behind MOSFET (Youtube Video Lecture)
Description
This MOSFET module with optoisolation uses the D4184 N-Channel logic compatible MOSFET with low Rds(on) for moderate to higher current low-side switching applications.
PACKAGE INCLUDES:
- D4184 MOSFET Control Module
- 3-pin Screw Terminal
- 2-pin Screw Terminal
- Small male header strip
KEY FEATURES OF D4184 MOSFET CONTROL MODULE:
- One switching output
- Low 8.5mΩ Rds(on) resistance
- 2.5V – 20V input control voltage with optoisolation
- 6 – 36V output switching voltage
- 10A continuous current handling capability (See notes below)
- 3.3 and 5V logic compatible (See notes below)
The modules utilizes the D4184 N-channel MOSFET that has a low Rds(on) resistance of 8.5mΩ typical.
These modules support about 10A of continuous current with a load voltage of 12V. If driven with PWM, the maximum peak current can be greater up to 20A or more.
The design of these modules includes an optoisolator on the input so the input is biased from the output load voltage and is independent of logic levels used for the drive signal. A 3.3V input will drive as much current as a 5V input for instance.
Note that the module does not have a fly-back diode on the board. If using the module with inductive loads, an external fly-back diode should be used to avoid possible damage.
Theory of Operation
The module includes a PC817 optoisolator which provides electrical isolation between the high powered MOSFET side and the logic signals used to control the module. If something goes wrong and you burn up the MOSFET, it should not damage the MCU being used to control it.
The MCU PWM input to the module drives the internal LED side of the optoisolator. This input includes a 1K ohm series current limiting resistor to keep the current through the LED at safe levels which allows the input to be driven by up to a 20V input or even higher if you are not using an MCU.
When the PWM input signal is low or disconnected, the internal LED in the optoisolator is off which in turn keeps the phototransistor output turned off. With the phototransistor off, the gate of the MOSFET is pulled to ground by a 4.7K resistor. This keeps the MOSFET turned off and the load is disconnected from ground and disbled.
A logic high on the PWM input turns on the internal optoisolator LED which turns on the phototransistor. This creates a voltage divider composed primarily of two 4.7K resistors. This biases the gate at 50% of the power supply voltage which turns on the MOSFET. If a 12V power supply is used, the gate will be at 6V.
Since the maximum gate voltage available to turn on the MOSFET is 50% of the power supply voltage, that limits the power supply to a minimum of about 6V. Power dissipation in the MOSFET will be higher with lower power supply voltages and a minimum power supply of 9V is recommended if trying to draw more than a few amps through the module.
When the MOSFET conducts, the load is connected to ground to complete the circuit and the load is powered up. This also provides a ground for the on-board LED which lights to indicate that the MOSFET is turned on. A 4.7K resistor limits current through the on-board LED to safe levels over the 6-36V operating range.
Module Connections
The module requires 3 connections. A logic signal to turn the MOSFET on/off; a DC power supply to power the device (load) being controlled and finally the load itself. Connectors are provided that can be soldered to be the board, but these connections can also be made by direct wiring if desired.
Logic Signal Connections: The 2-pin connector on the right side is for making connections to the MCU. It has two holes on 4mm centers which support a 2 position screw terminal as well as two holes on 0.1″ centers that can alternatively support a standard male header which may be handy in a breadboard setup. The pins are labeled PWM for the signal and GND for the signal ground.
DC Load Power Supply: is connected to the 3-pin screw terminals marked + / LOAD / – on the back of the module. The positive lead of the power supply connects to + and the ground connection is hooked up to –. The module supports a load power supply of 6-36VDC
Load: The load which is being driven is connected to the screw terminals marked + and Load on the back of the module. The positive lead of the load connects to the + terminal and the negative lead of the load connects to – terminal.
The signal ground and the load ground connections are not connected together on the module due to the optoisolator being used to provide isolation between the MOSFET power circuit and the MCU.
1 x 2 Screw Terminal / Header (Logic Signal Input)
- PWM = Signal input (active HIGH).
- GND = Signal ground
1 x 3 Screw Terminal (Load Power Supply Connections)
- + = Connect to power supply (6-36V) being used to power the load
- – = Connect to power supply ground
1 x 3 Screw Terminal (Load Connections)
Mosfet 5v
- + = Connect to positive lead of load (motor, LEDs, fan, etc)
- LOAD = Connect to negative lead of load
Physical Mounting: There are two 2mm diameter holes at the signal end of the board spaced 12mm apart if it is desired to physically mount it.
OUR EVALUATION RESULTS:
These modules work well for basic ON/OFF operation such as for driving a solenoid or PWM control such as for dimming an array of LEDs and can handle a surprising amount of power given the small size. It is also possible to parallel these modules to further increase the power handling capability. Though the maximum current spec for the MOSFET is 50A, do not expect to run 50A through this small module as it will quickly overheat due to minimal heatsink capability of the small PCB.
One important point to take note of is that if an inductive load is being controlled, an external fly-back diode should be used to prevent possible damage when the load is switched off.
The chart to the right from the datasheet shows the effect of the drive (Gate) voltage on the maximum potential current through the MOSFET device. Since the gate is driven off the load power supply at a 50% level, for a 10V power supply, the current handling will be similar to the 5V curve.
The chart below shows some example temperature measurements of the MOSFET with a load varying from 2.5A to 20A @ 12V. The logic drive signal varies from 100% duty cycle (always on) to 50% duty cycle or 25% duty cycle. The measurements are being taken with no airflow over the module and an ambient temperature of 22C. Since a 12V power supply is being used, the gate voltage is around 6V which gives pretty good performance.
In general, you should keep the MOSFET under about 100°C to keep it happy. For long-term use, 80°C or lower would be a better target.
Load Amps | 12V Input @ 100% duty cycle | 12V Input @ 50% duty cycle | 12V Input @ 25% duty cycle |
2.5A | 32°C | ||
5A | 39°C | 30°C | |
10A | 69°C | 47°C | |
12.5A | 102°C | 63°C | 43°C |
15A | X | 78°C | 48°C |
20A | X | 115°C+ | 74°C |
BEFORE THEY ARE SHIPPED, THESE MODULES ARE:
Low Gate Voltage Mosfet
- Sample tested per incoming shipment
12v Mosfet Switch
Notes:
- None
Technical Specifications
Maximum Ratings | ||
VDS | Drain-Source Voltage | 40V max (36V recommended) |
ID | Drain Current Max (Continuous) | 10A @ 12V |
RDS(on) | Drain-Source On-Resistance | 8.5mΩ |
Dimensions | (L x W x H) | 35 x 16 x 14mm (1.38 x 0.63 x 0.55″) |
Datasheet | AOD4184 |