Introduction: LED Holiday Craft
This is a fun holiday craft using LEDs, some papercraft, and an Arduino for control so you can program your own holiday light pattern. The construction is fairly easy - just three wires to solder.
Step 1: Parts
Parts:
- An Adafruit Neopixel Ring - this is a 1.75" ring of 16 digitally controllable RGB LEDs.
- An Arduino Uno, or similar. The nice thing about an Uno is that there is a 5v regulator you can use to power the LEDs, but with one of the smaller Arduino boards, you can use an external 5v power supply to drive the LEDs and the board. Arduinos can be found at many places like Amazon, or lower cost clones can be found on AliExpress. The Adafruit Trinket would probably work well for this project too.
- (3) pieces of solid core wire, each 7" long. 22 gauge is better, but 20 gauge just fits in the sockets too. Different colors for +5v, Gnd, and Data would be nice, but not necessary.
Power can come from a wall adapter for the Arduino (6v dc - 12v dc, where lower is preferred), or the USB port. For a remote location, you can use a 9v battery clip with a 2.1mm ID plug. A battery will not last long, though, depending on how many LEDs you have on over time.
Step 2: The Papercraft Base
The base of this project is a small papercraft project. Print the attached file on as thick a paper stock as you can on Letter size paper (8.5"x11"). There is a JPEG version and a PDF with the image in it - hopefully one will work for you - the main thing is to have it fill a single page. Photo paper works well, and glossy paper gives a nice finish, even though the finish can crack slightly on the folds.
It is easier to first fold the paper back (a "mountain" fold) on the two long vertical folds on each side of the mantle. Then fold it back before cutting the paper. That way, all the individual folds are already creased.
Note that there are some very short cuts above and below the fireplace to enable folding on those creases.
Cut out the stockings below the mantle carefully with a sharp knife.
For the horizontal folds, some are inward and some outward - see the pictures to see which is which.
Gluing the large areas first is best. I used white glue, which dries fast if you smooth the glue out with your finger before gluing. The bottom large tabs fit against the fold between the fireplace and the wall. The large tabs on top line up with the outside edge of the wall.
On the wreath, there are three small dots - punch those out with a push pin - those are where the three wires from the LED ring will go.
It is easier to first fold the paper back (a "mountain" fold) on the two long vertical folds on each side of the mantle. Then fold it back before cutting the paper. That way, all the individual folds are already creased.
Note that there are some very short cuts above and below the fireplace to enable folding on those creases.
Cut out the stockings below the mantle carefully with a sharp knife.
For the horizontal folds, some are inward and some outward - see the pictures to see which is which.
Gluing the large areas first is best. I used white glue, which dries fast if you smooth the glue out with your finger before gluing. The bottom large tabs fit against the fold between the fireplace and the wall. The large tabs on top line up with the outside edge of the wall.
On the wreath, there are three small dots - punch those out with a push pin - those are where the three wires from the LED ring will go.
Attachments
Step 3: LEDs and Wiring
The Adafruit "Neopixels" are WS2812 LED + drivers in a single package. They are digitally controllable and will hold their color once they are set. The LED modules have a separate red, green, and blue LED, and the controller chip allows 256 levels of brightness for each, so the total number of colors that are theoretically possible is over 16 million. The nice thing is that this matches common color schemes that are used in web pages etc.
The Neopixel ring has three wires to solder: +5, Gnd, and Data In - we are using the Arduino 5v regulator to drive the LEDs. You will not need the data out pin for this project. You will need three pieces of 20 gauge solid core wire, 7" each. Strip the insulation off one end for the ring at about 3/8", and the end for the Arduino at about 1/4". The 20 gauge solid core wire fits nicely into the header sockets.
Note: Solder from the bottom of the board - not the LED side! The holes are through-plated, so the solder will flow up. Trying to solder on the LED side may damage the solder to the LEDs. This is a bit unusual, soldering from the back with the wire sticking out there also, but if you put the wire in the hole just enough to go through, there should be some bare wire that you can solder to. The extra wire exposed on the back is not an issue since there are no other wires close to each hole. I found it easy to lay the ring LED side down, then bent the wire so it fit in the hole and rested on the table, allowing it to stay in place while soldering.
Run the wires through the holes in the wreath (use a push pin to start the holes), To hold the wreath in place, either bend the wires behind the wreath, or use a bit of glue or tape as needed.
Connect the +5 and Gnd wires from the LED ring to the corresponding Arduino pins. Connect the LED data in pin to digital pin 6 on the Arduino. You can use a different i/o pin - would just need to change the code to use the right pin.
Each WS2812 LED+driver can draw about 60 mA when all three colors are on full (white), so if all 16 LEDS are on full, the ring will use 960mA. The Arduino Uno regulator is rated for 1 amp, but will likely thermally shut down with that much current being drawn, especially for higher voltages being supplied to the board (since the excess energy is dissipated as heat). Also, when supplied by USB, the usable current will be more like 400 mA. The good news is that the LEDS will almost never all be on full at the same time, and since they are so intense, you will want to dim them down a lot more than fully on.
If you need more power, you can use an external 5 amp power supply and use that to power both the LEDs and the Arduino.
The Neopixel ring has three wires to solder: +5, Gnd, and Data In - we are using the Arduino 5v regulator to drive the LEDs. You will not need the data out pin for this project. You will need three pieces of 20 gauge solid core wire, 7" each. Strip the insulation off one end for the ring at about 3/8", and the end for the Arduino at about 1/4". The 20 gauge solid core wire fits nicely into the header sockets.
Note: Solder from the bottom of the board - not the LED side! The holes are through-plated, so the solder will flow up. Trying to solder on the LED side may damage the solder to the LEDs. This is a bit unusual, soldering from the back with the wire sticking out there also, but if you put the wire in the hole just enough to go through, there should be some bare wire that you can solder to. The extra wire exposed on the back is not an issue since there are no other wires close to each hole. I found it easy to lay the ring LED side down, then bent the wire so it fit in the hole and rested on the table, allowing it to stay in place while soldering.
Run the wires through the holes in the wreath (use a push pin to start the holes), To hold the wreath in place, either bend the wires behind the wreath, or use a bit of glue or tape as needed.
Connect the +5 and Gnd wires from the LED ring to the corresponding Arduino pins. Connect the LED data in pin to digital pin 6 on the Arduino. You can use a different i/o pin - would just need to change the code to use the right pin.
Each WS2812 LED+driver can draw about 60 mA when all three colors are on full (white), so if all 16 LEDS are on full, the ring will use 960mA. The Arduino Uno regulator is rated for 1 amp, but will likely thermally shut down with that much current being drawn, especially for higher voltages being supplied to the board (since the excess energy is dissipated as heat). Also, when supplied by USB, the usable current will be more like 400 mA. The good news is that the LEDS will almost never all be on full at the same time, and since they are so intense, you will want to dim them down a lot more than fully on.
If you need more power, you can use an external 5 amp power supply and use that to power both the LEDs and the Arduino.
Step 4: Arduino Programming
Adafruit provides a Neopixel library here. Follow the instructions there, but basically you will be adding that to the Arduino Library folder, restarting the Arduino IDE, and then you should be able see the Neopixel example code. The attached code here is a nice holiday pattern that you can use and extend.
Enjoy, and if you come up with some nice animations, share them! Happy Holidays!
Enjoy, and if you come up with some nice animations, share them! Happy Holidays!
#include <Adafruit_NeoPixel.h>#define PIN 6 // the digital pin the data line is connected to// Modifed NeoPixel sample for the holiday craft project// Parameter 1 = number of pixels in strip// Parameter 2 = pin number (most are valid)// Parameter 3 = pixel type flags, add together as needed:// NEO_KHZ800 800 KHz bitstream (most NeoPixel products w/WS2812 LEDs)// NEO_KHZ400 400 KHz (classic 'v1' (not v2) FLORA pixels, WS2811 drivers)// NEO_GRB Pixels are wired for GRB bitstream (most NeoPixel products)// NEO_RGB Pixels are wired for RGB bitstream (v1 FLORA pixels, not v2) Adafruit_NeoPixel strip = Adafruit_NeoPixel(16, PIN, NEO_GRB + NEO_KHZ800); #define low_red strip.Color(3, 0, 0)#define low_green strip.Color(0, 3, 0)#define med_red strip.Color(20, 0, 0)#define med_green strip.Color(0, 20, 0)#define hi_red strip.Color(40, 0, 0)#define hi_green strip.Color(0, 40, 0)voidsetup() { strip.begin(); strip.show(); // Initialize all pixels to 'off' } voidloop() { uint16_t i, j; int num_steps =100; fade_up(100, 30, 30, 0, 0); fade_up(100, 30, 0, 30, 0); fade_up(100, 30, 30, 0, 0); fade_up(100, 30, 0, 30, 0); colorWipe(med_red, 50); // Red colorWipe(med_green, 50); // Green colorWipe(med_red, 50); // Red colorWipe(med_green, 50); // Greenfor (j=0; j<2; j++) { for(i=0; i<strip.numPixels()+3; i++) { if (i<strip.numPixels()) strip.setPixelColor(i, hi_red); if ((i-1>=0) && (i-1< strip.numPixels())) strip.setPixelColor(i-1, med_red); if ((i-2>=0) && (i-2< strip.numPixels())) strip.setPixelColor(i-2, low_red); if ((i-3>=0) && (i-3< strip.numPixels())) strip.setPixelColor(i-3, med_green); strip.show(); delay(50); } } } // loop// fade_up - fade up to the given colorvoidfade_up(int num_steps, int wait, int R, int G, int B) { uint16_t i, j; for (i=0; i<num_steps; i++) { for(j=0; j<strip.numPixels(); j++) { strip.setPixelColor(j, strip.Color(R * i / num_steps, G * i / num_steps, B * i / num_steps)); } strip.show(); delay(wait); } } // fade_up// Fill the dots one after the other with a colorvoidcolorWipe(uint32_t c, uint8_t wait) { for(uint16_t i=0; i<strip.numPixels(); i++) { strip.setPixelColor(i, c); strip.show(); delay(wait); } }