12v RGB LED with Arduino


In this tutorial, we are going to learn about how to connect a 12v RGB LED strip with Arduino and how to program to make different color combinations and fading animations.

Things Required

AliExpressali express
utsource logo
cart icon
cart icon
cart icon
1k Resistor
cart icon
cart icon
cart icon

You can use any NPN transistors like TIP120, TIP121, TIP122 of N-Channel MOSFETs like IRF540, IRF 530, based on your application you can change the transistors. the difference is that they have a different collector-emitter current rating. For example, if you are using a large length of RGB LED strip then to drive them you will be needing high current transistors like IRF540 which have Drain Current (Id): 28 Amps. Or if you need only a few LEDs then you can use any other NPN transistors like TIP120 which have Collector Current of 5 Amps continuous and 8 Amps peak

In this tutorial, I am using TIP120 and the pinout diagram is shown below. You can download the datasheet from here.

Pinout – TIP120


  • Connect the emitter of all the transistors to the Ground of Arduino.
  • Connect the Ground of 12V power supply to the Ground of Arduino.
  • Connect the positive terminal of the 12V power supply to the 12V pin of the RGB LED strip.
  • Connect 1 K resistor to the base of each transistor as shown.
  • Connect wires from the digital pins D9, D10, D11 to the other end of the resistors as shown in the circuit diagram.
  • Finally, connect wires from the R, G and B terminals of the RGB LED strip to the collector (middle pin) if the TIP120 transistors as shown.

Complete Video Tutorial


Color Changing Program

Fading Program

Subscribe to our newsletter

You might also like…

To buy electronic components order from UTSOURCE

This Post Has 6 Comments

  1. Bob

    Did you forget the power for the arduino?

    1. Najad

      That’s commonsense Bob.

  2. Larry Sykes

    Instruction for project worked great! I modified the code to change colors more slowly on a loop and combined RGB to produce white for outdoor light display.
    Thanks for the great instructions.

    1. Najad

      Always welcome

  3. Mark Merry

    I loved how you provided BOTH written instructions AND a video for visual learners. Very thoughtful.

    1. Najad

      thanks for your support

Leave a Reply