Electronic – Wemos controled LED strip not turning off fully

led stripmosfet

I am trying to make a LED strip light controlled by wemos D1 mini with N-MOSFET. I have a working circuit but the led strip is not completely turned off when the wemos pin is low and I do not fully understand why.

Should I try to increase the pull down resistor value from 10k or is the circuit wrong?

I use IRLML2502 (specs) which can switch on 3.3V. Is it a good choice?

Another question is, is this going to sustain working let's say for 10h/daily without heatsink and frying?

Circuit note – 3.3V is the wemos pin.

schematic

simulate this circuit – Schematic created using CircuitLab

EDIT

Readings on the voltmeter says:

  • ESP pin off state – 0.0V
  • R2 off state – 4.5V

I see where the power is coming from. I removed the R2 and all is working now.
Why would R2 be needed there? M1 is charged off immediately anyway.

When the R2 is in the circuit

LEDs in mosfet off state are clearly visibly illuminated in lighted up room. All pictures are same camera settings – a bit underexposed. (From left – powered off, mosfet off, full brightness)
LEDs in power off, mosfet off and full brightness

Best Answer

I think what's happening is that the MOSFET is not completely turning off, working in weak inversion mode. You could try a stronger pull down - 1k instead of 10k. However, you would need to replace the 1 K with 100ohms to maintain the ratio. You could also try making this a high side driver.

I also notice you don't have a current set resistor for the LEDs, you may want to add one to improve the life span of the LED string.