The Mallsoft LED Lighting Project - Part 2

All about my LED controllers

· 6 min read
The Mallsoft LED Lighting Project - Part 2

Background

Back in 2022 I started to get into all sorts of microcontroller projects. It started with automation of my grow tent (discussed elsewhere on this blog) but quickly escalated into home automation writ large. The LED rabbit hole came mid-way through 2022 when I bought myself an Adafruit Matrix Portal microcontroller board and 64x32 HUB75 matrix display. I quickly added a second panel to make it 64x64, wired in some I2C add-on components and an IR sensor, and turned it into a temperature-monitoring, pattern-switchable synthwave clock.

Matrix Portal board, an SD Card reader, and a real time clock breakout on the back of a HUB75 panel
Synthwave clock, of my own design

I'll come back to the matrix displays in a bit. Suffice to say, this piqued my interest in addressable LEDs and I started to think about what came next. By October 2022, I decided I needed a way to cleverly light up a Jack-o'-Lantern and I designed and milled my first individually addressable LED project, the Pumpkinator, a Raspberry Pi Pico-based device that flickers multiple addressable LEDs to look somewhat like an off-colour candle flame. I used Adafruit's Diffused 8mm Through-Hole Neopixels as the light source.

A CNC-milled circuit board, Pumpkinator Rev. 1.
Wonderfully creepy Jack-o'-Lantern armed with the flickering, spooky Pumpkinator

Controller 1 - "Mallsoft"

In late 2022 I stocked up on more Adafruit supplies, including the new RP2040 SCORPIO board. This board had the same brains as the aforementioned Raspberry Pi Pico, but it also had 8 5v level-shifted outputs to use for controlling large numbers of LEDs. I combined that controller with an Adafruit Airlift Featherwing to give it WiFi support and whipped up some code in PlatformIO (with Arduino libraries) to breathe life into the >1500 LEDs.

I quickly learned 1500 addressable LEDs, even split across two channels, is quite a large number to software control with any decent framerate. Even using the acclaimed FastLED library I was hitting barriers running effects. I also didn't have a good way to control this setup. I played around with websockets and other approaches over wifi before deciding I wanted an interface on the actual device to control things with.

There were several iterations of the Mallsoft controller before I moved on.

"Mallsoft MkII" with RP2040 Scorpio, Airlift Featherwing, and OLED Display Featherwing setup to output to some Arduino LED panels. FlipperZero running DAPLink for debugging of RP2040.
"Mallsoft MkIII" with 8x8 dotstar display and rotary encoder for control. Features an additional board with resistors for reducing noise on the LED data line.

Controller 2 - PixelBlaze with Expander

In February 2023 I got my hands on an Electromage PixelBlaze and v3 Output Expander. The PixelBlaze is an independently-developed ESP32-based LED controller with a classy web interface for control. I bought this because it had a load of readily usable patterns I could immediately use with the LED strips and I could easily develop my own patterns.

The expander board was necessary to be able to output separately to multiple strips. It was also not limited to use with the PixelBlaze, which would be of benefit later on.

PixelBlaze Output Expander v3.0
Testing out the PixelBlaze on the floor of my very messy workshop in February 2023

My use of the PixelBlaze for this project was short because it didn't work with Home Assistant (at least not without API programming effort from me) and I had some slight frame rate dropping issues with the length of the runs. All in all though, Electromage makes a great LED controller and I've continued to use them on other projects.

Controller 3 - "Mallsofter"

Around April 2023 I discovered the power of the Teensy 4.0 and 4.1 development boards as well as the SmartMatrix Shield for Teensy, allowing it to control a HUB75 matrix display (see, I told you we'd get back to the matrix displays!). By May I had put together a first iteration using a Teensy 4.0, a level shifter board, and an Airlift Featherwing (for Wifi).

First iteration of Mallsofter - encoder knob for local control
Mallsofter running a display with a pixelated Hermes statue, while driving two LED strips.

I became sidetracked with other projects and life for the next few months but by August I had a fully working second revision. This one used the longer Teensy4.1 and made use of the Pixelblaze Output Expander (which I hacked in support for in the ws2812fx and FastLED libraries), offloading the LED heavy-lifting to the expander board.

5v power block and output expander for driving the LED strips (12v power for the main strips is fed to them separately)

I attached a Real Time Clock and sensors to the display to make it more useful on the bedside table, and mapped out the framebuffers to show a clock and mini scene of the bedroom with active LED patterns echoed on the front.

I also wrote in MQTT support so the LED strips would function in Home Assistant (including selection of effects!).

The complete "Mallsofter MkII" running on the nightstand, showing the current time and lighting configuration.

Controller 4 - WLEDx3

Mallsofter was in operation until this month, November 2024, when I decided to replace it with the featureful ESP32-based firmware, WLED. I'd known about WLED for a year at least but hadn't tried working with it until working with a friend on his LED lighting project recently.

WLED offers many advantages over the setup I was running previously, including out-of-the-box Home Assistant support, a huge number of included patterns, synchronization with other WLED devices, and more. I would lose my custom-programmed nightstand clock controller but as cool as it looks, in practice, I rarely used it, instead relying on Home Assistant automations for controlling my lights most of the time.

I did some testing with a single WLED controller and, unfortunately, not being as fast as the Teensy 4.1, the ESP32 choked on frames trying to run all four of the bedroom light chains.

Triple ESP32-S3 setup with Seeed XIAO ESP32-S3.

Rather than give up on the idea, I leaned on the sync feature and set up 3 ESP32s running WLED together – one for each of the two long strips, and one for the paper lanterns and under-bed lighting. This worked perfectly with each strip getting the full specification framerate (42 fps).

The only catch I've encountered is with the Home Assistant integration which causes frame drops/stuttering when it polls WLED every 10 seconds. I disabled polling and it went away, but this may not be an option for those with shaky wifi connections. In my case I went with ESP32-S3 boards that use an external antenna.

Overall I'm quite satisfied with the current controller iteration. I've moved the temperature/humidity sensor I had on Mallsofter over to another ESP32 running ESPHome in the bedroom so I haven't really lost any functionality in the end.

Closed up project case for WLEDx3 setup. Nice and compact.

Related Articles

Easy DIY CO2 Sensor
· 15 min read
Grow 3, day 27
· 2 min read
ESP32 and Home Assistant
· 11 min read