Halloween Forum banner

1 - 6 of 6 Posts

83 Posts
Discussion Starter #1
After alarming my new neighborhood with our normal yard haunt last year, we decided to take it down a notch this year by going with a wizard theme. We still wanted to use our pneumatic props, and I thought that making a magic wand would give the ToTs a chance to "defeat" the props, hopefully making it a little less intimidating. (-:

Infrared LEDs, like you find in your TV Remote, are very available and inexpensive. When you press a button on your remote, it blinks the LED on and off in patterns that the TV translates to "turn power on" or "change the channel," depending on which button you pressed. A microcontroller, like an Arduino, can easily replicate these patterns. You need another microcontroller attached to an IR sensor to decode the patterns, but these too are relatively cheap and easy to find.

I tore down a MagicQuest wand to see what made it tick, and it's really just an IR LED that blinks a code when you shake the wand. The code contains some basic information like a unique ID number (so the system knows who you are) and how hard you shook the wand.

My wife found some (PINK!) blinking toy wands at the dollar store that are compact but big enough to fit the electronics inside. As a bonus, they have a button and battery compartment (it's powered by 3 coin cells... which I eventually replaced.) The wand body is just a clear plastic tube glued to the handle (I had to cut it off with an X-acto to remove the glue, but it fits snugly and stays in place) and gave me someplace to stuff the circuitry.

I initially thought about using an Adafruit Trinket Arduino because it was so small, but it's based on the ATTiny chip, which seemed to be incompatible with the library I wanted to use, so I selected the Arduino Pro Mini. You can run it on 3.3V, so less batteries to try to fit in the wand, and it has plenty of IO. The Trinket, however, detects and decodes IR just fine, so I used one as the receiver.

I have a TV near my workstation, so I set up the receiving circuit, pointed my TV remote at it, and hit the power button. The Arduino spit out the code for that button, and I used that as the code the wand will transmit when successfully activated. This works well, since I can test the wands by turning on my TV, or test my receiver by using the TV remote- so I'm just testing one thing at a time.

I wanted the wand to only respond to the universally recognized swish-and-flick motion, so I'm using a 3-axis accelerometer - the ADXL345. eBay's got a ton of these dirt cheap, and they're very small and fit easily sideways into the wand tube. It uses I2C to communicate to the Arduino, so a simple two wire interface means less soldering. I loaded a sketch that shows me what data the ADXL is transmitting, and waved the breadboard around until I figured out what numbers to look for on which axes. This part gets complicated, but basically if the X and Y axes are above a certain number the swish has been achieved (motion down and right,) then a brief pause, then if the Y axis is above a certain number (downwards motion) the flick has been achieved.

I made a little PCB where the Arduino and ADXL plug into, attached the IR LED, the original button (you have to hold it down while performing the motion,) a power switch, a status LED, and shoved it into the tube. The handle only required a little Dremeling to accommodate all the new circuitry.

(The hacked wand next to the unmolested one.)



I still didn't have a good way to power it... I was worried the 3 button cells weren't going to last long, and unscrewing the door and replacing button cells on Halloween night in the dark just sounded like no fun. I serendipitously ran across a YouTube vid with a guy doing a teardown of a USB-rechargable electric cigarette lighter that had a small LiPoly battery in it. Eureka! The circuit board itself is tiny so it fits inside, and the recharging circuit meant that the wand would be rechargeable via USB . All those iPhone and BlueTooth charging dongles lying around the house would be useful- and you can even recharge it with one of those portable phone rechargers! The USB connector is exposed at the bottom of the wand... I want to make a screw-on cap for the bottom that will hide/protect it while in use.



I still haven't figured out where to locate the power switch where it's not in the way when you hold the wand, which is why it's hanging out of the old battery door currently. I do have an issue with range - with the lower voltage battery I can only turn my TV on within a few feet. I'm thinking I might have to look into a lens for the tip.

When it's all complete and working I'll tear it apart and paint and texture it to look more like your HP-inspired magic wand, maybe wood grain with some antique gold accents.

So this is the overall concept: a ToT walks up the driveway, I'll show them how the wand works and they'll practice by activating a couple non-threatening props (I'm hacking one of those faux-flame fan-driven torches.) When they're ready, I'll hit the (RF-activated) pneumatic props, which will jump and thrash around with scary lights and sounds. When the ToT activates the wand with the motion, the prop goes into "defeat" mode, retracting with "Ahhh... I'm melting!" sounds, fog and lights dimming around them. If I have time, I'm considering a "moving painting"-type video monitor with an actor congratulating them for defeating the Dark Wizard (or whatever.)

Thoughts? Thanks for reading!

124 Posts
Very cool project Neverhart!

You might want to think about adding additional IR emitters on the end of the wand to improve your range and reduce the need to point the wand directly at the receiver.

Some other things to check:
  • Make sure you are using the appropriate current limiting resistor value for your IR emitter(s) with 3.3V.
  • Have a look at the voltage levels from your output pin driving the LED white it is transmitting with a DSO (if you have one). If it is drooping, you might want to add a ~470uF boost capacitor between ground and your 3.3V line to smooth it out.

880 Posts
You have a cool idea for an interactive experience. Have you considered putting a motion switch and a capacitor instead of a power switch. Pointed up it's off. Make the first motion down and the processor is powered, then up or up & swish (if you prefer) causes the code to broadcast. You could even skip the swish and make the down turn on the processor (for a short period), and the processor just emits the string a couple times at power up. Giving plenty of time to raise the wand.
Here is one such switch. http://www.adafruit.com/products/173
1 - 6 of 6 Posts