I do have a problem with getting my Mosfet IRF520N working. In my project, I have a 12 VDC external power source which I need to use in order to get a special LED lighting up. Now I want to turn the LED on and off using the Mosfet IRF520N module. However, I cannot make it work. I have created a diagram to make the current situation visible:
The Mosfet does work actually. I have tried to use it with a 3 V LED wherefrom the powersource came from the Arduino Uno (3.3 V). This worked since the LED did turn on and off as I expected it to do so. But with this new external powersource, it seems not to work anymore.
Note: the LED is on continuously. Meaning it just won´t switch off.
Does someone see what is wrong with the setup? What should I do to make it work?
Parameters to consider when selecting a logic level N-channel MOSFET
Gate-Source Threshold Voltage - Vgs(th)(min) and Vgs(th)(max): Gate voltage at or below the minimum threshold value turns the MOSFET off. Common minimum gate voltages for 5 V logic may fall between 0.5 V and 1 V. Gate voltages above the maximum threshold value turn the MOSFET on. Gate threshold voltages between the minimum and maximum could turn the MOSFET on or off and must be avoided. Notice how the minimum and maximum values roughly coincide with the illegal region in Figure 1.
Drain-Source ON Resistance - Rds(on): When turned on, there is resistance between the drain and source that decreases as the gate-source voltage or Vgs increases. Choose a MOSFET whose lowest Rds(on) values occur at or near the ideal logic high voltage value and do not decrease substantially with higher Vgs values. See Figure 2.
Example: According to its datasheet, an InfineonIRLZ44 MOSFET has 25 mOhms of drain-source resistance at 5 V, 35 mOhms at 4 V and 22 mOhms at 10 V. At 5 V, its Rds(on) value is only 3 mOhms higher than the value at 10 V but is 10 mOhms lower than the Rds(on) value at 4 V making it a good choice with respect to Rds(on).
Figure 3
Input Capacitance - Ciss: The combination of the gate, oxide layer, and the body connection of a MOSFET act as a small capacitor that begins charging when voltage is present at the gate. It takes time to charge which results in an ON-state delay. Choose a MOSFET with the lowest input capacitance possible to avoid long delays and to minimize in-rush current which can be very high initially but lessens as the capacitor charges. Ideally, the ON-state delay is extremely short but may create enough surge to damage an I/O pin that has limited current sourcing capacity.
A current limiting resistor between the pin and gate prevents excessive I/O pin current draw.
When using a MOSFET connected directly to a microcontroller output pin, the MOSFET gate should be pulled either high or low as needed using an external resistor to prevent floating gate logic and unwanted output from the MOSFET during MCU startups and resets.
The above parameters are a basic start to selecting a MOSFET for logic circuits or gate designs that may be fine-tuned with additional consideration for heat dissipation and other performance parameters. Don’t be afraid to give MOSFETs a try in your next project design.
Very good explanation, however the schematic shown will only supply ~2.75 to the gate with a 3V3 processor, R2 should be connected to the port pin or the other side of R1. This is because the resistor configuration performs a voltage divider function. The threshold Vgs of the OPs MOSFET is per the data sheet: VGS(th) Gate Threshold Voltage 2.0 ––– 4.0 V VDS = VGS, ID = 250µA so it may not turn on.
My conclusion would be that the MOSFET is damaged (shorted) or the module was bad when you bought it.
If you decide to buy another, I recommend this one.
If it's any consolation, I made a very similar circuit using the same MOS module (except controlling a solenoid instead of LED) and it worked nicely. Bought 4 more of the same MOS module from Temu to hook up more solenoids and... none of them work. After hours of fiddling I'm beginning to think the problem is just dodgy electronics from Temu, not my stupidity.
The IRF520 has an Rds(on) specified for a Vgs of 10V only. So it may or may not work with 5V.
If Temu is claiming they all work at 5V, then you have been mislead.