How to connect RGB LED strip 12v, YUN Arduino and supply 12v?

Hi, I'm trying to do a project to control RGB LED strip from the browser. I'm using this TUTORIAL, but using only the Arduino YUN. The code works correctly, my problem is that when connecting the LED to 12V supply makes are always lit the three colors and just color changes are noticed (eg if I select red to 255 and green and blue 0, green and blue is not completely off)
I think I'm wrong connecting 12v source, could you tell me how to do it
Thank you
A greeting

Hi, i cannot read the tutorial or see the images on that page.

Can you post a link which describes your led strip? Is it common cathode or common anode? These strips are usually common anode, but the choice of colours in the wire seems strange (black for common where normally black means ground).

Also a schematic showing how you wired everything together. What transistors and other components did you use?

Paul

Thanks for the response PaulRB. All documentation I have used is this:

The problem may be that the original tutorial uses a unique led rgb and i use led strip rgb, I do not know
Thanks again

Those are the same links you gave before. I cannot read the blog. I cannot read any of the pdf files. I can read most of the other files on github but i have not found the Arduino sketch.

The tutorial seems to be driving a single 5mm common anode rgb led. An Arduino can drive this led directly. An Arduino cannot drive a 12V rgb led strip directly.

How are you connecting your circuit. If you can't tell me that, I cannot help you.

Sorry, but I can read normally. Arduino library only has the StandardFirmata and code Processing:

/*
Control de un Led RGB, a través de Internet
Concetado a Arduino.
Controlado por Processing
Montado en Raspberry Pi.
Desarrollado Por: Jefferson Rivera Patiño
riverajefer.blogspot.com
*/
 
import processing.serial.*;
import cc.arduino.*;
Arduino arduino;

Serial port;

int led_blue=9;
int led_green=10;
int led_red=11;
int val1,val2,val3=0;
void setup() {
    size(400,400);
    arduino = new Arduino(this, Arduino.list()[0], 57600); //comunicación entre Arduino y Processing     
    arduino.pinMode(led_blue, Arduino.OUTPUT);
    arduino.pinMode(led_green, Arduino.OUTPUT);
    arduino.pinMode(led_red, Arduino.OUTPUT);    
}
 void draw() {
  String entrada1[] = loadStrings("http://localhost/leds/red.txt"); // Rojo
  String entrada2[] = loadStrings("http://localhost/leds/green.txt"); // Verde 
  String entrada3[] = loadStrings("http://localhost/leds/blue.txt"); // Azul
  
  val1=Integer.parseInt(entrada1[0]);
  val2=Integer.parseInt(entrada2[0]);
  val3=Integer.parseInt(entrada3[0]);
  
  background(val1,val2,val3); 
  color_rgb(val1,val2,val3); 
  delay(150); 
 }

 void color_rgb(int rojo, int verde, int azul){
   arduino.analogWrite(led_red,255-rojo);
   arduino.analogWrite(led_green,255-verde);
   arduino.analogWrite(led_blue,255-azul);
 }

I did see that file but I did not understand that it was the Arduino sketch. I am not familiar with how Yun sketches are different to other Arduino sketches.

Now, post your schematic or picture showing how you have connected the strip to the Arduino and power supply.

Sorry, but it is the first time I use Fritzing...
BIG IMAGE

:astonished:
I must tell you bad news. You have probably damaged your Arduino already.

Arduino pins can be damaged by 12V and can be damaged by too much current. You have subjected your Arduino to both those things.

This is why it is recommended for beginners to get an Uno 3 for their first Arduino. It is less expensive to replace, and the avr chip itself can be replaced even more cheaply.

To drive your led strip you will need 3 n-channel, logic-level power mosfet transistors. I can suggest IRL520 or STP16NF06L.

You will need some of ~330R resistors, some of 10K resistors, and a breadboard and some connecting wire to wire everything up to check it works. And very possibly another Yun... but lets see first.

Your power supply may not be good enough either. If your strip is 5m long and has 30 leds per metre, that is 150 leds. Each trio of leds will need up to 60mA. That is a total of 3A and your power supply is rated at only 2A.

Thank you very much PaulRB, I think I'm going to need help from coworkers... Until a few days I can not write then, I hope you can help me in the future.
Thanks again
A greeting

I’ve been looking information, this scheme could work in my Arduino Yun?

->BIG IMAGE<-

You have got the general idea, yes. But you made a couple of mistakes in your diagram. The 10K resistors are not in the correct place on the blue and green channels. Also some ~330R between the fet gates and Arduino outputs would be a good idea. I would also add a large cap (e.g. 1000uF) accross the 12V & ground to smooth the current flow from the psu.

Were my assumptions about your led strip correct?

This scheme what I found at this address, just writing to ask if I could use it. As I said two days ago, I will need help from my co-workers. Continue to write in a few days
Thank you
A greeting