I made a neopixel lightbar controller to add color to my macro photographs. I usually just use mono colored LEDs to accomplish that, but thought something like this will give me more control.

The design uses the Adafruit Trinket M0 as the main controller. The light bar is an Adafruit RGBW Neopixel stick. I used four potentiometers to control intensity of each color (Red, Green, Blue, and White). By varying the individual pots, you can create a multitude of different colors.

 

Parts List

Wiring

Assembly

The 3D STL files for the enclosure are available on thingiverse and github. They were printed on a Prusa i3 MK3 printer.

You can secure the Neopixel strip and the Trinket M0 with small #2 wood screws.

The knobs should press fit onto the potentiometers.

I used brass #2 wood screws to secure the lid on to the enclosure body.

Code

NOTE: You’ll need to install and add the Adafruit Neopixel library for this code to work. Instructions to add this in your code are available here.