Introduction: (POV) Persistence of Vision Globe

Picture of (POV) Persistence of Vision Globe

!Update! I have added an excel program that makes it much easier to draw and code new images!

A simple persistence of vision globe. PLAY VIDEO

This is a project I've had in mind for quite some time and the "Make It Glow" contest was just the motivation I needed to inspire me to pull out an old 5 LED POV display and take it to the next level, using shift registers. If you enjoy this instructable please consider voting for it.

A quick intro to POV or persistence of vision: Any AC voltage light is actually blinking on and off at a frequency of 60hz or 60 times per second. Our brains perceive this as constant light. It is this concept which we will be taking advantage of, in order to create a spherical image using a single row of LEDs. For this project , I decided 24 LEDs sequenced using three 8-bit shift registers would provide the minimum resolution needed for the globe.

Step 1: Materials

Here's what I used.

  • (1) Arduino Uno (for prototyping)
  • (1) Bareduino (for permanent board optional) VIRTUABOTIX LINK
  • (3) HC595N Shift Registers
  • (24) Blue LEDs
  • (24) 220 ohm resisters
  • (1) breadboard
  • (1) battery holder and battery
  • (1) 10" diameter ring (wide enough to hold LEDs and the lighter the better)
  • (1) pieced of threaded rod (I used 5/16")
  • (1) Motor (I used one from an old Dirt Devil)
  • (1) Motor Coupler
  • (1) 120V Disconnect (Light Switch)
  • (1) Fan Speed Controller

Step 2: Building the Ring

Picture of Building the Ring

I used a piece of 1/8" thick x 1/2" wide aluminum flat bar for my ring and 5/16" all thread for the center mast, because I had them laying around, but I think this could be made on a 3D printer complete with PCB mounts and be much lighter. I built this ring for a previous build using 5 LEDs each powered off a separate DO of the Arduino.

There is nothing special about the diameter of the ring. Mine is approx. 10" round, just because the flat bar I had was 3' long to begin with. I rolled it on a 3 in 1 shear/brake/roll from Harbor Freight, but you could also form the ring around a disk cut from plywood and have good results. For that matter, I see no reason the ring couldn't be made from wood. I just prefer metl working.

I drilled holes for the LEDs at approx 5/16" on center. This spacing filled in all but 1" on the top and bottom on one side of the ring. You will need to bolt a bracket in the center of the ring to provide a mounting surface for the breadboards.

Step 3: Making the Circuit

Picture of Making the Circuit

This was my first attempt at using shift registers, so I started researching on Arduino's site and found an extremely useful example, which I modified to suite my needs. You can find the tutorial at Arduino ShiftOut I settled on the "Code Sample 2.3 - Dual Defined Arrays" as my base code, more on that later.

If you follow through the tutorial you will learn how to send bits of information, one by one, in serial from your Arduino to the shift registers. This arrangement allows you to control all 24 LEDs on this project with only 3 pins on the Arduino. We will be using the serial in, parallel out capability of the 74HC595 to load 24 bits of information or 3 Bytes into the shift registers and then shifting the data out in parallel to the LEDs.

Since the first bit of data we load will wind up in the last register spot, we'll attached LED1 or the most southern LED to QO of the first Shift Register. Follow the schematic from the ShiftOut example and attached the third shift register to the second, in the same manner as the second is attached to the first.

I recommend running the sample code along the way, first with just one register then with two. The sample code sequences the lights such that it is easy to see if anything is miss wired. I was able to simply add a Byte3 to the "Code Sample 2.3 - Dual Defined Arrays" and a third array which I called Blue. You can see this in the ShiftOutArrayByte3R1 code uploaded to this step.

Step 4: Putting It All Together

Picture of Putting It All Together

Now that were confident the circuit works we need to get everything mounted to the ring. I suggest mounting your Arduino/Bareduino on one side and your Shift Register Board opposite the Arduino. This will help with evening out the weight, but you will most likely need to move some thing around until you get a stable rotation. I used the 9 Volt Battery on the side I needed to add weight to. I used zip ties to attach the boards and the Battery to the center Mast. This way I could make adjustments to get the ring balanced.

Now to solder all of the LEDs. Since we're controlling the positive voltage of the LEDs, we can connect all of the cathode leads together with a single un-insulated wire and plug that into our ground. Then we need to solder a resistor to the Anode lead of each LED and then attached a wire from the resistor to corresponding shift register output pin. I left in the Blink All function in the setup loop as an easy way to tell if you have an LED out.

Step 5: Drawing the Globe

Picture of Drawing the Globe

!!Update!! Now you can draw using the excel program, which converts the image to hexidecimal for you. The code for your Red, Blue, and Green arrays can be copied and pasted into the Arduino sketch. Simply fill in a 1 where you want the LED to be ON and the cell will change to blue automatically! The Excel program is uploaded to this step. Thanks to the Rave Shades instructable for posting the Rave Shades Animator, which was modified for this project.

Okay. Now to get artistic. I chose a globe because I thought it would be a cool way to make a 360 degree spherical display using POV, but I'll try to show in this and the next step how you can create any image you can draw in a 24x70 dot resolution.

First I found a suitable world map image to use as a guide. Then I found an app on Google Play called "Mosaic Builder" that was perfect my needs. As you can see in the last picture on this step I was able to create a low res version of the world map pic on my 24x70 template. FYI the 24 comes from the 3 Bytes of data and therefore 24 LEDs tall and the 70 comes from dividing the circumference of my ring by 5/16" to make the horizontal spacing match closely to the vertical spacing of the LEDs. The 70 dots wide will vary based on the size of your ring, but is not critical. It's especially not critical since we are not using any type of sensor, such as an infra red LED to sense a complete rotation and reset the loop. This is something I may consider in the future, but for now as long as we have speed control on the motor the sensor is unnecessary.

Once you have a drawing you're happy with you can convert the image into hexidecimal code by Byte, in the next step.

Step 6: The Code

Picture of The Code

!Update! Just draw in your image using 1s to represent ON, which will automatically color the pixel blue. When your image is ready press the "Copy All Arrays" button and paste over the existing arrays in the Arduino sketch! I have uploaded a new sketch to this step.

As mentioned previously, I used the "Code Sample 2.3 - Dual Defined Arrays" from the Arduino ShiftOut example as my base. As you'll notice in this code the author comments that he isn't sure if Arduino can handle direct binary values, so Hexidecimal values were used instead. Note: I never changed the binary comments next to the Hex values, I only changed the Hex values to fit my world map image.

Now this was only my second time seeing Hex and I was pretty clueless. I found the attached Hexidecimal-Binary conversion chart, which helped immensely. This chart can be used to convert the binary value of each column or (Byte) to a hex value. For example if you look at the last picture on this step you can see how the world map image was broke into thirds from top to bottom and each column consists of 3 Bytes, where white or off = 0 and Blue or On = 1. At the bottom of each column the Byte has been converted to a Hexidecimal value ranging between 00 & FF which is the equivalent to a decimal value range of 0-255 or a binary range of 00000000 to 11111111.

The attached code has the Globe image loaded, but can be modified for an image of your own.

Step 7: Testing

Picture of Testing

Before I moved on with building a base and motor mount I thought I would test and tweak the circuit. I simply chucked the rig into a cordless drill, turned everything on and pulled the trigger. I had to adjust the delay to 1 ms and my first attempt put Russia south of Australia. I also learned the image displays up side down, from what I expected, which was an easy fix to simply turn the whole ring over. The attached video is of my final successful test. Now its time for a base with a permanent motor and speed controller.

PLAY LEAD GLOBE TEST

Step 8: Finishing Up!

Picture of Finishing Up!

I wired in the light switch as a disconnect for my motor and then wired the fan speed controller between the disconnect and the motor. This gives me a way to shut the power off quickly and have reasonably good control of the motor speed. Now I needed a way to connect the motor to the globe. The shaft on the motor was 17/64" and the all thread I used for the globe is 5/16". A 5/16" coupler might have been just the trick, but sadly I only had 3/8" couplers which were useless. Instead, I found a piece of 1/2" aluminum round stock and cut a 2" long piece and drilled a 17/64" hole through the center. This hole size was suitable for tapping a 5/16-18 thread halfway through the round stock. I also drilled and tapped a small hole through the side to thread in a set screw for the motor shaft then I threaded in the globe and used a jam nut to secure. The Dirt Devil motor spins fast enough to blow apart the hole assembly, so I needed to adjust the speed as far down as possible. At this speed the motor won't actually start spinning, making running the rig a little tricky. What I have to do is hold the globe from spinning and slowly raise the speed until the motor kicks on, then I can back the speed down and release the globe. Finally with some delicate fine tunning I can get a great slow spinning effect.

PLAY VIDEO

Comments

DivideWorks (author)2017-07-19

I have not used the ATtiny before, but looking at the pin layout I think

data pin= 5, latch pin=3, clock pin=6 would work fine. You need to define those pins at the top of the code.

supunshanaka (author)2017-07-19

hay i need help.if i use Attiny 85 microcontroller for permanent what are should be the pin numbers of code.(data,latch and clock)???
is this work
data pin= 5
latch pin=3
clock pin=6

SachinM39 made it! (author)2017-02-19

That was awesome

HardlyHumanFX (author)2016-09-22

Hi there! great instructable! I'm trying to figure out how to pulse an LED at 80 times per second. Could you point me in the right direction?

Check out the blink without delay tutorial. I think by using the millis function you would be able dial in the frequency of the LED pulses.
https://www.arduino.cc/en/Tutorial/BlinkWithoutDelay

MarianaL6 (author)2016-02-19

Good Morning,

Can you tell me how many rotations is that your engine does?

And you know of a compatible DC motor, ie it has the same speed or the rotations needed to carry out the project.

Thank you, I await response

DivideWorks (author)MarianaL62016-02-28

I dont know what RPM the globe runs stable at. The motor I used is way too fast. I would recommend using a DC motor with an electronic speed controller, so you can dial in the speed.

SalehaS1 (author)DivideWorks2016-08-23

but you can tell us the maximum rpm

masoudmaddi made it! (author)2016-06-18

Hi,

It's very nice to send you but I don't have your private e-mail adress! and I used exactly your arduino file that you have attached in your exprience ( POVglobe-1), is it wrong?

massoudmaddi@yahoo.fr :it's my e-mail

DivideWorks (author)masoudmaddi2016-06-18

I like your prototype platform. I sent you a private message with a link to anot her sketch with a simple symmetrical pattern. Let me know if that works

masoudmaddi (author)2016-06-17

Hi, I have a problem about the first Shift register, after loading the programme to arduino, 7 leds of first shfit register don't work but at first all of the leds blink then only the first led of the first shift register works.

I controled the programme and wiring, all of them are ok, but I don't know what is problem?

Can you help me?

DivideWorks (author)masoudmaddi2016-06-17

If all the LEDs blink at the beginning that means your shift registers are working. I think it is probably an issue with the data array. Can you send me your arduino file via private message?

LukaK19 (author)2016-05-26

Hi, I have one question, where do you declare delay in Arduino program? I have faster motor, and also I want to put Hall sensor for static picture at any speed, any advice?

DivideWorks (author)LukaK192016-05-26

The delay is at the end of the void loop. Line 269. Delay (1) The 1 equals 1 millisecond. You can change the value in the ( ) parentheses. Im not sure, but ithink it will accept decimals (.9)

I haven't tried it yet, but I think the trick to using a hall sensor for a static image would be to add an if/else, or case/switch statement after line 269. If the hall sensor pin is high then reset int j = to 0 else continue the loop. This way every revolution the image would start over at the first line. You would have to declare the digital input pin at the top of the code.

LukaK19 (author)DivideWorks2016-05-27

That delay dont change anything, so I dont know how to speed up my picture, and where to put hall sensor delay

DivideWorks (author)LukaK192016-05-27

did you try commenting out the delay completely. // delay (1)

LukaK19 (author)DivideWorks2016-05-30

I'm sorry, but I dont understand what you mean

DivideWorks (author)LukaK192016-06-13

Just add two forward slashes // in front of the delay. This will ignore the delay completely. I tried it this weekend and it definitely sped things up. I had to increase the motor RPM significantly in order to get a stable image.

LukaK19 (author)DivideWorks2016-05-27

Thanks! I'll try and if it will work, I'll put the code here

masoudmaddi (author)2016-06-05

hi,

I enjoyed your experience, it is very nice but I have a question about bareduino 328. I did not understand which ones of legs the Atmega are used for the 5 LEDs and which pogramme be use for clock? I looked the link that you recommended but I did not find anything about that.

Please say to me more about the bareduino and use the LEDs like a clock?

Best regards

LukaK19 made it! (author)2016-05-26

Just 8 months..

DivideWorks (author)LukaK192016-05-26

thanks for posting the photo! your rig looks awesome.

LukaK19 (author)DivideWorks2016-05-27

Thank you very much!

masoudmaddi (author)2016-05-25

Hi friend,

I want to use your project but I have a problem to undrestanding of LED GLOBE R2.xls? I didn't undrestand how upload a picture with .xls program and how send it in arduino?

DivideWorks (author)masoudmaddi2016-05-26

first you draw an image in the .xls program by changing the 0s to 1s in the drafting area. the program will automatically convert the image into 8 bit segments and then into hexidecimal code, so all you need to do is hit the copy all arrays button. when you hit that button the program will run a macro copying all of the data from column A onto your computer's clipboard. Then you can open the arduino sketch and select lines 32 through 241 and paste the new data from your clipboard. now you would have the information for your new image in the arduino sketch. finally, save and upload the new arduino sketch to your arduino board and you should be able to run the new image.

DavideT14 (author)2016-04-13

Hello Friend ! I Made The Whole Structure for POV globe with 40 LED 's only That I can not modify the software .. you give me a hand? Thanks

dajoker (author)2016-03-06

Thanks for the insight on building a Pov Globe, although my wiring is not the same it still worked. I made this for my capstone project to graduate from ITT TECH. jackiestarr0@gmail.com

ChiragJ10 (author)2016-02-20

hello sir! I want to make a globe consisting of 48 led's.Can you help me regarding the modifications that must be made in your code and excel sheet ?

Thank you!

DivideWorks (author)ChiragJ102016-02-28

Ambitious. there could be memory issues with the Arduous code. I'll take a look.

Aswinm1 (author)2016-02-24

can u please tell me which metal you used to make the ring

DivideWorks (author)Aswinm12016-02-28

I used aluminum, because I had it laying around. I've seen others use wooden rings that can be purchased from hobby stores. I've also seen people build the globe without a ring by soldering the LEDs directly to a round PCB. (printed circuit board)

ShaneS52 (author)2016-02-15

I built a globe for school project but in mine I am getting a lot of ghosting I believe it would be called.

I set the code to light up only 1 LED but I get 2 LEDs on. I had this issue but then somehow it stopped doing that. Now it started doing it again and have no idea how to solve it.

DivideWorks (author)ShaneS522016-02-15

I haven't experienced that before, but I looked at mine to verify the capacitor size between the ground and the latch pin and found I don't have a capacitor installed.

DBender (author)2016-01-07

hello friend, you can control animations using a computer?

DivideWorks (author)DBender2016-01-08

Not as is. You can create frames and load them in the Arduino. You could program different frames and sequence them using the Arduino. Look at the "ell eee dee" instructable for an example of this. I'm not sure how you could make it so you could change the image on the fly.

Aswinm1 (author)2015-12-30

If i attach red leds instead of blue wouldnt i get the advantage of scrolling the text and also the golbe display BRIGHTLY!.whats your opinion

DivideWorks (author)Aswinm12016-01-01

You could use any color LED to suit you're preferences. You may want to change the resistors used depending on the LED you choose. If you want to scroll text instead of display an image you would need to modify the Arduino code. I suppose if your text fit in one rotation than you could treat it as an image.

Aswinm1 (author)2015-12-30

if it attach red leds instead of blue wouldnt i get the advantage of scroll down text and also moke the globe display.whats your opinion

Aswinm1 (author)2015-12-21

hey can i use arduino nano instead of UNO .can you say the rpm of the motor you used in the project

DivideWorks (author)Aswinm12015-12-22

I haven't used the nano, so Im not sure. The limitation might be the memory required for the image.
The motor I used doesn't list rpm and I don't have a tachometer to measure. Whatever rpm it is, its way too fast. In hind sight, a DC motor with pwm speed control may have been a better choice.

DivideWorks (author)2015-12-21

The speed control switch can serve as the disconnect, but I wanted to be able to leave the speed setting and kill power quickly, in case of any problems. The 3rd shift register wires to the 2nd, exactly as the 2nd wires to the 1st. You can keep daisy chaining shift registers as needed to store more bits of information.

MarianaL6 (author)2015-12-02

Good day,

I will structure a globe similar to yours for a school work, needed to know how can I connect the other chip 74HC595 to the other two that appear in the image.

I appreciate the answer as soon as I could.

Thanks

DivideWorks (author)MarianaL62015-12-02

The 3rd shift register will connect to the 2nd shift register, exactly as the 2nd connected to the 1st.

brightled (author)2015-11-08

please explain "DO of the arduino"

DivideWorks (author)brightled2015-11-08

thanks for the education on AC. DC is definitely easier for me to conceptualize. DO stands for digital output. on the original 5 LED project, I could have each LED controlled on/off by a dedicated digital output pin on the Arduino.

brightled (author)2015-11-08

Great job explaining how it works,I commend you for not using a lot of BS tech who knows lingo THANKS ...

brightled (author)2015-11-08

Hello ,The project is great however in the introduction you state that" any AC lamp goes on and off every 60 seconds"well it does not the AC Voltage swings between +115 to -115 every 60 seconds.Itdoes not go on and off just swings pos to neg thus we have 60 hertz or cycle 115 AC....AC stands for alternating current.. please check any electrical technology book and look for a phase diagram...realize the voltage swings but current stays the same and it is thhe current that does the work of lighting th bulb.....WCH

komokazi (author)2015-08-02

Awesome, but one question: Why are there red leds on your ring in the pictures but none are functioning in the video?

DivideWorks (author)komokazi2015-08-02

The red LEDs were from the https://www.instructables.com/id/Simple-Arduino-POV-/ project. Using the sketch by Glen it is easy to scroll text on the display. I intend to combine both sketches to use the red LEDs to scroll text or the time over the globe, but the delays in both sketches causes issues. I haven't figured out a work around yet.

MrOz (author)2014-12-22

Impressive.

@jedii72 - hope you're thinking what I'm thinking......

Many Bothans died.......

About This Instructable

48,150views

353favorites

License:

More by DivideWorks:VR Car Zombie ApocalypseGear360 VR Home VideoVirtual Exercise Bike Race
Add instructable to: