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:
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.
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
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.
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.
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?
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.