Ever since seeing the music aligned christmas lights display many years ago (2009 it seems) I have been interested in how to achieve this.
Now that I have a bit more knowledge around the electronics space and a house to do it to, and seeing more recent videos it has peaked my interest in it.
I’m going to start with a few trial and error projects to see how everything behaves, and scale up from there with the ultimate goal being to create my own dedicated ESP32 LED controller powering a fancy display.
And if I can achieve this, apologies in advance to my neighbours.
Initial Research
My initial research has pointed me towards using xLights as the sequencer, which can then control the light display on its own or by exporting to Falcon Player on a device such as a Raspberry PI. For the initial testing I’ll be using xLights directly.
Each led strip (called Pixels in this case) needs to have a controller. The easiest way is to go with ESPixelStick, however as I am familiar with the ESP32’s through my other projects (ResourciBoard, Neon style LED sign), I’m going to try and be a little more hands on by using the basic NodeMCU platform with WLED as the firmware, as WLED contains all the necessary protocols to listen to xLights.
My research has also uncovered that 12v is best to start with if you have made no investment in led strips previously, so with the NodeMCU platform I’ll need to follow the wiring diagram on the WLED site.
This contains a few extra parts for 12v, specifically two fuses (not really required for testing purposes), an optional 62 Ohm resistor, a 1000uF capacitor, and a level shifter to bring the 3.3v data signal up to 5v to make the data signal more reliable. The level shifter needs to be fast enough for the signal sent to the led strip – a lot of forums recommend the 74HC14 so I will try and source some.
As for led strips themselves, I an going to start with a string of RGB pixels using the WS2811 chip.
Trial Shopping List
2x NodeMCU controllers
1x WS2811 based 12v LED Pixel strip of 50 Pixels
2x 74HC14’s
2x 1000uF capacitors
Once I have acquired all these parts or similar substitutes, I’ll move on to flashing the WLED firmware on to the NodeMCU boards.
Flashing WLED to the NodeMCU boards
This is actually surprisingly easy where it really shouldn’t work but it somehow does. It’s as easy as plugging the board in to a usb port, navigating to the WLED install website, click install, choose the com port, and then follow the prompts. You should end up logged in to your WLED dashboard on the device. Easy!
Initial Test
Inbetween moving house, I decided to get some things tested that weren’t too intrusive or required too many tools. So I hooked everything up with the electronics I did have on hand, and gave it a go.
It worked surprisingly well! The setup is a little different to what was suggested, so here’s the adjustments:
- 12v input
- LM317 linear regulator, adjusted to push out close to 5v. This does get hot but it was just to test the theory.
- WS2811 pixel led strip
- SN74HC125N quad buffer / line driver – to bump the 3v data signal from the NodeMCU up to 5v for the lights
Pre-scale theory
I figure I can use the quad buffer for more than one light strip, and I am keen on getting the initial 50 lights cut in half to try and get two NodeMCU’s of 25 leds to work in unison. That will then prove that the circuits and chips and everything would be good to go ahead with a larger deployment.
I purchased some 12v->5v switching regulators to prevent the heat issue, and got to assembling a test board.
The regulator isn’t soldered yet as I have to locate my iron, and the pixels need to be cut into two 25 led strands. Once I have those two complete, I can hook all of this up and see if the power is ok to drive all of this. Then it’ll just be a matter of scaling it all up!
A bit of trial and error
After locating my soldering iron I have been able to give this a go. I separated the pixels in to two 25 pixel strips, wired it all up, soldered the power supply, and turned it all on.
A number of issues appeared immediately:
- Only one NodeMCU could be reached successfully at one time. It didn’t matter which one, so it wasn’t a hardware fault.
- Only one set of pixels would light up.
After a lot of tinkering it turned out to be these issues:
- The NodeMCUs can’t be that close together, they are interfering with eachothers WiFi.
- I had the second set of pixels wired up incorrectly to the SN74HC125N.
- The second set of pixels don’t allow the data pin to come from the other end. It MUST be from the cut end. It just didn’t want to work the other way.
Once these were resolved it came alive!
This is showing it’s possible to control two NodeMCU’s using a single power source and SN74HC125N. It’s probably safer to just have a separate circuit per light strand however.
Now that I have two, it’s over to xlights to see if I can get them to react as though they are part of a house display. That will give me everything I need to scale it up, as the only limits should be 12v power capacity, wifi signal, and my time!
Veroboard Design
Just working on a quick veroboard layout for the two chips, where if I can source more of the buck regulators then I can make enough of these to do a bulk soldering session as this circuit seems to work.
New year, new chance!
It’s been about 8 months since the last update where christmas came and went. There was a window of a few months to organise something but I was let go from my job and therefore I had to refrain from spending up big on flashy lights. But I am preparing early this time to give it another go. It’s only April which should provide enough of a window to sort it out! First is resurrecting an old WiFi router, as I recall reading that this uses a lot of network traffic so it’s best to have a dedicated AP. So I dusted off an old netgear.
This has been updated with the latest firmware, configured, etc. ready for the nodes. I have also updated both NodeMCU’s that I had with the latest wled firmware, and set them as static IP’s on that AP. Looking good! Next is to resurrect the old circuit and try to sequence two led strips from the one board. If that works then it’s on to xlights again. Fingers crossed we can get it done this time!
Lights are back!
I have found the old circuit, rewired a few things and threw caution to the wind, and we have two strings from the one board!
Now that this looks good it means I have the components and wiring correct infront of me. The idea is each led strip will be 50 leds long instead of the 25 that I’m testing with.
I managed to get both strings to work as one within xlights. Some notes:
- Each nodemcu will be one universe.
- Each led consists of 3 channels (RGB). So for a 50 led (node) string, it’s 150 channels.
- It looks like it’ll be easier to work by channel number than by universe.
- To have something span across the whole house, create a group then add it to the timeline.
I think this is doable. Next step might be to make a nicer circuit from veroboard as I’ll need 5 or more of them.