NodeMCU V3 killing mosfets

So I first made a circuit with the arduino nano and uploaded a code witch faded between colors and worked perfectly. I wanted to make this LED strip remotely controlled so I got a NodeMCU v3 and made similar code for it to test out whether it would be able to control the LEDs the same way.

Unfortunately it kept having various issues like one led would always be on, or it just stayed solid on a random color. The first time i thought it was the Mosfets, so I switched out the NodeMCU with the Nano and it worked fine. When switching back to the NodeMCU the same issues occurs, and now does not work with the Nano either.

The NodeMCU V3 is by LoLin, the strip is the RGBW SMD5050, and Mosfets are IRLB8721

I also tried different pins with the following code:

static const uint8_t RED_LED = D1;
static const uint8_t GREEN_LED = D2;
static const uint8_t BLUE_LED = D3;
static const uint8_t WHITE_LED = D5;

void setup() 
{
  pinMode(RED_LED, OUTPUT);
  pinMode(GREEN_LED, OUTPUT);
  pinMode(BLUE_LED, OUTPUT);
  pinMode(WHITE_LED, OUTPUT);

}


void loop() 
{  
  for (int i=0; i <= 255; i++){
      analogWrite(RED_LED, i);
      delay(10);
   }
   analogWrite(RED_LED,0);
   
   for (int i=0; i <= 255; i++){
      analogWrite(BLUE_LED, i);
      delay(10);
   }
   analogWrite(BLUE_LED,0);
   
   for (int i=0; i <= 255; i++){
      analogWrite(GREEN_LED, i);
      delay(10);
   } 
    analogWrite(GREEN_LED,0);
}

Does anyone have an explanation of this phenomenon?

Perhaps it's due to the 4.5V RDSon of the mosfet and the 3V you are using?

the mosfet should be able to do 3-5v on gate. However, if this was the case am in need of new mosfets?

Paul3:
and Mosfets are IRLB8721

Does anyone have an explanation of this phenomenon?

So you're sure that the mosfets are destroyed, right?

If they're destroyed, then maybe need to monitor the temperature of these mosfets to see what temperature they get up to.

Try using one of these fellas instead.

....click here.....

Do you have a drawing of your circuit? The datasheet only specifies 4.5V RDSon, but the output characteristics call 3Vgs and Vds >1V being able to conduct just over 3A @ Tj 25C.

Are you sure you are getting at least 3V on the gate?

I reconnected the whole circuits but without the gates connected to a board to time. two LEDs remained on being the blue and green. the other 2 mosfets should be fine my guess.

I also checked the voltage of a pin using D1 and G on a multi meter, the result went up to about 0.7V. it increased and decreased as the code showed. this doesnt seem correct to me though.

Also I just took a picture of the circuit without the gates, hope it helps.

https://imgur.com/nvg4QVy

Couple of thoughts,

  • That is one tough MosFet, it would be difficult to damage it. Also note the predominant failure mode for MosFets is on all the time.
  • Perhaps you should check the mosfet statically. i.e. set one output to on 100% of the time and measure the gate and drain voltages.

Every pin is still only doing max 0.7V

Paul3

I looked at the picture but its difficult to be sure the connections. However it looks like you have:

Source pin to ground = OK
Gate pin through a resistor to ground = NG
Drain pin going off page to something = NG (most likely)

I would double check the connections.

Not knowing your exact goal, typical connections would be:

Drain to load, other side of load to +V
Gate to your controller
Source to common (the same common as the +V and the Controller).

Note: I try not to use the word "ground" it gives folks the false sense of an absolute "0" voltage. Many folks don't like the possibility of different "grounds" however different common connections is more palatable. Not on a soapbox but a lesson I learned long ago and hope to teach others.

Sorry for the image, but this was after i did the test, guess I forgot to reconnect some wires. For each Fet in this scenario, there was no gate connected, the drain went to the corresponding color on the rgb strip (i.e the red wire), while the +V on the strip connected directly to 12V rail, the source on the Fet was connected directly to the Negative rail.

The 10k resistors were used as pull-down resistors

this was the same setup which worked with the Nano going to gate

I think it would be worth your while to performing the following test.

Mosfet:

Drain ---- 1k ---- +V
Gate ---- 1k ----- 3.3V of the NodeMCU
source to the +v common and the NodeMCU common.

Drain should be near 0 volts
Gate should be ~ 3.3 V
Source should be 0 volts

Repeat with the same setup but the Gate ----- common.

Drain = +v
Gate and source = 0

Verify with your meter that the 3.3V line is 3.3 volts and the +V line is (?? 12 maybe).

Hi,
Your circuit link has gone,

Can you please post a copy of your circuit, in CAD or a picture of a hand drawn circuit in jpg, png?

Please post your circuit as an attachment to your post please.

Please read the first post in any forum entitled how to use this forum.
http://forum.arduino.cc/index.php/topic,148850.0.html

Thanks.. Tom.. :slight_smile:

Paul3:
the mosfet should be able to do 3-5v on gate. However, if this was the case am in need of new mosfets?

That MOSFET certainly is not rated for less than 4.5V. Its threshold voltage is quoted as 1.35 to 2.35V,
which means its right on the edge at 4.5V gate drive. Normally you'd see on gate voltages about 3 times
the threshold voltage - a 3.3V safe MOSFET would have threshold of 0.5 - 1.0V or so typically.

If you look at the typical gate-charge graph in the datasheet for the IRLB8721 you'll see the
plateau voltage is about 3.6V (and remember the variability is +/-0.5V from the threshold specs.
This means the plateau could be 3.1 to 4.1V.

They really are pushing it calling it logic level at all, I'd suggest it really needs 7V gate drive for
good fast symmetric switching needed for efficient PWM.

Hi,
This datasheet, does not refer to the MOSFET as logic at all.

I agree with @MarkT, but we really need your circuit diagram please.

Tom... :slight_smile:

Sorry, here it is again

@MarkT do you know of any mosfet or transisor that would work well with the nodemcu to control 12V load?

Paul3:
Sorry, here it is again

Two things...

• Please do not use imgur

• Instructions for attaching / embedding images are here...

I know where to go and search for MOSFETs - the search facility on the website of an electronics distributor
like Digikey, Farnell, Mouser, other exist.

Hi,
Thanks for the picture but.

Paul3:
Sorry, here it is again

Sorry, a complete circuit, including controller and power supply and LED strip with labels etc. in CAD or a picture of a hand drawn circuit in jpg, png?

Thanks... Tom... :slight_smile:

Just use one of these instead ....

Or maybe IRL540N

Otherwise, if you choose to keep using those mosfets that you're currently using, then could try putting heatsinks on them. Use some kind of cooling method and see how things go.

In this case, with the mosfets getting destroyed, it's not a case of the nodemcu v3 killing the mosfets. It's a case of you killing the mosfets because of some operating conditions not being considered for which a particular model of mosfet can operate satisfactorily or reliably. But that's ok. It's all part of gaining experience in electronics. It's normal.

@TomGeorge Here is my poorly made drawing on paint, I have not actually used any CAD tools before.