1
\$\begingroup\$

I am designing a LED flashing circuit with a MOSFET. With a 5V input signal it will drive a 2 watt LED when the 5V is switched on or off. The problem is when the MOSFET is in an off state 1.420 volts is still applied between the LED and load resistor.

Pictured is the two states of the MOSFET. When using just a load resistor to replace the LED the problem disappears. I am not sure why the voltage is being applied to the LED when the MOSFET is in an off state. I even tried with the real parts and it produced the same issue.

MOSFET off state MOSFET on state

\$\endgroup\$
15
  • 1
    \$\begingroup\$ Volts don't flow. Amperes flow. Voltage is pressure, amperes is current. \$\endgroup\$
    – JRE
    Commented Jul 7, 2021 at 15:20
  • \$\begingroup\$ Measure the current through the LED when the control signal is "off." \$\endgroup\$
    – JRE
    Commented Jul 7, 2021 at 15:21
  • \$\begingroup\$ Does the LED actually light when the control voltage is "off?" \$\endgroup\$
    – JRE
    Commented Jul 7, 2021 at 15:22
  • \$\begingroup\$ Yes the LED actually lights. I even tried it in real life and it produced the same results. \$\endgroup\$ Commented Jul 7, 2021 at 15:26
  • 1
    \$\begingroup\$ @BigBadBatta: You wouldn't think so, but you'd be wrong. It doesn't take much current to make a modern LED light up dimly. \$\endgroup\$
    – JRE
    Commented Jul 7, 2021 at 15:48

3 Answers 3

2
\$\begingroup\$

The leakage current of the IRF540 can be up to 250µA. Your measurements are showing 12µA, which is within the allowed range.

The IRF540 is made for high current use (33A) - the "high" leakage current of up to 250µA doesn't matter for that kind of use.

LEDs can conduct (and light up) at very low currents. You can find plenty of questions about LED household lights not turning off completely because leakage currents in the house wiring.

This current/voltage plot I made of a blue LED shows just how low the forward voltage can get with low currents:

Full plot: enter image description here

Zoomed in:

enter image description here

Over to the right on the zoomed in version, you can see where the current went above about 2 µA. At that point, the LED was clearly lit and visible on my workbench.


To make the LED turn off all the way, you need to use either a MOSFET with a much smaller leakage current or you need to put a resistor in parallel with the LED.

You could try about a 1.5k resistor across the LED. That will allow about 1 milliampere of current to flow through the resistor. That's much higher than the leakage current, so most of it should go through the resistor rather than the LED. If the LED is still too bright, use a smaller value resistor. Remember to keep an eye on the power rating of the resistor. It will be exposed to the forward voltage of the LED.

\$\endgroup\$
1
  • \$\begingroup\$ There isn't many local suppliers in my vicinity that has a MOSFET with a leakage current less than 5uA. I'm going to have to use the resistor . I've tried the 1.5k resistor and it works well. The extra power loss isn't a huge deal either. \$\endgroup\$ Commented Jul 7, 2021 at 16:58
0
\$\begingroup\$

R7 needs to have a much smaller value. It is not pulling the MOSFET gate to ground quickly enough. Try 10 k\$\Omega\$ instead, and change R5 to 100 \$\Omega\$.

\$\endgroup\$
1
  • \$\begingroup\$ I've tried this in the simulation and it still has the off state is 1.435v \$\endgroup\$ Commented Jul 7, 2021 at 15:25
0
\$\begingroup\$

So, to expand upon my comment.

A MOSFET with zero gate voltage is not a perfect open-circuit. There will be a certain amount of leakage. In the data sheet, page 2, 2nd section, you'll find IDSS, "Zero Gate Voltage Drain Current". For normal temperatures, the max is 25 uA, although this is with 100 volts across it. You are getting 12 uA. As far as the data sheet is concerned, the FET is working within spec.

Can you see this level of drive? If the LED has a linear current/brightness relationship, the light output of the LED at 12 uA will be (about) 1/100,000 the brightness of a full-on drive. Believe it or not, you CAN see this.

Just to prove it to yourself, make the following circuit

schematic

simulate this circuit – Schematic created using CircuitLab

This will give you about 10 or 11 uA. See if the LED doesn't light up - dimly.

EDIT - In comment, you have asked if there is a way to avoid the dim glow. There is. However, it will require changing the polarity of your control signal.

schematic

simulate this circuit

Now, when you turn on the FET, the voltage across the LED will be pulled down to something like 0.1 volt (see Figure 1 in the data sheet, keeping in mind that the current will be about 0.1 amps), and the LED will be turned off. When the FET is off, the LED will be on.

A final note. It is generally a good idea not to select an answer immediately. Give it 24 hours. No matter how good an answer may seem, you never know when a better one may come along.

\$\endgroup\$
3
  • \$\begingroup\$ I just hooked it up. It did light up. It was a little bit dimmer than my original circuit meaning I could have slightly more current flowing than in my simulation. I would assume this is because of slight discrepancies between simulated and real world resistor values. I guess I have to find a MOSFET that has a much smaller IDS. Unless there is a simple way to divert the current away only when the MOSFET is in an off state. \$\endgroup\$ Commented Jul 7, 2021 at 16:18
  • \$\begingroup\$ It's worth noting that your solution of shunting the LED will waste power, which may be important depending on the intended use. \$\endgroup\$
    – Hearth
    Commented Jul 8, 2021 at 14:56
  • \$\begingroup\$ @Hearth - Absolutely. It also is the simplest circuit. Which is more important depends "on the intended use". For that matter, the extra power dissipation may (under some circumstances) be A Good Thing. If the resistor is undersized, that will become apparent fairly quickly. A more efficient circuit will not experience problems with overheating until the LED has been left on for some time - which may or may not cause problems due to the delay. Engineering can get strange. \$\endgroup\$ Commented Jul 8, 2021 at 15:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.