OK how does it work and can a Picaxe do it?

hippy

Senior Member
An excellent magic trick. A synopsis for those hesitating at downloading the video ...

Four coloured switches. Four coloured light bulbs. Unscrew any number of bulbs, re-install in any order in any bulb sockets and each coloured switch still controls the bulb of the same colour.

The switch caps can also be removed and swapped over and will still control the same coloured bulb as the cap.

"The Mini-Magic Switchboard"

http://www.alakazam.co.uk/acatalog/General_Magic_27_.html

275 GBP / 320 USD

It's well worth downloading the video, and it's there where I believe the key to how it works is revealed.

Ignore the magician's lie that it's not packed full of circuitry, it is, as the description says and the price reveals - whan a magician says it's not done in some way then it usually is in my experience.

I enjoy deconstructing magic tricks and I suppose it's all part of reverse engineering, application of analytical skill, determining what input there must be to achieve a desired output, the reverse way of thinking perhaps to how people normally do.

I've worked out one way it could function entirely autonomously but don't want to spill the beans before others have had a chance to think about it themselves.

Edited : Minor spoiler removed. The video appears to confirm my theory.

Added : Don't get distracted with monitoring bulb presence ( doesn't work for just cap swapping ) nor the fact that the switch caps are held on by magnets. None of those things are needed for this trick to work.

Could be built with a PICAXE 14M, four light bulb drivers and a few resistors, plus hardware, and a sprinkling of pixie dust.
 
Last edited:

sghioto

Senior Member
Ok I'll give it a try.
From the video I noticed he always said the " color " first before pushing the appropriate switch. I'm thinking voice recognition for the switches and the sockets monitored with an ADC scan before any switches are turned on. Each bulb would have a small, but slightly different internal resistance added . Yeah that's right the bulbs are custom made and voice recognition. That would explain the 350.00 dollar cost.

Steve G
 

Michael 2727

Senior Member
I didn't look at the video above, and won't
bother on my slow connection.

A couple of familys I know from Melbourne
venture up this way each Crissy and Easter
for holidays, I look forward to seeing them all
and especially to what technology their very
spoiled kids got from Santa. Among the usual
new Phones, MP3 and DVD players were 2 new
games an LCD based, 20 Questions Ball. The ball
(small 2" or 50mm Dia, fits in your hand )
asks you questions to an object you are thinking
of and by pressing Animal, Veg, or Mineral, yes,
no and sometimes it tries to guess your object
within 20 Qs, or you win.
The other game was Hyper Dash
This has 5 coloured and numbered inverted cups/bowls
and a controller handle which fits over the bowls and
you place it over the object and press down for an ID.

The handle speaks which target you must tag next if
you select a correct one, nothing if incorrect and the
sequence is timed, fastest through wins.
It has 4 skill levels and tries to mess you up by simply
saying "REVERSE". I was told it was only $39.95 AUD

Anyway upon closer inspection, each cup has a small
RFID Disk attached by 2 screws to the inside base of
each cup/bowl ( I was nearly tempted believe me )

So I'm guessing the Magic Switch @ 200+ GBP may
have something similar. (albeit much smaller and well hidden)

Out of all of the Robot offerings this year, RoboRaptor,
RoboSapien, SpiderSapien, HomerSapien, they have all
been price reduced after the Christmas rush @ $128.00 AUD
Looks like HomerSapien (Homer Simpson Robot) lost the
favourites battle and was sitting on the shelf at a mere
$78.00 AUD last Monday ( K-Mart or Big-W can't renember)
 
Last edited:

hippy

Senior Member
No, I don't think there is voice recognition nor special custom bulbs.

One thing to always bear in mind is that magic really is illusion ( you see what you are led to see ), distraction ( you are led away from what you are not meant to see ), distortion ( what you may think is happening isn't actually happening ) and deception ( what the magician says is not necessarily true ). The skills for all that is what makes great magic.

It's usually the case that the simplest explanation is the right one, and a magician would not normally rely on anything which wasn't 100% reliable and repeatable. The cost of the prop often relects the kudos the magician can score more than its raw worth.
 

sghioto

Senior Member
I would agree Hippy that the simplest explanation would suffice if the prop was used only by the illusionist himself. But prop is for sale, so are you saying I would have to be an illusionist to use it?

Steve G
 

sedeap

Senior Member
Technical Magic?

Mmmm... something related with maths and ordered positions to light them up.
Magic is illusion, right.
Magician guide you to see what you want see with words and distractions.
4 bulbs by 4 positions = 16 options
Color is distraction, position is the key, and timing to reset the last configuration. (or combination, like all switch off)

I'm too busy right now to try to build this gadget, but I'll try to doit next week.
+ TTTT=Illusion
 

papaof2

Senior Member
Do the bulbs have filaments, or could there be a white LED inside the bulb?

If there could be an LED in the bulb, there could be electronics in the bulb's base that recognize a signal of some type (audio, rf, DC polarity, some combination) that is placed on the power feed to the bulbs. Note that rf could include an RFID chip in the bulb and a sensor at each socket.

If the bulbs are bayonet base, then there could be a small magnet in the base and hall-effect sensors around the sockets.

From my experience working in an uncle's magic shop many years ago, think cheap ;-) The cups and balls trick sold for $5US but only cost him $0.7US. He also did stage magic in Chinese robes - under the name Fu Ling Yu.

John
 

kevrus

New Member
Well i'm impressed.
If I had to make a guess, I would say there is more to the coloured caps than meet the eye, maybe sub-miniature rfid devices emplanted in the caps...an interesting project nevertheless
 

andrew_qld

Senior Member
Very simple

It took me three viewings to see how it works.

There is nothing special about the caps or the bulbs. There are no sensors in either. No voice recognition. Nothing tells the circuit which order the caps or bulbs are in.

It could be made with a picaxe quite easilly- I'm thinking of making one now, it's a good trick!

You could probably build it with discrete logic gates but it would be more difficult.

I might wait until a few more people get it. If you watch it a few times you will see the pattern forming and see how he does it.
 
Last edited:

leftyretro

New Member
Well the site I found that on figured it out pretty quick. Some here have either figured it out or are on the right path.

Hints:

The switches are just simple switches and there is nothing about the magnets that make this trick work, it would work the same without magnets in the switch covers. Also the bulbs are standard unmodified bulbs except for their color differences.

A PIC design would use just 4 digital inputs for the 4 switches and four digital outputs for the 4 lamps, that's all the hardware required.

Last hints that helped several solve it on the other site:

Watch the video with audio off, as all verbiage is just slight of hand.

Think program mode, operate mode.

Think left to right.

Have to admit I would not have figured it out on my own, an excellent combination of great visual prop and magic allusion.

I will have to build one for my grand daughter when she gets a little older :p

Lefty
 

Michael 2727

Senior Member
How about Red, Green, Yellow and Blue Electricity !

Looking at my Utility Bill gave it away, it says I can
subscribe to Green Electricity for so many ¢ extra
p/KWh. Problem solved :)
 

hippy

Senior Member
One could also use colour caps for the bulbs and simple non-magnetic sleeves for the switches. A smart magician playing to a technical crowd would probably wait until all the RFID, voice recognition, bulb resistance and other 'solutions' were expounded, then pull out a handful of white bulbs, allow the audience to fit caps however they please, use the non-magentic switch sleeves and repeat in complete silence to confound the audience even further.

It is a brilliant illusion and I'm wondering whether a PCB for this should be produced by Rev-Ed as a project board and kit. No worries about copyright infringement on the 'magic switchboard' itself ( even if tricks can be copyrighted ? ) because it would simply be a four switch input, four bulb output module, not a prop :)

@ retrolefty : I usually do well on Google searches but couldn't find any site describing the trick to check my theory against. When everyone has given up theorising, posting the link would probably save everyone having to write their own explanations and theories.
 

skyhawk

New Member
I think the key observation is that after a change the bulbs are always lit in positional order and all four are lit in order before the bulbs are lit randomly.
 

vze1mk7d

New Member
Well I'm new here and don't know much about programming but I think skyhawk is right. It all depends on the order the switches are flipped. The first switch flipped is always going to activate the bulb furthest to the left and the second switch the bulb next to it and so forth. After they have all been flipped, the order is stored in a variable or something so that he can flip them in any order and it will light the corresponding bulb. And when all of the switches are off for a certain amount of time, the switches are reset. I hope that makes sense.
 

leftyretro

New Member
Well I'm new here and don't know much about programming but I think skyhawk is right. It all depends on the order the switches are flipped. The first switch flipped is always going to activate the bulb furthest to the left and the second switch the bulb next to it and so forth. After they have all been flipped, the order is stored in a variable or something so that he can flip them in any order and it will light the corresponding bulb. And when all of the switches are off for a certain amount of time, the switches are reset. I hope that makes sense.
Give the man a prize ;)
 

hippy

Senior Member
Yes, I think we've got there.

The clever trick is bulding the mapping so earlier switches can be toggled off and on so the map could be built up pushing one switch on, next switch on until all on, or by first on then off, second on then off etc, and any combination works. That helps disguise the order.

I believe the "one cap" part is a forced choice (3:30). It's much easier to hand over a cap for the first or last bulb than the middle two, otherwise the patter would be convoluted and may give the game away. I'd have personally forced the last, then "you didn't choose this ...". Also, back to never believing what a magician says; "It's important I don't know which one you've chosen", probably means it is important he knows the outcome !

If you read the advertising blurb there's a ( perhaps unintentional ) spoiler which gives part of the game away; "Once the bulbs are lit, the switches can be turned on and off as often as desired and in any order". That "Once" is a bit of a giveaway retrospectively, implying that the switches cannot be used that way before all bulbs have been lit, thus the order of the switching is revealed as important in some way.

Anyway, here's some attached code which can be run in the simulator ...
 

Attachments

Technical

Technical Support
Staff member
Here's our version!

Code:
#picaxe 14m
 
' Assumptions
' Times out after 10 seconds of all switches in the off position
' All switches must be off at start
' All 4 switches must be switched on before that sequence is learnt
' bulbs/LEDs on outputs 0 to 3
' switches on inputs 0 to 3
 
symbol flags = b0  ' flags to remember whether a switch has been learnt yet
symbol flag0 = bit0
symbol flag1 = bit1
symbol flag2 = bit2
symbol flag3 = bit3
 
symbol light0 = b1 ' variable to remember which switch is which light
symbol light1 = b2
symbol light2 = b3
symbol light3 = b4
 
symbol position = b5  ' position counter
 
symbol timeout_counter = w6 ' timeout counter
symbol timeout = 1000  ' timeout set to 10s = 10 000ms = 1000 x 10ms
'Change to smaller number when simulating or you will get bored!
 
' Start of program
do_reset:
 position = 0 ' reset position counter
 flags = 0  ' reset flags
 
' Learning loop
waiting_to_learn_loop:
' if not learnt switch learn it
 if pin0 = 1 and flag0 = 0 then learn0
 if pin1 = 1 and flag1 = 0 then learn1
 if pin2 = 1 and flag2 = 0 then learn2
 if pin3 = 1 and flag3 = 0 then learn3
 
 ' we have learnt that switch so light output accordingly
 if flag0 = 1 then
  if pin0 = 1 then
   high light0
  else
   low light0
  end if
 end if 
 if flag1 = 1 then
  if pin1 = 1 then
   high light1
  else
   low light1
  end if
 end if 
 
 if flag2 = 1 then
  if pin2 = 1 then
   high light2
  else
   low light2
  end if
 end if 
 
 if flag3 = 1 then
  if pin3 = 1 then
   high light3
  else
   low light3
  end if
 end if
 
 goto waiting_to_learn_loop
 
' Learn a light position and set flag so we know that switch is done
learn0:
 ' position gives you the output for this switch
 flag0 = 1    ' set flag
 light0 = position   ' remember position for this switch
 goto learn_end
 
learn1:
 ' position gives you the output for this switch
 flag1 = 1    ' set flag
 light1 = position   ' remember position for this switch
 goto learn_end
 
learn2:
 ' position gives you the output for this switch
 flag2 = 1    ' set flag
 light2 = position   ' remember position for this switch
 goto learn_end
 
learn3:
 ' position gives you the output for this switch
 flag3 = 1    ' set flag
 light3 = position   ' remember position for this switch
 'goto learn_end
 
learn_end:
 inc position     ' add 1 to position counter
 if position > 3 then have_learnt_all ' all done
 goto waiting_to_learn_loop   ' not all done so back to loop
 
' now simply loop reacting to the switches
' timeout_counter value will increment every 10ms
' however if any light is on the timeout_counter is reset
' so this means the timeout will only 
' occur after 10 secoonds of all switches off
 
have_learnt_all:
 if pin0 = 1 then
  high light0
  timeout_counter = 0
 else
  low light0
 end if
 
 if pin1 = 1 then
  high light1
  timeout_counter = 0
 else
  low light1
 end if
 
 if pin2 = 1 then
  high light2
  timeout_counter = 0
 else
  low light2
 end if
 
 if pin3 = 1 then
  high light3
  timeout_counter = 0
 else
  low light3
 end if
 
 pause 10   ' wait 10ms
 inc timeout_counter ' inc timeout
 
 ' if timed out then reset else loop
 if timeout_counter > timeout then do_reset
 goto have_learnt_all
 
Last edited:

Shack

Member
The bulbs are always lit from the left to the right. So the code will set switch x = 1, switch y = 2, etc. Not sure what triggers a reset though for a new setup.
 

leftyretro

New Member
The bulbs are always lit from the left to the right. So the code will set switch x = 1, switch y = 2, etc. Not sure what triggers a reset though for a new setup.
All switches (and lights) being off for a time out duration (say 10 seconds) triggers a new learning setup.

Lefty
 

leftyretro

New Member
Here's our version!

Code:
#picaxe 14m
 
' Assumptions
' Times out after 10 seconds of all switches in the off position
' All switches must be off at start
' All 4 switches must be switched on before that sequence is learnt
' bulbs/LEDs on outputs 0 to 3
' switches on inputs 0 to 3
 
symbol flags = b0  ' flags to remember whether a switch has been learnt yet
symbol flag0 = bit0
symbol flag1 = bit1
symbol flag2 = bit2
symbol flag3 = bit3
 
symbol light0 = b1 ' variable to remember which switch is which light
symbol light1 = b2
symbol light2 = b3
symbol light3 = b4
 
symbol position = b5  ' position counter
 
symbol timeout_counter = w6 ' timeout counter
symbol timeout = 1000  ' timeout set to 10s = 10 000ms = 1000 x 10ms
'Change to smaller number when simulating or you will get bored!
 
' Start of program
do_reset:
 position = 0 ' reset position counter
 flags = 0  ' reset flags
 
' Learning loop
waiting_to_learn_loop:
' if not learnt switch learn it
 if pin0 = 1 and flag0 = 0 then learn0
 if pin1 = 1 and flag1 = 0 then learn1
 if pin2 = 1 and flag2 = 0 then learn2
 if pin3 = 1 and flag3 = 0 then learn3
 
 ' we have learnt that switch so light output accordingly
 if flag0 = 1 then
  if pin0 = 1 then
   high light0
  else
   low light0
  end if
 end if 
 if flag1 = 1 then
  if pin1 = 1 then
   high light1
  else
   low light1
  end if
 end if 
 
 if flag2 = 1 then
  if pin2 = 1 then
   high light2
  else
   low light2
  end if
 end if 
 
 if flag3 = 1 then
  if pin3 = 1 then
   high light3
  else
   low light3
  end if
 end if
 
 goto waiting_to_learn_loop
 
' Learn a light position and set flag so we know that switch is done
learn0:
 ' position gives you the output for this switch
 flag0 = 1    ' set flag
 light0 = position   ' remember position for this switch
 goto learn_end
 
learn1:
 ' position gives you the output for this switch
 flag1 = 1    ' set flag
 light1 = position   ' remember position for this switch
 goto learn_end
 
learn2:
 ' position gives you the output for this switch
 flag2 = 1    ' set flag
 light2 = position   ' remember position for this switch
 goto learn_end
 
learn3:
 ' position gives you the output for this switch
 flag3 = 1    ' set flag
 light3 = position   ' remember position for this switch
 'goto learn_end
 
learn_end:
 inc position     ' add 1 to position counter
 if position > 3 then have_learnt_all ' all done
 goto waiting_to_learn_loop   ' not all done so back to loop
 
' now simply loop reacting to the switches
' timeout_counter value will increment every 10ms
' however if any light is on the timeout_counter is reset
' so this means the timeout will only 
' occur after 10 secoonds of all switches off
 
have_learnt_all:
 if pin0 = 1 then
  high light0
  timeout_counter = 0
 else
  low light0
 end if
 
 if pin1 = 1 then
  high light1
  timeout_counter = 0
 else
  low light1
 end if
 
 if pin2 = 1 then
  high light2
  timeout_counter = 0
 else
  low light2
 end if
 
 if pin3 = 1 then
  high light3
  timeout_counter = 0
 else
  low light3
 end if
 
 pause 10   ' wait 10ms
 inc timeout_counter ' inc timeout
 
 ' if timed out then reset else loop
 if timeout_counter > timeout then do_reset
 goto have_learnt_all
Wait a min, you said about 20 lines of code should do it :p

Lefty
 

hippy

Senior Member
At one point I did wonder if it would even fit into a 14M as I casually suggested it would :)

