These are some mood lights that I made as Christmas presents for my nieces. I just about managed to get them finished in time!
I’ve been trying to get to grips with Fusion 360 and so I used that to design the base:
The LEDs are 24 pixel WS2812b rings that I got from Aliexpress. These are driven by an ESP8266 that sits inside the base and uses the FastLED library.
There’s a button and a potentiometer knob on the side. Clicking the button with a short press adjusts the brightness of the lamp, a long press changes the ‘program’ that the lamp is showing. There are 4 selectable programs/animations which gradually cycle between sets of colours. The potentiometer knob controls how fast the program runs, basically how quickly the colours change. The final program just displays a single hue and the potentiometer is then used to change the hue that is displayed.
I 3D printed all the parts using black, white and matte blue PLA. The internals are a mess because I’m terrible at soldering, but you can’t see any of that.
They are powered by USB and I got these handy usb cables with an integrated on/off switch so that I didn’t need a power switch on the lamp.
I’m quite pleased with how they turned out. It was a bit of a rush towards the end and I would have liked to have spent longer on the software side of it, programming the microcontroller with more/better animations.
If I make another I’m going to use a better button. This version uses these simple buttons and they are a bit fiddly to press, maybe some caps would help or I’ll just use a bigger button.
I’d also probably put two potentiometer knobs in it. One for the speed/hue and use another one to control the brightness. This would allow fine grained brightness control whereas currently you can only cycle between 4 pre-specified brightness levels. However, I think the ESP8266 only have 1 analog input for reading the potentiometer values. Maybe a rotary encoder would be the way to go, have a single knob that served as both the knob and button and could be used for everything?