timstephens

WiFi Connected Lamp

I built a wifi-controlled colour-changing standard lamp based on an old Habitat lamp that stopped working several years ago.

Hardware

The internals rely on a WS2812 LED strip containing 55 RGB LEDs, each of which is individually addressable. I control this with a PCB that I originally designed for my central heating control project, but which is suitable generic to allow this additional application. The microcontroller is an ESP8266-12 unit.

The whole system is powered with a 15W PSU providing 3A at 5v, which is enough to drive the LEDs at full power with a little headroom for the WiFi controller. I connected the power supply into the base of the lamp, fed the LED strip up inside the light tube, and then fastened the controller PCB at the top. There is also a DS18b20 temperature sensor fitted to the lamp so that it can provide input for the central heating control system whilst it’s powered on.

Software

Initially, I wrote my own control code but then realised that the Sonoff-Tasmota firmware can do everything that I need in this application. I modified one of the board descriptions to match the pinout of my board (very minor), and use that to provide the full control that I need. This firmware is really powerful, and a lot more feature-packed than I could ever need.

Result

The whole system provides a nice, controllable lighting solution that offers the full spectrum of RGB control, dimming and fancy party modes. Additionally, there is the ability to add another datapoint to the temperature monitoring network that I have in place.