Introduction: The Magic Wand Clock: a Persistence of Vision Toy !

Picture of The Magic Wand Clock: a Persistence of Vision Toy !

Hold this magic wand in your hand, swing it and push the button : a complete digital clock will appear floating midair. Amaze your kids and friends !

Step 1: Description

Picture of Description

This is a persistance of vision project of the kind we have seen lately in large quantities. POVs are fun to watch anyways. This one comes in the shape of a tooth brush case (courtesy of Swissair, now gone) one must hold as a magic mand. At the top of the case 7 LEDs provide the display, at the middle two small button set the time and a larger one triggers the display: push the button (this turns the display on otherwise the display is normally off) and swing the wand right to left and the time of day will float midair !
How is this accomplished ?
The display is virtual, being made of 25 columns of 7 LEDs each. Only one column is shown at a time. The single column of LEDs shows one after the other the columns forming the digits of minutes and hours, right to left : pushing the trigger button starts the display of minutes, tens of minute, separating colons, hours and tens of hours, one column at a time rightmost column to leftmost column. Your eye's retinas will retain the image of each column one close to the other and the image of the clock will appear. Difficult to explain, much easier and fun to try.

The circuit is based on a PIC16F84 micro, a 32768 Hz crystal watch salvaged from a dead watch 8 resistors, two capacitors and two AA or AAA batteries.
The circuit consumes very little power due to the low voltage supply and the low frequency crystal.
Synchronizing button push and wand swing may take time to learn, but not much.

The time is set with trials and errors: read the time, push minutes set button to meke them advance one minute per second, read time again. The same to set hours.
Below the schematic, the source code commented so as to make it understandable as much as possible and the HEX file ready to burn into the PIC.

I'd rather not delve into how to program the micro. There are many tecniques and sofware described over the net. This would probably deserve a whole instructable of itself. I successfully used PonyProg as programming software and its HW interfaces. Also found excellent WinPIC.

Make sure to check the video attached at the bottom. The quality is not good being taken with a photographic camera. The clicking noise is the 'wand!' button being clicked while swinging. The voices in the background are my family's.

Now on with step two: construction

This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 2.5 License

Step 2: Building the Circuit

Picture of Building the Circuit

Cut a piece of perfboard in a shape suitable for the top of your toothbrush case.
Solder at the top the seven LEDs, shorter pin is Cathode, the one that goes to ground. Better mark a black spot on the side of the LED's case before you cut the wires to correct lenght.
Solder one pin per LED first, align them in a row, solder the other pin of each LED.
Solder the socket in place, pay attention to position of pin no.1 (the one with the dot). Do not mount the micro on the socket for now.
Solder the crystal and the seven resistors.
Start wiring with very thin enameled copper wire.
One resistor and capacitors can be soldered on the solder side.
Connect battery holder un pushbuttons with thin plastic insulated wire.
The battery holder can be made out of thin cardboard: cut a square of cardboard the size to make one round around the two batteries. Hold with some scotch tape. Wrap another sheet of cardboard and hold again with scotch tape. Remove batteries and inner cardboard. The removed sheet of cardboard served to give batteries some room and slip easily inside the tube. The two electrical contacts can be taken from a broken toy or another electrical piece of equipment.

Buon divertimento ! Have fun !


Suraj Grewal (author)2014-07-09

Nice project,will try it for sure.

and yes,I read the licence terms.

OG Style (author)2007-01-12

5Volt I am tring to make your clock. (Good job on the info it is all there) I have a few question. On the schematic it says "82 or 100 W (x7)" does that me 82-100 ohm resistors? My 2nd question is will this work on a 16f84a? And can you give me the numbers off of the caps that you used for pin 15 & 16. I have assembled it with caps marked 82 on them and a 16f84a. When I push the buttion all I get is a quick light flash on and then off and stay off. I think it my be my caps I am using. I don't have any 820's. Thanks again good job

5Volt (author)OG Style2007-01-13

Ooops! apparently the font I chose replaces the Omega with a W... Yes it's Ohm. It should work fine on a PIC16F84a as well. Capacitors are ceramic, 16V or more Yahoo! The flash you see means the clock is working fine ! Just press the button while swinging the wand right to left. Try not to follow the wand with your eyes. You 'll see the time floating ! Don't get discouraged ! Just try to keep your eyes from following the wand look just in front of you, start moving the wand right to left, click. Watch the video to better understand the synchronicity (?) of swing anf click. Apparently this is the first sample of the magic wand clock done with this instructable ! Thanks for asking. Please post again for success or failure anyways ! Please post photos if possible. Best regards OG ! 5V

harsh bhatt (author)5Volt2012-09-15

hey 5 volt ...
i can see the flash ( change in led's pattern ) but its not visible when i move right to left how its show in video but we can observe can in led's when i press wound button
can u give any solution for this ......
waiting for ur answer
reply asap.... :)

smnoor88 (author)2011-07-06


yaly (author)2011-04-21

i have a universal pic programmer and i tried to program the hex file to the pic16f84a it gives me an error with mplab winpic800 and wxpic please help soon to send another better hex file thanks

robot1398 (author)yaly2011-06-25

