What’s this about?
Since a while I was wondering how to setup a chain of LEDs, where each LEDs colour and brightness could be assigned by me. In Germany I got 2 LED chains which turned out to just allow pre-programmed colours and blink patterns. I’m looking for full flexibility, so I could also for example deploy them behind the monitor and have them shine in the dominant colours of the current movie scene.
In my social bubble, many are playing with these - but it seemed to me like the presentations were always on types of LEDs etc. instead of covering the basics. So this is what works for me, and which I can now extend from, in future setups.
The components I’m using now
- Controller: I planned initially to just control the LEDs plainly via USB, but now settled with a small controller box which contains an ESP32, join a wifi network and can be controled over network. These cost ~20EUR, I got this one. That controller would also be good to connect additional LED stripes.
- Power: my first idea was to use USB from a PC, but that won’t deliver enough power for more than a handful LEDs, maybe 10, depending on type/consumption. For now, I use a 12V/2A power supply which in the past powered a router.
- LEDs: A huge variety is available, common names are ws2811, ws2812,
sk6812, tm1814, ws2813, ws2815. For starters, I got
this, which is
described as “WS2815, 3M 60 IP30, Black PCB”, meaning:
- WS2815 - chip
- 3M - 3 meter
- 60 - this kind of stripe has 60 LEDs per meter, so I have 180 LEDs
- Software: WLED is the software I use on the ESP32 based controller. Search terms for controllers like this: “wled controller esp32”. My controller was already flashed with the WLED software, last stable release.
When looking up the hardware, some pieces have to match:
- the voltage of the power supply has to be covered by the controller, and to fit the voltage required by the LEDs
- the maximum current of the power supply has to fit to the consumption of the LEDs. I consider my 12V/2A power supply slightly underpowered, but surprisingly the WLED software allows to configure the power supply specs, and then stays with brightness/effects below the limits!
Setup
The hardware arrived after 2 weeks. Not even soltering required. The LED chain had cables with connectors on both ends: one can be connected to the controller, the other could be used to chain other LED-chains. There was also a spare connector with loose ends: I simply connected these cables with the “controller”, and the LED-chain was connected. The power supply had a 3.5mm barrel plug, which I connected to the controller.
As the ESP32 contoller got power, it started offering a wifi network. On Linux, ’nmcli dev wifi’ showed the network, and with
# nmcli dev wifi con WLED-AP password wled1234
# dhclient <wifi-interface>
one joins the network. I got IP 4.3.2.2 assigned, and the ESP webserver was available at http://4.3.2.1 . From that interface, I configured the ESP to join the existing iot-wifi-network here. All of this could also easily be done from a mobile phone. The WLED pages are designed for mobile devices, but also have a “PC mode”, an interface optimized for desktops.
I also got a matrix built from LEDs shipped, looking into that next.
Power
Running the 180 LEDs on 20% brightness, the power supply takes 0.1A here on the 100V network in Japan, so 9 or 10W are consumed. The power supply gets a bit warm. On full LED brightness, consumption goes up to 24W.
Matrix
The matrix is a 32 columns / 8 rows device, sold for 16 euro here. Product name: “DC12V WS2815 8x32”, so 12V powered, LED type is WS2815. Works really nicely, and WLED can also control it. The LEDs are switched as if they were located in a long stripe, but WLED then aligns them into a matrix - with the user configuring the 32x8 setting. WLED also knows many effects for these 2D-setups.
Links
- NeoPixel, a widely used library for controlling LEDs
- hyperhdr is a project to control stripes for ambient light behind monitors. Here is a description of their hardware.
- more minimal controller, project
Comments? Questions? -> Mastodon thread
Last modified on 2024-10-20