Making A Birthday Party Magical With Smart Wands

Visitors to the Wizarding World of Harry Potter at Universal Studios are able to cast “spells” by waving special interactive wands in the air. Hackers like us understand that there must be some unknown machinations happening behind the scenes to detect how the wands are moving, but for the kids wielding them, it might as well be real magic. So when his son asked to have a Harry Potter themed birthday party, [Adam Thole] decided to try recreating the system used at Universal Studios in his own home.

Components used in the IR streaming camera

The basic idea is that each wand has a reflector in the tip, which coupled with strong IR illumination makes them glow on camera. This allows for easy gesture recognition using computer vision techniques, all without any active components in the wand itself.

[Adam] notes that you can actually buy the official interactive wands from the Universal Studios online store, and they’d even work with his system, but at $50 USD each they were too expensive to distribute to the guests at the birthday party. His solution was to simply 3D print the wands and put a bit of white prismatic reflective tape on the ends.

With the wands out of the way, he turned his attention to the IR imaging side of the system. His final design is a very impressive 3D printed unit which includes four IR illuminators, a Raspberry Pi Zero with the NoIR camera module. [Adam] notes that his software setup specifically locks the camera at 41 FPS, as that triggers it to use a reduced field of view by essentially “zooming in” on the image. If you don’t request a FPS higher than 40, the camera will deliver a wider image which didn’t have any advantage in this particular project.

The last part of the project was taking the video stream from his IR camera and processing it to detect the bright glow of a wand’s tip. For each frame of the video the background is first removed and then any remaining pixel that doesn’t exceed a set brightness level if ignored. The end result is an isolated point of light representing the tip of the wand, which can be fed into Open CV’s optical flow function to show [Adam] what shape the user was trying to make. From there, his software just needs to match the shape with one of the stock “spells”, and execute the appropriate function (such as changing the color of the lights in the room) with Home Assistant.

Overall, it’s an exceptionally well designed system considering the goal was simply to entertain a group of children for a few hours. We almost feel bad for the other parents in the neighborhood; it’s going to take more than a piñata to impress these kids after [Adam] had them conjuring the Dark Arts at his son’s party.

It turns out there’s considerable overlap between hacker types and those who would like to have magic powers (go figure). [Jennifer Wang] presented her IMU-based magic wand research at the 2018 Hackaday Superconference, and in the past we’ve even seen other wand controlled light systems. If you go all the way back to 2009, we even saw some Disney-funded research into interactive wand attractions for their parks, which seems particularly prescient today.

Continue reading “Making A Birthday Party Magical With Smart Wands”

Magic Wand Learns Spells Through Machine Learning And An IMU

Jennifer Wang likes to dress up for cosplay and she’s a Harry Potter fan. Her wizarding skills are technological rather than magical but to the casual observer she’s managed to blur those lines. Having a lot of experience with different sensors, she decided to fuse all of this together to make a magic wand. The wand contains an inertial measurement unit (IMU) so it can detect gestures. Instead of hardcoding everything [Jennifer] used machine learning and presented her results at the Hackaday Superconference. Didn’t make it to Supercon? No worries, you can watch her talk on building IMU-based gesture recognition below, and grab the code from GitHub.

Naturally, we enjoyed seeing the technology parts of her project, and this is a great primer on applying machine learning to sensor data. But what we thought was really insightful was the discussions about the entire design lifecycle. Asking questions to scope the design space such as how much money can you spend, who will use the device, and where you will use it are often things we subconsciously answer but don’t make explicit. Failing to answer these questions at all increases the risk your project will fail or, at least, not be as successful as it could have been.

Continue reading “Magic Wand Learns Spells Through Machine Learning And An IMU”

magic-wand

Hacking A “magic Wand” To Remotely Control Light Displays

Hackaday reader [Kieran] volunteers at an outdoor haunted house attraction called the “Disenchanted Forest”. Attendees are lead through the haunted forest by a volunteer, who helps keep everyone on the predetermined trail. The trail is usually lit by small LED fixtures that the group constructed, but the organizers wanted to make the lights more interactive this time around.

A fellow organizer gave [Kieran] a [Harry Potter] Magic Candle, which allows him to light the toy with the wave of his IR-enabled wand. He was told to “make it do something cool”, so he took a closer look at it to determine how everything worked.

Using an Arduino clone and some borrowed IR code he was able to get the wand to work with the forest’s trail lighting, but there was a lot of lag between waving the wand and triggering the light. Taking a second stab at it, [Kieran] was able to replicate the IR protocol used by the toy, speeding things up and increasing the wand’s range considerably. Now, the tour guides can light and extinguish the trail lighting with a simple flick of the wrist.

Take a look at the video below to see how things worked out for [Kieran], and be sure to swing by his site for more details if you have the urge to modify your Magic Candle.

Continue reading “Hacking A “magic Wand” To Remotely Control Light Displays”