I have to admit to being seriously intrigued. I just saw an electronics-based trick that I cannot explain…
This all started with my recent blog I want two impossible balls! (sorry, that was a Freudian slip, it was called I want impossible balls too!) A university lecturer responded with a comment saying:
Nice, but if you want an FPGA trick, this is what I used for a final project in my course last semester. It's a fun project to demo in class and then see the faces of the students as they talk amongst themselves about how it works (this is an intro digital design course and they know all about state machines and what FPGAs can do by this point: hint).
He also included a link to a video on YouTube, so I bounced over to take a look. This is really very interesting (see The Original Magic Switch Box video below). We start off with four switches – each with a plastic cover colored red, yellow, green, and blue – and four corresponding LEDS.
Not surprisingly, the green switch activates the green LED, the red switch activates the red LED, and so forth. Next the presenter pulls out a couple of the LEDs and swaps their positions, but having done so, the original colored switches still control their correspondingly-colored LEDs.
The Original Magic Switch Box
This is pretty clever thus far, but wait, there’s more, because the presenter then starts pulling the colored plastic covers off the switches and swapping them around … and even with their new covers, the switches still control their correspondingly colored LEDs.
“Hmmm, I thought, I wonder how that’s done?” Now, one thing is that part of the setup is covered, so you can’t see what’s going on “under the hood” as it were. But then I was enticed by another YouTube video boasting a “Clear Magic Switch Box” as shown below:
The Clear Magic Switch Box
This one uses bulbs rather than LEDs (or does it?), but the trick is essentially the same except that you can see the internals of the box (or at least, the parts you are supposed to see). The really clever part comes towards the end when the presenter takes the batteries out … and the switches and lights continue to work.
I bounced over to their website at www.voltarsmagic.co.uk, but this just auto-returned me to the YouTube video. I finally got in touch with the guy in charge, who tells me that they are going to be selling these in the not-so-distant future (I want one) but that the first run is already reserved (bummer) and that he will email me when more become available.
In the meantime, does anyone have any idea how this is done?
But wait, there’s still more, because I also ran across the video shown below. This isn’t a trick or an illusion, but it’s still a bit of a laugh. It’s a box with a single switch. When you turn the switch on, the box physically turns it off again:
The “Leave Me Alone” Box
I sort of liked one of the comments associated with this video – the one that suggested that operator received an electric shock after turning the switch on some number of times (which immediately made me think about my 12-year old nephew Dillon [grin]).
If you found this article to be of interest, visit Programmable Logic Designline where – in addition to my blogs on all sorts of "stuff" – you will find the latest and greatest design, technology, product, and news articles with regard to programmable logic devices of every flavor and size (FPGAs, CPLDs, CSSPs, PSoCs...).
Also, you can obtain a highlights update delivered directly to your inbox by signing up for my weekly newsletter – just Click Here to request this newsletter using the Manage Newsletters tab (if you aren't already a member you'll be asked to register, but it's free and painless so don't let that stop you [grin]).
One revision to my previous explanation, I think that the magic box simply alternates the order in which the LEDs light in each "round." All four switch presses (not just the last three) are assigning switches to LEDs. That way one can truly randomize where all the LEDs and switch caps go, and then the magician just has to hit the switches in the correct order during programming.
What ever be it is.There is a digital electronic circuit controlling the LED's and switches. How it is made and concealed is the real work.Plus the operator switching on the switches has a pattern and reflects from the program.
None of the videos showed switch color changes while lamps were lit. Is this a necessary limitation? It certainly is, if only a simple state machine is used.
Let's assume it is NOT a necessary limitation!
1. What would happen if you remove a switch color tag while the corresponding lamp was illuminated?
2. What if you rearranged the switch colors while one or more or even all the lamps were illuminated?
How would you like the above scenarios to work in order to maintain the mystery? Think about it... There are several possible functionalities to consider.
Give me a tiny digital QVGA pin-hole color camera and an FPGA, and I can do this (and more) quite easily!
1. Aim the camera so it can see all switches and lamps.
2. Identify which pixels identify which items, and hard-code the mapping.
3. Dynamically update the mapping with each frame.
Only a low frame rate is needed, perhaps no faster than 2-3 Hz. For simpler modes, a frame is captured only when a switch transitions to the ON state. The logic is relatively simple.
The neat part is that a clear box makes the implementation simpler. Otherwise, you'll need to hide the external camera, either under a black cloth, or within a wood frame.
What do you think?
Greg's got it.
"The order one puts on the switch caps or moves the LEDs can be completely random (I even had my students mix them up they way they wanted)."
However, the order the operator turns on the switches for the programming step is not random.
I think I have it, or at least I'm close. The first switch flip determines the order that the LEDs initially light. The second, third, and fourth switch flips tell the logic which switch to map to which LED.
If you name the LEDs A, B, C, and D left to right, you'll notice they only turn on in two sequences.
If you flip either of the outside switches first, the lights appear in this order:
D, C, B, A
If you flip either of the inside switches first, the lights appear in this order:
B, D, C, A
Since the magician knows what order the lights are going to turn on, he just makes sure to hit the switches in the right corresponding color. Once you have four switch presses your programming is complete and you can flip whichever switch you like.
Whenever there is a long enough delay (bulbs or caps being switched) the state machine resets and waits for the next programming.
There could be hearing aid batteries hidden in the battery compartment
In this version he turns the whole thing round and you also see that it's lifted off the table for a short time http://www.youtube.com/watch?v=l9ShZQepZ0o&feature=related