Configure your DIY-LED-CHRISTMAS-TREE

Freeform circuit style LED christmas tree

Item #DIY-LED-CHRISTMAS-TREE

$
 available

Overview

An Arduino UNO LED Christmas Tree Project

*orders placed by 3pm MST on 12/20 will deliver before Christmas Day!

This is an LED Christmas tree kit using an Arduino microctontroller, LED lights, a project box, heat shrink, and wire.

We designed this kit as a fun project or gift so that new and aspiring Electrical Engineers could improve their soldering & programming skills or a seasoned engineer who enjoys model building and freeform circuit styling can practice their building skills and capture some holiday spirit.

  1. Parts list:

      Helpful tools but not part of kit: A soldering iron or soldering stationwire cutters, a hot-air gun or hair dryer, and a multimeter or an oscilloscope for testing the circuit.

  1. Wiring
  • CS_Christmas_Tree_Schematic ( half of side view)

   4. Soldering 

 

 

  => For the soldering step, you will need to do a couple of things first:

       

  • Test the LED's: This step is very important: always double-check the LED's before soldering and installing them to prevent wasted time.  In this project you'll want to make sure you are only soldering in good LED's so you won't have to desolder the connection and replace the bad LED's with good ones.  A good LED should last quite a long time but you'll want to verify it functions first.  If your multimeter has a diode test function you can use that to test the LED or you can power it using your Arduino. Note:The longer leg is the positive side of the LED, called the anode, and the shorter leg is the negative side, called the cathode.

       

  • Bend the LED to the required shape.  In this case we are creating branches of the Christmas tree with several LED's per branch. You'll want to bend out the legs slightly about halfway down the leg so they can be formed around the other LED's in the branch.

The lowest row - in this step you'll need to solder together the positive side of each branch to form one connection, and the negative sides of each branch to form the other connection.

 

The middle row - same steps as the top row but with fewer LED's, I used 3 per branch.

The top row - same steps as the lower rows & branches.

 

The Tree's Star: - Solder all the positive legs to one another and all the negative legs to one another, you can design the star however you like!

Prepare all 3 rows before continuing. Be sure to use the appropriate wire lengths for the height of each row and height of the tree you would like. If using a 22 gauge solid core wire it should strong enough to support the LED's by itself.  I also used heat shring tubing around the LED's to improve the appearance and stability of the branches.

 

Loop everything through a heat shrink wrap from top to bottom. 

 

5. Coding

 

There are many different ways to program your Christmas Tree to light up, I've provided some sample code below that makes a nice sequence.  Hope that you enjoy the project and we always invite feedback via email at services@circuitspecialists.com

 diy led christmas tree

/*
-----------------Note----------------------
Date: 12-17-2019
Project Name: CS_ChristmasTree
Goal: Array
Author: Khang Nguyen
*/

int LED_S = 13;

int LED_R1_L1 = 1;
int LED_R1_L2 = 2;
int LED_R1_L3 = 3;
int LED_R1_L4 = 4;

int LED_R2_L1 = 9;
int LED_R2_L2 = 10;
int LED_R2_L3 = 11;
int LED_R2_L4 = 12;

int LED_R3_L1 = 5;
int LED_R3_L2 = 6;
int LED_R3_L3 = 7;
int LED_R3_L4 = 8;


void setup()
{
LED_Setup();
}

void loop()
{
int L = 0;
int T = 0;

for (L = 0 ; L < 5 ; L += 1)
{
Blink_LED_R1(L, 150);
Blink_LED_R2(L, 150);
Blink_LED_R3(L, 150);
if(L==0){Blink_LED_S (200);}
}
for(T=0 ; T<3000 ; T +=1)
{
digitalWrite(LED_R1_L1, HIGH);
digitalWrite(LED_R1_L2, HIGH);
digitalWrite(LED_R1_L3, HIGH);
digitalWrite(LED_R1_L4, HIGH);

digitalWrite(LED_R2_L1, HIGH);
digitalWrite(LED_R2_L2, HIGH);
digitalWrite(LED_R2_L3, HIGH);
digitalWrite(LED_R2_L4, HIGH);

digitalWrite(LED_R3_L1, HIGH);
digitalWrite(LED_R3_L2, HIGH);
digitalWrite(LED_R3_L3, HIGH);
digitalWrite(LED_R3_L4, HIGH);

digitalWrite(LED_S, HIGH);
}

}

