Persistence of vision – 2 principles and how to build
April 3, 2011 16 Comments
After the initial success with persistence of vision or POV, I made a PCB just to do the job. Please look at the middle of this page for some details:
Principle of operation:
How does the POV tell its speed and when to start displaying?
There is a sensor (typically Hall Effect magnetic switch or photogate) on the rotating board to sense where to start displaying. You have to display the same message at the same spot several times a second to get persistence of vision. Speed of the rotation is calculated by the rotating board, using time difference between two subsequent sensor readings. It’s like if there was 250 ms of time between subsequent triggers from the sensor, the speed is 1/250ms=4Rev/s
How does the POV display numbers and letters?
If you have recently made some purchase, bring out your receipt. You may notice that some of your receipts look rougher than others, seemingly made up of dots:
The left receipt shows characters made up of 5*7 dot matrix while the right receipt shows smooth characters (maybe the dots are too small to see).
What happens inside of the printer that produces the left receipt was that there is an ink ribbon placed in front of the blank receipt and a column of 7 pins is brought near the ribbon. The 7 pins can move quickly in and out. When a pin moves in it presses the ink ribbon against the blank receipt, making a dot on the receipt. When it pin moves out of the place, the ink ribbon is not pressed against the blank receipt. If you look at the capital T on line one, the pins are controlled by a microcontroller which tells the top pin to punch, then moves the pins one space to the right, top pin to punch, move to the right, tells all pins to punch, move to the right, tell top pin to punch, move to the right, tell top pin to punch. This way a “T” is made with two single dots on the top, seven dots in a column, two more single dots on the top again.
This way, a single column of pins makes characters, then characters make words, and then sentences. A persistence of vision display follows the same principle with a single column of LEDs “printing” in air. When the rotation is fast enough, at least around 2RPM, then the repeated information results in persistence of vision in human brains and the images magically appear. If I lived in the “Terminator” time, I would use such a display, not a dog, to tell who’s human who’s not. If you ever construct such a display, try taking a picture of what’s said, you’ll find it hard but still possible to take a picture of the complete message.
Here is another picture of my POV display acting as a clock:
Essentially you can display any message on the display you want, besides characters and numbers, as long as you use several columns of 8 vertical dots to represent them.
How the electronics works
I am using an Arduino to control the POV display that I made from 8 LEDs and a 74HC595 shift register, and a Hall Effect switch. The Arduino senses the rotation from the Hall Effect switch passing underneath a magnet (see there’s a ruler in the picture stuck on top of a poll?). Once sensed, it spits out the information to be displayed in columns of LEDs to the shift register. With a shift register, you can expand the number of LEDs to a number larger than the number of Arduino pins, without increasing the number of pins needed to control them. You only need 3 pins to control a series of shift registers, which translates to dozens of LEDs.
Here is a good tutorial on Arduino website to learn shift registers:
http://www.arduino.cc/en/Tutorial/ShiftOut
The arduino turns on the appropriate LEDs representing the first column of a character and waits for a short period of time, say 1ms, then it changes the LEDs to represent the next column, and wait and next.
How to make this display
List of hardware:
You will need the following parts in order to make the display:
One reliable rotation stage such as a computer case fan or my fancy Pasco rotation stage (improper assembly may result in injuries so do it carefully and don’t sue me)
One Arduino board (UNO or RBBB with a tiny breadboard)
Eight appropriate resistors, when unsure, use 220 Ohm
9V battery and clip
One perf board or the POV breakout board(see the middle of the page)
Some wires and headers
Assemble the hardware:
First solder the parts together indicated below. If you use a perf board, situate your 595 in the middle with the pins that are connected to their neighbors. You need to spread out the LEDs. You’re much better off using the breakout board. Make sure you observe polarity of the LED, long leg is positive.
Here is the breakout board:
Notice the circles (LED) have cuts that you can see on your LEDs to match. The IC spot also has a half circle notch to indicate orientation of the 595.
Here is when everything is soldered on:
To solder on the Hall effect sensor, face the narrow face of the censor away from the board and insert it into the 3-pin spot and solder. The bend the pins zig-zag so the sensor is further lifted up to sense a magnet.
Power the thing with 5V and GND indicated on the board and measure the output of the trig pin. Make sure you get the right magnetic poll to trigger the switch. It stays high until the correct magnetic poll is brought near enough to it. Once tested, secure the magnet on something that will hang directly above the sensor.
To test the LEDs, use the sample code from the Arduino tutorial:
http://www.arduino.cc/en/Tutorial/ShiftOut
If everything works, load the following code. Before you rotate your stage, you need to be sure everything is secured. Power Arduino with the 9V battery at Vin (positive) and GND pins. Turn on your rotation to at least 3RPM. Darken your room if possible.
To be continued…
Load the software to Arduino:
To be continued…
Nice and simple looking project thet both educates and entertains the hobbyist. Eagerly waiting for second post.
Will add some details. I competed in a national contest with this but didn’t win. Old physics professors can’t fathom what it is and didn’t even bother with the 2% accuracy (which is very good for teaching). I’ll post code and pictures soon.
I would love to see your code on this project. I’m having trouble with some of my POV stuff and I’m wondering how you handled it.
Sorry for the delay. Here is a link:
http://code.google.com/p/phi-prompt-user-interface-library/downloads/detail?name=POV_v14.zip&can=2&q=#makechanges
Sexy , you the man liudr, i have all the parts in my parts BIN
This apparatus, which was designed to show uniform circular motion, received an award from my state 🙂
I am very interested in your method of coding, are you planning to post arduino code…I’m using a mega 2560…and can you send me your schematic for the breakout board…im a student novice hobbyist. Thanks.
Sorry for getting back so slowly. Here is the code:
http://code.google.com/p/phi-prompt-user-interface-library/downloads/detail?name=POV_v14.zip&can=2&q=#makechanges
It’s been a while since I last touched this project. I will have to dig into my files to find the schematic.
Hey
Was wondering If u can give us some coding instructions on how u did this ????
We are trying to do the same thing and all the circuitry is build !!
just not sure about the coding part!!
Any help will be appreciated !!
Thanks in advance
Hi sherdot,
It’s been quite a while since I last touched that project but here is the latest code, which you may need to adapt for arduino 1.0 (no big deal, read my post on how to migrate to arduino 1.0).
http://code.google.com/p/phi-prompt-user-interface-library/downloads/detail?name=POV_v14.zip&can=2&q=#makechanges
Essentially the code displays whatever message you throw at it. Each message is disassembled into characters and each character is taken apart into vertical dots. You have the message, it will display it. My latest version also plays a bit with scrolling, if I remember it correctly. Good luck!
Where can you get that breakout board?
Jake,
I made 3 of them and have used them all. If you want to use this board, you can have them made at a few places such as OSH park or Seeedstudio etc. Reply if you want the files. I can’t post files other than pictures, texts and a few file types. I wish I could post zip files but nope.
Hello, I would like to ask you about POV and Arduino: some years ago I was at a party and in a corner of the place had a strip of LEDs blinking very rapidly; sometimes, when your eyes were going through that strip you could read a ‘hidden’ message; a friend told us that this phenomenon is called POV.
Now, I want to make a similar strip to those using arduino but all the information that I find is based on ‘moving the strip of LEDs’ either in circles or back and forth, but I wonder how you could do the opposite: leave led strip fixed and cross it with your eyes, like when you turn your head quickly to ‘read the message’.
Greetings and Congratulations for your work
Very interesting idea. So in order to see the hidden message, you turn your head quickly in one direction, correct? And the LED is a vertical strip of lights? This means you don’t have to spin the leds, just keep it in place. You may not catch the hidden message’s entirety every time you turn your head but given enough times you will piece everything together. I think that you can follow the same example of spinning LED strip but instead of triggering the blinking over a magnetic sensor, you trigger it periodically with say every 5 seconds. This way the viewer has a chance at the message every 5 seconds. Then the speed of the flashing should be close to how fast a human can turn his head 🙂 When I get a chance I’ll give it a try (I’m very busy with my 100 or so college students “eager” to learn physics everyday). I have a setup I can mod to trigger periodically.
hey kudos to you for your project.
Can you please give me some insight regarding how to write the code for analog POV clock instead of digital clock that you made.
P.S.-Its for my final year project.
For analog POV clock, you need a larger area to spin out a circular clock face. Maybe RGB LED matrix and some math to map x-y coordinates into polar. I’ve not done anything like that. Look up adafruit spoke POV hardware.