1
\$\begingroup\$

I have this very basic circuit featuring:

  • 12V LED strip
  • N-Channel Mosfet BUZ 11
  • 12V Power supply
  • NodeMCU (ESP8266 wifi dev. board)

Schematics

I'm trying to use the NodeMCU for dimming or simply turning off the LED strip.

It works just fine, even with PWM (Video, 1.6MB): preview image

But as soon as I use a different 12V power supply (I have tested 3, from old routers and other devices), it doesn't work anymore. The LED usually stays on but on one other power supply it always flickers.

Even more strange the negative pin of the power supplies sometimes seem to work as the gate pin of the MOSFET as when I touch it without a resistor, the light flickers or turns off.

I have tested:

  • 3 different power supplies, it only works on my lab bench power supply
  • 3 different NodeMCU controllers (just in case)
  • With or without the 10kΩ resistor between the NodeMCU and the Gate
  • Changing all cables I used
  • Using a 12V voltage regulator before the MOSFET
  • Using different MOSFETs (2N7002, IRFZ24NPBF, BS170, BUZ11)

I'm fairly new to electronics as I've always been a "software guy" so it could be that I'm missing something very basic here.

\$\endgroup\$
2
  • \$\begingroup\$ You need to go into troubleshoot mode. That means testing one thing at a time. Start with the simplest setup and work your way up. 1) Test that the 12 V LED string works with each power supply. So put the MOSFET and the MCU aside for the moment. Test that each supply can make the LEDs light up. 2) same as 1) but now add the MOSFET with the gate resistor. When the gate is connected to GND the LEDs should be off. When gate to 12 V they should be on. Again test for all supplies. 3) add the MCU and repeat. If you're wirelessly controlling on/off try to program a blinking function first. \$\endgroup\$ Commented Oct 21, 2016 at 9:15
  • \$\begingroup\$ It sounds like a 'current' problem. Measure the actual voltage you get with the other supplies. \$\endgroup\$ Commented Oct 21, 2016 at 9:15

1 Answer 1

3
\$\begingroup\$

You need a commmon ground between the two. Probably your bench supply (-) output is grounded and the other ones are not, and you are getting a ground through the USB cable and your PC, so the grounds are connected through the 3-pin wall plug when you use the bench supply. If you unplug the PC it will probably stop working. You may wish to use a 1K resistor between the two grounds, just in case.

Also (and this is not the cause of your proximate problem), your BUZ11 is really an inappropriate part for that service. It's not a logic-level MOSFET and is only guaranteed to fully turn on with 10V Vgs. You should use a MOSFET that has an acceptable specified Rds(on) with 3.3V or lower Vgs. The particular sample of BUZ11 you happen to have may sort of turn on enough typically, but that is not good engineering at all.

\$\endgroup\$
2
  • 1
    \$\begingroup\$ Thank you so much that really was the problem! After I added one more cable to connect the Node MCU's ground with the Power supply ground it worked perfectly. And thank you for the hint with the mosfet. I already bought a few "weaker" ones that can work with 3v on gate \$\endgroup\$
    – Christian
    Commented Oct 21, 2016 at 9:27
  • \$\begingroup\$ Good to hear. Virtually all the MOSFETs rated for 3.3V or less drive are surface-mount parts. One inexpensive power part is the TO-252 AOD476 79m\$\Omega\$ with 2.5V drive and will easily switch a couple A without much concern about heating. \$\endgroup\$ Commented Oct 21, 2016 at 10:00

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.