Harry Potter Spell

We just got back from the Wizarding World of Harry Potter in Florida. My son purchased an Interactive Wand which works via IR as far as I can tell. You would point this at what looks like an IR camera, do a specific gesture, and something would happen. I think it is IR based as you had to point the wand at a camera with a circle of red LEDs.

Anyway, I am trying to replicate this at home. Ideas? We still have the wand.

Hey @lujab2004!

This sounds like a cool idea to incorporate the wand with littleBits. If the wand is truly an IR transmitter, you could use the remote trigger http://littlebits.cc/bits/remote-trigger to incorporate the wand. You could also add the arduino and Cloud Module to add different functions of the wand!

@lujab2004 This looks like a really fun idea, and I assume you are working with wands as discussed here: http://www.businessinsider.com/harry-potter-interactive-wand-review-2014-8

Do you think the way you swish the wand causes the IR to emit codes similar to remote controls? If so, and you have an Arduino module, you might be interested in Ken Shirriff’s IR remote library: http://www.righto.com/2009/08/multi-protocol-infrared-remote-library.html

Today I posted this video which used a household remote to interact with an Arduino: https://www.youtube.com/watch?v=ox14wHQ790Y

I found an article about wands proposed for Disney parks: http://goo.gl/UQ46zw

I’m not sure if this is the same technology as you have. It looks like it could be COMPLICATED… i.e. the artifacts and the wands might communicate back and forth with bluetooth and IR.

Hey @JackANDJude!!

What type of IR receiver are you using with the Arduino? Do you mind posting the code as well? I’m thinking of a similar project!

I tried using the light sensor with limited success; I had more success with this simple phototransistor circuit: http://littlebits.cc/projects/torn-pressure-sensor

I downloaded Ken Shirriff’s library and followed these instructions on where to save the IR remote library: https://github.com/shirriff/Arduino-IRremote

Then after restarting the Arduino environment, the code “IRrecvDemo” can be found under File>Examples>IRremote>

I ran that and kept track of the HEX codes that corresponded with different buttons on various household remotes. Some remotes have multiple codes for each button, so I opted for a simpler remote that outputted less codes.

Then I modified Ken’s IRrecvDemo like this:

//#include /* less than sign*/ IRremote.h>

int RECV_PIN = 11;

IRrecv irrecv(RECV_PIN);

decode_results results;

void setup()
{
Serial.begin(9600);
irrecv.enableIRIn(); // Start the receiver
}

void loop() {
if (irrecv.decode(&results)) {
HEXCode = results.value;
Serial.println(results.value, HEX);
**/********HERE IS WHERE I ADDED A switch case
switch (HEXCode) {
case 0xFFFFFFFF:
Serial.println(“REPEAT CODE”);
break;
case 0x6D0BF044:
Serial.println(“MINUS”);
break;
case 0x4A49262:
Serial.println(“PLUS OR ATT”);
break;
case 0x129E14EB:
Serial.println(“LEFT ARROW”);
break;
**********SOMETHING LIKE THAT, BUT I LATER REPLACED Serial.println with actions
*/
irrecv.resume(); // Receive the next value
}
delay(100);
}

I do not think the wand emits anything. I cannot find a way to replace any battery and there is no power switch. Could it simply be an IR reflector? Its definitely not Blutooth, NFC, or anything like that as one spell is activated 35 ft away or so, and you never sync with anything.

1 Like

You can see an IR led on a camera (maybe not ipad or iphone). Maybe try waving it around and videotaping the tip.

@lujab2004 can you find a link that has details of the wand that you are using?

Hey @lujab2004!

Have you found further information concerning the Harry Potter Wand? This project idea sounds amazing!

Hi guys,
I’m new to all of this, but just got a bunch of kits for my daughter, including the Arduino and Cloud kits. We’re just about to leave the Universal Resorts tomorrow, and I had exactly the same idea, so I’d love to help you guys figure this out.

What @lujab2004 said is right about the wands. We got an interactive wand and a regular wand, and the only difference is a little glass “bulb” on the tip that must be an IR reflector. There are no active components on the wand - no batteries. When my daughter’s wand’s tip got scratched it stopped working well. They took the wand back to “fix” it (actually, just swapped it for a new one), and it works great now. If I do this project, I’ll be putting a reflector on the end of mine.

Everyone at the park knows that at each spell spot, your wand needs to be visible to an only semi-hidden sensor (even the kids know to look for the sensor). The kids often try to point their wand straight at the sensor, but that’s not necessary (and in some cases may hurt), so I’m guessing that the bulb tip is a rounded reflector.

The “sensor”, I’m guessing, is both a projector of an IR beam and the reflection sensor. They probably have an IR camera sensor, and are doing some machine learning algorithm on the pattern traced by the wand (each spell has its own pattern). Each kid does the movements in a different size and at a different rate. In some cases, my daughter got a supposedly complex pattern to work just by pointing her wand (maybe the tip accidentally traced the pattern in micro movements?).

