Project showcase
Christmas LED Tree Decoration

Christmas LED Tree Decoration © GPL3+

Wooden Christmas tree decoration, with led rows representing string lights of a Christmas tree and a star on top of it.

  • 884 views
  • 0 comments
  • 4 respects

Components and supplies

Necessary tools and machines

09507 01
Soldering iron (generic)
70y8518 40
Drill / Driver, Cordless
Hy gluegun
Hot glue gun (generic)

Apps and online services

About this project

Background

This project was intended as a Christmas present for my girlfriend and was also the first electronic project I've implemented. It was highly inspired by @Arduino_Jarod project Wooden LED Christmas Tree.

The idea

Wooden Christmas tree decoration, with led rows representing string lights of a Christmas tree and a star on top of it. Each row has different colors, which I'm able to control independently (as well as the rows it self) via arduinos micro-controller. This way I can bring tree to life by coding my own light show programmes.

Simple lightshow

Designing the tree

Arduino nano has limited amount of dio (Digital input/output) pins, therefore I've decided to go with 13 circuit layout to build my tree. (5 rows * 2 colors) for the tree + 3 rows for the star. A single dio pin doesn't provide enough voltage (nor does it withstand enough current draw) to power any circuit of more than 2 LEDs so I've had to figure out an external power source. Luckily I've dug up an old 12 volt (max 1 amp) wall power supply and used that as a single power source for my project. I've used NPN transistors to manage power supply to my circuits using lower voltage signals from dio pins.

Although 12V is a significant improvement over 5V arduino pin can provide, it still wasn't enough to power some of the longer LED rows connected in a series circuit. This is where I've had to use a slightly more complicated design and split my circuit load in to two parallel circuits before connecting it to the transistors collector. This way I've compensated my shortage of voltage by allowing more current draw, and as a result slightly increasing the main circuits resistance

With most of the thinking completed, It was time to fit everything onto a pref-board. I've fitted all 13 circuits in a 2 column layout, green ones on top and reds on the bottom. I've figured it would be useful to have horizontal power and ground stripes, similar to the ones on a breadboard, so I've included those in my design.

Cutting wood

Now I was finally ready to start constructing. The first activity turned out to be quite basic. I've simply cut the tree figure, a stand and drilled holes for all the LEDs.

Soldering LEDs

Next, I had to solder all the LEDs together. I've found LED legs to be lengthy enough, and avoided using any additional wires. Although it wasn't completely necessary, I've isolated soldered connections with heat wrapping wire tubes.

Soldering pref-board

This was the most time consuming task by far. I've soldered all the components in a similar pattern as previously described, and then all the wires, which would later connect to my LED circuits. Hot glue turned up useful at times, to isolate the open wires from the board.

Connecting it all together

After all this work, I could finally put it all together. I've glued the board to the back of a tree, connected all the wires and came up with some test code. In the end, it took some more time to debug many of the hardware issues (mainly caused by lack of soldering experience), but eventually I got it to work, and it came out beautifully :)

Code

Simple lightshowC/C++
// LED PINS (n € N)
//  green: 2n+1, n<5
//  red: 2n+2, n<5
//  yellow: n+11, n<3

#define SHORT unsigned short

void setup() {
  
  for(SHORT pin=1; pin<14; pin++) 
    pinMode(pin, OUTPUT);
}

void clearLeds() {
    
  for(SHORT pin=1; pin<14; pin++)
    digitalWrite(pin, LOW);
}

void firstProgramme() {
  
  for(SHORT pin=1; pin<14; pin++)
    digitalWrite(pin, HIGH);

  delay(3000);

  clearLeds();
}

void secondProgramme() {

  delay(700);

  for(SHORT n=0; n<5; n++) {
    
    digitalWrite(2*n+1, HIGH);
    digitalWrite(2*n+2, HIGH);
    
    delay(700);
  }

  for(SHORT pin=11; pin<14; pin++)
    digitalWrite(pin, HIGH);

  delay(700);

  for(SHORT i=0; i<6; i++)
    for(SHORT n=13; n>10; n--) {
      
      for(SHORT pin=11; pin<14; pin++)
         digitalWrite(pin, pin == n);

      delay(100);
    }

 digitalWrite(11, LOW);

  for(SHORT pin=13; pin>10; pin--) {
    digitalWrite(pin, HIGH);
    delay(100);
  }

  clearLeds();
}

void thirdProgramme() {

  SHORT counter = 0;
  
  for(SHORT pin=11; pin<14; pin++)
    digitalWrite(pin, HIGH);

  while(counter<31) {
    
    for(SHORT pin=1; pin<11; pin++)
      digitalWrite(pin, (pin + counter)%2);

    delay(300);
    counter++;
  }

  clearLeds();
}

void loop() {

  firstProgramme();
  secondProgramme();
  thirdProgramme();
   
}

Schematics

SIngle color series circuit
Led tree1 v680noxk1s
SIngle color series-parallel circuit
Led tree2 qau1dyenlx
Simplified prefboard design
Led tree3 mwedm0a7nt

Comments

Similar projects you might like

Wooden LED Christmas Tree

Project showcase by Arduino_Jarod

  • 1,777 views
  • 0 comments
  • 8 respects

Christmas Tree with 150 Digital LED Pixels

Project tutorial by Martino Ghisleni

  • 7,618 views
  • 2 comments
  • 15 respects

5 Minute Christmas Neopixel Led Strip

Project showcase by Alexander

  • 18,169 views
  • 25 comments
  • 32 respects

3D Printed Christmas Tree with Animation

Project tutorial by TheTNR

  • 1,456 views
  • 2 comments
  • 6 respects

Christmas Tree With Arduino

Project showcase by FLORICA Tudor-Nicusor

  • 4,273 views
  • 0 comments
  • 7 respects

IoT Christmas Tree Topper

Project tutorial by Balázs Simon

  • 2,718 views
  • 0 comments
  • 13 respects
Add projectSign up / Login