Ever since seeing the first Christmas tree animated and chorographed to music, I have always wanted to know how they did that and do it myself. I talked with friends, others who have completed such projects and did a bunch of research. I was able to complete my first project that I was able to have ready to show off to my family in December 2022.
I ended up with using an Arduino Mega with WS2811 addressable LEDs and lots of ongoing work on power supplies, injected power, with lots and lots of example code included the wonderfully written FastLED library.
The code that I put together after reviewing lots of other examples; borrowing other code and changing it, I came up with two different sets of patterns that get displayed. One set of just basic colors schemes using the color_palette feature of FastLED so that animations were smooth and the other was using the same set of animations but changed the color scheme to a little more personal: Orange and White (UT Longhorns); Maroon and White (TX Aggies); Blue and Gold (TAMUK); and Maroon, White and Silver (Schreiner University). All the different school colors of family in the room. In addition to the school colors, I kept my favorite Green, Red and Gold pattern and a rainbow pattern as well as the patriotic red, white and blue for USA. The indoor tree consisted of 200 LEDs.
GitHub Repo: https://github.com/jewettg/addressable_leds
In working with the different wiring; I found that to ensure that each strand of 50 LEDs would have enough power, I would power each strand. What I came up with was pretty fast and hacked together — so not the best, but it worked. I did attempt to ensure that strand power was connected and disconnected easily (for easy deployment to the tree).
I ran two-wire (basically speaker wire), 3-pairs up the middle of the tree and met with the power-inject points of each strand. I use spade terminals to connect the injection points to the wires coming up the middle of the tree (ensuring polarity was correct). All power wires ran back a single 2-terminal block that then connected to the +5/-5v terminals on a 60A power-supply.
Each strand of LED lights, while they could carry power and data (3-wires); it seemed more logical to to use only two of the three wires for data and ground, using the power -injection points to supply power to each strand. The very first strand has very temporary connectors to the Arduino Mega (data pin 3, and ground).
FUTURE BUILD
Future builds will include more durable connections (water-proof power connections and interlocking connectors), so that I can build an outdoor as well as an indoor LED display. I will prototype on the Arduino Mega and then run the show from an Arduino Nano.
The only thing to figure out, at least for the indoor display, possibly for the outdoor display:
How to cable manage (if necessary) the additional power wires.
Should they run the length of the LED strip (using zip ties and such to keep them together)
If ran along with the LED strand .. would the low 5v power cause RF interference on the data line?
Just run power from the power-supply to each strand as necessary?