# Current is limited when using MOSFET as a switch

I want to realise a basic ESP32 board to control three fans connected in parallel. In order to control the fan power, I'm using the FQP30N06L, a logic-level N-channel MOSFET. As you can see in the simplified schematic below, the MOSFET gate is connected to an ESP32 GPIO pin.

Everything works, but I noticed that the fans don't spin so fast. To debug the issue I measured the total current consumption and it is around 0.7 A.

Theoretically each fan draws 0.2A of current and is powered by 5 V, so a total current consumption of 0.6A should be normal, but if I connect the fans directly to the ground pin of the ESP32 (bypassing the MOSFET), the total current drawn is about 1A.

Of course with 1A of current drawn, the fans spin faster than the previous configuration.

The ESP32 board is USB powered and is configured to draw a maximum of 3 A at 5 V from the power source.

Does anyone know the reason why the current consumption is limited to 0.7 A when I'm using the MOSFET?

simulate this circuit – Schematic created using CircuitLab

• Try with a gate voltage equal to 5V ... Ron is only known with this voltage fig 3 of datasheet. Commented Feb 2, 2023 at 17:57
• Could be related to Vds to Id graph (one provided in the dataseet, Pg 3).You IO is 3.3V. So may be less compared to rated 32 A. Also the graph is for Vds 25V.. You test condition is 5V. That also will be a factor Commented Feb 2, 2023 at 17:59
• (Simplifying the schematic may have been detrimental.) Commented Feb 2, 2023 at 18:41
• 3 fans connected in series will still draw 200 mA if the voltage is increased 3 times @Angel1 Commented Feb 2, 2023 at 20:17
• Figure 3 in the datasheet for the Mosfet shows a "typical" one. But yours might have minimum specs and needs a gate voltage of 5V, but it barely works with only 3.3V. Commented Feb 3, 2023 at 14:44

I think the MOSFET is probably not fully switched on. The voltage on the gate seems sufficient enough, though the current through MOSFET is also dependent on drain-source voltage, which can be lower because the FAN and Ron (of the MOS) are effectively a voltage divider.

Easy test would be to connect 5 V (or better 9 V battery) to gate of the MOS and see if the current is higher, if it will increase the current than it means: voltage provided by the ESP (3.3 V) is not high enough. Assuming you can't increase the output voltage of the ESP, you can do the following:

• Look up a MOS with a lower Ron (resistance when switched ON)
• Or you can increase the Vcc for the fans if its possible for them.
• you can also parallel the FET, usually folks have more than one of a given part. Commented Feb 2, 2023 at 23:34
• I tried to connect 5 V to the Gate of the MOSFET but nothing changed Commented Feb 3, 2023 at 13:07
• @Angel0ne Have you connected 5V to the Gate(+) and Source(-) right? Another thing is, this MOSfet is capable of 20V Gate voltage, so if you can, you can try increasing the gate voltage. Commented Feb 3, 2023 at 13:48
• @Silver I applied +5 V to the Gate, Source is connected to ground as indicated in the scheme above. Later I'll try with 20 V using my bench power supply Commented Feb 3, 2023 at 14:53

You ask; "Does anyone know the reason why the current consumption is limited to 0.7 A when I'm using the MOSFET?" Yes, you are not driving the gate with enough voltage to fully enhance the MOSFET, it is acting a resistor with a higher value than desired.

If you have a resistor between the port and the MOSFET with a pull down resistor on the gate that is wrong, the pull down resistor needs to be on the port pin. This is especially important with 3V3 processors. The reason that configuration has problems is because it is a voltage divider.

The configuration generally shown on the web shows the pull down on the gate and a resistor to the port pin, this configuration is for logic level connections. When in doubt check the Vgs curve and calculate/measure the gate voltage.

Look at the graphs and you will see 3V3 is in the area where it will supply only about one ampere. It is not fully enhanced. A MOSFET is a voltage controlled resistor and since you are not fully enhancing it, it behaves as a resistor with a higher resistance and lower current capacity then the fully enhanced or maximum rating. Logic level generally indicates 5V logic especially on older devices. You need to check the charts when selecting a MOSFET.

Getting the gate voltage a bit higher would solve the problem.

• I tried to apply an higher voltage to the Gate but unfortunately nothing changed. I started with 5V until I reached 20V but the current drawn is almost the same. I also tried to remove the resistor from the Gate to Ground but when I remove the voltage to the Gate, the MOSFET remains active. Commented Feb 4, 2023 at 15:46
• Be sure the MOSFET is ok and measure the voltage from gate to source then gate to drain and what do you get. Is it connected as your schematic shows? Something is missing as it should work as you have shown the circuit.
– Gil
Commented Feb 4, 2023 at 20:24
• The connection is equal to the schematic above. The voltage from Gate to Source and from Gate to Drain is both equal to 5V when 5V is applied to the Gate. Commented Feb 5, 2023 at 7:19
• I goofed, I should have said with the negative lead of your meter on source then from source to gate and source to drain. with 5V on the gate the drain should read zero.
– Gil
Commented Feb 5, 2023 at 19:43
• Correct, the voltage between Source and Drain is 0V when I apply 5V on the Gate. I tried other MOSFET (same model) and the results are the same. Do you have any further suggestion? I would like to thank you because with you answer you clarified what are the parameters to look at when I choose a MOSFET Commented Feb 6, 2023 at 19:57