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
- 1 x Adafruit Trinket M0
- 1 x Adafruit RGBW Neopixel stick
- 4 x Potentiometers 50K
- 1 x 1800mA LiPo battery
- 1 x Slide switch
- 1 x LiPo JST connector
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.