i programmed it

5Volt (author)yaly2011-05-30

Just for continuity with PMs and comments, I'm pasting here my reply to Youssef comment and PM follow-ups:

The device id PIC16F84 should be input in some menu of your programmer. Very likely you are presented with a pull-down menu to choose from. The HEX file should not contain the device id.
The fuses are included in the HEX file which your programmer should understand well.
Anyways, in some menu of your programmer there should be some device configuration where you can set the fuses (make sure that watchdog timer is off and crystal is set to XT).

Hope this helps.

P.S. Please post any comments/follow-ups here: I'm notified of them by Emails anyways.


Nice kid, congratulations!

kahangkatumbal (author)2010-12-14

Thanks a lot. we found a 32768 hz oscillator..

btw, is the program really designed to show the time only for a few seconds? how can we make it retain the time?

5Volt (author)kahangkatumbal2010-12-15

Almost forgot : I read in your PM about the capacitors : 82pF can be reduced somewhat, say 68pF of 56pF. Just try, you can't damage anything. In case stick to 82Pf (check dead electronics, VCRs DVDs TVs, near the crystals).

5Volt (author)kahangkatumbal2010-12-15

Actually it is a POV clock in that to 'see' the time you have to wave the clock in front of you while pushing the 'wand!' button. The time is then displayed from one side to the other of the display, one slice at a time: persistence of vision (POV) makes you see time floating on air. If the display would stay up longer, say forever, without any synch (the button press) you would just see an un-readable jam of LEDs flashing.
Just press the button and wave the wand.

kahangkatumbal (author)2010-12-13

can you give us a hex code for the 4MHZ?!?!?!?!?

5Volt (author)kahangkatumbal2010-12-13

The timings are based entirely on the 32768Hz crystal. 4MHz would require total redesign of timings and thus timers, it would also drain batteries at the speed of light even with LEDs off.

32768 Hz crystal are very easy to find in crystal watches as small metallic cilinders : don't be afraid of damaging it these are pretty strong. The crystal you'll find will probably be un-marked but great chances are that it is 32768Hz.
Best regards

maviex (author)2010-10-06

hi sir,,im still having a problem with this project,,i load the program to a pic 16f84a and use a 4Mhz oscillator,,when i tried to turn it on, the LEDs flash some light then suddenly turned off, is it ok to put it on breadboard first? could anyone suggest a simpler project using pic 16f84a for beginners?

5Volt (author)maviex2010-10-07

Ahhh! I see : you are using the 4MHz crystal. This makes a difference : you must configure the oscillator bits for a "high speed crystal or resonator". The HEX file configures it for "low power crystal". Read details on page 21 (ch 6. SPECIAL FEATURES OF THE CPU) of the datasheet of the 16F84.
I don't have MPLAB installed now, so i can't make the 4MHz HEX file. You can do it with your programmer though settting/resetting the config bits of the micro..
Best for now, hope this solves.

Lord_Vek (author)2009-04-01

I made one, but it is resetting at random (shows 00:00:00). I unloked the option in .asm file to show seconds, also. But, why the resetting ? And how I could make it show the time for a bit longer ?

5Volt (author)Lord_Vek2009-04-09

Ciao Lord_Vek, sorry for not replying sooner but for some reason sometimes I read and forget about comment notices in my personal mail... Anyways, this 00:00:00 problem occurred to me also when the battery disconnected for a short time. This is due to oxidation of the battery to clip flat contact or vibrations. Of course vibrations are unavoidable to display the time so I suggest to place the spring clip at the bottom of wand and the flat clip end towards the LEDs (the outermost side of the wand). The batteries should also slide easily inside the paper-made battery holder. To make it, it could better to wrap a piece of paper around the batteries then wrap the cardboard and scotch tape the assembly, then remove the paper sliding it out to give some room to the batteries to slide sort of freely and stay on the flat clip easily. Hope this helps. Ciao and please come back on this. Alessandro

noah1r (author)2009-04-07

cool I like it =0 =) :p

5Volt (author)noah1r2009-04-08

Thank you very much. I'm very happy whenever this simple project is appreciated. Ciao Alessandro

colin55 (author)2008-12-29

I designed a similar toy that displayed words. See the example: and click on Ekektor link. I used an inertia switch made from a metal ferrule and a length of tinned copper wire. It gave very accurate results and the words appeared in exactly the same position in the air, every time the project was "swished."

krvavizmaj (author)2007-09-25

I don't quite get how the prescaler works on the PIC. If you use 32768 Hz oscillator you have 32768 cycles in second. If the timer overflows after counting to 255, shouldn't the prescaler be 1:128? So that way each count of the timer will be 128 cycles and so you get 32768 cycles until it overflows. I haven't really tried it in practice so I guess am wrong, can someone explain how it works?

5Volt (author)krvavizmaj2007-09-26

The crystal frequency is divided by four before being fed to the software programmable prescaler so, 32768/4/32/256 = 1 where 256 if the number of pulses needed by the counter to overflow, 32 is the software programmable prescaler preset and 4 is the crystal fixed divider.

tbird45039 (author)5Volt2008-09-03

