Instructables
Picture of Arduino + LEDs + fan = POV
 

I saw these POV(Persistence of Vision)  devices on other Instructables and thought I would like to make one and I have always wanted my own "APPLAUSE" sign.  Next improvement will be to make it go on whenever I enter the room.  :)  Maybe have it say, "And here's Charlie !" But that is for another time.

So I got a fan at a garage sale, did some reading , found some code and below is a video of my machine in action.

I started with nice code from an Instructable by Scott Mitchell - "Arduino Bike POV" but what I ended up with is his code greatly parred down.  I could not get it to work at first and so I keep changing the code .  Turned out my problem had nothing to do with the code. So I am going to go back to his code and try again as his is much more generic and would work more easily with different phrases.   But that is for later also.

The video below shows the POV in action. It does not seem as broken or disconnected in real life as it does on the video.




 
Remove these adsRemove these ads by Signing Up

Step 1: Get stuff

Picture of Get stuff

Items used in this project:
small fan - garage sale - 2.00
misc lumber - my basement - 0.00
a length of plastic  15 by 2.5 inches  - my basement - 0.00
an Arduino - I use a Ardweeny from SolarBotics - about 10.00
7 red LEDs -  already had -  1.00
7 - 330 ohm resistors - 3.00
Halls Sensor - I got from Adafruit - US5881LUA - 2.00
1 10k resistor to be used with the Halls sensor - 1.00
2 magnets from local hobby store - 1.00

also will need : wire, 9v battery , screws, Loctite 5 min epoxy, small PCB from Radio Shack

 

Bmud4 months ago

Really like this project and ive been trying to make one of own. I bought a 3144 Hall Sensor, i was able to run a different program that works with this sensor but when i run your program the hall sensor doesnt seem to want to work.

int val = 0; // This holds the read value.
void setup()
{
pinMode(12, INPUT); // Read the input on pin 2
pinMode(2, OUTPUT); // I used pin 13 since it has an LED on the UNO built-in.
Serial.begin(9600); // I also wanted to confirm the value I read.
}

void loop()
{

val = digitalRead( 12 ); // Go read the pin.
Serial.println(val); // just to see on the serial monitor what I read.

if ( val == HIGH )
digitalWrite ( 2, HIGH ); // Turn on the LED when the value is high.
else
digitalWrite ( 2, LOW ); // Turn off the LED when the value is low.

}

This is the program that works with my hall sensor. Ive tried modifying your program to get it to work but with no luck. Any clue what i can do to get your code to work?

Thank you!

dishak7 months ago

i have had tried the same but i did using plywood at the center
& then using pcb bilaterally with one side of pcb with uc &
other with leds & the battery & balanced the weight properly.
But as it started the fan started wobbling & making loud sound. how
do i overcome this didn't u face this?

well done project.

duboisvb (author)  dishak7 months ago

to some extent, I did have wobbly fan but after moving the battery around several times, I did find a place where it was pretty well balanced.

arnab3211 year ago
As you stated, the sensor is of a latch type, so does it mean the south pole is putting pin 3 to 0, and the north pole is used to restore its output?

i am planning to make one, in which the text would cover all of the circle. Is is possible by removing one magnet, or do i need a different hall sensor?
duboisvb (author)  arnab3211 year ago
in this project i used 2 magnets as I wanted the text to be in the upper half of the circle only so one magnet was the starting point and the next was the ending point.

i have used a reed switch when i want to use the whole circle. the reed switch is just a momentary switch which is closed by the magnet when it comes around. so the message will always start at the same spot. by adding blankspaces before and after the message , you can get it centered.

hope that helps

dudbarn2 years ago
I am trying to find a fan that will have some fairly strong wind generated when hooked to Arduino Uno. I bought a computer cooling fan, but it did not produce much wind. Need more powerful fan. Anyone have suggestions? The fan should be able to blow a sheet of paper off a table (for example). Thanks!
duboisvb (author)  dudbarn2 years ago
I have a project where I use an arduino and a motor controller shield along with a DC motor that has a propeller attached. the DC motor was gotten at a local hobby shop and it was originally meant to fly RC airplanes. It is pretty powerful and it blows a lot of wind. Perhaps that would work for you.
dudbarn2 years ago
I am trying to find help with the following error I receive when I attempt to load the program onto my Uno...

byte b = font[ch][i];    "font" nt declared in this scope

fanfk2.cpp: In function
'void printLetter(char)': fanfk2:103: error: 'font' was not declared in this scope
fanfk2.cpp: At global scope: font:32: error: redefinition of 'const unsigned char font [95][5]'


I appreciate any help to this "noobie" 
duboisvb (author)  dudbarn2 years ago
what I suspect may be wrong is the following:
Your arduino sketch should consists of 2 pieces each in its own tab

1. the arduino code from this instructable but only from the begining of the code to the the line "delayMicroseconds(51000);"

2. then thewre is a drop down menu which you access by clicking the little arrow on the upper right of the shetch (just under the serial monitor icon) . select "new tab" and name it font.h. then copy and paste the remainder of the code into that tab.

hard to explain but I hope that helps

What would you code to hve the fan display other words?
e.g. it would say "applause" for 5 seconnds, then display "winner" 5 seconds and so on...

Thanks!
duboisvb (author)  dudbarn2 years ago
I did a POV which had 4 different phrases. Perhaps you can modify the code to your needs
http://www.instructables.com/id/Simple-POV-wArdweeny-Persistence-of-Vision/
I have the program loaded and working, however, it seems the letters are too narrow. How does the width=5 command work? Is that the determining factor for the letter width?

Also, you said you didn't use a sensor. I don't have one either, but perhaps my fan runs at a different speed and my letters spin around in a circle. Where in the code can I make adjustments to play around with this?

