Year Round Holiday LEDs Part 3: Installation
Today on the hookup we’re going to take a close look at the installation process for my year round holiday house LEDs and make sure that you have all of the information you need to do a successful, long lasting, problem free install on your house.
This is part 3 of my holiday house LED series, If you haven’t watched parts 1 and 2 I’d highly recommend you start there first. In this video we’re going to take a detailed look at the installation process with some tips and tricks to make sure your LEDs function properly and continue to do so for many years to come.
The first thing we’re going to look at is the wiring schematic for the nodeMCU that runs all the lights. I have mine soldered onto a small prototype board with female header pins so I can easily remove and replace the nodeMCU without disconnecting any wires in the event of an issue.
In addition to providing the nodeMCU with 5V power on the Vin pin and ground on the GND pin we’re also going to wire in connections for each of our data output channels. Each zone of LEDs has it’s own data pin and each of those data pins is going to pass through a logic level shifter before being soldered to a terminal block. These terminal blocks make it easy to attach and detach different zones of lights in case you ever need to do any troubleshooting.
Lots of people have commented asking about the maximum distance between the microcontroller and the first pixel. And the answer that I have is that if you’re using a logic level shifter there shouldn’t really be a meaningful maximum.
The problem that DrZzs described in his video where the first pixel needed to be within a few centimeters of the microcontroller is caused by how the controller chip on the LED reads data. You may know that data is sent as zeroes and ones, but more accurately it is sent as HIGH signal and LOW signal. The WS2812B will recognize a data signal as high when it is greater than or equal to 70% of the VCC voltage and and low when it is less than or equal to 30% of the VCC voltage. So if our 5V power supply is actually putting out 5.0V, that means our data signal would need to be 70% of 5.0V which is 3.5V. The data signal generated by the ESP8266 is 3.3V, which is near the top of the ambiguous no mans land of the data signal which can cause errors in data transmission.
Putting the first LED close to the microcontroller minimizes these errors, and since each LED receives and rebroadcasts the data signal at the VCC voltage. That means that only the first LED in the strip gets 3.3 volt logic, and then every other LED chip gets a rebroadcasted message using 5 volt logic from the previous LED, so as long as the first LED gets the correct message the whole strip will work. The logic level shifter just ensures that the first LED will get the message without any errors.
To wire up a logic level shifter you give it a reference low voltage, provided by the 3.3V output on the nodemcu, and a reference high voltage which should come directly from the 5V power supply. The grounds on the logic level shifter should also attach to the ground on your power supply. Now you’ll just wire each of your data signals from the nodemcu to the low voltage side of the logic level shifter, and then connect the high voltage side to your LED’s data wire, or in this case to those terminal blocks I mentioned before.
My power supply and nodemcu are in my garage in one of these telecom boxes. Just to make it look nice I’ve installed some conduit to pipe the wires into the attic where they then go up to the different roof peaks through the soffits. The run from the garage to the first floor is about 20 feet, but the run from the garage to the second floor is more like 50 feet and like I said, I’ve never had any problems with signal using the logic level converter.
At the beginning of each of the roof peaks I’ve got 18 gauge three conductor wire coming in and that gets connected to the 5 volt, data, and ground connections on the LED strip. When installing your strips you need to make sure that they are going in the right direction. The strips have arrows pointing in the direction that the current should be flowing, make sure that the arrows are pointing away from the wires that you are connecting. At the beginning of the strip I’m also going to take a second wire and connect it to the 5 volt and ground connections coming from my 3 conductor wire to run parallel to my strip for power injection. I use this 22 gauge two conductor solid core wire to do my power injection. I chose it for two reasons: First, it’s thin enough to fit into the aluminum channels along side the LED strips, and second, it’s pretty inexpensive… You can pick up 500 feet of it for around 25 bucks.
This wire works okay for power injection, but it still leaves a bit to be desired, measuring the voltage at my last LED on the roof peak with a multimeter shows a voltage of 3.6 volts on the 5 volt rail, which is not ideal. The bigger your wire gauge on your power injection wire the more leds you’ll be able to support, but bigger wire will probably not fit into the aluminum channels. The effect of the lower voltage is most apparent when the power draw is the highest, meaning pure white, 100% brightness, you can see that the left side of my first floor roofline doesn’t output the same pure white that the rest beginning of the strip does. For me this was an acceptable tradeoff for the smaller wire size since the problem can be easily solved by lowering the overall strip brightness, but you’ll need to make those decisions for yourself.
Next you’re going to need to mount your aluminum channels on the roof, as DrZzs says, be careful up on the ladder, a trip to the ER is not in the budget for this project. Each aluminum channel piece gets two connection brackets, the spacing isn’t particularly important, but keeping them all level is extremely important. Use a ruler or a template to make sure they are all equally spaced from your roofline so that your channels all line up. Here’s a small tip that makes a huge difference: When you cut the aluminum channels you’ll also need to cut the plastic light diffuser that fits into them, but when you mount them, don’t use the cut channel with the cut diffuser. By overlapping the joints of the channel and the diffuser it will keep your aluminum channels straight and that should also take some strain off of the LED strips.
You can see that in my channels I’ve got the power injection wire running along the bottom of the channel and the LED strips above them. I keep the injection wire in place with small globs of hot glue, it doesn’t need to be pretty since it will be inside the channel with the diffuser on top of it.
At the end of each strip, or more specifically whenever there is a change in the roofline I use that opportunity to inject power. If the joint happens to be on the actual end of the strip you can just use the wire that comes pre-soldered to the strip to connect them and inject power, but if you need to cut a custom length of LEDs you’ll need to solder on some new wire and waterproof the connection. To do this, carefully pull away the silicone coating next to the copper solder pads and fill each pad with a nice pool of solder, you should also strip away about an eighth of an inch from each wire and tin those with a bit of solder. Next you’ll quickly apply heat to the pre-tinned wire while pressing it against the copper pad, this will bond the solder on the pad to the solder on the wire, repeat for all 3 connections. Last you’ll cover the whole thing in hot glue, and slide some 3/8” heat shrink tubing over the end. When you shrink the tubing using a heat gun or a lighter you should see the hot glue squeeze out the ends, which means we’ve got a nice waterproof wiring connection inside.
Each junction should have 4 wires connecting to 5 volts and 4 wires connecting to the ground, as I said before the data signal is rebroadcast by every LED, so you’ll just attach the data out of one strip to the data in on the next strip. These junctions are going to be the most difficult part of the installation process. The farther apart you put the two strips the more room you’ll have to put your wires, but you’ll also be able to notice a gap in the LEDS if they are all lit up. Here you can see where I have a junction on the garage roof line. It was my first junction of the installation and I left more space than I needed to meaning the junction is more noticeable. It should be noted that you should avoid bending these strips. If you have a peak you should cut each strip and make a wiring junction to turn the angle.
If you have a roof gap to bridge you’ll just repeat this same process, but install a longer length of wire in between them. You should also use those areas as a perfect opportunity to inject power again. Installation can be a bit tedious, it took me about 4 hours to do the first floor and 5 hours to do the second floor, but I was taking my time, making sure to get everything lined up nicely, and trying not to fall off the ladder. Remember that this is a permanent installation, so doing it right the first time will save you headaches later.
Back on the software side I’ve gotten a few questions about how to change the frequency of some of the effects. Don’t underestimate how fast these little chips are, even running all these complex animations the void loop still executes around 30 times per second, if you’re running less LEDs in less zones yours will be even faster than that.
I found that using the random8 function to generate a random number between 0 and 255 once per loop and executing the lightning effect whenever it was exactly equal to 255 was the correct frequency for me, but if you have less LEDs and are therefore running the loop more often it may result in the lightning happening way too often. If you change the random8 function to random16 it will generate a number between 0 and 65,535 and then tell it to execute the thunder effect whenever it generates a number that is greater than some other large number. If you put in a value of 65,280 you would get about the same frequency as having the random8 value equal to 255 meaning it should happen roughly once every 255 loops. If you wanted it to happen less you can just increase that number to something like 65,400, which would then theoretically happen once every 485 loops.
I’m adding more and more animation types to prepare for my project of making a synced light show this year for Christmas. Once I getting them working well and have the code stable I’ll be updating the github page with those additions. If you’ve got over the air updates setup in Arduino it makes it very easy to upload new code to your nodeMCU even if it isn’t in a convenient location.
If I missed anything, or if you still have unanswered questions please ask them in the comments section. I’ve got an increasing number of people emailing me questions, and while I’m happy to help I’d prefer you do it in a public place whenever possible so other people who may be having the same issue can benefit from the information.
Thank you to all my awesome patrons for supporting my channel. Check out the links in the description if you’re interested in supporting this channel and the projects that I make. If you’re new to the channel and you enjoyed this video, please consider subscribing, and as always, thanks for watching the hookup.