Luckily the 14M has 256 bytes of program space, and my code uses about 150 bytes so a good amount left over.

An additional problem ...

It's great being a magician on a stage where you have complete control over the setup, exit stage right with the trick and the audience don't get to play, but where us mere mortals are likely to be showing off our magical skills will be the pub, playground or office and people will want, "give it here" access, so what to do ?

Following up on some links I got sent, one nice bit of patter was AC : alternating current, DC : direct current, and super-magical SC : specific current which is of course what this trick runs on :)

So that gives "an out" as to why only the magician can control the trick having mastery over SC which others don't, so handing it over is no problem as long as the audience don't have the power of SC, ie each switch only activates the bulb opposite when in their hands.

That's just another "reset mode" which locks it into one-to-one mapping once the trick is over and the prop is handed around. One thought was to timeout on all switches on for 10s and then enter the locked-mode as soon as the switches are set all off. "Give it here", set all switches on, give some spiel for 10s, turn the switches off, hand it over. It'll never behave as a trick in their hands.

Getting it back into trick mode is an issue as someone will want to see it done again. "You've discharged the SC, I have to take it home to recharge" is a bit weak, so perhaps a concealed magnet and reed relay ?

Any other suggestions ?

Hardware

What's the best way to drive small bulbs ? ULN2803 darlington drivers ?
 

