Introduction: Lumos the Christmas Tree

My children and I built this project to bring a little bit of magic from Universal Studios home with us. We recently visited the theme park and bought wands from Ollivander's wand shop and had so much fun going around the park activating different spell stations. I am always curious as to how things work, so of course I got to googling how to recreate this at home. I found several wonderful Instructables re-creating the magic in their own special ways, but Christmas was right around the corner and I thought it would be amazing if I could merge the magic of Christmas and the magic of Hogwarts and maybe inspire some of the kids in my extended family to think about how programming and engineering is like performing magic in real life. Thus "Lumos the Christmas Tree" was born. This tree is programmed to read 8 different spells and perform light and sound animation that match the kind of spell that was "drawn".


You may configure this to work with other setups, but here is what I've tested with:
1. I-VOM Wireless Mini Speaker with 3.5mm Aux Input Jack, 3W Loud Portable Speaker for iPhone iPod iPad Cellphone Tablet Laptop, with USB Rechargeable Ba

2. AmazonBasics USB 2.0 Cable - A-Male to Mini-B Cord - 6 Feet (1.8 Meters

3. Infrared Night Vision IR Camera for Raspberry Pi 4, Pi 3b+ Video Webcam with Case Suits for 3D Priter

4. Adafruit FadeCandy - Dithering USB-Controlled Driver for RGB NeoPixels [ADA1689]

5. ALITOVE 50pcs DC 12V WS2811 Led Pixel Black 12mm Diffused Digital RGB Addressable Dream Color Round LED Pixels Module IP68 Waterproof

6. CanaKit Raspberry Pi 4 4GB Starter Kit - 4GB RAM

7. Harry Potter wand from Universal Studios (or make your own

8. 12V wall adapter power supply for the LED Pixels

Optional materials to build the tree:

1. Tomato Cage frame for tree:

2. Garland (I used 2.5 of these):

3. Twist Ties (I used 2 of these):

Step 1: Wiring

For this project I have used a tomato cage and some cardboard to construct my Christmas tree and keep my light arrangement fairly uniform. This isn't a requirement, although I think it makes the animation look nicer. The important part of this step is that the night vision camera must have a clear view of the wand-holder,and all the mechanics inside must have sufficient air flow. I used twist-ties to attach everything together. I have attached the tomato cage to the cardboard and the raspberry pi, speaker, and night vision camera are attached to the cardboard base. Garland is wound around the tomato cage to cover the insides, being mindful of keeping it out of the camera view, some trimming may be necessary to do this. I ended up using about 30 feet of garland to wrap my 33" tall, 12" diameter tomato cage tree.

Step 2: Install Software

This project was tested with the latest version of Raspian Buster with desktop version:4.19. You can download the latest version at

1. OpenCV: Follow the instructions on this blog post to install OpenCv and a virtual environment:

2. Processing: Follow the instructions in this blog post to install processing software on raspberry pi:

3. FadeCandy: Follow the directions on the fadecandy github readme to clone fadecandy and install a fadecandy server. You'll be ready to move on when you're able to control your lights by accessing the fcserver at http://localhost:7890/

4. Clone "Lumos the Christmas Tree" source from:

5. Build the light animation executables: I have included the files necessary to create the processing light animations, but because the java executables are so large, you will need to compile them separately. Below are the commands to do so (replace /home/pi/repos/ to wherever you clone this project):

exec /usr/local/bin/processing-java --sketch=/home/pi/repos/lumos-the-christmas-tree/strip50_flames --output=/home/pi/repos/lumos-the-christmas-tree/incendio --platform=linux --export
exec /usr/local/bin/processing-java --sketch=/home/pi/repos/lumos-the-christmas-tree/strip50_water --output=/home/pi/repos/lumos-the-christmas-tree/aguamenti --platform=linux --export
exec /usr/local/bin/processing-java --sketch=/home/pi/repos/lumos-the-christmas-tree/strip50_light --output=/home/pi/repos/lumos-the-christmas-tree/lumos --platform=linux --export
exec /usr/local/bin/processing-java --sketch=/home/pi/repos/lumos-the-christmas-tree/strip50_spazzy --output=/home/pi/repos/lumos-the-christmas-tree/broken --platform=linux --export

Step 3: Run the Program

The github source includes spell recognition for the spells listed on the flyer above. There are instructions on the github readme if you would like to try training your own spells. run to start the program The spell recognition works best in low light, if you have trouble with the wandtracing image bouncing all over the screen, check the debug window to see if it is picking up any errant light sources, these will be shown with red circles on the screen.

Make it Glow Contest

Participated in the
Make it Glow Contest