int Blink_LED_S (int Speed)
{
digitalWrite(LED_S, HIGH);
delay(Speed);
digitalWrite(LED_S, LOW);
delay(Speed);
}
int Blink_LED_R1(int Line, int Speed)
{
if (Line == 1) {digitalWrite(LED_R1_L1, HIGH);}
if (Line == 2) {digitalWrite(LED_R1_L2, HIGH);}
if (Line == 3) {digitalWrite(LED_R1_L3, HIGH);}
if (Line == 4) {digitalWrite(LED_R1_L4, HIGH);}
if (Line == 0)
{
digitalWrite(LED_R1_L1, HIGH);
digitalWrite(LED_R1_L2, HIGH);
digitalWrite(LED_R1_L3, HIGH);
digitalWrite(LED_R1_L4, HIGH);
}
delay(Speed);
digitalWrite(LED_R1_L1, LOW);
digitalWrite(LED_R1_L2, LOW);
digitalWrite(LED_R1_L3, LOW);
digitalWrite(LED_R1_L4, LOW);
delay(Speed);
}
int Blink_LED_R2(int Line, int Speed)
{
if (Line == 1) {digitalWrite(LED_R2_L1, HIGH);}
if (Line == 2) {digitalWrite(LED_R2_L2, HIGH);}
if (Line == 3) {digitalWrite(LED_R2_L3, HIGH);}
if (Line == 4) {digitalWrite(LED_R2_L4, HIGH);}
if (Line == 0)
{
digitalWrite(LED_R2_L1, HIGH);
digitalWrite(LED_R2_L2, HIGH);
digitalWrite(LED_R2_L3, HIGH);
digitalWrite(LED_R2_L4, HIGH);
}
delay(Speed);
digitalWrite(LED_R2_L1, LOW);
digitalWrite(LED_R2_L2, LOW);
digitalWrite(LED_R2_L3, LOW);
digitalWrite(LED_R2_L4, LOW);
delay(Speed);
}
int Blink_LED_R3(int Line, int Speed)
{
if (Line == 1) {digitalWrite(LED_R3_L1, HIGH);}
if (Line == 2) {digitalWrite(LED_R3_L2, HIGH);}
if (Line == 3) {digitalWrite(LED_R3_L3, HIGH);}
if (Line == 4) {digitalWrite(LED_R3_L4, HIGH);}
if (Line == 0)
{
digitalWrite(LED_R3_L1, HIGH);
digitalWrite(LED_R3_L2, HIGH);
digitalWrite(LED_R3_L3, HIGH);
digitalWrite(LED_R3_L4, HIGH);
}
delay(Speed);
digitalWrite(LED_R3_L1, LOW);
digitalWrite(LED_R3_L2, LOW);
digitalWrite(LED_R3_L3, LOW);
digitalWrite(LED_R3_L4, LOW);
delay(Speed);
}
void LED_Setup()
{
pinMode(LED_S, OUTPUT);

pinMode(LED_R1_L1, OUTPUT);
pinMode(LED_R1_L2, OUTPUT);
pinMode(LED_R1_L3, OUTPUT);
pinMode(LED_R1_L4, OUTPUT);

pinMode(LED_R2_L1, OUTPUT);
pinMode(LED_R2_L2, OUTPUT);
pinMode(LED_R2_L3, OUTPUT);
pinMode(LED_R2_L4, OUTPUT);

pinMode(LED_R3_L1, OUTPUT);
pinMode(LED_R3_L2, OUTPUT);
pinMode(LED_R3_L3, OUTPUT);
pinMode(LED_R3_L4, OUTPUT);

}