3D printed mood lights

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?


Those are so cool! Nice work!

What if you added a second button instead and did brightness control with just the pot and hue control while holding the second button?

There’s also the option of a single button that is programed on button up: quick press to change mode, long press and hold to unlock speed mode for the pot.

1 Like

Thanks Kyle! My nieces were happy with them so it worked well.

I initially thought I was going to use the pot to control both the hue and the brightness, making it modal by pressing the button but I ended up ruling it out. I think that would only work with a rotary encoder. I couldn’t think of a way that changing the value in one mode wouldn’t also change it for the other mode. I would have to decouple the absolute pot values from the absolute hue/brightness values, making them relative, but then I don’t think that would work unless the pot could endlessly rotate? The physical limits, and the ‘mechanical memory’ of the pot were working against that use case.

They make continuous rotation pots but I don’t think that’s the right tool for you.
A rotary encoder is ideal!