Use this forum to chat about hardware specific topics for the ESP8266 (peripherals, memory, clocks, JTAG, programming)

User avatar
By Sucram
#71276 Hello,

sorry for the noobish question :-)

I want to power a NodeMCU board via Lipo battery, and switch a motor using a mosfet (~1A).

As I've usually work with 5v logic level and are more familiar with classic transistors, I was wondering what mosfet would work using 3.3v.

Is 3.3v enough to switch higher currents with the IRFZ44N? I want to build a few devices with kids where I volunteer at, and preferably want a cheap through-hole component.

The IRFZ44N comes up a lot when searching, though for controlling 12V (e.g. LED strips).

Thanks!
User avatar
By lethe
#71279 No, you can't use an IRFZ44N (at least not by its own).

Have a look at the datasheet: https://www.infineon.com/dgdl/irfz44n.p ... 3b3575220b

One of the most important characteristics for MOSFETs is V_GS(th) (listed under "Electrical Characteristics").
The potential between gate and source pins must be higher than the max. value listed there for the MOSFET to turn on. For n-FETs source is usally connected to ground, so for the IRFZ44N to turn on you must apply a voltage higher than 4V at the gate. You can't do that with the 3.3V output of an ESP GPIO.

You could use a bipolar transistor to pull the gate up to motor voltage instead of just the 3.3V supply, have a look at this stackechange thread for an example circuit: https://electronics.stackexchange.com/q ... -to-device

Alternatively you can choose a MOSFET with a lower V_GS(th). These are often called logic level or sublogic level FETs, but many of those are only available in SMD packages (mostly SOT-23 or SO8).
If you don't mind SMD packages, the IRLML6244TRPbF would be suitable for example.

But in any case, don't forget to add a flyback diode when switching inductive loads.
User avatar
By Sucram
#71280 Thank you for the quick reply and information!

That is what I thought, though I found a lot of projects using the IRFZ44N with the ESP, e.g. for a 5050 LED strips. Probably works to some degree in practice, but who knows how reliable / up to which currents.


Yes, I was favoring a direct solution, skipping the transistor. I'll check out the IRLML6244TRPbF.
As kids will solder it, I was favoring a larger format (e.g. 220);
I've read about the STP16NF06L, FQP30N06L and IRLB3034PbF on the forum here, some of which are a more expensive, welp, I'll check the data sheets tomorrow. Now my head is buzzing.

Flyback-diode: Yes :-)

Thanks again!
User avatar
By lethe
#71284
Sucram wrote:That is what I thought, though I found a lot of projects using the IRFZ44N with the ESP, e.g. for a 5050 LED strips. Probably works to some degree in practice, but who knows how reliable / up to which currents.

Those are pretty bad designs... The threshold voltage given in the datasheet is actually anywhere between 2V and 4V, so these circuits may work with one transistor but may not with another one, even it's from the same batch & manufaturer.
But even if it does work, the V_GS(th) value in the datasheet is for tiny currents (250µA). The FET will still have very high resistance at those voltages, so it will waste a lot of energy.


Yes, I was favoring a direct solution, skipping the transistor. I'll check out the IRLML6244TRPbF.
As kids will solder it, I was favoring a larger format (e.g. 220);

Even though I actually prefer SMD to THT, SOT-23 may indeed be unsuitable for kids to solder, especially if they do not have any experience...

I've read about the STP16NF06L, FQP30N06L and IRLB3034PbF on the forum here, some of which are a more expensive, welp, I'll check the data sheets tomorrow. Now my head is buzzing.

The last 2 should be suitable, if in doubt I would recommend IRLB3034PbF, as its datasheet actually has a drain current graph for gate voltages as low as 2.5V (Fig. 1), whereas the FQP30N06L starts at 3V.

If you want to keep things simple & cheap, you could also use a TIP120 darlington transistor.
These are cheap and easy to obtain, but they are ancient, need a base resistor and given that they are bipolar transistors (which have a voltage drop across collector/emitter instead of the FETs resistance) the circuit will be a lot less efficient (almost 1W wasted at 1A).
However for a simple, educational circuit you may be able to live with these drawbacks...