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

  • 3
    \$\begingroup\$ NEO pixels also have data inputs, when this MOSFET is off, a zero on one of the data lines can still power the Neopixel. You simplified the schematic but at the same time that removes the part that is causing the issue! Also, you can program a Neopixel to be off so there is no need for disconnecting the ground with a MOSFET. \$\endgroup\$ Dec 16, 2020 at 20:23
  • 1
    \$\begingroup\$ Watch this video by Dave from the EEVBlog to learn how the ESD protection will power a circuit / IC through any of its pins: youtube.com/watch?v=2yFh7Vv0Paw Dave doesn't connect the VDD and you disconnect GND, that doesn't matter, the same principle still applies. \$\endgroup\$ Dec 16, 2020 at 20:27
  • 2
    \$\begingroup\$ Simplifying the diagram was actually detrimental to your question. You have a big nice schematic everyone sees, and then one has to read right down to the last sentence to know the schematics is completely useless as Neopixel is not a simple LED but it combines a driver IC and the LEDs in a single package. \$\endgroup\$
    – Justme
    Dec 16, 2020 at 20:35
  • \$\begingroup\$ Apologies, I wrongly assumed it wasn’t important detail when asking the question. \$\endgroup\$
    – Dibly
    Dec 16, 2020 at 20:45
  • 1
    \$\begingroup\$ Does this answer your question? Mosfet: gate voltage 0 but still led strip on \$\endgroup\$
    – RoyC
    Dec 16, 2020 at 21:19

1 Answer 1


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.

  • \$\begingroup\$ So the correct solution would have been to use an p-channel MOSFET and turn off the 5V ? \$\endgroup\$
    – Dibly
    Dec 16, 2020 at 20:27
  • 1
    \$\begingroup\$ Yes, it would be better. But then the data line cannot be set high, or it will also leak supply current into the Neopixel. \$\endgroup\$
    – Justme
    Dec 16, 2020 at 20:28
  • \$\begingroup\$ @Dibly Better but not how it should be done. You can program the LEDs to be off, explain why that's not good enough. \$\endgroup\$ Dec 16, 2020 at 20:30
  • \$\begingroup\$ @Bimpelrekkie, I’m aiming for reducing power consumption as much as possible. Even with the LEDs programmed off, there is still some current draw. I’m assuming the microcontrollers are still powered. \$\endgroup\$
    – Dibly
    Dec 16, 2020 at 20:47
  • \$\begingroup\$ OK, then also make sure that the data line is made high (5 V) when you switch off the AO3400 MOSFET. \$\endgroup\$ Dec 16, 2020 at 21:07

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.