hippy

Senior Member
Thanks for the tip, nice, quite cheap and available in seven colours so the audience can get to play with any four of their own choice :)

http://www.rapidonline.com/productinfo.aspx?tier1=Electronic+Components&tier2=Optoelectronics&tier3=Miniature+Lamps&tier4=LED+Miniature+lamps+MES&moduleno=77938

Haven't found any perfect toggle switches with sleeves yet. Some versions of the trick use 'tumbler switches' with painted screw-on covers but that runs the risk of activating the switch while swapping covers.
 

Technical

Technical Support
Staff member
We thought about coloured disks cut out like polo mints. Just drop over the switch of your choice so it rests on the baseplate.
 

papaof2

Senior Member
The "telephone switch" handle they use in the video is usually available with a screw on handle. If you drill out the threads in the plactic cap or file off the threads on the toggle itself, you would have slip-on handles.

The screw base LEDs make it practical to run on AA cells, so it's definitely portable magic.

"Specific current" is a good spiel phrase. Maybe have that as part of the logo on the base?

John
 

mikek

Member
A darligton would do it, but we prefer this type of idea - you can drive them direct with a resistor. They may need a coat of transparent paint so you know which one is which!
http://www.rapidonline.com/netalogue/specs/72-8922e.pdf
LEDs are no longer "ordinary light bulbs" and might arouse the suspicion that there are "smarts" built in. For example, if you could access the connection between the resistor and the LED, you could measure the voltage drop across the LED and determine what color LED it is.
 

