Final Project Documentation — Let There Be Light

Magic Final Documentation

###############################################################
Script of the trick:
###############################################################
*magician stands next to a table with a black TV screen (facing the audience) and a black box*

The wizards of legend had amazing powers: the ability to make things disappear, the ability to move things without touching them, the ability to fly. In comparison, the “magic” performed by current magicians is trivial: sleight of hand and clever contraptions to befuddle people. But I wanted to return to the time when being magical meant being powerful. As powerful as a God. And on the first day of creation, what did God say? Let there be light.

*magician waves hand over device sitting on the table in front of him*

*device starts shining brightly*

Of course magic is only magical if it transcends boundaries: the laws of physics, the expectations of common folk, and sometimes… real physical boundaries.

*Bring audience member on stage, hand them a silicon box made to look like steel*

(to audience member) This is a metal box, correct? Go ahead, pick it up and feel it. Can you confirm it’s made of real metal? Awesome, thanks. Go ahead and place that over the device. Now for those of you out there who aren’t big physics nerds, it isn’t possible to send any sort of signal through solid metal using any of the technologies in our cell phones, computers, and everything else. You see, metal reflects electromagnetic waves, so for anyone who thought I was doing something tricky with wireless communication, explain this one.

*wave hand over box*

(to audience member) Now, go ahead and remove the box.

*device is shining, cover it up again*

(repeat procedure, asking audience members whether to turn it on or off each time so they you know you truly have control over whether it turns on or off)

*excuse the audience member back to their seat*

When it comes to light, I’m a bit biased. I have a particular source of light that I prefer above all others: fire. That’s right, I’m a total pyro, proud of it. My runescape username was actually irishpyro94 for all of middle school. True story.

Now, as a natural element, fire is inherently more difficult to control that manmade light sources like those I was controlling before. This doesn’t always go well, so I’m going to back up from my target a little bit in case something goes wrong. *looks at people in front row* Um, you guys all turned in your liability waivers right? Ok, good.

*walk to other side of stage*

Alright, who want to see some fire!?

*gesture as if shooting a fireball a la Dragon Ball Z, TV screen suddenly turns on, showing a picture of a blazing fire, sound effects*

*applause*

Thank you!

###############################################################
End script
###############################################################

This trick gives the illusion of generating fire and light at one’s will. The script above describes the ideal version of the trick which I didn’t have time to fully implement unfortunately. I will describe the technology I used to perform a first approximation of the above.

There are two primary technical components: an infrared-based module for the up-close magic and a Bluetooth-based trick for the fire trick. I will discuss the infrared technology first.

########################
INFRARED
########################
IR Transmitter
2015-05-17 16.06.36

The magician needs an IR LED attached to his wrist with an appropriate power supply hidden up his sleeve. In my trick, I used a breadboarded Arduino circuit. I powered an Arduino Nano (http://www.arduino.cc/en/Main/ArduinoBoardNano) from a 9V battery. Then I passed the 5V rail through an appropriately sized resistor to limit the current, then through the IR led and finally to ground. I taped this LED to the bottom of my palm near my wrist, positioned such that it was covered up by the sleeves of my coat unless I extend my arms in front of me, as I do when flourishing my hands over the device in the trick. The LED I used turned out to be highly directional, only shining in a narrow beam. A better choice would be an omnidirectional light source, though then the magician would need a way to tell the LED when to turn on (as opposed to my setup, where the LED was always on). This could be accomplished with a flesh-colored flex sensor on the magician’s palm that can tell when the magician’s hand is flexed open.

IR Receiver

2015-05-17 16.06.56

The device that actually lights up needs only 3 components: a power source, an IR sensor, and a light source. I used an Arduino Nano powered via USB from my computer, though in the ideal performance the device would be battery-powered. I used an IR sensor with an integrated thresholding circuit, but the sensitivity could be better tuned if a discrete photodiode was used with the output current being read by a microcontroller that does the thresholding calculation. For the light source, I used three standard LEDs, one of each red, green, and blue. This results in an interesting iridescent effect because your eye doesn’t know whether to interpret the light as white or as discrete colors.

Ideally, this device would be packaged in an interesting way, perhaps to look like an orb or crystal ball of some sort, like the one in Gandalf’s staff that he used in Moira and to drive away the Nazgul during the Gondorian retreat from Osgiliath.

The silicon box mentioned in the script is an interesting touch that I wish I could have implemented. Silicon is transparent at IR wavelengths, but opaque to visible light. I tried to leverage the fact that it looks like metal to convince any skeptics in the audience.

Here you can see the IR system in operation.

2015-05-17 16.09.57

########################
BLUETOOTH
########################
The final part of the trick involves “lighting the TV on fire”. This is done through Bluetooth signalling between the magician and the computer controlling the TV. In the script, I described a TV monitor to display the fire, but in the trick I performed, I used a laptop. Using a larger screen is better for dramatic effect, and if it can be powered wirelessly using resonant magnetic induction, that adds another impressive element to the trick, that would be extra impressive. Then there could be some banter about the energy of the fire powering the screen or something.

Bluetooth transmitter

2015-05-17 16.08.13

On the magicians side, there is an Arduino Nano wired to an HC-05 Bluetooth module (http://www.amazon.com/Bluetooth-converter-serial-communication-master/dp/B008AVPE6Q). The Arduino is continuously reading in analog voltage values from a potentiometer voltage divider circuit. These 0-5V voltages are converted to a 10-bit binary value (0-1024 in decimal). This decimal value is sent to the HC-05 using the SoftwareSerial Arduino module, and the HC-05 automatically transfers those values to the device with which it is paired. The magician need to discreetly rotate the potentiometer dial counterclockwise during the “fireball throwing flourish”, thus signalling to the TV to display fire. Alternatively, there can just be a discreet button and the Arduino can wait for it to be pressed, which would have been way simpler and more robust than the potentiometer method. Lesson learned.

The code for this is found at https://github.com/colinmcd94/magic/blob/master/magic_analog_tx/magic_analog_tx.ino.
For anyone who wants to use bluetooth communication for any reason, I have a skeleton file for using HC-05 with Arduino+SoftwareSerial here: https://github.com/colinmcd94/magic/blob/master/magic_bluetooth/magic_bluetooth.ino.

Bluetooth reciever
I paired my Mac with the HC-05 module, which is fairly easy to do from System Preferences. If the pairing initially fails, click Options and enter the code 1234 into the box. This is the default code for all HC-05 modules.

[Screenshot 2015-05-17 16.11.33

My computer was running a shell script that connected to the HC-05 serial port using the stty command and received a data packet every 2 seconds or so. This script can be found at https://github.com/colinmcd94/magic/blob/master/fire.sh. You can see the values written to the terminal change as I rotate the potentiometer knob, and when the values falls below 100 (corresponding to about half a volt), my computer opens Safari and shows a video of fire. This is a webpage I wrote available at http://mcdonnell.mit.edu/human/magicfire.html. It uses bigvideo.js to display a video across the whole screen.

Here, you can see the Bluetooth system in operation. You can see the decimal voltage readings being transferred to the shell script running in Terminal, and the “catching fire” in action.

2015-05-17 16.16.07