Thanks,...again

Gary
duboisvb (author)  dudbarn2 years ago
hello,

the width = 5 refers to the font.h file.
when you look at the font.h file you see that each letter is a matrix of 5 unigue pieces. each piece will light the 7 leds in a pattern that when done quickly and in the proper sequence will produce the letter required.

worddelay will define the blank space between each word so you can play with that to get more or fewer words in the circle


delayMicroseconds(500); this effects the time between 2 columns of leds

delayMicroseconds(2800); this effects the time between 2 different letters

You will need to adjust the above 2 based on the rpms of your fan. just trial and error

hope that helps
Thanks for the help. I have played with the numbers and just can't seem to get it right. Still moving too fast and the letters are not really clear.
I was curious if adjusting the variable here

var = 0;
while(var < 95){
// do something repetitive 120 times

would make a difference.

Gary
duboisvb (author)  dudbarn2 years ago
the var adjusts how long an individula phrase will be shown before going to the next phrase. I do not think that variable will have much effect on the spacing of the letters and words.

I am surprised the other 2 lines did not make drastic differences. Do not be afraid to change the 500 to say 2000 and the 2800 to say 10000. Try very big numbers to get something to happen and then scale it back if needed
Thanks! I'll give it a try. I appreciate your willingness to share!
I had already done that because I read all the previous comments. My problem was I had 2 tabs, font and font.h that were interfering. I got it working!

Thanks for the quick response and help. I love it!!!

Gary
dchurch242 years ago
Hi, does the hall effect sensor have to be at the other end (opposite the LEDs)? I have designed a PCB with the hall sensor just in front of the 1st LED. Would I need to change the code (the delay part) for this to work?
duboisvb (author)  dchurch242 years ago
I have not worked with the hall sensor much but what I found was that it acts like a switch and so i have one sensor 180 degrees from the other because I just wanted the word to appear at the top of the circle. With just one sensor it would turn on the first time around and then off the second time around , etc. You could produce images all the way around the circle. You would have to play with the delay time to get good spacing . hope that helps.
Excellent, thank you for the reply. I have ordered 10 sensors (I couldn't find anywhere that only sold singles, but I have no complaints ;-) ).

I've just made a small home-printed PCB (following instructions from here and elsewhere) with 7 LEDs on and the holes ready for the hall sensors.

I'll keep you posted on my progress. Keep up the good work. Thanks for an easy to understand Instructable (it's actually the first that I've tried to put into practice).
Hi, well, I'm still waiting for my hall effect sensors from China - so I went ahead and made it anyway. I changed the code and guessed at the rotation speed instead of using the sensors (I will change it back when they arrive). However, it only bloody works! The text spins sightly, especially as the motor battery discharges, but there is text spinning and is readable!

My kids love it! So, thanks once again for making an easy to understand 'able.
duboisvb (author)  dchurch242 years ago
thanks. I am glad it is working for you.
Are both of your sensors plugged into the same Arduino pin? Reading through the code it seems like that might be the case.
duboisvb (author)  dchurch242 years ago
There is only one Halls sensor. It is attached to the part that spins. As it reaches the first magnet, it will be turned on and the software will detect that and then start the LED's . When it reaches the second it is turned off ( the lower half of the cycle)
Thank you. That makes much more sense now. For some reason I thought you were using two sensors!
bears03 years ago
what about hacking one of those little handheld fans that are pre-made POV's. i wanna learn how they make those.
Blackice5043 years ago
hi mate i copyed the code into my arduino software and it comes up with this error

sketch_aug16a.cpp:28:19: error: font.h: No such file or directory
sketch_aug16a.cpp: In function 'void printLetter(char)':
sketch_aug16a:103: error: 'font' was not declared in this scope
sketch_aug16a.cpp: At global scope:
sketch_aug16a:129: error: expected unqualified-id before '--' token

i am very new to programing with microcontrollers so i not sure how to fix this any ideas?
duboisvb (author)  Blackice5043 years ago
Hello,
I think this may be the problem:
I did not spell it out in the instructable and that is my fault but ....

In the instructable the code is actually 2 files. I get the same error if I copy and paste the whole code listing into an Arduino sketch but if you do the following it does verify:
copy and paste from the top of the file to the point where font.h is started ie the last 2 lines of the copy will be :
delayMicroseconds(2500);

}

Then in the arduino sketch you need to click on the arrow that is in the box on the right near the top and select "new tab" , name this font.h , copy and paste the font.h code from the Instructable into this sketch.

I just tried this again and it worked but after doing the copying and pasteing, I did need to go back and delete a couple of lines that were not commented out properly eg
------------------------------------- this line
and

*/ this line


So in summary:
you need the font.h to be a seperate file (or tab)


Hope that helps
i shall try this.
thank you for pointing this out.
Blackice5043 years ago
oh yeah i was thinking of using a PC fan and the sensor wire i think i can find the code for that from the examples from the arduino website but i think that should work.
nmvb3 years ago
What is a Halls Sensor?
duboisvb (author)  nmvb3 years ago
It is a electronic component that senses the presence of a magnet field. There are different types but the one I used changes states when near the north pole of a magnet and then changes back when near the south pole. This change of state can be "read" by the arduino and used as a signal to do something.

The following URL is to the Adafruit item that was used and a more detailed explanation can be found there.

http://www.adafruit.com/products/158
nmvb duboisvb3 years ago
oh, thanks :D
godofal nmvb3 years ago
a hall effect sensor if a chip that detect magnetic forces and electric current :)
here its used to know when a certain point is reached on the circle, so the arduino knows when to start blinking the LED's