wllshaw

Member
My guess is he seems to be setting up the colors the first time he runs through the switches after a bulb change. After a bulb change he runs through the colors in a definate order, always the same. After that he plays with your mind. In regards to how it's done, well no clue. I'm a newbie here, reading the forum and studying the manuels before I delve into asking questions. Keep up your posts people. Your ideas and comments are enticing and thought provoking.
 

w0es

New Member
It could it be as simple as he has a foot switch he is activating under the table.
Most magic tricks are very simple.
 

alpacaman

Member
I made one of these using Technical's code, only modified to use an 18x.
I'm going to add code so that if you leave all the lights on for 10 seconds it will make switch 1 turn on light 1, switch 2 turn on light 2, etc... - regardless of where the lights are. That way at the end of the routine you can hand it over to the person you're showing it to and they won't be able to do it - even if they turn all the lights off for 10 seconds. The only way to get it to do 'magic' again would be to reset the power.
 

Andrew Cowan

Senior Member
Last one!

Power: 4 AA cells
PIC: 18X
Driver: Darlington driver chip
Bulbs: 6.5V 300ma bulbs (screw)
Switches: Miniture toggle switches
On/off switch: In base
Coloured bulbs: Painted with glass paints.

I was going to have red/yellow/blue/green, but the green dropped and smashed as it was drying, so I replaced it with a white one.

The switch covers are paper - I was going to make better ones but never got around to it.

It is amazing to show people - no-one ever works out how it works.

Any questions?

Andrew
Whoops - I'll post this again in finished projects. If a moderator wants to delete these posts, fine.
 

Attachments

Last edited:
Top