Electronic – MOSFET switch not turning off load

mosfetnmosstm32transistors

I am using a n-channel MOSFET (AO3400A) as a power switch. Circuit is below.

The issue I'm facing is when the EN pin is 0V, the LEDs are still dimly lit. The voltage across the load measures about 2.9V.
When EN pin is 3.3v, the LEDs are at full brightness and the voltage across the load measures 5V. This is the expected behaviour in this instance.

With EN at 0V, I would have expected the LEDS to be completely off. Any thoughts why this might be the case ?

Just a note, in my actual application I'm using Neopixels, but have simplified the diagram for the purpose of this question.

enter image description here

Best Answer

Neopixels are not simple LEDs. They have a driver IC inside it. And in addition to supply and ground, there is data pins that are referenced to ground.

It is not correct to turn off the ground of an IC, because it still can leak supply current out of the data pins via IO pin protection circuitry when data pin is pulled low.

Don't disconnect the ground if you need to cut power to the RGB LED.