Christmas Lights


I recently finally found the time to do something with these 2 strips of WS2801 LEDs that I had laying around for years… and what better / more obvious idea given the time of the year, than build some over-engineered Christmas lights ?:)

2 strips of WS2801 LEDs are controlled by an ESP32 board with an integrated 128×64 I2C SSD1306 OLED display.
A rotary encoder is used to control the brightness of the LEDs and to change the “mode” (coloured/blinking lights / continuous white).
Powered by a simple 12V 3A wall wart.
Also using a 5V L4940V5 Linear Regulator to power the ESP32 board from the main 12V power line.

There’s not much more to say, beyond the fact that I struggled quite a bit with LEDs having random colours, the further away from the controller they were. Strangely enough the first 11 LEDs from the strip worked consistently while the remaining 9 not. I then tested with the 2nd strip and it worked just fine. This convinced me it was a problem with one of the strips of LEDs and I simply threw away the “defective” part.

However, later on I started having problems even with the “good” LEDs and only then realised that apparently the FastLED library has issues on ESP32 and I had probably thrown way perfectly good LEDs… !
The only way to make it work was using Hardware SPI, which is NOT yet officially supported for ESP32, so I had to manually add that diff.
However, while initially all the remaining 31 LEDs worked perfectly fine all together, just before installing them I started seeing the same, random colour, problem… pretty frustrating indeed, and by that time I had spent all the time I had for this project, so I just left it as it was 🙂

Oh, and the nice little 3D printed box housing the electronics :

You can of course, as usual, find both the ESP32 code and the FreeCAD model on my github repository.

Advertisement

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: