Using MOSFETS with TTL levels (5 Volt and 3.3 Volt)

If you are looking for 3V3 compatible FETs: scroll towards the end (last update november 2021)

FET

Various Arduino projects that need to switch a high DC load are using MOSFET’s to do this, according to the circuit at the right (R1 is optional and may be necessary to switch off the FET if the pin goes low.

Popular MOSFET’s that are used are the IRF510 and IRF 520

irf510 irf520
IRF510 IRF520

Looking at those graphs one can see that at a gate to source level of 5V (Arduino levels) the IRF510 is only capable of delivering 1 Amp, whereas it is specified for 5,6 Amps continuous current. The 520 is somewhat better: at 5 V it delivers 3 Amps from its max of 9.2. This is because these FET’s are designed to pass the max current at gate voltages of around 10 Volts and that is beyond what most microcontrollers can deliver.

For the IRF522 it is even worse.

irf522

Looking at the curve, at a gate to source voltage of 5V the IRF522 is hardly turned on. You are limited to a current of about 200mA. Much better to use a cheap Darlington transistor then.

The IRF530 is a better choice:irf530

At 5V volt on the gate, the IRF530 will pass something around 4.5Amps.

If you are shopping for a MOSFET for the Arduino consider the IRL540 The L shows that is a logic level mosfet. A logic level mosfet means that it is designed to turn on fully from the logic level of a microprocessor. The standard mosfet (IRF series etc) is designed to run from 10V.

Here is the curve for the IRL540:

irl540

Now at 5V you are out of the linear region and the MOSFET can already deliver its specified 28 Amps continuous current.

You may also consider the IRLZ44.

The IRLZ44 data-sheet shows the Vgs(th) to be 1-2V. With a 3V drive the FET drops less than 0.15V at 4A (at 25C, Rds(on) is about 0.04 ohms), and under 0.25V at 175C (Rds(on) < 0.063 ohms).
So we know the FET’s I^2-R ohmic dissipation will be under 1 watt, and that’s good. If we use Vgs = 4V, specified for AVR chip outputs, the dissipation should be about 0.4W at 25C (0.8W for Tj = 175C). The  Transfer characteristics graph (figure 3 in the data sheet) shows it can handle 30 Amps  with a gate voltage of 3V3.

irlz44

Wether a MOSFET is a standard MOSFET or a ‘logic’FET becomes clear from the Datasheet. If for instance you look at the Datasheet of the IRFZ44N at the Rds(on), This lists the ‘on-resistance’ under the condition that Vgs=10V (and Id=25A). If there is no rating for Rds(on) when Vgs=5V (or 4.5V), then it is not a logic-level MOSFET. A logic level MOSFET will have Rds(on) specified for Vgs=5V or 4.5V. If its only specified for Vgs=10V, its not logic-level.

Another thing to beware of in datasheets is Vthresh (threshhold voltage). This is not the gate voltage to turn the device on, its the gate voltage at which it switches fully off (less than a few uA of current, typically). If Vthresh is given as 2..4V range, it cannot be a logic level MOSFET (Vthresh is usually 0.5 to 1V for logic-level MOSFETs).

When designing with MOSFETs be aware that instead of having a Vsat like a bipolar transistor, a fully-saturated MOSFET acts as a low-value linear resistor. If for instance you want to switch 5A in a 12V circuit and you only want to waste 0.5V across the MOSFET, then its on-resistance (Vds(on)) should be <= 0.1 ohms (0.5V / 5A)

The dissipation then is 5x5x0.1=2.5 Watt. But suppose the FET you choose has 0.05ohm Vds(on) and carries 10A then it will dissipate I^2R watts, ie 10x10x0.05 = 5W. This will need a good heatsink if the load is on for more than a second or two, but it is no issue if it gets millisecond pulses every few seconds. ‘ON-resistance’ of 0.2 to 0.001 ohms are available (though less than 0.005ohms gets expensive).

The relatively cheap BUZ11 is also an option. Although it is no Logic level MOSFET, it will go into saturation with a 5 Volt gate voltage at around 7 amps and a VDS of about 0.5 to 1 Volt. But it’s RDS(on) will be far from ideal and you will lose 3.5-7 Watts in the FET:BUZ11

Should you however be stuck with a FET like the IRF522 that really needs a high voltage to switch efficiently then use the following circuit:MOSFET

Realise though that it is an inverting circuit. A HIGH on the Output of the Arduino will switch the Load Off. Also the 520 and 510 will be more efficient with this circuit.

MOSFETwith low voltage input

Remember to use a heatsink for the MOSFET if you are using any serious loadsMOSFET Print

If you are using this circuit to switch any serious loads, then it is wise to solder some thick wire over the tracks coming from the MOSFET. You will find the print design here. This is for direct transfer so it is already mirrorred the right way.

If you have a non logic FET (like the IRF series and need some galvanic separation from your microcontroller circuit, the following circuit comes in handy:fet520

3.3 Volt levels

For a long time ‘TTL” meant 5 volt. Nowadays more and more 3.3 Volt boards are available as well in the Arduino series as in the popular ESP8266 and the raspberry Pi. On these boards the STN4NF03L (Vgs(th) 1Volt), can be a good choice. Not an ideal choice, but a good one. Check section 2.1 figure 4 in the datasheet. (Mind you the Vgs(th) -threshold gate source voltage- is not the Voltage at which to use the FET, see  warning at end of this paragraph)
Other good choices are the FQP30N60L (Vgs(th) 1-2.5 Volt), or the IRLZ44 (Vgs(th) 1-2V)(discussed above and practical results of the latter found in Jeroen’ s comment below)
Other FETs that can be used with 3V3 are for instance (By no means complete):
IRLB8721PbF Vgs(th)  1.35-2.35 Volt
PJC7400_R1_00001  Vgs(th) 1.7Volt
IRLMS2002TRPBF Vgs(th) 1.2 V
AON2408 Vgs(th) 1.2V
 PMV16XNR  Vgs(th) 0.4-0.9V. On-Resistance of only 20 mOhm when powering the gate at only 3V, and can source a bit more than 6A
AO6400 Vgs(th) is 0.65 1.45Volt (typically 1.05 V) capable of delivering almost 7 amps
SiSS52DN Vgs(th) 1-2,2 Volt at 3V3 Gate voltage it should be anle to deliver 100A. (page 3 Transfer characteristics table). It has an Rds(on) in the tens of miliOhms. AFAIK it comes i a Powerpack housing only.

Let me again stress for the novice, that the Vgs(th) is the voltage on the gate at which the FET just starts to open. It is not fully open at that voltage and can only  deliver very little power. The FETs mentioned here however can deliver more power when they have 3v3 at the gate. Check their datasheet though to see if it is enough for your project. (usually you will find it on page 3 in the ‘transfer characteristics graph). If for instance we look at the FQP30N60L That  has a Vgs(th) of 1-2.5 Volt, we can see that at room temperature at 1 Volt…it doesn’t do anything but at 2.5Volt it may do  around 2 ampere. At 3v3 however it can deliver about 11 ampere

fqp30nl60

The STN4NF03L (Vgs(th)1Volt)  for instance can deliver about 4 ampere at 3v3 but almost nothing at 1Volt.

So what about some of the popular ‘chinese web site’ MOSFET moules that are available. for instance this one:
d4184

That has two D4184 powerfets in parallel. The D4184 has a Vgs(th) of 1.7-2.6V. The datasheet (page 3) teaches us that at 3V3 the max current is probably around 1, maybe 2 ampere (it is hard to see in the graph). So the board will do for 3V3 if you only need 2-4 amps. It’s real capability of 2*50 Ampere however needs a gate voltage of 10Volt.

How about this one:

Well, that has an IRF520, that is not even very suitable for 5 Volt.

How about this one:

Well, it seems that one is available with either an FR120, an LR7843 or an AOD4184.
The FR120 has a Vgs(th) of 1-2.5 Volt. The transfercharacteristics in the data sheet though show that even at 3v3 the Drain current is really minimal.
The LR7843 has a Vgs(th) 1.4-2.3V at 3V3 it is capable of delivering high currents. the transfer chracteristics graph shows 40 Amps, but only at short bursts. The max current is 16 Amps.
The AOD4184 is AFAIK similar to the D4184 that is discussed above: the board will do for 3V3 if you only need 2-4 amps. It’s real capability of 2*50 Ampere however needs a gate voltage of 10Volt.

Epilogue
I feel compelled to add a few caveats here. I have focused mainly on whether 3V3 or 5 Volt was an appropriate level to turn on a FET and get a decent current flowing through it (as opposed to just the threshold gate voltage). That does not mean though that every FET I mentioned here as being TTL level, be it for 3v3 or 5 volt is suitable for your specific project. Eventhough 3V3 or 5 volt may be fine to even fully open a FET, there are other factors to take into account when chosing a FET for your project. 2 important ones are the Rds(on) (=Static Drain-Source On-Resistance) and the Ciss (the input capacitance).

To give an example: the AO6400 MOSFET that has a max current of 6.9 Amps can be fully switched on with even 1.05Volt. However the RDS on at a low gate voltage is about twice as high as with a Vg of 10 volt. At 10 Volt it is 28mOhm and at 2.5Volt it is 52mOhm. at max current that would be a power dissipation of 1.3 vs 2.5 Watt. Maybe both not much, but it could be important for your project. The AO6400 has a gate capacitance of 630 pF and the IRLZ44 has a gate capacitance of 3300 pF. In combination with a gate resistor that determines the RC time, or in other words the speed that the FET will react to a specific gate voltage. Again, it might be minimal but it might be of importance for your project

149 thoughts on “Using MOSFETS with TTL levels (5 Volt and 3.3 Volt)”

  1. Rob, the 10 k resistor is there to pull the gate of the FET to a high enough level to fully open up the FET.
    If it is not there, the gate will not get any voltage from the 12 V power source.
    If it would be just a wire (i.e. 0 ohm, it would be quite hard to close the gate without shorting the power supply when the transistor closes. You’d probably fry the transistor as well

  2. recreated this with pn100 tran and irf1405 mosfet

    reverse R1(to gnd) and T2(C to Vcc E to T1g) to run it non inverting

    good learning curve as i knew next to nothing about transistors at the begging

    1. Joe, good idea, but as I picture your changes, the emittor will be at 12 Volt when open, while yr Arduino will set the basis at a max of 5Volt, which would cause the transistor to close again. But if it is working for you, that is good

      1. foutIs this what you mean? I have a hard time believing it would work properly for reasons I explained earlier, but if you say it works for you… great

  3. Thank you for the clear explanation. Is it possible to use two (or maybe three) IRF510 to handle more amperage? It would probably be best to just buy a FET that could handle the higher amperage, however I have some IRF510 s in my parts bin.

    1. Apologies foe my late reply. I haven’t been paying attention. As far as I know it is possible to put FETs parallel but I think it is better to get one w a higher rating, just in case the FETs don’t open at the same moment

  4. Excellent post, was very illuminating! In the schematic where you show the BUZ11 FET, are R1 and R2 functioning as a voltage divider?

    1. Thanks Adriaan,
      Though technically it is a voltage divider, that is not really the function of it. R1 is just there to limit the current through the gat, coming from a microcontroller pin.
      the function of R2 is to tie the gate to ground in case there is no input attached. As FET’s usually have a high impedance, leaving a gate ‘floating’ may make it be high or low and the attached lamp might go on when there is no signal

    1. the LM324 is a quad opamp. driving a mosfet with it is basically attaching the output to the gate of the MOSFET. Not sure though what bridge you need. Is it for audio? Or for a power rectifier?

  5. Would like to have a non inverting driver, do you have any recommendation how to solve this, or best IC driver for arduino.

    1. if you drive a logic Mosfet directly from your arduino it is non inverting. so I am not entirely sure what you need

      1. Im actualy pondering the same question as Legolas. How can you design a non inverting circuit for controlling a non logic level mosfet where the 5v the arduino can provide is not enough to “open” the mosfet enough.

        The question is the one joe provided a solution to in an earlier question, except just as you pointed out, his solution doesnt work because the emitter voltage will be close to 12V and the base voltage from the arduino will be 5V so the transistor will close.

      2. Well, you would need to put an inverter before the circuit i provided, either by a logical gate or with yet another transistor. I am not sure if there is an easier way to do it. But it would be a bit of an uneconomic solution compared to just using a logic level MOSFET. If you come up with an idea I would be happy to hear it. 🙂

    1. yes you can, but the question is reallt too genereic to give a good answer to as there are probably better ways to drive astepper motor from an Arduino. If the steppermotor does not draw too much, think about an ULN2803

    2. I see. That was a MOSFET motordrive board you referred to. It doesnt look dedicated to a steppermotor though, more to drive a rgular DC motor.
      There are ready made driver modules for stepper motors, check aliexpress, or, depending on yr motor, use a 595+ULN2803

  6. Hi,
    I try to make something like this but I’m not using arduino but a PIC18F4550. I should turn on a load (some LED lamps in paralel) with a Mosfet. In my schematic I use an output with a small resistor (150 Ohms) in series with the gate of the N Channel Mosfet (STP3NA) and my load is in drain (like the first schematic showed in this post, but I have no R1 resistor between gate and source, I only have a resistor like R1 in the second schematic). So, when I put the output high some of my LED lamps doesn’t turn on immediatly, it seems that has a flash before turn on. Is that normal? I think that is not normal. Who can tell me what should I improve i my schematic? Should I try to use a BC337 for exemple to turn on the Mosfet like the schematic 3 and in this case when I put my output high the Mosfet is off, so I should put it Low to turn on my load, is it?
    Thanks all

    1. Dinah, that your lights do not light up immediately seems kinda odd, but could be a habit of the lamp you are using. What kind of lamp is it?
      wether to use a resistor in the gate line is a matter of debate, some say no, some say yes. I have chosen to put one in just to be sure. Normally the impedance of a FET is high enough to not lose any signal over that resistor. The gate source resistor is purely to make a predefined state and to avoid the entrance to float
      I do not know the PIC18F4550 that well, but what is important is the Output voltage it has on its pins. The STP3NA I do not know very well and I couldnt quickly find a readable datasheet, but though it doesnt seem to be a Logic level FET, from what I could see, it should open enough around 3 volt already… but if you have a better datasheet, please check that.
      If it does open at 3 volt and your PIC supplies that, adding a transistor is not really necesary and if you do it doesnt need to be the BC337, can be a regular signal transistor too, like the 547.
      What i like you to do first is to detach the pic-circuit and just put 5 Volt on the entrance of yr FET circuit, via say that 150 ohm resistor, and see if then your lamp behaves the same.
      Let me know

  7. Hello – Great post ! I’m trying to build a H-bridge with mosfets (switching from ‘old’ NPNs and PNPs …). Could you please recommend a logic-level P-channel equivalent to the IRLZ44 or IRL540 ? Thank you. Olivier.

    1. Somehow Logic P channel mosfetsarent as plentiful. You could consider the FQP27P06.
      I presume you are aware of the designcriteria of an H-bridge and the chances of shorting your PSU if you dont do the switching correctly.
      Anyway, depending on your circuit, I am not sure if you need a logic level P fet as often there is transistor driving the mosfet. good luck

      1. Thanks – You are correct. The two P-channel mosfet will be driven by transistors. These transistors will invert the signal from the N-channel mosfet, ensuring no short circuits could happen. The driver will have only 2 inputs, allowing off, fw, rev and brake. I need TLL mosfets just because the motor is ~5V max…

  8. Could I use the IRL540 (or IRL540N) in order to activate a on/off +24Vdc/10A solenoid valve? The circuit should be robust enough to support the load during a few minutes.

    1. oddly i replied twice and my answer just doesnt get logged. OK I try again: Yes you can. The IRL540N can take 36 amps. Please bear in mind that eventhough a logic level FET, the IRL540N is not at its lowest resistance at 5 Volt, but it shld be low enough to make 10 amp no problem

  9. Can i use this circuit with Arduino to drive 2 x 20W (1.6Amp each) LED Auxiliary lights on my motorcycle? I will use Arduino to dim the power acording to inputs from handlebar.. Please help. I´m am looking for a good reliable circuit to PWM the lights. Cheers!

    1. you could do that, but an Arduino might be a bit overkill. An attiny85 could do that as well. But then again, if bought at the right place.. a bare Attiny85 may cost 80 cts and a complete arduino pro mini only 1.60 euro

  10. Hello.

    I would like to control my marine tank LED’s at 4amps 12v and have a IRF540 what circuit would be best suited to this type of application and part?

    1. The IRF 540 can obviously take 4 amps, but sadly it expects a higher voltage on its gate than the most microcontrollers can deliver ( i presume you will use a microcontroller). That means you have to have a 12 Volt driver as in this circuit: https://arduinodiy.files.wordpress.com/2012/05/fet2.gif
      However keep in mind that that driver inverts as well, so you have to invert your signals (HIGH-> off ; LOW-> ON).
      Really my advice would be to get a different FET, use the Logic level FET’s, such as the IRL540.
      I am not sure where you are based but the IRL540 costs abt 60 cts where I am.
      That just will make your circuit much easier and save you a transistor and resistor.
      Good luck, but dont hesitate to ask again shld you need further advice

      1. Hi.
        Thanks very much for your time.
        Yes im using Arduino to control the circuit.
        I will try source a IRL540.
        So no R1 and T1 from your diagram link?

  11. Hello
    I have IRL3713 and IRL540. I tried to switch an IR LED to control the air conditioner. I noticed that the range is very low. When I conneted a BJT (2N2222) it was ok, range was above 4 meters.
    I couldn’t understand the datasheet of IRL3713. The current of a MOSFET is Ids =K*(Vgs-Vt), so it should be constant for some Vds. But where can I find K in the datasheet? Also, from the graphs, Ids changes with Vds, is it because of the channel shortening effect? How can I find the current in the LED?

    1. IR LED’s usually have a high (80-100mA) current they can take. Do you have a type number for the IR LED? Then you can find the current in the datasheet?
      remains the question why you would want to use a bulky IRL540 or an IRL3713 (which i think is a double MOSFET
      When you were using the 2n2222, what seriesresistor did you use. Was that the same as for the mosfet?
      Your formula Ids =K*(Vgs-Vt), is only valid under some circumstances depending on whether Vgs is bigger than Vt or not and wether Vds is close to the saturation or not. But in reality you dont need that formula as it mainly has to do with the range wherein the FET DrainSource acts as a pure resistor.
      The IRL540 is a logic level FET and putting 5 Volt on the gate should be enough to open it up, albeit that it has a drain source resistance of less than one ohm, though that depends a bit on the current and the temperature.
      I would suggest that you just use a 2n2222 or BC547 (or similar) and if you have a regular IR LED like SFH487 (880nM) or an LD274 (950 nm) drive them with 80-100mA.
      the 2n2222 has a collector current of max 800mA so that should not be a problem. For a BC547 it is a bit on the edge.
      Generally, IRLED’s have a forward voltage of 1.4-1.5 Volt, so you need a seriesresistor. The Vce in saturation is about 0.3-0.4 Volts so you need to have a voltage drop of 5-1.7=3.3 Volts. For a 100mA current you then need a seriesresistor of 33 Ohm. Use a baseresistor of say 560 Ohm.

      That also explains why it is foolish (sorry) to use a powerfet to drive a 100mA IRLED. The IRL540 is aimed at currents up to 28 Ampere and therefore it aims at having a very low RDSon. However, since your LED NEEDS a seriesresistor at 5 Volt, there is no point of choosing a FET with say a 0.077 Ogm resiatance, only to then add a bigger series resistor.
      Anyway, my questions
      Which IR LED?
      What seriesresistor did you have on the 2n2222
      What seriesresistor did you have on the FET
      and maybe most of all… Why do you want to use a FET

  12. How we connect irf450 mosfet , here the problem is ….it required 20 v to turn on and from ic 555 i cannot get it

    1. you make a mistake. The irf450 doesnt need 20 Volt tu turn on. It already switches on at much lower voltages, albeit not completely, but the optimal voltage is around 10-12 Volt. The 20 Volt you probably saw in the datasheet, but that is the max voltage on the gate.

      As the 555 can be fed with up to 18 Volt, it shouldnt be a big problem to use the 555 to switch. If you feed it with 15Volt the output voltage is around 12-13 volt which will do the job

  13. I’m trying to switch a 3.7 volt 3A peak load (LoNet SIM800L breakout board) using an IRL540N with 5.2 volts on the gate but the circuit keeps shutting down. I’m using a 3.7 volts LiPo battery as a power supply. And a step up boost converter to supply the 5.2 volts on the gate. According to your post and the datasheet, the IRL540N should have no problem supplying the current at this voltage, right? Or am I overlooking something? When I power the SIM800L directly from the LiPo it runs fine. Please help me out. My hairs are starting to turn gray :-(.

    1. That indeed is odd and I start to wonder if it is the IRL540 that is shutting down or something else.
      Maybe you alreadymeasured it but just to make sure, when your problem aises, have you measured if there is still voltage on the gate or even voltage on your PSU?
      What type of step up converter are you using?
      Try (just to test) without the converter, 3.7 Volt is not ideal but still should open the FET somewhat, and tell me what happened.
      Do you have the break out board in the drain or the source?

      1. HI, thank you for your fast reply and I’m glad you agree that this is odd behaviour! I seem to have missed your reply at first since I did not subscribe to your posts fast enough apparently :-(, but I’m here now.
        I have done like you said. It shows the same behaviour when I use 3.7 volts on the gate directly instead of using the boost converter. I am using this converter: https://www.kiwi-electronics.nl/2-5V-6V-naar-5V-USB-DC-DC-Boost-Converter. Perhaps it is a lose wire or something. The battery is ok and gives a steady 4 volts. I’m using a breadboard. Perhaps one of the wires is corrupt. I will try it again after soldering it instead of using a breadboard.

  14. Hi there,

    Can I use PC817 Optocoupler instead of 4N35?

    And what if I wish to use 5V or 9V instead of 12V input, the R1 (100R), R3 (1K), R4 (40K ???) will stay the same values?

    Thanks

    1. in principle u can use any optocoupler

      With regard to 9V and 5V input, I presume you mean supply voltage. Well there is a bit of a problem there, Not with the resistors but with the FET as those voltages are too low for the IRF540. You need a logic fet for that such as the IRL series

  15. Very good article, thanks for talking about a subject often overlooked by many. Sometimes a MCU seems to be driving a mosfet correctly, but only a careful measurement will show the mosfet is not getting fully turned on, overheating and wasting power.

    However, I would like to point that some mosfets not rated as “logic-level” are also very good for the job. I’m a fan of AO (Alpha and Omega) mosfets, and the model below (as an example) will show extremely low Rds(on), even on voltages as low as 3V, but yet, the datasheet rates Rds(on) at Vgs = 10V:

    Click to access AO6400.pdf

    So, the bottom line is: always check the whole datasheet, specially the Vgs / Rds(on) curve, if the datasheet has one. A mosfet may have great performance at low voltages, even if the datasheet initially rates it at Vgs = 10V.

    1. Thanks for your contribution. That 52 mOhms at 2.5Volt definitely is pretty good. better even than some TTL level MOSFETS. Thanks for pointing out that series. I was not aware of those. In case of the 6400 it seems the effect of a higher Vgs (say 10 volt as opposed to 3V3) is in a lower RDSon (28mOhm vs 52mOhm),so at a lower gate voltage the Fet has to dissipate more heat. With the max current of 6.9Amps that would be 1.3 Watt vs 2.5 Watt. Those are not huge numbers to begin with but in some projects it could make a difference.
      Checking the datasheet is always a good suggestion. Some people however have trouble reading a datasheet or do not know what to look for and in that case foing with TTL level FETs is a safe option.
      Many of the cheap MOSFET driver boards available at say Dealextreme or aliexpress are with an IRF520 or IRF540 and though these will do they job, they are definitely not the best, as 5 Volts just not high enough to open them up. The 2n7000 series, often used with the arduino is even worse in that aspect, but if used to switch an LED it is OK (rdsOn about 40-50 ohms at 4.5V)
      The AO6400 you refer to can handle almost 7 ampere. That is definitely enough for most applications.
      It is not expensive: If bought per 20 it is 26 eurocts a piece.

      1. Glad to be able to contribute! The only caveat using those AO parts, is their size: they are tiny, SOT-23 package, and that bring problems on soldering, and also on power dissipation!

        I already set a few of them on fire during testing / development, because they can’t stand much current in the linear zone. So, mistakes during development can be fatal.

        They indeed can stand almost 7A, but only when sufficiently on or off. For example, when used with a high frequency PWM and high amps, careful testing must be done, because high frequency means more time spent in the linear zone, and these parts can quickly get hot and burn, differently of TO-220 parts, that can also burn, but only after some minutes of overheating.

      2. Switching speed indeed is important. I emphasize that in my AC dimming with PWM article as in a MOSFET article I am still working on. I can imagine that a SOT23 indeed can only take a current the size of 7 amps if there hardly is any dissipation (read low RDSon). MOSFETs make excellent switches but bad resistors :-).
        A spec the the size of an SOT23 only needs a little heat and it is gone 🙂

  16. Did you test something like AP90T03P-HF?
    Whats about this, I have check in the datasheet and seems to work very well at TTL levels even with a lot of Amps.

    1. The AP90T03P-HF is an interesting Mosfet. It is not a true logic level mosfet, it needs some 10 volts. However it has a very low Rdson. At 10 volt it is 4mohm and the fet can take 45 amp, but at 4.5 it is 6mOhm and can handle 30 amps. at 5 volt it is about 4.5 mOhm, so it will function well at TTL levels.

  17. Hi,
    Your post really helped me understand more about mosfet’s and there datasheets.
    But to be sure i had a question.
    I want to put around 10A of current trough a coil to make a partical accelerator.
    I had a IRF540 Mosfet but now i understand why it became very hot.
    My question was which MOSFET should i buy, could you give my some advice?
    I was thinking of the IRL540 and the IRF530 you mentioned earlier.

    Thanks in advance,
    Ruben

    1. if you use ttl logig the IRL540 is a good choice. The IRF530 not so much as it is not a logiclevel FET, though it does better than the IRF540. At 5 Volt GS it can however only take some 4.5 Amps, whereas the IRL540 I beleve can take 25 Amps (check the datasheet) with a rather low Rdson.

      In general you want a MOSFET that has a low Rdson and switches fast at the available triggervoltage (5volt with ttl) and ofcourse can take the voltage and current it will be exposed to.
      The input capacitance is best chosen as low as possible. Most MOSFETS will be between 600-1300pF. The capacitance is a factor in how fast you can switch the MOSFET. MOSFETs need tobe switched fast. They are good switches,but you dont want to use them as resistors.
      Now you want to put current through a coil. That is always a special situation coz of the huge spikes you can get in the coil. need to protect your FET against that, but I leave that design to you. A particle accellerator……. interesting. Good luck

  18. Thank you for this very good explanation. I am not used to Mosfets and was not aware of the differences between IRFxxx and IRLxxx Mosfets and was wondering why my Mosfets (IRF840) got terrible hot, even the current was only 2.4A while the Mosfet is specified for Ids max 8A. Using the transistor to drive the gate with higher voltage solved the problem.

    1. More and more cheap Mosfets. I didnt check the specs but the guys at Bildr are smart enough to use logic MOSFET i guess 🙂

  19. dear sir i have 40 volt supply.. now i want convert 40 volt to 12 volt dc…..please give me any simple circuit

    1. The simplest circuit is just a 12 V regulator but that is very inefficient.
      You need a step down/buck converter. However I advise you against building that yourself as they are rather cheap if you just buy them:
      https://www.aliexpress.com/item/DC-CC-12A-300W-Step-Down-Buck-Converter-7-32V-To-0-8-28V-Power-module/32247251105.html
      or
      https://www.aliexpress.com/item/5-pcs-LM2596HVS-LM2596HV-DC-DC-Adjustable-Step-Down-Buck-Converter-Power-Module-4-5-50V/32583565817.html

  20. Well what an amazing article. I know understand MOSFETs and data sheets. You should take up teaching 🙂

  21. Recently I am designing a circuit for drive a 8 Amps DC Motor directly by a TTL level output from an Arduino Micro, First I was thinking to use IRLZ44N you tell in this article and will works great due to it 25mOhms at 5Vgs that make the mosfet dissipate about 1,6 Wats (probably I will need a heatsink), but finally I am thinking to use a similar Mosfet called STP55NF06L with a little lower Rds(on) (20mOhm at 5Vgs) that will dissipate 1,3 Watts. Not significant difference but my electronics shop has it in stock 😉
    http://www.st.com/resource/en/datasheet/stp55nf06l.pdf
    I think to tell you this other alternative to IRLZ44N. Regards,

    1. Antonio, thank you for expanding. Indeed, more and more FETs availablefor 3.3 Volt. Good luck with your project

  22. Hi, really interesting your information!!, you make easy the topic! thankss a lot!. I want to drive the CBT-140 WHITE LED. The datasheet mentioned a current between 21 Amperes -28 Amperes for driving led. I´m using a microcontoller to turn on and turn off the device. Is there any logic mosfet capable to drive 25 Amperes? or Is there any logic mosfet capable to support 150 W (power dissipation)? or do you recomend use a “classic” mosfet to drive this power? thank you!!

  23. Pingback: AcTricker | Djynet
  24. Hi, I’m having problem using IRF520. I just need to switch on and off small DC motor. Every time I tried with new IRF520, but any of them worked only for first time. and then the mosfet closes the circuit and never open again. It seems mosfet get burned every time. I just touched the gate pin to turn motor on. even if I release finger, the gate not closed. The transistor may burnt. I even used feedback protective diode with motor. what may be the cause for it?

    1. without exactly knowing your circuit, I would guess it is static electricity killing your MOSFET.
      Also, if you have the gate floating, the state of the mosfet could be undefined

  25. Hi, awesome explanation, here I have a problem, I´m working with a RFD16N05LSM, it is a logic level mosfet so I should drive it by the 5v arduino output.

    I´m driving a 12v led strip, with 4 colors, but the different colors are connected to different wires, and then the ground is a common wire, so I have no other chance to use the mosfet between the 12v and the led strip.

    the deal is that when I turn on the mosfet with the high pulse of the arduino it just alow 5v out, but the drain is connected to 12v and I´m using a 10k resistor to ground at the gate.

    Do you have any idea why is the mosfet not working properly and letting the 12v works on the led strip?

    Regards!

    1. ok let me see if i understand you correctly: you have an NFET with the drain connected to 12 V and the source is connected to your ledstrip.
      And as i understand when you put 5 volt on the gate, the output (on the source i presume) is only 5Volt.
      That is not surprising. For this MOSFET to open you will probably need atleast some 3 volt GateSourcevoltage. As there is an LED in the source to ground (i presume), there is already a voltage drop, keeping the source above ground. Say that is 2 Volt. Then indeed the FET will open but it cannot go above 5Volt at the source, because then it will close again as the VGStsh is around 1-1.5Volt. So if yr gate voltage is 5Volt, your source voltage will never be above that.

      You may want to read up here https://electronics.stackexchange.com/questions/70318/using-a-n-mosfet-to-switch-a-common-cathode-ledstrip

  26. It’s actually much worse than you describe. Every curve you have used has in small print V(DS) = 50V (or similar HIGH voltage) Tw = 20uS. So the currents you are quoting are with a full supply voltage across the FET for a very short time.

    For FETs a much safer measure is R(ds_on) at a given gate voltage.

    1. Oh i fully agree David. I usually look at RDSon but many people just want to know ‘how much current’
      Fets are wondefull little gadgets but can be quite fiddly at logic level voltages

  27. Hello, would anyone know if NCEP01T18 can be driven by Arduino? This actually is used for heatedbed in 3D printers up to 180A.

    I would like to use it to switch car heated seat (12V, 8A).

    The datasheet indicates max Vgs 4V but the curve shows that at 5V the mosfet can deliver current way above my requirement

    Thank you for your help.

    1. The NCEP01T18 has a Gate threshold voltage of 2.5-4.5 Volt. Though that seems like the FET is suitable for an Arduino, I do not think it is an optimal combination. I tried to find a Vgs vs RdsOn graph, but it definitely looks like this FET would appreciate a bit more Voltage on its gate.
      I am not sure what datasheet you looked at but I do not see a max of 4Volt, I see a max of ca 20 Volt

      1. Thank you for your answer.
        I bought it and it works with Arduino. It start switching on at around 3V and it seems to be quite wide open at 4,5V. I am actually using it with octocoupler connected to 12V. I am getting almost 7V at the gate so no issues.

      2. Great, that is good to know. 7 Volts at the gate definitely a lot better than 4.5 though you may not benefit from the very low RDSon of this FET, so the full 180 amps might be pushing it 🙂
        Sadly I didnt find a good graph to relate maxpower or RDSon to the 7 Volt gatevoltage, but I guess if it is working it is working. Keep an eye on the temperature though when you start using it with 8 amps.
        Would be interested to hear how the FET holds out on 8 Amps. Always good to know practical experience with FET’s

  28. I require to use Arduino along with driver and power MOSFET for getting an output of around 1 to 1.5 k V.basically an SMPS for applying on very low loads.I am planning to use 2SK3748 Power MOSFET. My dilemma is am new to this field so is there any other better power MOSFET for high voltage switching application and driver for the same.The only conditions are it should have high switching speed so low rds on and high break down voltage.

    1. nisha, I usually do not work with such high voltages so I am very hesitant to do a recommendation, maybe someone else can

  29. just to let you know that NCEP01T18 is holding great. At 8A it is not even breaking a sweat. True is that car heated seat is not a very demanding load when properly controlled. Setting a temperature to a comfortable level arduino switches the mosfet on for 10-20sec followed by a 50sec off time.

  30. Silly late to the game 6 years after the fact, but as a bunch of IRLZ44’s arrived today, I put them to the test: Rds 38mOhm with a Vgs of 3.3 volt. Very nice!

    If you happen to only have non Logic level MOSFETs laying around, i.e . IRFZ44, and you want to switch somewhat higher voltages (i.e. your 12 volt LED strips) a good design is to use a MOSFET driver, such as a TLP250. It contains an opto-isolator and does all the gate driving. Also easier if you need to do high side switching.

    1. No such thing as too late though as Fet’ s are still around and when I wrote the original post I think it only dealt with 5Volt. Asyou know I have been hesitating between the IRLZ44 and the FQP30N60L, the latter being often advised on the raspberry fora, but it seems your results are quite good.

      TLP250 certainly can replace my fiddling with transistors to drive a high voltage FET,
      Thanks for your input.

    1. Thanks, perhaps we are just discussing terminology here. I want the MOSFET to be completely open such that Vds and Rdson are minimal and in fact it acts like a switch
      As far as I know that is called saturation, but I could be wrong

    2. it seems the handouts has switched the terminology for ‘saturation’ and ‘linear/triode’ region, hence explains your confusion. i am amazed how notes from education institutes got them wrong.

    1. I fully agree, those are a bad choice, but I guess someone made a couple of thousand before the logic FETS were freely available and someone needs to buy those, so lets push them onto the Arduino buyers 🙂

      4 euro is actually quite steep for those boards. Definitely should consider aliexpress for thos things, but maybe it is just my tightfisted dutch personality 😉

  31. hello 🙂 … you did a nice job explaining pretty much all the basics info about n-channel MOSFET, but I was wondering how can you drive the gate of a p-channel MOSFET irf9540n by an Arduino PWM pin, to charge a 6v SLA battery with an input to the system of 8v, and of course an input for the Arduino about 5v .

    1. Thanks. So if I understand you correctly, you will have a PFet with the Source connected to 8Volt, the Drain to the 6 Volt battery and the gate to the arduino. The Vgs of the Fet is -10Volt, the max you have will be -8Volt, which will be enough to open the FET. The problem is in closing the FET. Your max output on the Arduino is idelly 5 Volt (bot probably more like 4.5Volt), so the smallest voltage you can put on the Gate is -3 Volt (5-8). At that Vgs it still can allow some 4 amps to flow through, just at a higher Rds, so there still will be a load voltage and a load urrent, but with a FET that is getting hotter.
      So what you need to do is to increase the voltage you can put on the FET, in order to fully close it.
      Here is a circuit that may do that, albeit that you need to adapt it for your voltage and keep in mind it inverses the signal https://2.bp.blogspot.com/-eT9K6TqFwLA/WOoCVNREmSI/AAAAAAAAPAw/N1bzbXPG8AY87BPyBxavb4FM9xSmytAMwCLcB/s1600/QRP-LABS-TX-switch.png

  32. Buenos dias.

    Es muy buena la explicacion que transmites y parece que realmente respondes las preguntas que te refieren. Estoy interesado en suscribirme. Podrias decirme como hacerlo?. Muchas gracias.

  33. Since I am working with power switching, I am always testing the mosfets with different resistance, pull-up and down range. Because if there is difference in pull-up and down resistors value, it does create kind of duty cycle. rising and falling different time line. Since gate also kind of capacitor, to charge and discharge as well as to avoid this and make it instant switching, I use full wave signal to charge gate and discharge. It is pity that most manufacturers does not even mention on their datasheets!

    1. True. The gate capacity should not be ignored especially in com o with resistors as you mention

  34. Hi E,
    This column is really nicely done. I appreciate your tone and encouragement of those of us on a journey to learn more.
    The explanations and examples you provide, plus the quite helpful comments and suggestions by others, made this a delight to read through. It certainly helped me a lot. Thanks again.

  35. Bonjour j’ai un arduino Due je cherche a faire allumer une ampoule à incandescence de 6Volts via un Mosfet.
    On sait tous que l’arduino Due ne délivre qu’en sortie un niveau 3,3V j’aimerais savoir qu’elle mosfet je pourrais utilisé.
    Aujourd’hui j’ai un IRF520N donc avec une Uno ou mega OK mais pas pour la Due. Ma sortie PWM a une résistance de 220 ohms sur la Gate et une résistance gate source en pull down de 10kohms. Est ce que l’IRL540Z conviendrais? Est ce que le FET va pas surchauffer? Merci de vos retour.

    1. Bonjour. L’IRL540Z a un seuil Vgs de 1-2Volt.
      À un Vgs de 3 volts, il peut commuter 15 ampères. Cela semble être un bon choix.
      La résistance de 10k est bonne, mais peut être plus élevée.
      Bonne chance

  36. Hi E
    I know that you have said above that you should not use a MOSFET as a resister.

    The old question of controlling a fuel gauge with an MCU PWM.
    The gauge I gather is a bit like a voltage divider. Supply voltage 12 V, earth wire, and a signal wire. The signal wire when not connected to ground is 5 V. The gauge signal wire is to go to a fuel sender that works on resistance. 190 Ohm resistance is full ; 0 Ohm is empty. On the signal wire I think there is less than 20 mA current when reading empty at 0 volts, at full there is a bit over 2 Volts.
    A digital resistor will not give enough set points in the 200 Ohm range (say at least 30)

    Can a MOSFET be used for the above?
    What sort would you suggest?
    Use a MOSFET in parallel with 190 or 200 Ohm resistor/s
    Or, control with just a BC547
    Located in Australia.
    Kind regards…Ross

    1. Ross, though better to not use a mosfet as resistor, ofcourse it can be, provided the dissipation is kept low. The problem of using a mosfet in your case though seems hard because you have no way of setting the resistance. As far as i understand your setting you would need to be able to set known resistance values right? Neither mosfet nor bc547 can do that. If you don’t need that, both will work

      1. That is a very quick reply E.
        Will the value from a MOSFET be linear?
        What MOSFET will give a linear value in this range?
        Can then set the upper and lower limits of the PWM
        Thanks, Ross

      2. The linearity of a mosfet can be found in their datasheet. Though they may be linear over a certain interval they are usually not linear over their entire range. As i never have used Mosfets in this way i wouldnt know of a specific one. If at one time you need your resistance to be 200 ohm and you have a current of 20mA that comes to 4Watt dissipation so i would go for power mosfet. Thise are usually bult for low RDSon so you would be working over a small range at the fringes of its resistive vs conductive value….where things usually are not linear.

      3. Add to that that when your mosfet hears up, the resistance changes.
        Also PWM does not work because that ysually switches a mosfet fully on or off

      4. OK
        So cannot use a MOSFET, maybe unless it is used as a ‘voltage divider’ if that is the correct name. Put a resistor in parallel with the MOSFET, and the current will go through the resister if the MOSFET is off, or a % depending on the amount of time the MOSFET is open.

      5. Indeed. A mosfet would not be your best choice.
        Depending on the amount of setpoints you need, how about a multi switch with resistors?

    2. Ross, as I assume the fuel gauge is relatively slow, I don’t see why you can’t use PWM (as you kind of indicated in your question. Linearity can easily be obtained in the code. Just drive the gate from a PWM output, and the gauge through a 180 ohm resistor to the mosfet. That should basically do it, unless the gauge is digital and starts jumping all over the place.

Leave a reply to AJ Cancel reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.