Christmas Lights Arduino and WS2811





Introduction: Christmas Lights Arduino and WS2811

Hello fellows!

Today I decided to write my first instructable. It is about Christmas lights and Arduino. I liked this project because you can add infinite light games. The only limit is your imagination and creativity. The core of this project are: Arduino Uno, WS2811 RGB LEDs and an old PSU (Power Supply Unit).

Here is a video with the final project:

So let's get started! :D

Step 1: Components and Tools:

The list of the needed components (from Aliexpress):

  1. Arduino UNO R3
  2. Bluetooth module HC-05
  3. Small Sound Sensor
  4. Breadboard
  5. Relay x2
  6. Old PSU with 12V and minimum 10A
  7. Wires and wires
  8. 220 ohm Resistors
  9. WS2811 RGB addresable LEDs.
  10. White LEDs x2

The tools needed for this project:

  1. Soldeing Iron
  2. Cutter
  3. Screwdrive flat and cross
  4. scissors
  5. isolating tape

Now that we have all we need let get to work. ^_^

Oh, almost forgot. Is also needed one decorated Christmas tree.

Step 2: Preparation of the PSU

Now we must "hack" the PSU so we can use it to power-up the LED strip. I have an old PSU with the power of 450W. All what we need from it is the wires of 12V and GROUND.

Cut all the connectors and group them:

  • the red ones are 5V
  • the orange wires are 3.3V
  • the yellow ones are 12V
  • the Green one is the wire for turning ON the PSU. When is connected to ground the PSU is ON all the time.
  • the black ones are the GROUND
  • the other ones are not an interest for us.

I found out this informations from this video:

I recommend to solder all the yellow wires together and a single wire father-father to be easy to connect to breadboard. Do the same for GROUND.

To find out how much leds can your PSU can power-up you must look on the PSU, in the +12V column and find the amperage. Mine have 21A.

To power-up a simple LED at full brightness we need 20mA. But our LEDs are RGB, so we multiply 20 with 3. One RGB LED need 60mA to be full powered. Now, check how much LEDs per meter have your strip. I have 30 LEDs per meter. So 5 meters of strip needs 5*30*60=9000mA=9A.

Step 3: Making the Connections to Breadboard and Arduino

Now that we prepared the PSU is time to make the connections on the breadboard and Arduino.

If you want to learn more about breadboards check this link:

First connect one wire to 5V pin of Arduino and put it to the "+" of the breadboard and one wire from one GND pin from Arduino tu the "-" of the breadboard.

Next, let's wire the bluetooth module. Put the module to breadboard and:

  1. Connect the VCC of the module to one pin from column "+" where you have connected the 5v.
  2. Connect the GND to one pin from column "-" where you have the GND of Arduino.
  3. Connect the RX pin of bluetooth module to pin 0 (RX) of Arduino
  4. Connect the TX pin of bluetooth module to pin 1 (TX) of Arduino

Now the small sound sensor.Put the module to breadboard and:

  1. Connect the "+" of the module to one pin from column "+" where you have connected the 5v.
  2. Connect the GND to one pin from column "-" where you have the GND of Arduino.
  3. Connect the AO pin of sound module to pin A0 of Arduino

Put one 220ohm resistor on the breadboard. At one end connect the data wire from LED strip and at tha other connect a wire to digital pin 7 of Arduino.

And last thing to do is to connect the relays:

  1. Connect the VCC of the relays to one pin from column "+" where you have connected the 5v.
  2. Connect the GND to one pin from column "-" where you have the GND of Arduino.
  3. Connect the IN1(or S in case of a single relay) to digital pin 11 of Arduino
  4. Connect the IN2(or S in case of a single relay) to digital pin 12 of Arduino

These are the connections. It's time for some lights. ;)

Step 4: Light 'em Up!

We must attach the LEDs to breadboard and relays.

LED strip

First connect three wires to the LED strip. One to 12V (prefferable red), one at GND (black or white) and one to Data IN(Green).

!!! Warning !!! Watch out that you connect the data pin to "DATA IN" (DI) of the LED strip.

The 12V wire connect to the second column "+" of breadboard, and the GND wire connect to second column "-" of breadboard, in this way we make COMMON GROUND between Arduino and PSU. (important for the LED strip to work properly)

White LEDs

Put the red wire into the third connector of relay1 and relay2. The GND of white leds is passed through one 220 ohm resistor for each and then to the COMMON GROUND.

Put 12V from breadboard (second column "+" of it) to the middle connector of the first and second relay).

Place one led to the bottom of the tree and one in the top to light the star from there. The LED strip can be placed however you want. I put it in spiral. (Forgot to add photo)

Step 5: The CODE

We are almost there! Now we have to upload the code for Arduino.

First you must download "FastLED" library. You can found it here:

Next you must unrar it to "Documents->Arduino->libraries"

For more info about this library you can check all the examples from it or can check this link. For examples open Arduino IDE, click on left top on "File->Examples->FastLED". Open the examples and try to understand the code from there.

The code for our christmas light games is in "Christmas.ino" file.

I have 9 light games:

- '0': sound reactive (VU meter)

- '1': random static color

- '2': one climbing white light

- '3': carousel

- '4': rainbow colors

- '5': rainbow stripes

- '6': up and down

- '7': two random colors

- '8': random light games

- '9': turn off the LED strip

You can add your own modes with little effort.

Step 6: Bluetooth Connection

The final touch, the application to control the light games.

  1. Download the app "Bluetooth Terminal HC-05" from Google Play. (I don't know an app for Iphone)
  2. Open the bluetooth of your phone. Search for devices. When HC-05 found, pair it. (the code is 1234 or 0000).
  3. Open "Bluetooth Terminal HC-05" and press on "HC-05" device.
  4. After the bluetooth is connected to HC-05 you can follow the instructions in images to set up the buttons.

I have in code orders from '0' to '9' so I set up the buttons to send values from 0 to 9 to Arduino.

Step 7: Finish!

I have a video with the project on youtube. It is in my native language, but what I explain there is what is sayed in the steps above so don't worry, just enjoy the light games. ^_^

The video:

I hope you like this project. If you have any suggestions, any feedback or you stumble in something please write in comments and I'll try to help.



    • Water Contest

      Water Contest
    • Clocks Contest

      Clocks Contest
    • Creative Misuse Contest

      Creative Misuse Contest

    2 Discussions

    That's a neat idea for the lights! They look beautiful and it would be really convenient to be able to control them remotely :)

    1 reply

    Thank you very much! It means a lot.

    And the idea of control remotely, that is a future improvement. Thanks for saying it to me. ^_^