# MOSFET as a switch - drain to source resistance (voltage drop) too big

I'm trying to use an IRF510 MOSFET as a switch for my JSN-SR04T ulrasonic sensor connected with ESP32 based microcontroller.

• The gate is connected to a GPIO pin which outputs ~3.3V and is also grounded with 10kOhm resistor.
• The sensor is between Vcc and drain.
• The source is grounded.

When I turn on my GPIO pin, the MOSFET switches on but the voltage between drain and source is ~1.5V, which means my sensor won't turn on (it needs 3.3V.) Shouldn't the voltage between drain and source be nearly 0? What could be the cause?

• Does this answer your question? Should an N channel MOSFET turn on when I apply the rated "gate threshold voltage"? Commented Jan 24, 2022 at 13:23
• You need to configure the GPIO as push-pull output. And the gate-source threshold voltage of IRF510 can be as high as 4V. This means that 3.3V may not be sufficient to turn the MOSFET fully on. Something between 10V and 20V guarantees a full turn on. Commented Jan 24, 2022 at 13:25

You are nowhere near driving the IRF510 with enough gate-source voltage: -

3.3 volts is just too low for this MOSFET. Even with 4.5 volts if you tried to take 100 mA the volt drop would be 100 mV. You didn't say what current your sensor took but, at 3.3 volts gate drive, the IRF510 is a poor choice. The words in the data sheet tell this too: -

4 volts gate-source voltage is only guaranteed to cause a drain current of 250 μA.

• Thank you for a detailed answer. I didn't understand datasheet properly. Commented Jan 25, 2022 at 7:39

Consider the quadratic equation for RdsOn depends on the square of the difference of the gate to threshold voltage of reaching the rated RdsOn.

The mass production of FETs has a wide tolerance for Drain Threshold current from Gate to source voltage. The traditional FETs have a Vgs(th) rating from 2 to 4V or so. In the last decade over 50 thousand new FET varieties have been produced and many for Logic level voltage control with a lower threshold range than the 2 to 4V range.

Typically for the traditional 2 to 4V FETs you want at least 250% more gate voltage than the Vgs(th) aka Vt. (this was your mistake)

For the logic level FETs with thresholds that permit 3V control the thresholds must be below 50% of the minimum control voltage or less.

As these are cost-sensitive choices choose the best match using the RdsOn max and Vgs minimum that you can guarantee and determine the temperature rise of heat dissipation for the current and RdsOn that you need to avoid excessive junction temperature rise such as > 60'C which affects MTBF.

Details on FET parameters

The cause is 3.3V gate drive voltage.

The FET barely turns on at 3.3V, it needs much more.

Lots of correct answers here (your gate voltage is insufficient for the FET), but no one else has posted the solution. There are many logic-level compatible MOSFETs which you can find. Further, with such a small load current, you don't require a large FET with commensurate large gate charge, so you should be able to drive it directly from your microcontroller.

Here's a link to a few candidates: https://www.digikey.com/short/fz4tmwr7

• Thank you very much I'll be sure to get one of these. I guess I didn't read the IRF510 docs the right way. Commented Jan 25, 2022 at 7:38