I am trying to make a simple circuit to control an IKEA LED strip (VATTENSTEN, 1.5W @ 5V) with an ESP32 (for use with ESPHome).
For this, I am using a BS170 MOSFET to control the circuit, and it works great when turning it on, achieving full brightness.
However, when I turn it off, the LED strip is still lit (albeit incredibly dimly). I have tried changing the transistor in case it was faulty, but I got the same issue.
Here's the schematic. From what I've gathered, it should work. Granted, I don't know much about this, and it's very likely I'm just missing something incredibly obvious.
simulate this circuit – Schematic created using CircuitLab
I've checked with a multimeter, and the gate does get pulled low, so that's not the issue.