i realy wish i new someone who could teach me how to understand ICs, etc.

wolfy (author)5Volt2007-10-10

if i use PIC16F628 how can i re-program it?

5Volt (author)wolfy2007-10-11

You can do it. But you must recompile it for the 16F628. You need MPLAB for this and some assembler programming experience, not much really, but some. The 16F628 has more peripheral than the 16F84 and some register may not be named the same. Anyways It is worth trying to recompile the .asm as is and see. Ciao

MJTH (author)2008-07-19

Haha, I think your hand would get saw after a w hile of trying to set the time

HuKePa (author)2007-06-14

Hi! I from Bulgaria. I am planning to make this, and I make it... but dont let go ;o/ On this level I serch a problem... BTW Are you want to see...?

5Volt (author)HuKePa2007-06-14

Wow, this is the first time I see the picture of someone else' magic wand clock , great ! Thanks for posting. Now, you say it doesn't work, right? The most critical part are the crystal and capacitors connections to the micro: keep these as short as possible, try and use thin wire. The LEDs are connected the right way and not reversed ? Did you check with a multimeter? Are the batteries ok ? Could you program the chip correctly ? Check everything once more and look for short circuits with a multimeter. Ciao and grazie.

HuKePa (author)5Volt2007-06-17

Now I see few mistakes ... ;] I forget 3 connections 1 LED burned When I correct this problems maybe let go :D bye bye naw. Late I say what up :)

botronics (author)2007-04-06

You might try programming the pic with my "pic-key" programmer.
It's a simple and cheap pic programmer

macmaniac (author)2007-03-15

I am planning to make this in the future and I will make a pcb. If you wish I will send it to you to publish on this instructable.

5Volt (author)macmaniac2007-03-16

Excellent, please do so Ciao

OG Style (author)2007-01-11

What is the battery life on this and how accurate is the clock? Good job.

5Volt (author)OG Style2007-01-12

Thank you OG. The thing eats up 70 micro Amps at rest (i.e. with LEDs off). Could be better. The fact is that the PIC16F84 can't be put at rest completely without stopping the timer as well! It is as accurate as the crystal is. There's no delay intrinsic to the circuit. Secs are incremented 1/32768 the crystal frequency. Tiny watch crystals are very accurate as long as they are 'thermostatic' that is as long as they are worn by a (live) human with an almost constant body temperature. At room temperature it is accurate quite enough though. Ciao. 5V.

curhat06 (author)5Volt2007-01-30

Hai 5 Volt Nice Project.. But when I try to download then I unzip end open magicwandschematic.pdf it error I can't open it. (bed encrypt dictionary) can U send to my email Many Thank's

5Volt (author)curhat062007-02-05

The file is OK now. Bye 5V.

5Volt (author)curhat062007-01-31

Thank you.
Yes, apparently the file got corrupted. I'm reposting it tonight. In the meantime you may want to download it from

OG Style (author)2007-01-13

ok I think I got it. When you push the button the light stay on for about 1/2sec. They don't stay on constantly. Thanks

5Volt (author)2007-01-13

Added one more video to make action more clear. The clicking noise is the trigger button being pushed. 5V

OG Style (author)2007-01-12

1 more question are those 3 caps all ceremic?

5Volt (author)OG Style2007-01-13

Yes, ceramic 16V or more. 5V.

cornflakes (author)2007-01-13

Is every crystal I'll find on clockes will be a 32768Hz?

5Volt (author)cornflakes2007-01-13

Almost al wall clocks (or watches) use 32768Hz crystals as long as they do not have fancy features (alarm , thermo, hygro ...). They have the shape of small cylinders. 32768 are most common because scaling down from 32768 to 1 Hz ( 1 pulse per second) is done via 15 flip flops (a very simple device) each dividing by two. Anyways those who sel PICs generally sell 32768 crystals as well for a fraction of an Euro (or $). Thanks for asking 5V.

flipf0nt (author)2007-01-12

i believe a hall effect sensor + rare earth magnet and this thing on a ceiling fan would be a really cool room clock, but some power supply issues would need to be worked out. This is a really neat toy to mess around with, do u have an eagle file worked out of this?

5Volt (author)flipf0nt2007-01-12

You could power the clock with a sort of transformer made by a primary (tied to the motor) around the blades rod. The metallic rod could act as the core. The secondary would be on the blades around the rod. 5V.

5Volt (author)flipf0nt2007-01-12

No. I haven't designed a PCB for it. Yes, the ceiling fan is good. But you may want to check the spoke POV also ( or ). It is designed to go over bicycles wheels. It has colours also, but more expensive. With the fan the problem would be balancing. Bigger batteries could be put on the opposite side with respect to the circuit position.
Thanks for asking

Crash2108 (author)2007-01-12

The POV dildo!

5Volt (author)Crash21082007-01-12

Of course ! Very good a mod. Just a motor from a broken mobile phone !

About This Instructable




More by 5Volt:USB bronze bell striking clock (with Arduino)Build a real bell-striking clock for your PC and a fire extinguisher-striking clock.Encode data in 2D on your T-shirts, business cards and stickers !
Add instructable to: