LED Strip SMD 5050


I am attempting to control a 12V RGB LED strip (SMD 5050) from an Arduino Uno (and Nano), and have set up the following breadboard. When I power on the circuit with a 12v power adaptor, the led turns on to white, but doesn’t execute my sketch, which should fade from a color to another.
As I’m pretty new to this, have I made a blatant mistake? (Probably, as I seem to have fried my MacBook Air when I connected to both USB and power at the same time…)

Any feedback would be greatly appreciated :slight_smile:


You should avoid all that current going through the Uno's ground pins. Connect the ground pin from the 12V power supply to the breadboard.

Why do you say your witch is not running? Have you tried 3 x 5mm LEDs, with series resistors, connected to the 3 pwm outputs, without the strip of 12V psu connected?

What model/part number of MOSFET are you using?

Hi Paul, thank you for your response :slight_smile:

As MOSFET I used 3 LD1117AV33.

Regarding the wiring of the ground, do you mean I should rewire as in my updated diagram?

Regarding the sketch, I am running the following, but it only lights to white.

int red = 9;
int green = 10;
int blue = 11;

void setup() {
  pinMode(red, OUTPUT);
  pinMode(green, OUTPUT);
  pinMode(blue, OUTPUT);

void loop() { 
  fadeFromTo(red, green);

void fadeFromTo(int from, int to){
  for(int i=0; i<255; i++){
    analogWrite(to, i);
    analogWrite(from, 255-i);

As MOSFET I used 3 LD1117AV33.

That's a 3.3volt voltage regulator, not a mosfet.

That's a 3.3volt voltage regulator, not a mosfet.

Correction: they were 3.3volt regulators, now they are probably broken 3.3volt regulators.

Dammit :confused: ! Still have a bunch to learn :slight_smile:

What should I be using?

Stp16nf06l would be suitable. I say that because I have memorized the part number! There are probably hundreds to choose from. What you are looking for is "n-channel" and "logic-level" and probably in a "to-220" package. Most of them will have a higher maximum voltage and current than you need, so don't worry so much about those figures.

Funny how when you use the right components things work out... I replaced the voltage regulators with TIP120, and the circuit works now correctly :slight_smile:

Thank you all for the help!

That's not a mosfet either, but a bjt darlington transistor.
Sort of ok for a short-ish piece of LED strip, assuming you have used the right (~220ohm) base resistors.

Yes, tip120 are a bit old and rubbish compared to a proper MOSFET. If you upgrade to a longer strip, get some real MOSFETs.

Regarding the wiring of the ground, do you mean I should rewire as in my updated diagram?

I don't see a difference. It's still the case that all the current flowing back to the PSU connector through the ground line is still passing through the Uno board, albeit between neighbouring pins.