Liz - Blitz City DIY
Published © GPL3+

NeoPixel Menorah

An RGB electric menorah to celebrate Hanukkah.

IntermediateFull instructions provided6 hours1,034
NeoPixel Menorah

Things used in this project

Hardware components

Adafruit NeoPixel Diffused 8mm Through-Hole LED - 5 Pack
×2
Adafruit Trinket M0
×1
1/2" 90 Degree PVC Pipe Elbow
×1
1/2" PVC Pipe Tee
×1
1/2" PVC Pipe Coupling
×1
1/2" PVC Pipe Cross
×1

Hand tools and fabrication machines

Hot glue gun (generic)
Hot glue gun (generic)
Soldering iron (generic)
Soldering iron (generic)
Dremel
This is the one I have but even a drill will work.

Story

Read more

Custom parts and enclosures

Menorah Base .STL File

.stl file for the Menorah Base. Beginner at CAD so please be kind haha

Error uploading file to Sketchfab.

Schematics

NeoPixel Menorah Circuit

Breadboard view of the circuit

Code

Basic NeoPixel Rainbow Cycle Code (Circuit Python)

MicroPython
Very basic script to run the rainbow cycle effect in Circuit Python on an Adafruit m0 board.
import board
import neopixel

pixpin = board.D2
numpix = 50 #I left this value high despite the lower number of actual pixels to 
            #keep the colors flowing slowly
            
strip = neopixel.NeoPixel(pixpin, numpix, brightness=2, auto_write=False) 

def wheel(pos):
    # Input a value 0 to 255 to get a color value.
    # The colours are a transition r - g - b - back to r.
    if (pos < 0) or (pos > 255):
        return (0, 0, 0)
    if (pos < 85):
        return (int(pos * 3), int(255 - (pos*3)), 0)
    elif (pos < 170):
        pos -= 85
        return (int(255 - pos*3), 0, int(pos*3))
    else:
        pos -= 170
        return (0, int(pos*3), int(255 - pos*3))

def rainbow_cycle(wait):
    for j in range(255):
        for i in range(len(strip)):
            idx = int ((i * 256 / len(strip)) + j)
            strip[i] = wheel(idx & 255)
        strip.write()
        time.sleep(wait)
        
while True:

  rainbow_cycle(0.001)

Credits

Liz - Blitz City DIY

Liz - Blitz City DIY

6 projects • 75 followers
\\ DIY-er on a quest to gather and share knowledge. She/her.

Comments