Introduction: Permanent Digital LED House Holiday Lighting
Digitally addressable RGB LED strips are becoming more available and less expensive through hobbyist electronics stores and direct from factories in China, so it's time to update your holiday house lighting!
This project uses an Arduino to control strips of digitally addressable LEDs, and the idea is to put them up once, and then use different programs for each holiday throughout the year.
In a previous project, I added permanent analog LEDs. Those are good, but the whole strip is always the same color. With digital LEDs, you can do a lot more animation effects since each individual LED can be controlled.
There are many Instructables on using these LEDs - the main effort in this one was finding a way to easily mount them on the outside of the house, while still being able to remove them for repair, painting etc.
The LEDs used were strands of WS2812b LEDs, which is a combination of a 5050 RGB LED + a WS2811 controller chip in a single surface mount package. These are very bright LEDs! You can buy them in 5 meter strips, and they can come with a silicone jacket for waterproofing.
Programming them is easy with a few free Arduino libraries. For this one, I used the "Neopixel" code from Adafruit. FastSPI is another popular library.
One big caveat - this was not an easy project! The Arduino coding part is relatively easy, but there is a lot of soldering of connectors and planning involved. Also, the LEDs are somewhat sensitive to power fluctuations, and seem a bit prone to failure. Even with the precautions mentioned here and elsewhere, I still ended up taking down portions of the strings several times and eventually replacing about 10 of the individual LEDs. Now that they are up and working (so far!), they are very cool - much more interesting than those boring static lights! :-)
Step 1: Parts
The main idea was to come up with a way to mount the LED Strips easily, be able to work on them as needed, and take them down for painting. So, I used some plastic molding as a backing to make the strips rigid, and cup hooks and screw eyes to mount them to the house. That way, each strip can be taken down as needed for any work.
Electronics and Wiring Parts
- LEDs - WS2812 or better WS2812b strips (better reverse polarity protection and slightly brighter). Waterproof - this is usually a silicone jacket for these types. I recommend 30 LEDs per meter since more LEDs will require a lot more power! Also, more than 30 LEDs per meter ends up blending together from a distance. Adafruit has them (called Neopixels). You can also get them at Ali Express (the Ray Wu store is popular, but there are many stores selling them). They come with white or black flexible circuit boards. You can also search for WS2811 since the WS2812 LEDs use the WS2811 chip + a 5050 LED. The other way to go are strands of WS2801 LEDs would also be fine, and since each LED is typically separated by a couple inches of wire, they draw a lot less power and still look great. Get extra LEDs since you will be fixing some of them.
- JST-M 4 conductor connectors - you will need one male and one female per strip, plus a few extras. You only need three conductors. When I built my project, I did not see any 3 pin JST-M connectors for sale, but I see them on AliExpress now, and they should also be good, without that extra wire. The LED strips have different connectors depending on where you buy them, but some of them come with three pin JST-M connectors already soldered on which you may be able to take advantage of if you use those. I live in a fairly dry location, so if you live where it rains a lot, you may want to use waterproof connectors. There are ones that are made for LEDs like these.
- 2 conductor connectors - I used some JST-M 2 conductor connectors first, but then found these Deans type connectors and really prefer them since they are easy to solder, and have obvious polarity, where the JST-M connectors with black wires require you to remember how you used them. Don't forget the mating plugs. These are used for the power connectors. The Deans type connectors allow 18 gauge wire to be soldered directly to the connectors. There are also auto ones like these that might work.
- An Arduino Mega to control the LEDs. Most of the LED libraries use an array to store the pixel values, so the Mega is required so it has enough RAM to hold the array for all these pixels. The array is 3 bytes (R, G, B each 1 byte) per pixel. There are ways to do this without the array, so a simple Arduino could be used.
- Power supplies - 10 amps, 5 volts. You will need about one of these for every 150 LEDs. I used these, or you can use ones like this one. For long runs, though, there will be too much voltage drop on the lines, so I ended up using higher voltage power supplies, and DC to DC step down (buck) converters at the strips, which worked very well. You can also use 5v power supplies with lower wattages, and just use them to run fewer LEDs. The advantage of this approach is that they cost less, and you will need less "power injection" wiring (see next step). The disadvantage is that you will need to run those wires around more unless you have a lot of outlets available along the installation.
- Wire - 18 gauge is recommended, especially for longer runs. 20 gauge can be used for connections from the strips to the 18 gauge wire since the heavier gauge is mostly to minimize voltage drop over longer distances.
- capacitors - 1000 uF electrolytic - you should use one per power supply.
- resistor - one 300 to 500 ohm resistor.
- fuses - adding inline fuses at the power supplies may help if you accidentally mis-wire anything.
Mechanical Parts
- Plastic strips - These were from Home Depot: Royal Mouldings Model 867 1/4 in. x 3/4 in. x 8 ft. PVC Composite White FRP Cap Moulding.
- #10 Screw Eyes like these, or these
- 1" Cup Hooks like these, or these
- Silicone RTV to seal up the ends of the LED strips.
- Waterproof kitchen containers - I used these to hold the power supplies. You will need to get the right sized ones for your particular project.
Step 2: Planning the Layout and Wiring
For my single story house, I decided to follow the roof line. So, it made sense to have a separate strip for each section of roof line, and on the longer runs, a couple of of the 8 foot strips end-to-end. Each strip can be taken down to make way for painting etc., or to work on the strip itself. This happens a lot since the LEDs do go bad from time to time (see the Troubleshooting section).
For the electrical wiring, the WS2812b LEDs have a +5V, Gnd, and a data line. Since the digital commands are passed down the data line from LED to LED and strip to strip, that wire needs to form one continuous circuit from the beginning to the end. You can still light up the LEDs in any order, but the single control line will connect them all.
Similarly, all the strips should have their ground wires connected to make sure the signal has the same ground reference across all the strips.
There is some great info on how to handle these LEDs at Adafruit and Pololu. In addition, the Do It Yourself Christmas site has a lot of very helpful info - especially on their wiki.
Power
Since each strip needed to wired and tested individually, I used the same input connector for each strip, wired in the same way, even if not all the input pins were needed in normal operation. That way, I can pull and test any strip with the same signal and power connector from the Arduino controller. As mentioned before, I had a few bad LEDs, so I used this system a lot - highly recommended!
The WS27812b LED strips have three wires, and come with a variety of connectors. I ended up discarding all of those and using JST-M 4 conductor connectors on each strip. The lead-in connector only uses three of the wires for testing, and the fourth was sometimes used to bring power from the end to the start of the segment (or a separate 2 pin connector was used). Standardizing on three pin connectors would be fine too, and if I did this project again, I would probably do that, especially if the connectors had color coded wires to make wiring easier. The output connectors were wired differently for each strip - to match the power requirements for the subsequent strip.
For example, if one strip is at the end of a set on one power supply, and the next strip starts a new power supply, the output of the first strip would not connect the +5 wire across. The second strip would have a separate connector for power to come in, and also the main input connector would have the power line connected for testing only.
At the very beginning, use a small resistor in series with the signal wire from the Arduino - 200-500 ohms.
Make sure to use capacitors at the power supplies!
Generally, the female connectors are used as the input side of the strips.
So, all the ground wires for everything are connected together, and the data line runs between all the LEDs in order. The +5 lines should only be shared between sets of LEDs using that power supply - it is best to not cross the +5 lines between the power supplies since they are not all exactly the same voltage and can oppose each other a bit.
Getting enough power to all the LEDs is the hardest part of this project. Since each 5050 LED module can use 60 ma of current, 150 LEDs will draw up to 9 amps. 150 LEDs are what you would get with a single 5 meter LED strip with 30 LEDs per meter.
I highly recommend the Do It Yourself Christmas web site RGB power discussion for it's excellent coverage of power issues with LED lights for houses. I found it after I did my initial work, and it would have saved me a lot of time debugging the system. One key piece of advice is that you should be adding power every 50 LEDs or so since the voltage drop on the strips themselves is significant. I had some runs of up to 76 LEDs, which seemed OK. It might be good to test this before wiring everything up - use bright white (all LEDs on full) to test - see the Troubleshooting section for more info.
For longer runs, power will need to be added at a few places, even if it's from the same power supply as "power injection". Power Injection simply means running multiple wires from your power supply to sections of the LEDs to have less voltage drop than running the power through the strip itself. So, for 150 LEDs in three sets of 50, you can use a single 10 amp 5v supply, but should run power lines to the start, two middle sections (every 50 LEDs) and the end of that string. So, that is 4 power lines - each optimally using 18-2 wire, so it's a lot of wire and connectors. I chose to run those lines along the LEDs, adding connectors at the beginning and end of each strip so I could take them down easier. That was a lot of soldering, but the Deans style connectors are pretty easy to solder (wish I had them at the start!). There are some YouTube videos with demos on how to solder them. You could also run the power wires separately in longer runs independent of the strips. The strips would still be removable and testable individually.
So, you will see a mix of JST-M 2 and Deans style connectors in the photos since I switched in mid-project. I found the Deans style connectors easier to work with - easier to solder, and the polarity was obvious.
For my house, I only had a few locations where there were power outlets available, so I had to carefully plan out where the wall adapters were located and which LEDs they would supply. For my wiring then, I had power going in a couple directions, and the attached diagram shows where I ended up at the planning stage.
Since I had to add power over some long distances, the other technique is to use higher voltage wall adapters and DC to DC converters to convert the higher voltage to 5 volts right at the strips. This seemed to work well, and power injection was still used from the converter to the surrounding LEDs. One trick with the DC to DC converters is keeping them waterproof while allowing them to dissipate heat. I will try a pill bottle and see how it goes.
One other idea is to run separate power adapters or DC to DC converters for each set of 50 or so LEDs. The cost of the converters and power supplies would be lower since they would not need to handle as much power, but the wiring would likely end up being as complex.
The attached plans show what I was thinking before I started wiring, and what I ended up with.
Step 3: Mounting the Strips and Waterproofing
The molding was attached to the eaves with screw eyes and cup hooks. That way, each segment can be taken down as needed for repair or to move for painting etc.
To mount the LED strips, I attached them to thin plastic molding to give them some rigidity. Each strip was cut to the proper length for the portion of the roof they were to go on. I kept them from touching each other since there will be connectors on each end.
The cup hooks go on the house at places that make sense - every few feet. I spray painted mine to match the house. I drilled pilot holes to make it easier to screw them in. Then you can hold the strip up and mark the locations in the bottom of the strip for the screw eyes. I drilled a small pilot hole at the marks (see pictures), and screwed the screw eyes in.
Now, you can cut the LED strips to match each plastic strip. The LED strips have certain locations with solder pads where they can be cut, so the plastic strips may be a bit long in some cases, which is not a big problem - barely noticeable that the LEDS have a small gap with so many lit up. I used zip ties every few inches (every three solder pads) to attach the LED strips to the plastic strips. You will need to solder connectors on the end, so don't put zip ties at the very end until you are done. Leaving a couple off for now will make the soldering easier, and you can add the end zip ties after the soldering is complete and the strip is tested.
Once all the connections were made and the LEDs tested, I used RTV silicone to seal up the ends of the strips.
I used water tight kitchen storage containers to hold the power adapters with holes drilled for the connectors to pass through. I sealed those holes with RTV silicone also.
Step 4: Troubleshooting
Fixing LEDs
I had a number of LEDs that did not work at all or had one color broken. I am not sure if it was inherent in the quality of the LEDs, or from bad voltages/signals in my system.
The first LED can burn out more often than others, especially if you are not using capacitors on the power supplies. If you have a bad LED, generally all LEDs after that one will not go on. To test this, power up just that strip, and use a breadboard jumper wire to connect the data out copper trace from the previous LED to the data input copper trace of the next LED. I pushed the jumper wire pins right through the silicone jacket to make these connections.
Sometimes, a lit LED does not pass the data, and needs to be replaced. Sometimes, the first dark LED is the one that needs to be replaced. By jumping the data line, you should be able to decide which case you have.
Once you have identified the LED to be replaced, cut the silicone jacket between the LEDs next to it - using the space between the LEDs will keep the LED clear when you glue the jacket back together. Cut out the LED at the cut marks - you will want the copper pads of the two surrounding LEDs on the strip to be cut so they are right at the edge so solder can bridge to them. Cut a new LED in the same way - with the copper right up to the edge. Then, solder a bridge for the three lines (+5, Gnd, and Data) to add the new LED to the string.
It is possible that UV light will affect the lifetime of the LEDs.
Power Issues
I had some power distribution issues. Although I spent time making sure I was not exceeding the 10 amps available with each adapter, there was more voltage drop in the wires than I expected.
One symptom for this issue is seeing some flashing lights in random colors in the string. A second, more subtle symptom of power issues is when you have the LEDs on at full white, and some of them seem more orange in color - typically near the end of a string.
One way to verify this as a power issue is to run the strips at low values or brightness for the LEDs, then try them at full brightness, including white. If the dimmer level works while the brighter flickers, then it's most likely a power issue. I also wrote a program to make the whole strip fade from zero to all colors full on in a slow loop to look for those effects.
If you have any of these issues, you will need to improve the power wires, or add more power supplies in the strings. If the power supply is relatively close (a few feet) to the set of LEDs, you can use power injection to help - see the planning step and links.
If the power supply needs to be farther away, you can use a higher voltage power supply and DC to DC converter to step the voltage down nearer to the LED strip.
I used a combination of these techniques to enable full white on my LED strips.
Step 5: Programming
To control the strips, I used an Arduino. In my case, I had 500+ LEDs, so I needed an Arduino Mega to have enough memory to hold the RGB array (3 bytes per LED for the R, G, and B color byte values).
For the LED control, I used the Adafruit Neopixel library, and added a few new animation routines. The code is attached. The signal wires for the LED strip was connected to pin 6, and the ground wire needs to be connected with the Arduino for the signal reference. In addition, I just used the 5 volts from the strip to power the Arduino, so the Arduino is powered from the 5v pin.
There are other libraries like FastSPI and one from Pololu. There is also an Arduino code sample that only needs an Uno since it does not use an array.
You could also use a controller like the T-1000s and LED Edit, though I had a lot of trouble getting that working with the Java version on my machine, so I would not recommend that unless you like to tinker.
Now that I have the LEDs up, the real art is in the programming and animations!
Step 6: More Ideas
Pulling out the Arduino, and downloading a new animation for each holiday can be a hassle, so you could add a panel of push buttons for each holiday. I have now posted another Instructable on how to make this project controllable from the web to make reprogramming easier.

