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.
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 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!
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
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!
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.