To say Harry Potter is a cultural phenomenon is an understatement. It’s simply part of our culture, arguably as beloved as any other media franchise in history, inspiring many of us to try to capture some of the magic on our own — which is what this project is about.
After a recent trip to Universal’s Wizarding World of Harry Potter, my daughters and I decided to create a project that could use the interactive wands from the theme park, at home, to control our own props and gadgets. We called it Raspberry Potter because it was powered with a Raspberry Pi. We demonstrated the project last year at the Minneapolis/St. Paul Mini Maker Faire and this article — Ollivander’s Lamp — is the latest extension of that project.
Here’s how the Raspberry Potter works:
1. Using an infrared camera, the Raspberry Pi computer looks for small circles of reflected infrared light in its field of vision.
2. These small circles of light get tracked for movement, using OpenCV computer vision software. These patterns of movement are the gestures or “spells,” and you can make them using the reflective tip of a wand.
3. When the predefined patterns of movement are matched, a “spell” is cast (Figures A, B, and C) and the Raspberry Pi runs code that controls a connected device — in this case our magic lamp.
What About the Wand?
If you don’t have an official interactive wand from the park (Figure D), don’t worry! You can easily make your own wand by gluing a sequin to the end of a stick. Any wand-like object will work fine — it only needs a reflective tip that can be used to reflect infrared light. Just make sure the sequin is shiny and flat; the faceted ones don’t work well. You can also use a “pearl sticker” such as these.
We 3D-printed this wood-grained wand from Thingiverse and it turned out OK (Figure E). The Make: Labs used these cool-looking ones from Etsy, intended as party favors. Or check out the Raspberry Potter website for a link to my new book with detailed instructions for making your own wand.