Third Prize in the
Halloween Decor Contest

Runner Up in the
Tech Contest

Participated in the
Microcontroller Contest
45 Comments
Question 4 years ago
Carl, have you updated your .ino sketch since you originally posted? Or, maybe you know of some good resources to look up sketches by other people for LED house holiday lighting?
I have your sketch working great and hope to find time to make some changes. I was thinking the candy cane stripe effect would be cool to make each stripe a little longer and also fade a 1 to 3 pixels in front and back. It would soften the "hard edge" a bit.
Thank you for this thorough post.
Answer 4 years ago
Thanks. Good ideas on the lighting. There are so many new materials and info on doing this now! Mine is still working - had to replace a few LEDs and power connectors in the Fall. I would re-do the power connections for sure - squirrels have chewed on the T connectors :-)
I have not updated the code from the Instructable since I use a personal web site to set the colors. The drawing subroutines are below, and I can PM you a version with the proper indenting etc. if you need, though you may only be missing a couple of the ones below.
I have a more limited holiday display due to comments from the family :-) Not going for one of the contests here :-)
Radiate,5,40,255,0,0,0,255,0
Radiate,5,40,255,0,0,0,255,0
XmasColors
Wait,8
RedWhite
One more note: I tried the Vixen Lights app recently with a simple Arduino as a controller and I think it would work with this many LEDs, though I have not tried it.
//----------------------------------------------------------------------
// wait_secs
//----------------------------------------------------------------------
void wait_secs(int secs) {
delay(1000 * secs);
} // wait_secs
//----------------------------------------------------------------------
// set_color
//----------------------------------------------------------------------
void set_color(uint8_t r, uint8_t g, uint8_t b) {
for(uint16_t i=0; i<strip.numPixels(); i++) {
strip.setPixelColor(i, strip.Color(r, g, b));
}
strip.show();
} // set_color
//----------------------------------------------------------------------
// colorWipeUp - Fill the dots one after the other with a color
//----------------------------------------------------------------------
void colorWipeUp(uint32_t c, int wait) {
for(uint16_t i=0; i<strip.numPixels(); i++) {
strip.setPixelColor(i, c);
strip.show();
delay(wait);
}
} // colorWipeUp
//----------------------------------------------------------------------
// colorWipeDown - Fill the dots one after the other with a color
//----------------------------------------------------------------------
void colorWipeDown(uint32_t c, int wait) {
for(uint16_t i=strip.numPixels()-1; i>=0; i--) {
strip.setPixelColor(i, c);
strip.show();
delay(wait);
}
} // colorWipeDown
//----------------------------------------------------------------------
// rainbow
//----------------------------------------------------------------------
void rainbow(int wait) {
uint16_t i, j;
for(j=0; j<256; j++) {
for(i=0; i<strip.numPixels(); i++) {
strip.setPixelColor(i, Wheel((i+j) & 255));
}
strip.show();
delay(wait);
}
}
//----------------------------------------------------------------------
// rainbowCycle - Slightly different, this makes the rainbow equally distributed throughout
//----------------------------------------------------------------------
void rainbowCycle(int wait) {
uint16_t i, j;
for(j=0; j<256*5; j++) { // 5 cycles of all colors on wheel
for(i=0; i< strip.numPixels(); i++) {
strip.setPixelColor(i, Wheel(((i * 256 / strip.numPixels()) + j) & 255));
}
strip.show();
delay(wait);
}
}
//----------------------------------------------------------------------
// Input a value 0 to 255 to get a color value.
// The colours are a transition r - g - b - back to r.
//----------------------------------------------------------------------
uint32_t Wheel(byte WheelPos) {
if(WheelPos < 85) {
return strip.Color(WheelPos * 3, 255 - WheelPos * 3, 0);
} else if(WheelPos < 170) {
WheelPos -= 85;
return strip.Color(255 - WheelPos * 3, 0, WheelPos * 3);
} else {
WheelPos -= 170;
return strip.Color(0, WheelPos * 3, 255 - WheelPos * 3);
}
}
//----------------------------------------------------------------------
// xmas_colors
//----------------------------------------------------------------------
void xmas_colors() {
int mod;
for(uint16_t i=0; i<strip.numPixels(); i++) strip.setPixelColor(i, strip.Color(0, 0, 0));
for(uint16_t i=0; i<strip.numPixels(); i++) {
mod = i % 30;
if ((mod >= 0) && (mod <= 2)) strip.setPixelColor(i, strip.Color(255, 0, 0));
if ((mod >= 6) && (mod <= 8)) strip.setPixelColor(i, strip.Color(0, 255, 0));
if ((mod >= 12) && (mod <= 14)) strip.setPixelColor(i, strip.Color(204, 50, 0));
if ((mod >= 18) && (mod <= 20)) strip.setPixelColor(i, strip.Color(0, 0, 255));
if ((mod >= 24) && (mod <= 26)) strip.setPixelColor(i, strip.Color(255, 240, 0));
}
strip.show();
} // xmas_colors
//----------------------------------------------------------------------
// fade_ab - fade between 2 colors
//----------------------------------------------------------------------
void fade_ab(uint8_t cR1, uint8_t cG1, uint8_t cB1, uint8_t cR2, uint8_t cG2, uint8_t cB2, int wait, int num_steps) {
int j;
set_color(cR1, cG1, cB1);
for (j=0; j<num_steps; j++) {
set_color(cR1 + j * (cR2 - cR1)/num_steps, cG1 + j * (cG2 - cG1)/num_steps, cB1 + j * (cB2 - cB1)/num_steps);
strip.show();
delay(wait);
}
} // fade_ab
//----------------------------------------------------------------------
// chase
//----------------------------------------------------------------------
void chase(int width, int gap, int loop_delay, int fR, int fG, int fB, int bR, int bG, int bB) {
int len = width + gap;
int R, G, B;
int i, j;
for (i=0; i<strip.numPixels(); i++) {
for (j=0; j<=i; j++) {
R = fR - (((i-j) % len) * fR / width);
if (R < 0) R = bR;
G = fG - (((i-j) % len) * fG / width);
if (G < 0) G = bG;
B = fB - (((i-j) % len) * fB / width);
if (B < 0) B = bB;
strip.setPixelColor(j, strip.Color(R, G, B));
}
strip.show();
delay(loop_delay);
}
} // chase
//----------------------------------------------------------------------
// chase_single_up
//----------------------------------------------------------------------
void chase_single_up(int width, int wait, int fR, int fG, int fB, int bR, int bG, int bB) {
// green dot moving down
for(uint16_t i=0; i<strip.numPixels(); i++) {
if ((i - width) >= 0) {
strip.setPixelColor(i-width, strip.Color(bR, bG, bB));
}
strip.setPixelColor(i, strip.Color(fR, fG, fB));
strip.show();
delay(wait);
}
} // chase_single_up
//----------------------------------------------------------------------
// chase_single_down
//----------------------------------------------------------------------
void chase_single_down(int width, int wait, int fR, int fG, int fB, int bR, int bG, int bB) {
// green dot moving down
for(uint16_t i=strip.numPixels()-1; i>=0; i--) {
if ((i + width) <= strip.numPixels()) {
strip.setPixelColor(i+width, strip.Color(bR, bG, bB));
}
strip.setPixelColor(i, strip.Color(fR, fG, fB));
strip.show();
delay(wait);
}
} // chase_single_down
//----------------------------------------------------------------------
// sparkle
//----------------------------------------------------------------------
void sparkle(uint32_t col1, uint32_t col2, int wait, int steps) {
uint16_t i, j, k;
for(i=0; i<strip.numPixels(); i++) strip.setPixelColor(i, strip.Color(0, 0, 0));
for(k=0; k<steps; k++) {
i = random(strip.numPixels());
j = random(2);
if (j == 0) strip.setPixelColor(i, col1);
if (j == 1) strip.setPixelColor(i, col2);
strip.show();
delay(wait);
strip.setPixelColor(i, 0);
}
} // sparkle
//----------------------------------------------------------------------
// red_white
//----------------------------------------------------------------------
void red_white() {
#define pat_width 7
int i, j, k;
strip.setBrightness(0);
for(j=0; j<256; j++) {
strip.setBrightness(j);
for(i=0; i<strip.numPixels(); i++) {
if (((i % pat_width) == 0) || ((i % pat_width) == 1)) strip.setPixelColor(i, 255, 0, 0);
if (((i % pat_width) == 2) || ((i % pat_width) == 3)) strip.setPixelColor(i, 255, 255, 255);
if (((i % pat_width) == 4) || ((i % pat_width) == 5) || ((i % pat_width) == 6)) strip.setPixelColor(i, 0, 0, 0);
}
strip.show();
delay(10);
}
for (k=0; k<200; k++) {
for(i=0; i<strip.numPixels(); i++) {
j = i + k % pat_width;
if (((j % pat_width) == 0) || ((j % pat_width) == 1)) strip.setPixelColor(i, 255, 0, 0);
if (((j % pat_width) == 2) || ((j % pat_width) == 3)) strip.setPixelColor(i, 255, 255, 255);
if (((j % pat_width) == 4) || ((j % pat_width) == 5) || ((j % pat_width) == 6)) strip.setPixelColor(i, 0, 0, 0);
}
strip.show();
delay(100);
}
} // red_white
//----------------------------------------------------------------------
// middle_to_edge - fill the strip from the middle out
//----------------------------------------------------------------------
void middle_to_edge(int wait, uint8_t R, uint8_t G, uint8_t B) {
int i;
int n2 = strip.numPixels() / 2;
for(uint16_t i=0; i<=n2; i++) {
if ((n2 - i) >= 0) strip.setPixelColor(n2 - i, strip.Color(R, G, B));
if ((n2 + i + 1) < strip.numPixels()) strip.setPixelColor(n2 + i + 1, strip.Color(R, G, B));
delay(wait);
strip.show();
}
} // middle_to_edge
//----------------------------------------------------------------------
// bar_right - move a bar of the given width to the right
//----------------------------------------------------------------------
void bar_right(int width, int wait, uint8_t fR, uint8_t fG, uint8_t fB, uint8_t bR, uint8_t bG, uint8_t bB) {
int i, j;
for(uint16_t i=0; i<strip.numPixels(); i++) {
for (j=0; j<width; j++) {
strip.setPixelColor(i+j, strip.Color(fR, fG, fB));
strip.setPixelColor(i-j, strip.Color(bR, bG, bB));
}
strip.show();
delay(wait);
}
strip.show();
} // bar_right
//----------------------------------------------------------------------
// bar_left - move a bar of the given width to the left
//----------------------------------------------------------------------
void bar_left(int width, int wait, uint8_t fR, uint8_t fG, uint8_t fB, uint8_t bR, uint8_t bG, uint8_t bB) {
int i, j;
for(uint16_t i=strip.numPixels()-1; i>0; i--) {
for (j=0; j<width; j++) {
strip.setPixelColor(i+j, strip.Color(bR, bG, bB));
strip.setPixelColor(i-j, strip.Color(fR, fG, fB));
}
strip.show();
delay(wait);
}
strip.show();
} // bar_left
//----------------------------------------------------------------------
// radiate out from the center
//----------------------------------------------------------------------
void radiate(int width, uint8_t wait, uint8_t fR, uint8_t fG, uint8_t fB, uint8_t bR, uint8_t bG, uint8_t bB) {
int i, j, k;
int mid = strip.numPixels() / 2;
for (i=0; i<mid; i++) {
for (j=0; j<=i; j++) {
if ((((i-j) / width) % 2) == 0) {
strip.setPixelColor(mid + j, strip.Color(fR, fG, fB));
strip.setPixelColor(mid - j, strip.Color(fR, fG, fB));
} else {
strip.setPixelColor(mid + j, strip.Color(bR, bG, bB));
strip.setPixelColor(mid - j, strip.Color(bR, bG, bB));
}
}
strip.show();
delay(wait);
}
} // radiate
//----------------------------------------------------------------------
// running mice
//----------------------------------------------------------------------
#define MAXMICE 40
void mice(int num_mice, int width, int min_vel, int max_vel, uint8_t wait, uint8_t fR, uint8_t fG, uint8_t fB, uint8_t bR, uint8_t bG, uint8_t bB) {
int i, j, k;
int mPos[MAXMICE];
int mVel[MAXMICE];
int pos;
int mDone[MAXMICE];
boolean bQuit;
num_mice = min(num_mice, MAXMICE);
// initialize the mice positions and velocities
for (i=0; i<num_mice; i++) {
mPos[i] = random(strip.numPixels() - width);
mVel[i] = random(min_vel, max_vel + 1);
if (random(2) == 0) mVel[i] = -1 * mVel[i];
mDone[i] = 0;
}
// move each mouse
while(1) {
// wipe the strip to the back color
for(j=0; j<strip.numPixels(); j++) {
strip.setPixelColor(j, strip.Color(bR, bG, bB));
}
for (j=0; j<num_mice; j++) {
for (k=0; k<width; k++) {
pos = mPos[j] + k;
if ((pos >= 0) && (pos < strip.numPixels())) {
strip.setPixelColor(pos, strip.Color(fR, fG, fB));
} else {
mDone[j] = 1;
}
}
//mPos[j] = min(strip.numPixels() - width - 1, max(0,mPos[j] + mVel[j]));
mPos[j] = mPos[j] + mVel[j];
} // j mice
strip.show();
delay(wait);
// quit if the mice are all done
bQuit = true;
for (j=0; j<num_mice; j++) {
if (mDone[j] == 0) bQuit = false;
}
if (bQuit) return;
} // while(1)
} // mice
9 years ago on Introduction
Great idea and clever mounting methods!! I feel your pain with having to deal with power distribution, colour variations, and LED failure. I went through all all of that too, and pulled out all of my hair in the process.
One of the biggest problems people are facing with these strips is the obscenely high resistance of the cheap copper tracks on the lengths of circuit board. To keep costs minimal they use a very thin copper foil that is adequate for the requirements of the strip, but not for daisy-chaining them. This results in requiring the multiple power injection sites.
The way I have been able to solve both issues was to use 14 AWG building wire called NMD 14-2, which is a stiff, vinyl-jacketed wire, white in colour, that makes a rigid substrate for LED strips to be stuck onto. The wire has three conductors within the vinyl sheath (despite the 14-2 designation), a black, a white, and a bare wire. I used the bare as ground, white as +5v and the black as data.
The major benefit to this arrangement is that one large power supply can easily power the entire system's length due to the almost-zero voltage drop. If the LED load requires more power than one supply can provide, additional supplies can be merged into the wire run wherever most convenient. Such arrangement might be both supplies at one end, one at the start and at the middle or the end. Each LED strip's beginning is marked on the wire, and using a hobby knife I stripped 1/4" from the wire's sheath and removed 1/8" of insulation from the individual wires, to which I soldered the GND, +5v and DATA wires that go to the start of the LED strip, then covered it all in silicone sealant. (The DATA connection is only once at the very beginning, and only the GND and +5v from the next strip and beyond)
One thing that I did that seems to have been a great investment, in view of the system's zero-failure rate of the LEDs, was to install a 100uF electrolytic capacitor, a 10uF tantalum capacitor AND a 0.1uf mono capacitor (all in parallel) across the GND and +5v feeder points at the start of each strip.
I used acrylic tubing cut lengthwise down the center to give two lengths of "C" channel that fit over the wire and LED strips for weather and UV resistance, and used silicone on the back to seal it up. Installed in 4' and 6' rigid sections clipped into place, I used "bullet connectors" (Panduit) to connect the NMD wire conductors between sections.
Hope this helps anyone with power problems, I find it MUCH EASIER than having colour issues and multiple power sources to deal with.
Reply 7 years ago
This sounds fantastic.
I'm in the planning stages of RGB LED lights around my home's exterior as well.
Question: Would it be possible to run the entire length (20-25 meters of lights, maybe 10 meters of no lights) on a single length of NMD 14-2? Based on my estimates, isn't that like 50 amps at full white brightness? Wouldn't that be more than a single length of NMD 14-2 could handle?
I guess another way to ask this is how long was your installation?
Reply 9 years ago on Introduction
Great ideas! I had not considered using the rigidity of house wiring itself as the structure. I did try 12 gauge landscape wire, which is thick, but too flexible. I now have a bunch of 18 gauge wire and Deans style connectors for power injection, and it seems to work well, but a simpler setup would be nice.
8 years ago
I got everything to get this running on my house this year. My only problem is when I ran this as a test with one strip only about 3/4 of the 5 meter led strip lights up. I was thinking it was a power issue, the power brick i have is 5V 8A, not the recommended 10A. My math tells me if each pixel only draws 20mA then for 150 pixels I only need 3 amps, but if they each pull the full 60mA then I need 9 amps, making me 1 amp short.
But I also notice in your code you have these lines:
//Adafruit_NeoPixel strip = Adafruit_NeoPixel(74+74 + 52+27+39+71 + 9+38+39+11 + 15+70+15+11+40, PIN, NEO_GRB + NEO_KHZ800);
Adafruit_NeoPixel strip = Adafruit_NeoPixel(100, PIN, NEO_GRB + NEO_KHZ800);
Reply 8 years ago
Yes, exactly. If they completely stop, then it's probably either the code, or a bad LED. Those numbers being added up in my code are the number of LEDs in each segment. So, at about 3/4 of the 5m strip and 30 LEDs/m, that is around 112 LEDs. If you have a full 5m at 30LEDs/m, then that number should be 150. FWIW, that also initializes an array for the RGB values of that size, so it adds up! (3 bytes per pixel)
Power shortages would result in dimmer colors near the end, or maybe some flickering in extreme cases. Most sites I have read recommend power injection every 50 LEDs. That can be from the same transformer, but with hefty wires connecting it at a couple more points in the wire. You can see how it looks and decide if you can re-wire later. If you are planning, my experience is to definitely do it.
Your math on the power is correct - if they are not all on full white, you will probably be OK.
Good luck!
8 years ago on Step 6
Thanks for the write-up. I had attempted something similar last year, but was turned off due to the size of wire needed to run 5v over my house and ended up going with mono 12v LED lights instead. the in-line converters are a great idea; I am working on a re-design using some of your techniques. :)
8 years ago on Introduction
These are awsome.But to complicated for lil ol me.
8 years ago on Introduction
Bên mình cũng đang kinh doanh đèn led http://kingled.vn/ nhưng thực sự xem những video trên của bạn thấy thực sự chuyên nghiệp và rực rỡ. Rất đáng học hỏi ạ!
8 years ago on Introduction
SELLERS:
You might prefer a US based seller (may only cost 50¢ more), so that you get the product in a week instead of a month, and fast returns if there are problems. Be sure to take a good look at seller ratings before buying, and post negative seller feedback if you are treated badly... Some of the cheapest sellers have only 50-60% positive rating, while it is normal to see 90% positive.
1-MODE VS. 3-MODE:
The cheapest sellers are typically offering the 1-mode light, so expect to pay a bit more for a 3-mode. You should also realize that 3-mode isn't always a good thing... Several reviewers have complained that they don't like the extra complexity and confusing (memory) behavior, so consider your needs carefully. As bright as this is, I insist on 3-mode so I can dim the light (about 40 lumens), and get several times longer battery life. The combination of high/low and flood/spot very effectively covers the full range of flashlight usage scenarios. I do wish LOW was the first mode in the cycle... you can't un-blind yourself after the fact. And I'd like an even-lower brightness mode, ~5 lumens.
BATTERY/RUN-TIME:
It is a waste to buy 14500 Li-Ion batteries... Most of them cost ~$4/each, and have just 10% more power (Volt*Amp/Hours) than a $2/each LSD NiMH rechargeable, which withstands much more use and abuse (and Li-Ions are notorious for vastly exaggerated specs). Contrary to some other reviews here, I've seen absolutely NO difference in light output whether my lights are driven by 1.5V or 3.6V, so the regulator is doing a superb job. Although a hot-off-the-charger Li-Ion battery, briefly at ~4.2 volts might over-drive the LED for a small increase. If weight was critical, I would prefer disposable Lithium AAs to Li-Ions. Also, a single AA is much cheaper, smaller, and more convenient than 3xAAAs, yet both provide nearly the same amount of power. In a pinch, this flashlight even runs reliably on a single AAA battery without modification. So this unit is superior to most other (18650) small flashlights.
On a single, I get 1.5 hours of run-time on HIGH before the light dims. I expect "strobe" mode to get double that. LOW mode lasts about 4.5 hours before the voltage presumably drops too low and the regulator suddenly shuts-off the light entirely. I measured a current of approx 1.7A@1.3V on HIGH, and 0.5A@1.3V on LOW. With a 13¢ "Super Heavy Duty" AA battery, I got about half the run-time, which is decent and useful in emergencies (but starts to dim sooner than NiMH). With a battery extension tube converting this to 2xAAs, on HIGH I get 4 hours of run-time, a 33% improvement.
CLONES:
Most 3-mode sellers are offering cheap clones of the 150 lumen Ultrafire SK68, which is itself a very similar clone of the 120 lumen Sipik SK68which a few people have also received. You may be interested to know that the Sipik was itself originally a MUCH cheaper clone (using a different battery) of the old 220 lumen Nitecore Extreme
The wide array of blank/unbranded SK68 clones sold here can be different than their Ultrafire cousins... A few have a different thread diameter and the button protruding from the tail-cap so they *can't tail-stand*. Meanwhile it seems most lack proper voltage regulation ("buck"), so they're 2.5X as bright with a Li-Ion battery, or 2X as bright with 2xAAs using an extension tube, and may burn out the LED quickly on the higher voltage. The design and build quality of the clones is never quite as good as the Ultrafires, but they're decent lights, and typically still well-worth the price. I'd stick with Ultrafire branded lights for any critically important usage, like camping/hiking, myself.
SUMMARY:
This is nearly the PERFECT small flashlight. I always carry one in my back pocket, next to my wallet... I rarely notice it and I've always got a great flashlight with me when I need it. With an extension tube, it can fill the role of a MEDIUM sized flashlight as well. With the belt-clip turned backwards, it can clip on a hat for a hands-free headlamp. The high/low modes and flood/spot zoom lens means you get the exact lighting you want for nearly any purpose. And it makes a great lantern/whole-room light if you unscrew and remove the lens entirely (equivalent to a 15W bulb). Ultrafire rates this "SK68" light as 150 lumens, not 300lm as listed here, and it's pretty evenly matched with my 190 lumen DorcyCyberLight. I just wish I could find a large 2xD flashlight with all these same features, other than the discontinued Small Sun ZY-A601.
WISHLIST:
- The belt clip should be turned the other way around (or just drill a second set of screw holes near the head, so customers can choose). That would allow clipping to a hat or similar for hands-free headlamp use (without needing an extension tube). It would allow quick mounting under a car hood as a work-light, and more.
- An even lower ~5 lumen brightness mode would be great for preserving night-vision, up-close work, or indoor use, and would allow a single AA to run your light non-stop for 48 hours. I've resorted to also carrying around those $2 1xAA "3W Police" LED lights as well.
- Lowest mode first when turning-on the flashlight would be best, then cycle through higher modes as needed. Alternatively, a memory or a switch to set (and keep) the preferred initial mode might make everyone happy.
- An inexpensive pack of colored lenses seems like a common request. I believe most people want, in order of decreasing priority: Red, Amber, Green, Blue.
- Sold together with an extension tube would be a great option, like the Ultrafire C3 usually is. There's a big market for 2xAA mini-maglites, so I'm not the only one who would like the option of that larger form-factor. You CAN find extension tubes for (most of) these lights here on Amazon thanks to their compatibility with "3W Police" lights:
* http://denledchieusang.com/Tuyp-led-(Tube-led)/137/group
* http://denledchieusang.com/Tu-van/Cau-tao-va-cach-su-dung-bong-den-tuyp-LED-T8-1963.html
* http://denledchieusang.com/Tuyp-led-(Tube-led)/Loi-ich-cua-den-tuyp-LED-so-voi-den-ong-huynh-quang-1947.html
If you have any information to add, particularly if you believe my list is inaccurate, feel free to leave a comment below. I can update it with new information as it becomes available.
Reply 8 years ago on Introduction
Chung cư 87 Lĩnh Nam: http://chungcugiarehn.com/
Reply 8 years ago on Introduction
Show floor property Phat Dat we have more than 100 condominium apartments at Lingnan 87, sent by the host's price range from: 16-20tr / m2 (The type area of 85m, 88m, 92m, 131m .81m, 87m, 105m2) Contact me to get the cheapest: Hotline: 0983,338,268
http://chungcugiarehn.com
9 years ago on Introduction
Hello, i use led strips like this (direct from china, much cheaper then from lady ada)
And i come up with a different fastning sollution.
I use Plastic U beams. (the ones used to make the cabinet doors sliding easyer)
they are 12mm inside wide end 10mm deep, the strips glide wright in and stay there.
U can glue the strips down before putting the led's in or use a very smal screw.
I have also made an frame for my Arduino Ambilight from the strips.
If u like i can post a picture.
Reply 9 years ago on Introduction
Sounds like a good system. Do you have a link for a sample plastic u beam? A picture would be great! Thanks!
Reply 9 years ago on Introduction
This is a picture of it.
if the strip goes in to deep for some viewing purpose, then put somthing underneeth it.
i used 1 time 2 ethernet cables next to eachother and then the strip rises to the front, and the viewing angle is wider then.
on the far part of thd ztrip you can see the strip at the bottom of the rail/Beam.
Richard
Reply 8 years ago on Introduction
Looks good - thanks. Hiding the power wires there is a good approach. There are aluminum channels with plastic tops made for LEDs sort of like this, but they cost as much as the LEDs!
http://www.aliexpress.com/wholesale?catId=0&initia...
Reply 9 years ago on Introduction
Here is the image, i didnt know how to atach it lol
9 years ago on Introduction
Very nicely done! I just ordered all (I think. Hope.) the components for implementing this project on my house. In the planning, I've incorporated some of the ideas expressed in the comments section and I hope that it turns out well. Focusing on your last paragraph; any progress on the web control aspect??
Reply 9 years ago on Introduction
Thanks - there were some great suggestions in the comments, so I would love to hear what route you go, and how it works out.
I am already running the web server based version, and hope to publish that one in a week or two. If you want to start sooner, just send me a PM.