I’m still traveling, but if I get anywhere with this when I get back, I’ll report back.

Interesting info, @timothy_high ! I think we need an accelerometer.

An accelerometer might be one way to do it (and if we combine this with the cloud component, would be a way to make a smart phone act as a wand!), but it’s not how they do it with the official wands - remember that there’s no battery, and therefore no active components. I’m pretty sure IR reflection + pattern recognition is the way to go, but I’m not sure if there’s an easy implementation for that.

Hmmm. I assumed there was a battery, to which the user has no access. It’s a completely different puzzle without a power source. To confirm there’s no power on board, have you tried videotaping the tip with a camera that can see ir while you wave it around at home?

@timothy_high You might find some inspiration if you check out Johnny Chung’s video and info on tracking sources of IR light: “Low-Cost Multi-point Interactive Whiteboards Using the Wiimote” http://johnnylee.net/projects/wii/

The Wiimote is stationary (used for it’s IR camera), and he only moves around an ir “light pen”, which maybe could be substituted with an ir reflector.

The wiimote project looks fantastic! I’m going to see if I can get it to work. This would be a great project to try out my knowledge of Machine Learning to recognize the wand movements, assuming I get that far.

As for the wand itself, I did some experiments to try to figure out how it works. I got out my camera and verified with a TV remote that it can see IR light. Then I pointed it at the wand - nothing. However, I tried to use the wand as a reflector, and wasn’t very impressed at all. It was worse than when I wrapped it with tinfoil.

I wonder about the design choice - a glassy reddish bulb on the tip. I noted that, although kids sometimes seemed to think it was necessary, you didn’t actually have to point the wand right at the sensor. The glassy bulb approach would help with having a clean single point of reflection no matter what the angle… Also, scratched tips tended to make it harder to work, so maybe that’s an indication that the reflection needs to be as clean a point as possible.

I also wondered about the sensor. If my camera can detect IR light, shouldn’t the sensors show up like bright blobs in photos? And wouldn’t that ruin everyone’s pictures? I didn’t remember seeing bright spots of light in any of my photos, so I had a look. It turns out you CAN see exactly 4 purple-ish points, in the same color as IR light on the digital camera, in the photos that show the sensor. But they are much fainter than I’d have expected for reflecting off a wand from a several feet away. Also, they have a visible light component - those 4 bulbs (or ones right next to them) are visibly red without the camera.

Next, I’ll try out the wiimote with an IR projector to see how visible the wand will be.

1 Like

Hi again,

So I just wasted an entire weekend trying to get the wiimote working with my Macbook, and finally gave up. SOOOOO much easier using Windows, with the projects @JackANDJude pointed out!

I got my hands on a night vision video camera (with an IR LED array), and tried it out on the Wiimote sensors. Direct light worked great, but reflecting off the interactive wand, I got NOTHING. Not even if I try to reflect off of tinfoil (using glass or a mirror to reflect works just fine).

This leaves me with a clear path to proceed: put a bright reflector on the tip of the wand. But also leaves me very confused! What are they using at the park? Some sort of RF signal? If so, then why the 4 IR LEDs that clearly appear in our photos? Are the wands an active component, and will they still work if we come back next year?

If anyone is up to chopping their wand in half for a look inside, let me know!

I think this site may have given away the secret, and it makes complete sense: RFID

http://www.imagination.com/en/labs/2014/08/daily-inspiration-harry-potter-rfid-wands

I’m not sure RFID is the best way to detect fine-grained position information, but I actually did a project some 20 years ago that use radio signals to detect the x,y position of a wand-like device (it was a music project, and you could play on the air like you were hitting an invisible xylophone), so although the article says RFID, it could just be any type of radio signal.

Here’s an article showing how to read an RFID tag via Android without additional devices: http://blog.fieldid.com/2013/11/scan-rfid-tag-android/ I don’t have an NFC-capable device here, otherwise I’d check right now if the wands are emitting any signals. I’ll see if I can get some help from friends at work and report back.

1 Like

After testing with Android, I can (only) confirm that it’s not using RFID in the NFC frequency range. This doesn’t really mean much, actually. NFC uses high frequencies specifically so that they aren’t readable from far away. As I said before, some of the sensors are working from several meters away, way out of NFC range.

1 Like

It’s very interesting to try and figure out how a closed product such as this works. It’s also fun to invent our own designs that effectively do the same thing or whatever it is WE want. We already have a lot of bits available, and we can even make new modules to suit our design parameters. So let’s hear it from everyone. What would you want from a wand? @timothy_high? @lujab2004? @MR_STEAM? This question is open to everyone else, too! What features would your dream wand have, and/or how would you make it if you had all the bits? I’m really curious!