My old light strip recently broke. Instead of buying a new one, I thought I’d try making my own improved version.
It has several different “widgets”, from left to right:
It is also possible to use the strip as any ordinary RGB LED strip via a simple web UI and there’s “night mode” that turns the blue LEDs off (don’t forget about that melatonin production).
There are two parts to this project: the controller that talks directly to the LEDs, and the server that fetches weather, stock and calendar information and passes that information on to the controller.
The LED strip + controller consists of a few different parts:
These parts cost me ~€26 in total.
One problem I ran into was the voltage drop after a few meters. 7.2 ampères through a thin copper wire means that you lose a significant amount of voltage over a few meters. This meant that the last LEDs in the strip got a red-ish tint as the blue LEDs became dimmer (this has to do with the difference in forward voltage between red and blue LEDs; blue LEDs require a higher voltage to turn on than red LEDs). This was easily solved by running two extra thin copper wires (one for +5V and one for GND) along the LED strip and soldering them to the other end of the strip.
The ESP8266 runs a very simple HTTP REST API that allows you to set the LED color of ranges of the strip. It is very dumb and does not do anything other than turning some LEDS off and on. The code is available here.
The server that fetches weather, calendar and stock info was written in Go and is available here. It is easy to create new modules (see the weather widget, for example). The server will automatically give each module the chance to update every 15 minutes. There is also a small web server running on port 8080 that allows you to control the different modes of the strip, however its interface is very rudimentary, ugly and not yet finished.
If I had the chance to start all over again, I would probably use SK6812 LEDs instead of WS2812B. The WS2812B’s have 3 LED channels: one for red, blue and green. This is great for most colors, though they have trouble recreating warm whites. SK6812 strips have a 4th LED channel for warm white LEDs, so they are much better at creating warm white light. They are just ~€1 extra per meter, so I would probably choose these if I had to start all over again.