What resistor do I need?

Hello, I really need help with my project. I bought an rgb-strip 12v 3A and a nodeMCU. Last week I fried my first nodeMCU and now I have a new one. I also bought 3 tip 120 transistor to control the rgb-strip. I think I need resistors between the transistors and the nodeMCU. Can someone help me to find the correct value of the resistors?

The TIP120 Darlington transistor really needs an opto isolator to use it safely and it has other disadvantages such as high voltage drop on the load circuit.

I prefer using MOSFETs like the IRLB8721.

Here’s a good tutorial on controlling LED strips with an Arduino, but the same circuit can be used with a NodeMCU.

Note that if you’re using code written for the Arduino then you needs to change the PWM values from 0-255 to 0-1027 otherwise you’ll only get quarter brightness on your LED strip.

Remember also that Blynk requires a clean void loop.

Although I’ve previously designed a custom PCB using these MOSFETs I’ve now moved over to using off the shelf RGB controllers that have a built-in ESP8266 and flashing them with my own code, simply because it makes for a much smaller and neater package:

The code in this example could be used with the MOSFETs described above, if you change the GPIOs to reflect the ones you’re using.


1 Like

I ordered the IRLB8721 mosfets online.

Is it correct if:
-I connect the gate to the GPIOs of the nodemcu
-I connect the source to the gnd.
-I connect the drain to the rgb-strip?

is this all possible without any resitors?
and is this compatible with te zergba in the blynk app?


Sorry, I somehow managed to omit the link to the tutorial. I’ve fixed that now, and the link is here also:


That helps al lot,
thanks Pete!